/* Jan Chi Builders — design tokens
   Palette "Monsoon" (chosen by the owner, 2026-11-03): slate ground, sea-glass accent, off-white text, paper sections in
   pale stone-green. It replaced the cobalt / amber palette. The old token names stay as aliases so every stylesheet
   reads the new values through them: --amber* is the sea-glass accent, --cobalt* the deep sea accent used on paper,
   --ink* the slate ground, --blueprint* the raised slate of the Studio and the project panels. */
:root {
  /* Monsoon */
  --slate: #172026;
  --slate-2: #1f2a31;
  --slate-3: #2b3942;
  --sea: #5cc4bd;        /* accent on slate: 7.9:1 against --slate; text on a sea button is slate (7.9:1) */
  --sea-soft: #94dad5;
  --sea-deep: #2e6f73;   /* the accent on paper: 5.1:1 on #eef2f1, 4.4:1 on #dbe3e1 (large text and rules only there) */
  --sea-deeper: #245a5e;
  --off-white: #eef2f1;

  /* rgb triplets for translucent layers: rgba(var(--ink-rgb), 0.9) */
  --ink-rgb: 23, 32, 38;
  --ink2-rgb: 31, 42, 49;
  --on-rgb: 238, 242, 241;
  --amber-rgb: 92, 196, 189;
  --cobalt-rgb: 46, 111, 115;
  --paper-rgb: 238, 242, 241;
  --soft-rgb: 148, 218, 213;

  /* brand aliases (legacy names; see the note above) */
  --cobalt: var(--sea-deep);
  --cobalt-600: var(--sea-deeper);
  --cobalt-300: var(--sea-soft);
  --amber: var(--sea);
  --amber-soft: var(--sea-soft);
  --amber-deep: var(--sea-deep);   /* a hairline annotation on paper */

  /* neutrals: slate ground and paper */
  --ink: var(--slate);
  --ink-2: var(--slate-2);
  --ink-3: var(--slate-3);
  --paper: #eef2f1;
  --paper-2: #dbe3e1;
  --paper-3: #c8d3d1;
  --concrete: #9aa7a8;
  --steel: #56656b;
  --muted-on-ink: #a9b8b9;   /* 8:1 on slate, 5.8:1 on --slate-3 */

  /* raised slate (Studio, project panels); the names are historical, nothing is drawn as a blueprint */
  --blueprint: var(--slate-2);
  --blueprint-line: #d3e2e0;

  /* semantic (light surface defaults) */
  --bg: var(--paper);
  --fg: var(--slate);
  --muted: #4a5a60;          /* 6.1:1 on paper, 5.2:1 on --paper-2 */
  --line: rgba(var(--ink-rgb), 0.14);
  --line-strong: rgba(var(--ink-rgb), 0.32);
  --accent: var(--sea-deep);
  --accent-contrast: #ffffff;
  --focus: var(--sea);

  /* type: Big Shoulders Display for display and headings, Hanken Grotesk for text and labels (no mono, as in the
     approved mockup; --font-mono keeps its name for the label style). Hanzi fall back to PingFang / YaHei. */
  --font-display: "Big Shoulders Display", "Arial Narrow", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Hanken Grotesk", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: var(--font-display);
  --font-mono: "Hanken Grotesk", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem);
  --fs-xl: clamp(1.9rem, 1.4rem + 2.1vw, 3rem);
  /* the condensed display face sets about a third narrower than the old one, so headings run a step larger */
  --fs-2xl: max(2.1rem, min(11vw, clamp(2.6rem, 1.4rem + 3.8vw, 4.6rem)));
  --fs-hero: clamp(3.4rem, 1.4rem + 8vw, 9.5rem);
  /* labels (eyebrows, footer heads); hanzi need a size up to stay legible */
  --fs-label: 0.75rem;
  --fs-label-zh: 0.8125rem;
  --fs-support: 0.9375rem;

  /* layout */
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1360px;
  --section-y: clamp(80px, 9vw, 160px);
  --radius: 2px;
  --radius-lg: 6px;
  --header-h: 72px;
  /* one paper for every raised sheet (the director's card, the brief) and one elevation */
  --sheet: #f7faf9;
  --shadow-sheet: 0 18px 40px -24px rgba(var(--ink-rgb), 0.35);

  /* motion: controls answer at once; content may ease in, never blocking input (css/story.css, js/motion.js) */
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-exit: cubic-bezier(0.4, 0, 1, 1);
  --t-press: 100ms;
  --t-fast: 160ms;
  --t-med: 240ms;
  --t-slow: 320ms;

  /* layers */
  --z-ruler: 40;
  --z-header: 50;
  --z-dialog: 80;
}

/* landscape phones: a slimmer header leaves more of the short screen to the page */
@media (orientation: landscape) and (max-height: 500px) { :root { --header-h: 56px; } }

/* Dark surfaces: apply to a section to flip its semantic colours. */
.surface-ink {
  --bg: var(--ink);
  --fg: var(--off-white);
  --muted: var(--muted-on-ink);
  --line: rgba(var(--on-rgb), 0.12);
  --line-strong: rgba(var(--on-rgb), 0.3);
  --accent: var(--sea);
  --accent-contrast: var(--ink);
}

.surface-blueprint {
  --bg: var(--blueprint);
  --fg: var(--off-white);
  --muted: var(--muted-on-ink);
  --line: rgba(var(--on-rgb), 0.14);
  --line-strong: rgba(var(--on-rgb), 0.36);
  --accent: var(--sea);
  --accent-contrast: var(--ink);
}

/* Focus ring: sea-glass reads on slate but only ~1.9:1 on paper, so the light sections and the solid header use the
   deep sea (5.1:1, WCAG 1.4.11). Dark controls inside them, and the slate header of the open menu, keep sea-glass. */
.services, .founder, .for-architects, .process, .contact, .site-header.is-solid { --focus: var(--cobalt); }
.menu-open .site-header { --focus: var(--amber); }
