/* ════════════════════════════════════════════════════════════════════
   ANUNA DESIGN SYSTEM
   Single source of truth — tokens, typography, core components.
   Extracted from the living-manifesto homepage (the reference design).
   Every main-site page links this and consumes its tokens/classes
   instead of redefining them inline.
   ════════════════════════════════════════════════════════════════════ */

/* ─── SELF-HOSTED FONTS (privacy-first; no third-party requests) ──── */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/dmmono-normal-300-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/fonts/dmmono-normal-300-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dmmono-normal-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/dmmono-normal-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/dmmono-normal-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/dmmono-normal-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/dmsans-normal-400-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/dmsans-normal-400-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/fraunces-italic-400-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/fraunces-italic-400-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/fraunces-normal-400-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/fraunces-normal-400-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/spacegrotesk-normal-400-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/spacegrotesk-normal-400-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ─── DESIGN TOKENS ─────────────────────────────────────────────── */
:root {
  /* surfaces (light, cream) */
  --bg:        #FAF8F3;   /* page background          */
  --bg-2:      #F4F2EC;   /* raised surface           */
  --bg-3:      #ECEAE5;   /* card / hover surface     */

  /* ink (text on light) */
  --ink:       #16150F;   /* primary text / headings  */
  --mut:       #57544A;   /* secondary / body-muted   */
  --faint:     #8A8678;   /* tertiary / labels        */

  /* accent — moss */
  --green:     #4A7A49;   /* primary accent           */
  --green-lt:  #5B8C5A;   /* lighter (on dark panels) */
  --green-dk:  #3C6A3B;   /* hover / pressed          */
  --moss-dim:  rgba(74,122,73,0.4);  /* soft green — card-hover border */

  /* accent — warm */
  --warm:      #A87235;   /* secondary accent / CTA   */
  --warm-lt:   #C2873E;

  /* lines */
  --hairline:  rgba(22,21,15,0.12);   /* ink hairline on light   */
  --line-moss: rgba(74,122,73,0.16);  /* nav / section dividers  */

  /* dark code/terminal panels (kept dark on a light page, by design) */
  --panel:      #0E0D09;
  --panel-ink:  #C9C6BC;  /* light text on dark panel */
  --panel-mut:  #9A968A;

  /* type families */
  --font-display: 'Fraunces', serif;          /* italic eyebrows, numerals */
  --font-heading: 'Space Grotesk', sans-serif;/* h1–h3, wordmark           */
  --font-body:    'DM Sans', sans-serif;       /* body copy                 */
  --font-mono:    'DM Mono', monospace;        /* labels, code, nav links   */

  /* type scale (fluid) */
  --fs-h1:     clamp(44px, 8.4vw, 116px);
  --fs-h2:     clamp(36px, 6.2vw, 86px);
  --fs-h3:     clamp(22px, 2.1vw, 27px);
  --fs-lede:   clamp(18px, 2.1vw, 23px);
  --fs-body:   17px;
  --fs-eyebrow:clamp(15px, 2vw, 21px);
  --fs-label:  12px;

  /* spacing scale */
  --s-1: 0.5rem;  --s-2: 1rem;   --s-3: 1.5rem;
  --s-4: 2.5rem;  --s-5: 4rem;   --s-6: 8rem;

  /* layout */
  --container: 1200px;
  --reading:   880px;
  --gutter:    clamp(22px, 5vw, 72px);

  /* shape */
  --radius:    6px;
  --radius-pill: 999px;
  --shadow-card: 0 12px 30px rgba(22,21,15,0.05);
  --shadow-nav:  0 1px 16px rgba(22,21,15,0.04);
}

/* ─── BASE / RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body), system-ui, -apple-system, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
::selection { background: rgba(74,122,73,0.22); color: var(--ink); }

/* ─── TYPOGRAPHY ────────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-heading); color: var(--ink); }
h1, h2 { font-weight: 700; letter-spacing: -0.03em; line-height: 0.99; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); letter-spacing: -0.028em; line-height: 1.0; }
h3 { font-size: var(--fs-h3); font-weight: 700; line-height: 1.16; letter-spacing: -0.01em; }

/* editorial accent inside a heading — Space Grotesk structure, Fraunces italic accent */
h1 em, h2 em, h3 em { font-family: var(--font-display); font-style: italic; font-weight: 400; color: var(--warm); }

a { color: var(--green); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--green-dk); }

.lede {
  font-size: var(--fs-lede); line-height: 1.5; color: var(--mut);
  max-width: 32em;
}

/* italic Fraunces eyebrow */
.eyebrow {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: var(--fs-eyebrow); color: var(--green); letter-spacing: 0.01em;
  margin: 0 0 22px;
}

/* mono uppercase label / tag */
.label, .tag, .section-label {
  font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--green);
}

/* ─── LAYOUT HELPERS ────────────────────────────────────────────── */
.wrap      { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-read { max-width: var(--reading);   margin: 0 auto; padding: 0 var(--gutter); }

/* ─── TOPBAR (site nav) ─────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; gap: 24px;
  padding: 13px var(--gutter);
  background: var(--bg); border-bottom: 1px solid var(--line-moss);
  box-shadow: var(--shadow-nav);
}
.topbar a { text-decoration: none; }
.topbar .wordmark {
  font-family: var(--font-heading); font-weight: 700;
  letter-spacing: -0.02em; font-size: 20px; color: var(--ink);
}
.topbar .navlinks {
  display: flex; gap: 26px; margin-left: auto; align-items: center;
  /* defensive resets so a page's stray bare-nav rule can't leak in */
  position: static; background: none; border: none; padding: 0; box-shadow: none;
}
.topbar .navlinks a {
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  letter-spacing: 0.02em; color: var(--mut);
}
.topbar .navlinks a:hover { color: var(--ink); }
.topbar .navcta {
  font-size: 14px; font-weight: 600; background: var(--warm); color: #fff;
  padding: 9px 18px; border-radius: var(--radius-pill);
  transition: transform 0.15s ease;
}
.topbar .navcta:hover { transform: translateY(-1px); color: #fff; }

/* mobile nav — CSS-only hamburger toggle (checkbox hack); hidden on desktop */
.topbar .nav-burger { display: none; }
@media (max-width: 720px) {
  .topbar .nav-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    margin-left: auto; width: 32px; height: 32px; padding: 5px; cursor: pointer;
  }
  .topbar .nav-burger span {
    display: block; width: 22px; height: 2px; border-radius: 2px;
    background: var(--ink); transition: transform 0.2s ease, opacity 0.2s ease;
  }
  /* burger → X when open */
  .topbar .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .topbar .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .topbar .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  /* the links become a dropdown panel below the bar */
  .topbar .navlinks {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; align-items: stretch; margin: 0; padding: 6px 0;
    background: var(--bg); border-bottom: 1px solid var(--line-moss); box-shadow: var(--shadow-nav);
  }
  .topbar .nav-toggle:checked ~ .navlinks { display: flex; }
  .topbar .navlinks a { padding: 13px var(--gutter); font-size: 15px; }
  .topbar .navlinks a:hover { background: var(--bg-2); }
}

/* ─── BUTTONS ───────────────────────────────────────────────────── */
.btn {
  display: inline-block; padding: 12px 28px; border-radius: var(--radius-pill);
  font-family: var(--font-heading); font-weight: 600; font-size: 16px;
  text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dk); color: #fff; }
.btn-warm    { background: var(--warm); color: #fff; }
.btn-warm:hover { background: var(--warm-lt); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px rgba(22,21,15,0.25);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ─── CARD ──────────────────────────────────────────────────────── */
.card {
  background: var(--bg-2); border: 1px solid var(--line-moss);
  border-radius: var(--radius); padding: clamp(26px, 3vw, 40px);
  box-shadow: var(--shadow-card); transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--green); transform: translateY(-2px); }

.chip {
  font-size: 14px; font-weight: 600; padding: 7px 14px;
  border-radius: var(--radius-pill); background: rgba(22,21,15,0.06);
}

/* ─── CODE / TERMINAL PANEL (intentionally dark on light) ───────── */
.panel { background: var(--panel); color: var(--panel-ink); border-radius: var(--radius); }
.panel .mut { color: var(--panel-mut); }

/* ─── COLOPHON / LEGAL FOOTER (dark) ────────────────────────────── */
.colophon {
  background: var(--panel); color: var(--faint); text-align: center;
  padding: 0 var(--gutter) clamp(40px, 6vw, 70px);
  border-top: 1px solid rgba(255,255,255,0.06);
}
.colophon-legal {
  margin: 0; padding-top: clamp(28px, 4vw, 44px);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: #7A7669;
}
.colophon-nav {
  margin-top: 18px; display: flex; gap: clamp(16px, 2.4vw, 28px);
  flex-wrap: wrap; justify-content: center;
}
.colophon-nav a {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.06em; color: var(--panel-mut); text-decoration: none;
}
.colophon-nav a:hover { color: var(--bg); }

/* ─── SCROLL REVEAL ─────────────────────────────────────────────── */
[data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.2,0.7,0.2,1),
              transform 0.7s cubic-bezier(0.2,0.7,0.2,1);
}
[data-reveal].in, [data-reveal].revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { transition: none; } }
