/* Mad Funnel Labs: design tokens + fonts.
   Subject vernacular: signal-flow schematics, wiring diagrams, patch panels. */

/* ---------- Fonts (self-hosted, latin + latin-ext) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 600 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/bricolage-grotesque-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 600 800;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/bricolage-grotesque-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/atkinson-hyperlegible-400-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/atkinson-hyperlegible-400-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/atkinson-hyperlegible-700-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/atkinson-hyperlegible-700-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  /* Colour: light (drafting paper) */
  --bg: #EEF1F4;            /* Drafting paper */
  --surface: #FFFFFF;       /* raised panels */
  --text: #14213D;          /* Ink: 14.1:1 on paper */
  --text-muted: #5B6474;    /* Graphite: 5.3:1 on paper, 6.0:1 on white */
  --accent: #4D7CFF;        /* Signal blue: brand fill, diagram strokes (3.3:1 on paper, graphics only) */
  --link: #2F5BE0;          /* Signal blue for text + button fill: 5.0:1 on paper, 5.7:1 with white text */
  --link-hover: #2249B8;
  --btn-bg: #2F5BE0;
  --btn-bg-hover: #2249B8;
  --btn-fg: #FFFFFF;
  --lit: #E4EBFF;           /* lit node tint */
  --lead: #F2A541;          /* Lead amber: ONLY the moving lead and the booked state */
  --lead-ink: #14213D;      /* text/outline on amber: 7.8:1 */
  --edge: #6B768A;          /* wires + unlit node borders: 4.0:1 on paper */
  --line: rgba(20, 33, 61, 0.14);
  --grid: rgba(20, 33, 61, 0.07);
  --focus: #2F5BE0;

  /* Type */
  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step--1: 0.9375rem;                                      /* 15px small */
  --step-0: clamp(1.0625rem, 1.03rem + 0.15vw, 1.125rem);    /* 17 to 18px body */
  --step-1: clamp(1.25rem, 1.18rem + 0.3vw, 1.4rem);         /* lead / h4 */
  --step-2: clamp(1.5rem, 1.33rem + 0.7vw, 1.9rem);          /* h3 */
  --step-3: clamp(1.875rem, 1.5rem + 1.6vw, 2.75rem);        /* h2 */
  --step-4: clamp(2.375rem, 1.7rem + 3vw, 3.75rem);          /* page h1 */
  --step-5: clamp(2.5rem, 1.45rem + 3.3vw, 3.875rem);         /* hero h1 */

  /* Spacing (8px grid) */
  --space-1: 0.25rem;  /* 4  */
  --space-2: 0.5rem;   /* 8  */
  --space-3: 0.75rem;  /* 12 */
  --space-4: 1rem;     /* 16 */
  --space-5: 1.5rem;   /* 24 */
  --space-6: 2rem;     /* 32 */
  --space-7: 3rem;     /* 48 */
  --space-8: 4rem;     /* 64 */
  --space-9: 6rem;     /* 96 */
  --space-10: 8rem;    /* 128 */

  /* Radius: varies by hierarchy */
  --radius-panel: 12px;
  --radius-node: 8px;     /* diagram nodes and buttons */
  --radius-chip: 999px;

  --gutter: clamp(1rem, 3.5vw, 2rem);   /* 16px on phones */
  --container: 72.5rem;                 /* 1160px */
  --header-h: 4.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14213D;          /* Ink becomes the page */
    --surface: #1B2A4A;
    --text: #E6EAF0;        /* 11.8:1 on surface */
    --text-muted: #A9B3C4;  /* 6.7:1 on surface */
    --accent: #7A9CFF;
    --link: #7A9CFF;        /* 5.4:1 on surface */
    --link-hover: #A3BBFF;
    --btn-bg: #7A9CFF;
    --btn-fg: #14213D;      /* 6.1:1 */
    --btn-bg-hover: #A3BBFF;
    --lit: #22356B;
    --edge: #8290AA;        /* 3.7:1 on surface */
    --line: rgba(230, 234, 240, 0.16);
    --grid: rgba(230, 234, 240, 0.06);
    --focus: #A3BBFF;
  }
}
