/* Design tokens: the source of truth for the Michigan AI Dev site and portal frame. Author: Michigan AI Dev Team. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-var.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  /* colour roles (brand navy #363F53 is the ink and the band; SA_63 darks are retired, section 2) */
  --color-canvas: #F3F4F7;          /* harbor mist: page background */
  --color-surface: #FFFFFF;         /* job sheet, contact sheet, sign-in card, list rows */
  --color-tint: #E3E7EE;            /* quiet tint panels, filter field background */
  --color-note: #FBF4EA;            /* status lines (contact placeholder), concept-preview strip */
  --color-ink: #363F53;             /* brand navy: text, outlines, rules */
  --color-ink-muted: #5A6478;       /* secondary text */
  --color-line: #717A8E;            /* meaningful borders, input borders */
  --color-navy: #363F53;            /* brand navy as a band: process band, footer, portal bar */
  --color-on-navy: #FFFFFF;         /* text and white knockout artwork on navy */
  --color-on-navy-muted: #C9D0DD;   /* secondary text on navy */
  --color-navy-rule: #5A6478;       /* decorative step dividers on navy; the numerals and <ol> carry the order */
  --color-action: #B4380B;          /* buoy orange: the one action colour, primary control only, never on navy */
  --color-action-hover: #8F2C08;
  --color-on-action: #FFFFFF;
  --color-link: #1A5E7E;            /* in-text links, always underlined */
  --color-focus: #363F53;           /* focus ring on light surfaces */
  --color-focus-on-navy: #FFFFFF;   /* focus ring on navy */
  --color-mark-ai: #DCE6F3;         /* "AI drafts" marker fill on the job sheet (text carries the meaning) */
  --color-error: #9B2C2C;           /* sign-in and save errors: text and box border */
  --color-error-bg: #FBECEC;
  --color-ok: #1F6B45;              /* saved confirmation (portal only) */
  --color-ok-bg: #E8F3EC;
  --color-sketch: #C7CDD9;          /* decorative ruling behind the hero; no text, no meaning */
  --color-sketch-on-navy: #4D566B;  /* decorative ruling on navy; no text, no meaning */

  /* type (unchanged from SA_63 0.1.2) */
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --step--1: clamp(0.875rem, 0.85rem + 0.11vw, 0.9375rem);
  --step-0: clamp(1.0625rem, 1.02rem + 0.21vw, 1.1875rem);
  --step-1: clamp(1.25rem, 1.16rem + 0.45vw, 1.5rem);
  --step-2: clamp(1.5rem, 1.32rem + 0.89vw, 2rem);
  --step-3: clamp(1.875rem, 1.47rem + 2.01vw, 3rem);
  --step-4: clamp(2.375rem, 1.52rem + 4.24vw, 4.75rem);
  --weight-display: 760;
  --weight-heading: 700;
  --weight-body: 400;
  --weight-strong: 700;
  --leading-display: 1.02;
  --leading-heading: 1.12;
  --leading-body: 1.6;
  --tracking-display: 0.02em;     /* never negative; letters never touch */
  --tracking-heading: 0.04em;     /* H2 and H3 */
  --tracking-label: 0.02em;
  --measure: 62ch;

  /* space (4 px base; unchanged from SA_63) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --section-pad: clamp(4rem, 2.6rem + 7vw, 8rem);
  --content-max: 76rem;
  --tap-min: 2.75rem;

  /* shape */
  --radius-sheet: 0.25rem;
  --radius-control: 999px;
  --radius-field: 0.25rem;
  --border-thin: 1px;
  --border-strong: 2px;
  --rule-sheet: 4px;                /* the job sheet's left rule */
  --shadow-sheet: 0 1px 0 rgb(54 63 83 / 0.08), 0 12px 24px -12px rgb(54 63 83 / 0.30);
  --focus-width: 3px;
  --focus-offset: 3px;

  /* brand clear space (section 4): multiply by the rendered box height */
  --brand-clear-stacked: 0.14;
  --brand-clear-banner: 0.26;

  /* motion */
  --motion-settle: 320ms;
  --motion-settle-delay: 200ms;
  --motion-hover: 140ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}
@media (prefers-reduced-motion: reduce) {
  :root { --motion-settle: 0ms; --motion-settle-delay: 0ms; --motion-hover: 0ms; }
}

/* Type by screen. The only place sizes change by screen. Rem sizes, so browser zoom and the visitor's own text size always work. */
:root { --step-lead: var(--step-0); }
@media (min-width: 600px) and (max-width: 1023px) { /* tablets */
  :root { --step--1: 1rem; --step-0: 1.125rem; --step-lead: 1.25rem; --step-1: clamp(1.375rem, 1.16rem + 0.45vw, 1.5rem); --step-4: clamp(2.375rem, 1.56rem + 4.24vw, 4.75rem); }
}
@media (max-width: 599px), (min-width: 900px) and (max-width: 1100px) and (max-aspect-ratio: 3/5) and (pointer:coarse) { /* phones */
  :root { --step--1: 1rem; --step-0: 1.1875rem; --step-lead: 1.25rem; --step-1: 1.4375rem; --step-2: 1.625rem; --step-3: 2rem; --step-4: clamp(2.375rem, 1.52rem + 4.24vw, 4.75rem); }
}
@media (min-width: 900px) and (max-width: 1100px) and (max-aspect-ratio: 3/5) and (pointer:coarse) { html { font-size: 200%; } } /* a phone in "Desktop site" mode shrinks the page to under half size */
@media (min-width: 1920px) { :root { --step-4: clamp(4.75rem, 3.1rem + 1.4vw, 5.7rem); } }
@media (min-width: 2100px) { html { font-size: clamp(100%, 100% + (100vw - 2100px) * 0.0048, 103%); } } /* eased in over 100 px; 103% from 2200 as before */
@media (min-width: 2460px) { html { font-size: clamp(103%, 103% + (100vw - 2460px) * 0.0048, 106%); } } /* 106% from 2560 as before */
@media (min-width: 3200px) { html { font-size: 110%; } }

/* Ultrawide: header and hero type only, blended in from 2800 px so nothing jumps. Each size is the normal rem size plus a small step
   that grows more slowly than the window, so every browser zoom step still makes the words bigger. Nothing here applies at 2799 px or less. */
@media (min-width: 2800px) {
  html { font-size: min(110%, 106% + (100vw - 2800px) * 0.0016); } /* the old jump from 106% to 110% at 3200, spread out */
}
@media (min-width: 2800px) and (min-height: 960px) {
  :root { --uw: calc(100vw - 2800px);
    --step-nav: calc(var(--step--1) + min(var(--uw) * 0.005, 6px));
    --step-note: calc(var(--step--1) + min(var(--uw) * 0.004, 3px));
    --step-hero: calc(var(--step-lead) + min(var(--uw) * 0.0048, 4px));
    --step-hero-title: calc(var(--step-4) + min(var(--uw) * 0.016, 24px)); }
}
