/* ============ Yookthi · Design Tokens ============ */

/* ─── Light mode (default) ─────────────────────── */
:root {
  /* Surfaces — warm-tinted to avoid clinical flatness */
  --bg:          #FAFAF7;
  --bg-panel:    #F2F1EC;
  --bg-inverse:  #0D0D0B;       /* warm-tinted — never pure black */

  /* Text */
  --ink:         #0C0C0A;
  --ink-muted:   #4a4948;
  --ink-soft:    #76756d;

  /* Borders */
  --hairline:      #1c1c19;
  --hairline-soft: #d6d4cc;

  /* Brand */
  --accent:      #00D084;
  --accent-ink:  #000;
  --accent-soft: #E6FBF2;

  /* On-inverse surfaces */
  --on-inverse:       #F5F4F0;
  --on-inverse-muted: #a8a8a2;
  --on-inverse-hair:  #2c2c29;

  /* Misc */
  --selection: #00D084;

  /* ─── Type stacks ───────────────────────────────
     Spectral   — high-contrast transitional serif; editorial authority.
                  Not Instrument Serif. Not Cormorant. Designed for screens.
     Barlow     — sharp geometric sans; clean technical edge without Inter.
     Azeret Mono — distinctive mono for labels; less common than IBM Plex.
  ─────────────────────────────────────────────── */
  --ff-serif: "Spectral", Georgia, "Times New Roman", serif;
  --ff-sans:  "Barlow", system-ui, -apple-system, Helvetica, Arial, sans-serif;
  --ff-mono:  "Azeret Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Layout */
  --maxw:  1360px;
  --pad-x: clamp(20px, 4vw, 56px);
}

/* ─── Dark mode ─────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #0A0A08;      /* warm-tinted dark — not flat #0A0A0A */
    --bg-panel:    #121210;      /* warm-tinted panel */
    --bg-inverse:  #F5F4F0;
    --ink:         #F4F3EE;
    --ink-muted:   #c3c2ba;
    --ink-soft:    #8a897f;
    --hairline:      #272724;
    --hairline-soft: #1e1e1b;
    --accent:      #00D084;
    --accent-ink:  #000;
    --accent-soft: #0a2a1e;
    --on-inverse:       #0C0C0A;
    --on-inverse-muted: #4a4948;
    --on-inverse-hair:  #d0cfca;
  }
}
:root[data-theme="dark"] {
  --bg:          #0A0A08;
  --bg-panel:    #121210;
  --bg-inverse:  #F5F4F0;
  --ink:         #F4F3EE;
  --ink-muted:   #c3c2ba;
  --ink-soft:    #8a897f;
  --hairline:      #272724;
  --hairline-soft: #1e1e1b;
  --accent:      #00D084;
  --accent-ink:  #000;
  --accent-soft: #0a2a1e;
  --on-inverse:       #0C0C0A;
  --on-inverse-muted: #4a4948;
  --on-inverse-hair:  #d0cfca;
}

/* ─── Reset ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-padding-top: 64px; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 240ms ease, color 240ms ease;
}
body.nav-open { overflow: hidden; }
::selection { background: var(--accent); color: #000; }

/* ─── Skip link ─────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -120px; left: var(--pad-x);
  padding: 10px 18px;
  background: var(--accent); color: #000;
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  z-index: 200;
  transition: top 200ms ease;
  text-decoration: none;
}
.skip-link:focus { top: 14px; }

/* ─── Links ─────────────────────────────────────── */
a { color: inherit; text-decoration: none; }

/* ─── Focus styles — WCAG 2.4.7 ────────────────── */
:focus                { outline: none; }
:focus-visible        { outline: 2px solid var(--accent); outline-offset: 3px; }
button:focus-visible  { outline: 2px solid var(--accent); outline-offset: 3px; }
a:focus-visible       { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ─── Media ─────────────────────────────────────── */
img { max-width: 100%; display: block; }

/* ─── Utility ───────────────────────────────────── */
.eyebrow {
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--ink-soft);
}
.mono   { font-family: var(--ff-mono); }
.serif  { font-family: var(--ff-serif); }
.italic { font-style: italic; }
.hair      { height: 1px; background: var(--hairline); width: 100%; }
.hair-soft { height: 1px; background: var(--hairline-soft); width: 100%; }

/* ─── Layout ────────────────────────────────────── */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.section          { padding: clamp(56px, 8vw, 104px) 0; }
section[id]       { scroll-margin-top: 64px; }
.section--inverse { background: var(--bg-inverse); color: var(--on-inverse); }
.section--inverse .eyebrow { color: var(--on-inverse-muted); }

/* ─── Buttons ───────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid var(--hairline); background: transparent; color: inherit; cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
  text-decoration: none;
  font-weight: 400;
}
.btn:hover         { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary       { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: #00b874; border-color: #00b874; color: #000; }

.section--inverse .btn         { border-color: var(--on-inverse-hair); color: var(--on-inverse); }
.section--inverse .btn:hover   { background: var(--on-inverse); color: var(--bg-inverse); }
.section--inverse .btn.primary { background: var(--accent); color: #000; border-color: var(--accent); }

/* ─── Tags ──────────────────────────────────────── */
.tag {
  display: inline-block; padding: 4px 9px;
  background: var(--accent); color: #000;
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase;
}

/* ─── Headings ──────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--ff-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0;
}

/* ─── Reveal animations ─────────────────────────── */
.reveal {
  opacity: 1; transform: none;
  transition: opacity 640ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 640ms cubic-bezier(0.22, 1, 0.36, 1);
}
html.js-ready .reveal:not(.is-in) { opacity: 0; transform: translateY(14px); }
html.js-ready .reveal.is-in       { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js-ready .reveal { opacity: 1 !important; transform: none !important; transition: none; }
}
