/* ============================================================
   1. DESIGN TOKENS — mirrors Wulf dashboard
   ============================================================ */
:root {
  /* Color */
  --paper:        #0D0E12;
  --paper-dim:    #1C1E26;
  --surface:      #14151A;
  --ink:          #FFFFFF;
  --ink-muted:    #C8CAD6;
  --ink-dim:      #7C7F93;
  --spark:        #F59E0B;
  --spark-dim:    #D97706;
  --border:       rgba(255,255,255,.07);
  --border-strong:rgba(255,255,255,.14);

  /* Type */
  --font: 'Inter', system-ui, -apple-system, sans-serif;

  /* Geometry */
  --radius:    8px;
  --radius-sm: 4px;
  --scene-py:  96px;      /* vertical padding for each scene */
  --container: 1200px;    /* max content width */
  --gutter:    24px;      /* horizontal page padding */
}

/* ============================================================
   2. RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-muted);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: 0; color: inherit; }
img, svg { display: block; max-width: 100%; }

/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--spark);
  margin-bottom: 16px;
}
.eyebrow--dim { color: var(--ink-dim); }

h1, h2, .display {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
h1, .display-1 { font-size: clamp(40px, 6vw, 72px); }
h2, .display-2 { font-size: clamp(32px, 4.5vw, 56px); }
h3 { color: var(--ink); font-weight: 600; font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; }

p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }
.lead { font-size: 18px; color: var(--ink-muted); }

/* ============================================================
   4. LAYOUT PRIMITIVES
   ============================================================ */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.scene {
  padding: var(--scene-py) 0;
  border-bottom: 1px solid var(--border);
}
.scene:last-of-type { border-bottom: 0; }

.scene--center { text-align: center; }

.scene__inner {
  max-width: 720px;
  margin: 0 auto;
}
.scene__inner--wide { max-width: 1040px; }

.rule {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--spark);
  margin-bottom: 24px;
}

/* ============================================================
   5. COMPONENTS
   ============================================================ */

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  transition: opacity .15s ease, transform .15s ease;
}
.btn:hover { opacity: .9; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-ghost   { border: 1px solid var(--border-strong); color: var(--ink); }
.btn--lg     { padding: 16px 28px; font-size: 15px; }

/* --- Top navigation --- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter);
  position: sticky;
  top: 0;
  background: rgba(13,14,18,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid var(--border);
}
.nav__brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.nav__brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  background: var(--spark); color: var(--paper);
  border-radius: 6px; font-weight: 800;
}
.nav__links { display: flex; gap: 32px; align-items: center; }
.nav__links a { font-size: 13px; color: var(--ink-muted); transition: color .15s ease; }
.nav__links a:hover { color: var(--ink); }
.nav__cta { font-size: 13px; padding: 8px 16px; border: 1px solid var(--border-strong); border-radius: 4px; color: var(--ink); }
.nav__cta:hover { background: var(--paper-dim); }
.nav__menu-btn { display: none; }

/* --- Footer --- */
.footer {
  padding: 64px var(--gutter) 32px;
  border-top: 1px solid var(--border);
  color: var(--ink-dim);
  font-size: 13px;
}
.footer__inner { max-width: var(--container); margin: 0 auto; }
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer__col h4 { color: var(--ink); font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 16px; }
.footer__col ul { list-style: none; }
.footer__col li { margin-bottom: 8px; }
.footer__col a:hover { color: var(--ink); }
.footer__bottom { display: flex; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--border); }

/* --- Hero (cinematic) --- */
.hero {
  min-height: calc(100vh - 73px); /* viewport minus nav height */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--gutter);
  text-align: center;
  position: relative;
}
.hero__scroll {
  position: absolute;
  bottom: 32px; left: 50%; transform: translateX(-50%);
  font-size: 11px; color: var(--ink-dim); letter-spacing: 2.5px;
}

/* --- Module card (used on home Scene 4 and /platform) --- */
.modules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 48px;
  text-align: left;
}
.module-card {
  background: var(--paper-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.module-card__icon {
  width: 32px; height: 32px; color: var(--spark); margin-bottom: 16px;
}
.module-card__name { color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.module-card__status {
  display: inline-block;
  font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 3px 8px; border-radius: 3px;
  margin-bottom: 12px;
}
.module-card__status--live    { background: rgba(245,158,11,0.15); color: var(--spark); }
.module-card__status--roadmap { background: rgba(255,255,255,0.05); color: var(--ink-dim); }
.module-card__teaser { font-size: 14px; color: var(--ink-muted); line-height: 1.55; }

/* --- Chat preview (atmospheric, used on home Scene 3 and /modules/chat) --- */
.chat-preview {
  max-width: 560px;
  margin: 48px auto 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 24px;
  text-align: left;
}
.chat-preview__head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 14px; margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
  font-size: 12px; color: var(--ink-muted); font-weight: 600;
}
.chat-preview__head::before {
  content: ''; width: 8px; height: 8px; background: #10b981; border-radius: 50%;
}
.chat-preview__msg { margin-bottom: 16px; }
.chat-preview__msg:last-child { margin-bottom: 0; }
.chat-preview__who { font-size: 11px; color: var(--ink-dim); margin-bottom: 6px; }
.chat-preview__who--wulf { color: var(--spark); font-weight: 600; }
.chat-preview__bubble {
  background: var(--paper-dim);
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-muted);
}
.chat-preview__bubble--you { color: var(--ink); }

/* --- Three Rings (home Scene 5) --- */
.rings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
  text-align: left;
}
.ring__num {
  font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  color: var(--spark); margin-bottom: 12px;
}
.ring h3 { margin-bottom: 8px; }
.ring p { font-size: 14px; }

/* --- Category pills (home Scene 6) --- */
.pills {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-top: 32px;
}
.pill {
  font-size: 13px; padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 100px; color: var(--ink-muted);
}

/* ============================================================
   6. REVEAL ANIMATION (driven by JS IntersectionObserver)
   ============================================================ */
.scene { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.scene.is-visible { opacity: 1; transform: translateY(0); }
.hero { opacity: 1; transform: none; } /* hero loads visible — no reveal delay */

/* ============================================================
   7. RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  :root { --scene-py: 64px; }
  .nav__links { display: none; }
  .nav__cta { display: none; }
  .nav__menu-btn {
    display: inline-flex;
    width: 36px; height: 36px; align-items: center; justify-content: center;
    border: 1px solid var(--border-strong); border-radius: 4px; color: var(--ink);
  }
  .nav__links.is-open {
    display: flex; flex-direction: column;
    position: fixed; top: 73px; left: 0; right: 0;
    background: var(--paper); padding: 24px var(--gutter);
    border-bottom: 1px solid var(--border);
    gap: 16px;
  }
  .nav__links.is-open .nav__cta { display: inline-flex; width: fit-content; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .rings { grid-template-columns: 1fr; gap: 24px; }
  .modules { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: 8px; }
}
