/* ============================================================
   Steep 4x4 website: design tokens
   Extends configurator/css/tokens.css (same near-blacks, amber, fonts, radii, motion)
   with a fluid type scale, section rhythm, containers and light "studio" surfaces.
   Docs: /css/COMPONENTS.md
   ============================================================ */
:root {
  color-scheme: dark;

  /* ---------- Shared with the configurator (keep in sync) ---------- */
  --bg: #0b0b0c;
  --surface-1: #111113;
  --surface-2: #17171a;
  --surface-3: #1e1e22;
  --surface-4: #26262b;
  --scrim: rgba(6, 6, 7, .72);

  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --line-3: rgba(255, 255, 255, .24);

  --text: #f4f4f2;
  --text-2: #b4b4b9;
  --text-3: #8d8d94;
  --text-inverse: #0b0b0c;

  --accent: #f2a33a;
  --accent-hover: #f6b55a;
  --accent-ink: #1b1205;
  --accent-soft: rgba(242, 163, 58, .12);
  --accent-line: rgba(242, 163, 58, .55);
  --accent-text: var(--accent);          /* amber used AS TEXT (darker on studio) */

  --ok: #7bd49b;
  --warn: #f2c94c;
  --danger: #ff7a6b;
  --danger-soft: rgba(255, 122, 107, .1);
  --info-soft: rgba(255, 255, 255, .04);

  /* Product render wells: renders are shot on light grey */
  --well: radial-gradient(120% 90% at 50% 30%, #f1f1f0 0%, #dcdcdb 60%, #cfcfce 100%);

  --font-display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: .75rem;    /* 12 */
  --fs-sm: .8125rem;  /* 13 */
  --fs-md: .9375rem;  /* 15 */
  --fs-lg: 1.0625rem; /* 17 */
  --fs-display-sm: 1.375rem;
  --fs-display: 2rem;
  --fs-display-lg: 2.5rem;
  --tracking-display: .02em;
  --tracking-caps: .12em;

  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 40px; --s-8: 48px; --s-9: 64px;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-pill: 999px;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, .45);
  --shadow-3: 0 24px 64px rgba(0, 0, 0, .6);
  --ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --t-fast: 140ms;
  --t-med: 240ms;
  --t-slow: 420ms;

  /* ---------- Website additions ---------- */

  /* Fluid type scale (360px → 1440px viewports) */
  --fs-body: 1rem;                                          /* 16 */
  --fs-small: .875rem;                                      /* 14 */
  --fs-lead: clamp(1.0625rem, 1rem + .3vw, 1.3125rem);      /* 17 → 21 */
  --fs-h4: clamp(1.25rem, 1.15rem + .45vw, 1.5rem);         /* 20 → 24 */
  --fs-h3: clamp(1.5rem, 1.25rem + 1.05vw, 2.25rem);        /* 24 → 36 */
  --fs-h2: clamp(2.25rem, 1.6rem + 2.8vw, 4.25rem);         /* 36 → 68 */
  --fs-h1: clamp(2.75rem, 1.8rem + 4.2vw, 5.75rem);         /* 44 → 92 */
  --fs-hero: clamp(3.25rem, 1.5rem + 5.6vw, 7.5rem);        /* 52 → 120 */
  --fs-stat: clamp(2.5rem, 1.9rem + 2.6vw, 4.5rem);
  --lh-tight: .92;
  --lh-display: 1;
  --lh-body: 1.6;
  --measure: 62ch;

  /* Layout */
  --container: 1280px;
  --container-wide: 1520px;
  --container-narrow: 820px;
  --gutter: clamp(16px, 4.2vw, 56px);
  --grid-gap: clamp(16px, 2vw, 32px);
  --site-header-h: 72px;

  /* Section rhythm */
  --space-section: clamp(80px, 5.5vw + 56px, 168px);
  --space-section-sm: clamp(56px, 3.5vw + 40px, 104px);
  --space-stack: clamp(32px, 2.4vw + 20px, 64px);   /* section head → content */

  /* Studio (light) surfaces for product renders */
  --studio-bg: #e8e8e6;
  --studio-bg-2: #dededc;
  --studio-card: #f3f3f1;
  --studio-ink: #0f0f10;
  --studio-ink-2: #45454b;   /* 8.3:1 on studio-bg */
  --studio-ink-3: #5c5c63;   /* 5.6:1 on studio-bg */
  --studio-line: rgba(15, 15, 16, .12);
  --studio-line-2: rgba(15, 15, 16, .22);
  --studio-accent-text: #8a5208; /* amber as text on light: 5.4:1 */

  /* Motion additions */
  --t-reveal: 900ms;
  --reveal-shift: 28px;
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
}

@media (max-width: 900px) {
  :root {
    --header-h: 56px;
    --fs-display: 1.75rem;
    --fs-display-lg: 2.125rem;
    --site-header-h: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0ms; --t-med: 0ms; --t-slow: 0ms; --t-reveal: 0ms; --reveal-shift: 0px; }
}

/* ---------- Theme scopes ----------
   Components read --text / --line / --surface-* so they adapt automatically inside
   a light studio section. Apply .theme-studio (or .section--studio) to any wrapper. */
.theme-studio,
.section--studio {
  color-scheme: light;
  --text: var(--studio-ink);
  --text-2: var(--studio-ink-2);
  --text-3: var(--studio-ink-3);
  --text-inverse: #f4f4f2;
  --line: var(--studio-line);
  --line-2: var(--studio-line-2);
  --line-3: rgba(15, 15, 16, .36);
  --surface-1: var(--studio-card);
  --surface-2: #ececea;
  --surface-3: #e2e2e0;
  --surface-4: #d6d6d4;
  --accent-text: var(--studio-accent-text);
  --info-soft: rgba(15, 15, 16, .04);
  --ring: 0 0 0 2px var(--studio-bg), 0 0 0 4px var(--studio-ink);
  --shadow-2: 0 10px 30px rgba(20, 20, 24, .12);
  --shadow-3: 0 30px 70px rgba(20, 20, 24, .18);
  background: var(--studio-bg);
  color: var(--text);
}
