/* ============================================================
   ViZO Studio — Colors & Type
   Foundational design tokens. Import this file in any artifact.

   Fonts: Fraunces (display serif) + Inter (UI sans) + JetBrains Mono.
   All from Google Fonts. If you swap to Editorial New / Söhne later,
   replace the @import and update the --font-* vars below.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300..800;1,300..800&family=JetBrains+Mono:wght@400;500&display=swap');

/* Brand UI sans — Helvetica Neue (uploaded by user, May 2026).
   Single weight ttf; synthesize bold for 600/700.
   Path is relative to wherever this file lives; consumers should
   import this CSS from the project root so /fonts/ resolves. */
@font-face {
  font-family: "HelveticaNeue";
  src: url("fonts/HelveticaNeue.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---- Primary palette (monochrome) ----------------------- */
  --ink:        #0A0A0A;  /* primary text, logo, primary buttons, footer bg */
  --ink-soft:   #1A1A1A;  /* secondary surfaces, dark-mode cards */
  --charcoal:   #2E2E2E;  /* headings on light, hover state */
  --graphite:   #4A4A4A;  /* body emphasis */
  --slate:      #737373;  /* secondary body, captions */
  --ash:        #A3A3A3;  /* disabled, placeholders, dividers */
  --mist:       #D4D4D4;  /* subtle borders, input borders */
  --bone:       #EDEDED;  /* section dividers, secondary surfaces */
  --paper:      #F7F7F5;  /* warm off-white page background */
  --canvas:     #FFFFFF;  /* primary card background */

  /* ---- Accent (sparingly, <3% surface) -------------------- */
  --accent-amber:      #D4A574;
  --accent-amber-soft: #F4E8D9;

  /* ---- System states (desaturated, earthy) ---------------- */
  --success: #2D7A4F;
  --warning: #B8741C;
  --error:   #A8342E;
  --info:    #3A5A7A;

  /* ---- Semantic aliases ---------------------------------- */
  --bg:           var(--paper);
  --bg-inverse:   var(--ink);
  --surface:      var(--canvas);
  --surface-alt:  var(--bone);
  --fg:           var(--ink);
  --fg-muted:     var(--slate);
  --fg-subtle:    var(--ash);
  --fg-inverse:   var(--canvas);
  --border:       var(--mist);
  --border-soft:  var(--bone);

  /* ---- Typography ---------------------------------------- */
  --font-display: "Montserrat", "Helvetica Neue", "Helvetica", system-ui, sans-serif;
  --font-sans:    "HelveticaNeue", "Helvetica Neue", "Helvetica", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Display & headline scale — FLUID via clamp(min, vw, max).
     Scales smoothly 375px → 2560px with no breakpoint jumps. */
  --type-display-xl: clamp(40px, 6vw, 96px);   /* hero */
  --type-display-l:  clamp(36px, 5vw, 72px);   /* section opener */
  --type-h1: clamp(32px, 4.5vw, 56px);
  --type-h2: clamp(28px, 4vw, 56px);           /* section subheads */
  --type-h3: clamp(20px, 1.8vw, 24px);
  --type-h4: clamp(18px, 1.4vw, 20px);
  --type-h5: 16px;
  --type-body-l: clamp(16px, 1.2vw, 19px);
  --type-body:   clamp(16px, 1.2vw, 19px);
  --type-body-s: clamp(14px, 1vw, 15px);
  --type-caption: clamp(11px, 0.85vw, 12px);
  --type-eyebrow: clamp(10px, 0.8vw, 13px);
  --type-button:  16px;                        /* fixed for accessibility */
  --type-mono:    clamp(11px, 0.9vw, 13px);

  /* ---- Spacing (8px grid + tight 4px) -------------------- */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-8: 48px;
  --space-10: 64px;
  --space-12: 96px;
  --space-16: 128px;
  --space-20: 160px;

  /* ---- Containers ---------------------------------------- */
  --container-xs: 640px;
  --container-sm: 880px;
  --container-md: 1120px;
  --container-lg: 1280px;
  --container-xl: 1440px;

  /* ---- Radii (subtle, editorial) ------------------------- */
  --radius-sm: 4px;   /* buttons, inputs */
  --radius-md: 6px;   /* tags */
  --radius-lg: 8px;   /* cards */
  --radius-xl: 12px;  /* feature/pricing cards */

  /* ---- Borders ------------------------------------------ */
  --border-hairline: 1px solid var(--bone);
  --border-default:  1px solid var(--mist);
  --border-strong:   1.5px solid var(--ink);

  /* ---- Shadows (rarely; quiet) -------------------------- */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 4px 16px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);

  /* ---- Motion ------------------------------------------- */
  --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-entrance: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 150ms;
  --dur-base: 200ms;
  --dur-mid:  300ms;
  --dur-slow: 600ms;

  /* ---- Surface mixers (used by the nav, modals, etc.) ---- */
  --nav-bg-scrolled: var(--canvas);
  --overlay-scrim:   rgba(10, 10, 10, 0.5);
}

/* ============================================================
   Dark theme — flips the monochrome scale. All components that
   reference --ink / --paper / --canvas / --graphite / --slate /
   --mist / --bone invert automatically.
   ============================================================ */
:root[data-theme="dark"] {
  --ink:        #F4F2EE;  /* primary text on dark */
  --ink-soft:   #E2DFD9;
  --charcoal:   #C8C4BD;
  --graphite:   #A8A39A;
  --slate:      #7A766F;
  --ash:        #545048;
  --mist:       #2A2826;
  --bone:       #1A1917;
  --paper:      #0A0A0A;  /* page background */
  --canvas:     #141312;  /* card / surface */

  --accent-amber-soft: #3A2E1D;

  --border-hairline: 1px solid var(--bone);
  --border-default:  1px solid var(--mist);
  --border-strong:   1.5px solid var(--ink);

  --nav-bg-scrolled: var(--canvas);
  --overlay-scrim:   rgba(0, 0, 0, 0.6);
}

/* Smooth the theme handover so it doesn't snap. */
html { transition: background-color var(--dur-mid) var(--ease-standard); }
body, section, nav, footer, .card, button, a, h1, h2, h3, h4, h5, p, span, li, ul, div {
  transition: background-color var(--dur-mid) var(--ease-standard),
              color           var(--dur-mid) var(--ease-standard),
              border-color    var(--dur-mid) var(--ease-standard);
}

/* ============================================================
   Semantic type classes — drop these on elements directly.
   ============================================================ */

html, body { background: var(--bg); color: var(--fg); font-family: var(--font-sans); font-size: var(--type-body); line-height: 1.65; -webkit-font-smoothing: antialiased; }

.display-xl,
.display-l,
.h1, .h2 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--ink);
  text-wrap: balance;
}

.display-xl {
  font-size: var(--type-display-xl);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 400;
}
.display-l {
  font-size: var(--type-display-l);
  line-height: 1.0;
  letter-spacing: -0.03em;
  font-weight: 400;
}
.h1 {
  font-size: var(--type-h1);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.h2 {
  font-size: var(--type-h2);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.h3, .h4, .h5 {
  font-family: var(--font-sans);
  color: var(--charcoal);
}
.h3 { font-size: var(--type-h3); line-height: 1.3; letter-spacing: -0.01em; font-weight: 600; }
.h4 { font-size: var(--type-h4); line-height: 1.4; font-weight: 600; }
.h5 { font-size: var(--type-h5); line-height: 1.5; font-weight: 600; }

.body-l { font-size: var(--type-body-l); line-height: 1.6; color: var(--graphite); }
.body   { font-size: var(--type-body);   line-height: 1.65; color: var(--graphite); }
.body-s { font-size: var(--type-body-s); line-height: 1.55; color: var(--graphite); }
.caption { font-size: var(--type-caption); line-height: 1.5; font-weight: 500; color: var(--slate); }

.eyebrow {
  font-size: var(--type-eyebrow);
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--graphite);
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--type-mono);
  letter-spacing: 0;
  font-feature-settings: "tnum" 1;
}

.tnum { font-variant-numeric: tabular-nums; }

/* Body text constraint — keep line length editorial */
.prose p, .prose li { max-width: 65ch; }
.prose em { font-family: var(--font-display); font-style: italic; }

/* Headings: sentence case is the rule — enforce in copy, not CSS */

/* ============================================================
   Type scale is fully fluid via clamp() above — no per-breakpoint
   font-size overrides needed. (Layout still restructures at the
   640px / 1024px breakpoints in JS.)
   ============================================================ */

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
