/* Local font definitions for MAUI app - no network requests needed */

/* Roboto Font Family */
@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("Roboto/font-light.ttf") format("truetype");
}

@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Roboto/font.ttf") format("truetype");
}

@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("Roboto/font-medium.ttf") format("truetype");
}

@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("Roboto/font-bold.ttf") format("truetype");
}

/* Inter Font Family */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Inter/font.ttf") format("truetype");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("Inter/font-medium.ttf") format("truetype");
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("Inter/font-semiBold.ttf") format("truetype");
}

/* Material Icons */
@font-face {
    font-family: "Material Icons";
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url("MaterialIcons/font.ttf") format("truetype");
}

/* Material Icons styling (required for icon rendering) */
.material-icons {
    font-family: "Material Icons";
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: "liga";
    font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
}

/* Mono Fonts */

@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("JetBrainsMono/font.ttf") format("truetype");
}

/* Akshar Font (Variable) */
@font-face {
    font-family: "Akshar";
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url("Akshar/font.ttf") format("truetype");
}

/* Chewy Font */
@font-face {
    font-family: "Chewy";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Chewy/font.ttf") format("truetype");
}

/* Kalam Font Family */
@font-face {
    font-family: "Kalam";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Kalam/font.ttf") format("truetype");
}

@font-face {
    font-family: "Kalam";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("Kalam/font-bold.ttf") format("truetype");
}

/* Share Tech Mono Font */
@font-face {
    font-family: "Share Tech Mono";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("ShareTechMono/font.ttf") format("truetype");
}

/* Slackey Font */
@font-face {
    font-family: "Slackey";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Slackey/font.ttf") format("truetype");
}

/* Dokdo Font */
@font-face {
    font-family: "Dokdo";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Dokdo/font.ttf") format("truetype");
}

/* SpecialElite Font */
@font-face {
    font-family: "SpecialElite";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("SpecialElite/font.ttf") format("truetype");
}

/* NekroOne Font */
@font-face {
    font-family: "NekroOne";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("NekroOne/font.ttf") format("truetype");
}

/* Handwritten Fonts */

@font-face {
    font-family: "Architects Daughter";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("ArchitectsDaughter/font.ttf") format("truetype");
}

@font-face {
    font-family: "Nanum Pen Script";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("NanumPenScript/font.ttf") format("truetype");
}

@font-face {
    font-family: "Long Cang";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("LongCang/font.ttf") format("truetype");
}

@font-face {
    font-family: "Permanent Marker";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("PermanentMarker/font.ttf") format("truetype");
}

@font-face {
    font-family: "Shadows Into Light";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("ShadowsIntoLight/font.ttf") format("truetype");
}

/* Display — Anton (available; landing hero currently uses Freeman via --font-s11) */
@font-face {
    font-family: "Anton";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Anton/Anton-400.ttf") format("truetype");
}

/* Display / LED — Doto (LIVE SCOREBOARD + pixel ticker) */
@font-face {
    font-family: "Doto";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("Doto/Doto-Medium.ttf") format("truetype");
}

/* Display — Neutronic Rounded (Adobe license; NeoARV wordmark)
   Local copy of Typekit kit irj5qlx — prefer self-host for MAUI/offline. */
@font-face {
    font-family: "neutronic-rounded";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src:
        url("NeutronicRounded/neutronic-rounded-400.woff2") format("woff2"),
        url("NeutronicRounded/neutronic-rounded-400.woff") format("woff");
}

@font-face {
    font-family: "neutronic-rounded";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src:
        url("NeutronicRounded/neutronic-rounded-700.woff2") format("woff2"),
        url("NeutronicRounded/neutronic-rounded-700.woff") format("woff");
}

@font-face {
    font-family: "neutronic-rounded-black";
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src:
        url("NeutronicRounded/neutronic-rounded-900.woff2") format("woff2"),
        url("NeutronicRounded/neutronic-rounded-900.woff") format("woff");
}

/* Terminal Fonts — Sixtyfour (variable: BLED, SCAN) */

@font-face {
    font-family: "Sixtyfour";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Sixtyfour/font.ttf") format("truetype");
}

@font-face {
    font-family: "Sixtyfour Delicate";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Sixtyfour/font.ttf") format("truetype");
}

@font-face {
    font-family: "Sixtyfour Slight";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Sixtyfour/font.ttf") format("truetype");
}

@font-face {
    font-family: "Sixtyfour Touching";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Sixtyfour/font.ttf") format("truetype");
}

@font-face {
    font-family: "Sixtyfour Overlapping";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Sixtyfour/font.ttf") format("truetype");
}

@font-face {
    font-family: "Sixtyfour Overexposed";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Sixtyfour/font.ttf") format("truetype");
}

/* Terminal Fonts — Workbench (variable: BLED, SCAN) */

@font-face {
    font-family: "Workbench";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Workbench/font.ttf") format("truetype");
}

@font-face {
    font-family: "Workbench Delicate";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Workbench/font.ttf") format("truetype");
}

@font-face {
    font-family: "Workbench Slight";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Workbench/font.ttf") format("truetype");
}

@font-face {
    font-family: "Workbench Evenly";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Workbench/font.ttf") format("truetype");
}

@font-face {
    font-family: "Workbench Close";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Workbench/font.ttf") format("truetype");
}

@font-face {
    font-family: "Workbench Touching";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Workbench/font.ttf") format("truetype");
}

@font-face {
    font-family: "Workbench Overlapping";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Workbench/font.ttf") format("truetype");
}

@font-face {
    font-family: "Workbench Overexposed";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Workbench/font.ttf") format("truetype");
}

@font-face {
    font-family: "Workbench Maximum";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Workbench/font.ttf") format("truetype");
}


/* Additional Sans Fonts (Variable + Static) */

/* Alan Sans (Variable wght 300–900: Light → Black) */
@font-face {
    font-family: "Alan Sans";
    font-style: normal;
    font-weight: 300 900;
    font-display: swap;
    src: url("Alan_Sans/AlanSans-VariableFont_wght.ttf") format("truetype-variations");
}

/* Alatsi (Static) */
@font-face {
    font-family: "Alatsi";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Alatsi/Alatsi-Regular.ttf") format("truetype");
}

/* Freeman (Static) */
@font-face {
    font-family: "Freeman";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Freeman/Freeman-Regular.ttf") format("truetype");
}

/* Fresca (Static) */
@font-face {
    font-family: "Fresca";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Fresca/Fresca-Regular.ttf") format("truetype");
}

/* Glory (Variable wght 100–800: Thin → ExtraBold; no Black) — Roman + Italic */
@font-face {
    font-family: "Glory";
    font-style: normal;
    font-weight: 100 800;
    font-display: swap;
    src: url("Glory/Glory-VariableFont_wght.ttf") format("truetype-variations");
}
@font-face {
    font-family: "Glory";
    font-style: italic;
    font-weight: 100 800;
    font-display: swap;
    src: url("Glory/Glory-Italic-VariableFont_wght.ttf") format("truetype-variations");
}

/* Noto Sans Display (Variable wdth 62.5%–100% + wght 100–900: Thin → Black, ExtraCondensed → Normal) — Roman + Italic */
@font-face {
    font-family: "Noto Sans Display";
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 62.5% 100%;
    font-display: swap;
    src: url("Noto_Sans_Display/NotoSansDisplay-VariableFont_wdth,wght.ttf") format("truetype-variations");
}
@font-face {
    font-family: "Noto Sans Display";
    font-style: italic;
    font-weight: 100 900;
    font-stretch: 62.5% 100%;
    font-display: swap;
    src: url("Noto_Sans_Display/NotoSansDisplay-Italic-VariableFont_wdth,wght.ttf") format("truetype-variations");
}

/* Ropa Sans (Static — Roman + Italic) */
@font-face {
    font-family: "Ropa Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Ropa_Sans/RopaSans-Regular.ttf") format("truetype");
}
@font-face {
    font-family: "Ropa Sans";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("Ropa_Sans/RopaSans-Italic.ttf") format("truetype");
}

/* Signika (Variable wght 300–700: Light → Bold + GRAD axis -25 to +150) */
/* GRAD adjusts visual weight WITHOUT changing horizontal metrics; access via:
   font-variation-settings: "GRAD" 50;  (no layout shift, unlike font-weight) */
@font-face {
    font-family: "Signika";
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url("Signika/Signika-VariableFont_GRAD,wght.ttf") format("truetype-variations");
}

/* Signika Negative (Variable wght 300–700: Light → Bold) */
@font-face {
    font-family: "Signika Negative";
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url("Signika_Negative/SignikaNegative-VariableFont_wght.ttf") format("truetype-variations");
}

/* Strait (Static) */
@font-face {
    font-family: "Strait";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("Strait/Strait-Regular.ttf") format("truetype");
}

/* Winky Sans (Variable wght 300–900: Light → Black) — Roman + Italic */
@font-face {
    font-family: "Winky Sans";
    font-style: normal;
    font-weight: 300 900;
    font-display: swap;
    src: url("Winky_Sans/WinkySans-VariableFont_wght.ttf") format("truetype-variations");
}
@font-face {
    font-family: "Winky Sans";
    font-style: italic;
    font-weight: 300 900;
    font-display: swap;
    src: url("Winky_Sans/WinkySans-Italic-VariableFont_wght.ttf") format("truetype-variations");
}


/* Define font metrics to prevent layout shift */
@font-face {
    font-family: "Roboto-fallback";
    size-adjust: 100.06%;
    ascent-override: 92.67%;
    descent-override: 24.33%;
    line-gap-override: 0%;
    src: local("Arial"), local("Helvetica");
}

@font-face {
    font-family: "Inter-fallback";
    size-adjust: 107.64%;
    ascent-override: 90.2%;
    descent-override: 22.48%;
    line-gap-override: 0%;
    src: local("Arial"), local("Helvetica");
}

:root {
    --font-primary: var(--font-s18), -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --font-secondary: var(--font-s2), -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --font-mono: var(--font-m1), "Consolas", "Courier New", monospace;
    --font-inter: "Inter", "Inter-fallback";
    --font-roboto: "Roboto", "Roboto-fallback";
    --font-chewy: "Chewy", cursive;
    --font-kalam: "Kalam", cursive;
    --font-slackey: "Slackey", cursive;
    --font-dokdo: "Dokdo";
    --font-specialelite: "SpecialElite";
    --font-nekroone: "NekroOne";
    --font-m1: "JetBrains Mono";
    --font-m2: "Share Tech Mono";
    --font-s1: "Inter", "Inter-fallback";
    --font-s2: "Roboto", "Roboto-fallback";
    --font-s3: var(--font-chewy);
    --font-s4: var(--font-kalam);
    --font-s5: var(--font-slackey);
    --font-s6: var(--font-dokdo);
    --font-s7: var(--font-specialelite);
    --font-s8: var(--font-nekroone);

    /* Additional sans fonts */
    --font-alansans: "Alan Sans", sans-serif;
    --font-alatsi: "Alatsi", sans-serif;
    --font-freeman: "Freeman", sans-serif;
    --font-fresca: "Fresca", sans-serif;
    --font-glory: "Glory", sans-serif;
    --font-notosansdisplay: "Noto Sans Display", sans-serif;
    --font-ropasans: "Ropa Sans", sans-serif;
    --font-signika: "Signika", sans-serif;
    --font-signikanegative: "Signika Negative", sans-serif;
    --font-strait: "Strait", sans-serif;
    --font-winkysans: "Winky Sans", sans-serif;
    --font-s9: var(--font-alansans);
    --font-s10: var(--font-alatsi);
    --font-s11: var(--font-freeman);
    --font-s12: var(--font-fresca);
    --font-s13: var(--font-glory);
    --font-s14: var(--font-notosansdisplay);
    --font-s15: var(--font-ropasans);
    --font-s16: var(--font-signika);
    --font-s17: var(--font-signikanegative);
    --font-s18: var(--font-strait);
    --font-s19: var(--font-winkysans);

    /* Handwritten fonts */
    --font-nanumpenscript: "Nanum Pen Script", cursive;
    --font-longcang: "Long Cang", cursive;
    --font-permanentmarker: "Permanent Marker", cursive;
    --font-shadowsintolight: "Shadows Into Light", cursive;
    --font-h1: var(--font-nanumpenscript);
    --font-h2: var(--font-longcang);
    --font-h3: var(--font-permanentmarker);
    --font-h4: var(--font-shadowsintolight);
    --font-architectsdaughter: "Architects Daughter", cursive;
    --font-h5: var(--font-architectsdaughter);

    /* Display */
    --font-anton: "Anton", Impact, sans-serif;
    --font-doto: "Doto", "Sixtyfour", monospace;
    --font-neutronic-rounded: "neutronic-rounded", sans-serif;
    --font-neutronic-rounded-black: "neutronic-rounded-black", sans-serif;

    /* Terminal fonts — Sixtyfour variants (min → max SCAN) */
    --font-sixtyfour: "Sixtyfour", monospace;
    --font-t1: var(--font-sixtyfour);
    --font-t1-1: "Sixtyfour Delicate", monospace;
    --font-t1-2: "Sixtyfour Slight", monospace;
    --font-t1-3: "Sixtyfour Touching", monospace;
    --font-t1-4: "Sixtyfour Overlapping", monospace;
    --font-t1-5: "Sixtyfour Overexposed", monospace;
    --font-t1-6: var(--font-sixtyfour);

    /* Terminal fonts — Workbench variants (min → max SCAN) */
    --font-workbench: "Workbench", monospace;
    --font-t2: var(--font-workbench);
    --font-t2-1: "Workbench Delicate", monospace;
    --font-t2-2: "Workbench Slight", monospace;
    --font-t2-3: "Workbench Evenly", monospace;
    --font-t2-4: "Workbench Close", monospace;
    --font-t2-5: "Workbench Touching", monospace;
    --font-t2-6: "Workbench Overlapping", monospace;
    --font-t2-7: "Workbench Overexposed", monospace;
    --font-t2-8: "Workbench Maximum", monospace;
}

/* Handwritten font utility classes — uppercase by default */
.font-h1 { font-family: var(--font-h1); text-transform: uppercase; }
.font-h2 { font-family: var(--font-h2); text-transform: uppercase; }
.font-h3 { font-family: var(--font-h3); text-transform: uppercase; }
.font-h4 { font-family: var(--font-h4); text-transform: uppercase; }
.font-h5 { font-family: var(--font-h5); text-transform: uppercase; }

@font-face {
    font-family: "EmojiMono";
    src:
        local("Apple Color Emoji"),
        /* macOS/iOS */ local("Segoe UI Emoji"),
        /* Windows */ local("Noto Color Emoji"),
        /* Linux/Android */ local("Android Emoji"),
        /* Older Android */ local("EmojiOne Color"),
        /* Firefox OS */ local("Twemoji Mozilla"); /* Firefox fallback */
    font-display: swap;
    unicode-range:
        U+1F300-1F5FF, U+1F600-1F64F, U+1F680-1F6FF, U+2600-26FF, U+2700-27BF;
}

/* Ensure emoji rendering works properly */
.emoji-support {
    font-variant-emoji: emoji;
    font-family:
        "EmojiMono", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji",
        cursive;
}

/* Apply font stacks globally */
body {
    font-family: var(--font-primary);
}
