/* ==========================================================================
   Half Motion - Design Tokens
   --------------------------------------------------------------------------
   Palette is three values only: yellow #F0FF59, ink #121212, white #FFFFFF.
   Yellow is legible as TEXT only on dark ground. On light ground it is used
   as a FILL behind ink text (chips, buttons, markers), never as text colour,
   so light sections resolve --hm-accent to ink instead.
   Never hardcode: use var(--hm-accent) / var(--hm-accent-ink) / var(--hm-mark).
   ========================================================================== */
/* Type. PP Neue Montreal is the brand face and leads every stack. It is a
   licensed font and its file is deliberately NOT in this repo, so until the
   licence is bought and pp-neue-montreal-500.woff2 is dropped into
   assets/fonts, the face behind it renders: Geist, an open licence neo
   grotesque chosen because it sits in the same territory, not Arial, which was
   reading as a system default. Body paragraphs are Arial on purpose.
   To switch the brand face on, add:
   @font-face{font-family:"PP Neue Montreal";
     src:url("../fonts/pp-neue-montreal-500.woff2") format("woff2");
     font-weight:400 500;font-display:swap;}
   and preload it in Base.astro. Never copy a font file out of another site's
   CDN, and never point an @font-face at a file that is not here: it 404s on
   every page. */
@font-face{font-family:"Geist";src:url("../fonts/geist-400.woff2") format("woff2");font-weight:400;font-display:swap;}
@font-face{font-family:"Geist";src:url("../fonts/geist-500.woff2") format("woff2");font-weight:500;font-display:swap;}

:root{
  /* The whole palette */
  --hm-yellow:#F0FF59;
  --hm-yellow-dim:#d8e64a;
  --hm-ink:#121212;
  --hm-white:#FFFFFF;

  /* Yellow as a fill works on any ground; ink always sits on top of it. */
  --hm-mark:var(--hm-yellow);
  --hm-mark-ink:var(--hm-ink);

  /* Contextual accent, dark ground default */
  --hm-accent:var(--hm-yellow);
  --hm-accent-ink:var(--hm-ink);
  --hm-accent-soft:rgba(240,255,89,.12);
  --hm-accent-line:rgba(240,255,89,.30);

  /* The brand face carries everything: titles, subtitles, navigation, buttons,
     labels. Several spellings so it resolves whichever way it is installed. */
  --font-display:"PP Neue Montreal","PPNeueMontreal",Ppneuemontreal,"Geist",Arial,sans-serif;
  /* The reference site pairs it with Suisse Intl Mono on small labels and
     buttons. That is licensed too, so this falls back to a system mono until
     the file is added. Applied to the micro-label tier only. */
  --font-mono:"Suisse Intl Mono",ui-monospace,"SF Mono",Menlo,Consolas,monospace;
  /* Running paragraphs only. Arial here is deliberate: it keeps long copy
     plain and lets the brand face carry the voice everywhere else. */
  --font-body:Arial,Helvetica,sans-serif;
  --font-weight-body:400;

  /* Display tracking. The brief is -3px, which is right on the display and h1
     tier and would collide glyphs on a 25px h3, so it is expressed in em and
     clamped: it reaches exactly -3px at the largest heading size and eases off
     to -0.6px on the smallest. Body text is never tracked negatively. */
  --track-title:clamp(-3px,-0.055em,-0.6px);
  --track-tight:-0.6px;

  --fs-display:clamp(2.5rem,1.4rem + 5.2vw,5.5rem);
  --fs-h1:clamp(2.1rem,1.4rem + 3.2vw,3.75rem);
  --fs-h2:clamp(1.7rem,1.2rem + 2.2vw,2.75rem);
  --fs-h3:clamp(1.25rem,1.05rem + 0.9vw,1.6rem);
  --fs-lead:clamp(1.05rem,1rem + 0.4vw,1.25rem);
  --fs-body:1rem; --fs-small:0.875rem; --fs-label:0.78rem;

  --sp-1:0.5rem; --sp-2:1rem; --sp-3:1.5rem; --sp-4:2rem;
  --sp-5:3rem; --sp-6:4.5rem; --sp-7:6.5rem; --sp-8:9rem;
  --container:1240px;
  --gutter:clamp(1.15rem,0.6rem + 2.2vw,2.5rem);
  /* One block padding for every section, so the space above a section equals
     the space below it and the rhythm is the same on every page. */
  --sec-pad:clamp(3.25rem,2rem + 4.6vw,6rem);
  /* What the fixed bar occupies, measured: 87px wide down to 52px on a phone.
     A masthead adds this to its top padding so the space you actually see
     under the bar matches the space under the masthead. */
  --header-space:clamp(3.25rem,2.44rem + 3.33vw,5.5rem);

  /* Crisp, near-square corners. Soft oversized radii read as templated, so
     only the pill (used by buttons alone) keeps a curve. */
  --radius:3px; --radius-lg:4px; --radius-xl:6px; --radius-pill:999px;
  --bento-gap:clamp(.75rem,.4rem + 1vw,1.15rem);
  /* One ratio for every side-by-side media block, so image size is
     identical everywhere and never shifts with the copy beside it. */
  --media-ratio:16/10;

  --ease:cubic-bezier(.22,1,.36,1);
  --ease-soft:cubic-bezier(.4,0,.2,1);
  --dur:.7s; --dur-fast:.34s; --dur-hover:.42s;

  /* Asset placeholders. Tuned per section so they never read as a white slab. */
  --ph-bg:#232323; --ph-text:#7c7c7c; --ph-line:#2f2f2f;

  --bg:var(--hm-ink); --surface:#181818; --surface-2:#1f1f1f;
  --text:var(--hm-white); --muted:#a6a6a6; --line:#282828;
}

.sec-dark{
  --bg:var(--hm-ink); --surface:#181818; --surface-2:#1f1f1f;
  --text:var(--hm-white); --muted:#a6a6a6; --line:#282828;
  --ph-bg:#232323; --ph-text:#7c7c7c; --ph-line:#2f2f2f;
  --hm-accent:var(--hm-yellow); --hm-accent-ink:var(--hm-ink);
  --hm-accent-soft:rgba(240,255,89,.12); --hm-accent-line:rgba(240,255,89,.30);
}
/* Hero and any panel that wants grey rather than pure ink */
.sec-grey{
  --bg:#181818; --surface:#1f1f1f; --surface-2:#262626;
  --text:var(--hm-white); --muted:#a6a6a6; --line:#2c2c2c;
  --ph-bg:#252525; --ph-text:#7c7c7c; --ph-line:#333;
  --hm-accent:var(--hm-yellow); --hm-accent-ink:var(--hm-ink);
  --hm-accent-soft:rgba(240,255,89,.12); --hm-accent-line:rgba(240,255,89,.30);
}
.sec-light{
  --bg:var(--hm-white); --surface:#f6f6f4; --surface-2:#eeeeea;
  --text:var(--hm-ink); --muted:#575757; --line:#e5e5e0;
  --ph-bg:#ececea; --ph-text:#8f8f8f; --ph-line:#dededa;
  /* Yellow text fails on white, so the accent here is ink. */
  --hm-accent:var(--hm-ink); --hm-accent-ink:var(--hm-white);
  --hm-accent-soft:rgba(18,18,18,.055); --hm-accent-line:rgba(18,18,18,.16);
}
/* Light grey. Same rules as .sec-light, one step down in value, so two light
   sections can sit next to each other and still read as separate fields. */
.sec-mist{
  --bg:#f4f4f1; --surface:#ffffff; --surface-2:#ecece7;
  --text:var(--hm-ink); --muted:#575757; --line:#e2e2dc;
  --ph-bg:#e7e7e2; --ph-text:#8f8f8f; --ph-line:#dcdcd6;
  --hm-accent:var(--hm-ink); --hm-accent-ink:var(--hm-white);
  --hm-accent-soft:rgba(18,18,18,.055); --hm-accent-line:rgba(18,18,18,.16);
}
.sec-lime{
  --bg:var(--hm-yellow); --surface:#e6f54f; --surface-2:#f5ff7d;
  --text:var(--hm-ink); --muted:#4a4f22; --line:#dcec4d;
  --ph-bg:#e2f14b; --ph-text:#5c6330; --ph-line:#d5e544;
  --hm-accent:var(--hm-ink); --hm-accent-ink:var(--hm-yellow);
  --hm-accent-soft:rgba(18,18,18,.07); --hm-accent-line:rgba(18,18,18,.2);
}

@media (prefers-reduced-motion:reduce){
  :root{ --dur:.001s; --dur-fast:.001s; --dur-hover:.001s; }
  html{scroll-behavior:auto;}
}
