:root {
  --bg: #0d0f14;
  --bg-alt: #12151c;
  --surface: #171b24;
  --surface-2: #1d2230;
  --border: #262c3a;
  --text: #e8ebf2;
  --text-dim: #9aa3b5;
  --text-faint: #6b7488;
  --accent: #7c6cff;
  --accent-2: #3dd7a0;
  --warn: #ffb454;
  --danger: #ff6b6b;
  --radius: 16px;
  --maxw: 980px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, monospace;
}

[data-theme="light"] {
  --bg: #f7f8fb;
  --bg-alt: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f1f3f9;
  --border: #e2e6ef;
  --text: #161a22;
  --text-dim: #5a6478;
  --text-faint: #8b94a6;
  --accent: #6a55ff;
  --accent-2: #14b87f;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background .35s ease, color .35s ease;
}

a { color: inherit; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 40px);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand {
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -.02em;
  font-family: var(--mono);
  font-size: .95rem;
}
.brand-goat { filter: saturate(1.2); }
.nav-right {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.4vw, 26px);
}
.nav-right a {
  text-decoration: none;
  color: var(--text-dim);
  font-size: .9rem;
  transition: color .2s;
}
.nav-right a:hover { color: var(--text); }
@media (max-width: 680px) {
  .nav-right a { display: none; }
}
.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 34px; height: 34px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 1rem;
  display: grid; place-items: center;
  transition: background .2s, transform .2s;
}
.theme-toggle:hover { transform: rotate(-25deg); background: var(--surface-2); }

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(60px, 11vw, 130px) clamp(20px, 5vw, 40px) clamp(50px, 8vw, 90px);
  text-align: center;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -10% 0 auto 0;
  height: 460px;
  background: radial-gradient(60% 100% at 50% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%);
  filter: blur(20px);
  z-index: -1;
  pointer-events: none;
}
.eyebrow {
  font-family: var(--mono);
  text-transform: lowercase;
  letter-spacing: .04em;
  color: var(--text-dim);
  font-size: clamp(.95rem, 2.4vw, 1.15rem);
  margin: 0 0 8px;
}
.answer {
  font-size: clamp(3.6rem, 15vw, 8.5rem);
  line-height: .95;
  margin: 0;
  letter-spacing: -.045em;
  font-weight: 800;
  display: inline-flex;
  align-items: baseline;
  gap: .12em;
}
.answer-word {
  background: linear-gradient(180deg, var(--text), color-mix(in srgb, var(--text) 55%, var(--accent)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.answer-cursor {
  width: clamp(.22em, 2vw, .3em);
  height: .82em;
  background: var(--accent);
  border-radius: 3px;
  display: inline-block;
  animation: blink 1.15s steps(1) infinite;
  align-self: center;
}
@keyframes blink { 50% { opacity: 0; } }
.subhead {
  max-width: 640px;
  margin: 26px auto 0;
  font-size: clamp(1.02rem, 2.6vw, 1.28rem);
  color: var(--text-dim);
}
.hero-meta { margin: 36px auto 0; max-width: 460px; }
.meter {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px;
  position: relative;
  overflow: hidden;
}
.meter-fill {
  position: absolute;
  inset: 0;
  width: var(--pct);
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 75%, transparent), color-mix(in srgb, var(--accent-2) 75%, transparent));
  opacity: .22;
  animation: grow 1.4s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes grow { from { width: 0; } }
.meter-label {
  position: relative;
  font-size: .9rem;
  color: var(--text-dim);
}
.meter-label b { color: var(--text); }
.hero-cta {
  margin-top: 34px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  text-decoration: none;
  font-weight: 600;
  font-size: .98rem;
  padding: 12px 22px;
  border-radius: 11px;
  border: 1px solid transparent;
  transition: transform .15s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 30px -8px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn-ghost {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

/* ---------- bands ---------- */
.band { padding: clamp(50px, 8vw, 96px) clamp(20px, 5vw, 40px); }
.band-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.band-inner { max-width: var(--maxw); margin: 0 auto; }
.band h2 {
  font-size: clamp(1.5rem, 4.5vw, 2.2rem);
  letter-spacing: -.03em;
  margin: 0 0 18px;
}
.hash { color: var(--accent); font-family: var(--mono); }
.lead { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--text); max-width: 720px; }
.band p { color: var(--text-dim); max-width: 720px; }
.band p.lead { color: var(--text); }
.band em { color: var(--accent-2); font-style: normal; }

/* ---------- recipe / anatomy ---------- */
.recipe {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 30px;
}
.ingredient {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: transform .18s, border-color .18s;
}
.ingredient:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.ing-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ing-icon { font-size: 1.6rem; line-height: 1; }
.ing-pill {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 4px 10px;
  border-radius: 999px;
}
.ingredient.ready { border-color: color-mix(in srgb, var(--accent-2) 40%, var(--border)); }
.ingredient.ready .ing-pill { background: color-mix(in srgb, var(--accent-2) 20%, transparent); color: var(--accent-2); }
.ingredient.coming .ing-pill {
  background: var(--surface-2);
  color: var(--text-faint);
  border: 1px solid var(--border);
}
.ingredient h3 { margin: 0 0 8px; font-size: 1.12rem; letter-spacing: -.02em; }
.ingredient p { color: var(--text-dim); font-size: .95rem; margin: 0; }
.ing-needs {
  margin-top: auto !important;
  padding-top: 14px;
  margin-bottom: 0;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: .76rem !important;
  color: var(--text-faint) !important;
}
.fine { font-size: .9rem; color: var(--text-faint); margin-top: 22px; }
.fine b { color: var(--accent-2); }

/* ---------- roadmap ---------- */
.roadmap {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
  display: grid;
  gap: 10px;
  counter-reset: road;
}
.road {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  padding: 14px 18px;
  border-radius: 12px;
  transition: transform .16s, border-color .16s;
}
.road::before {
  counter-increment: road;
  content: counter(road, decimal-leading-zero);
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--text-faint);
  flex: none;
  width: 1.4em;
}
.road:hover { transform: translateX(3px); }
.road-name { font-size: 1.02rem; color: var(--text); font-weight: 500; }
.road-status {
  flex: none;
  order: 2;
  margin-left: auto;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.road.done { border-left-color: var(--accent-2); }
.road.done .road-status { background: color-mix(in srgb, var(--accent-2) 20%, transparent); color: var(--accent-2); }
.road.wip { border-left-color: var(--warn); }
.road.wip .road-status {
  background: color-mix(in srgb, var(--warn) 20%, transparent);
  color: var(--warn);
}
.road.wip .road-status::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--warn);
  vertical-align: middle;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.road.todo { opacity: .82; }
.road.todo .road-status { background: var(--surface-2); color: var(--text-faint); border: 1px solid var(--border); }
@media (max-width: 520px) {
  .road { flex-wrap: wrap; gap: 8px 14px; }
  .road-status { order: 0; margin-left: 0; }
  .road-name { flex-basis: 100%; order: 3; }
}

/* ---------- app preview ---------- */
.app {
  margin-top: 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.55);
}
.app-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.dot { width: 11px; height: 11px; border-radius: 50%; background: var(--border); }
.dot:nth-child(1){ background:#ff5f57; } .dot:nth-child(2){ background:#febc2e; } .dot:nth-child(3){ background:#28c840; }
.app-title { margin-left: 10px; font-family: var(--mono); font-size: .85rem; color: var(--text-dim); }
.app-body { padding: clamp(16px, 3vw, 26px); }

.app-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 620px){ .app-stats { grid-template-columns: repeat(2,1fr); } }
.stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.stat-num { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; }
.stat-lbl { font-size: .8rem; color: var(--text-dim); margin-top: 2px; }
.stat-warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); }
.stat-warn .stat-num { color: var(--warn); }

.goat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}
.goat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  transition: transform .18s, border-color .18s;
}
.goat-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.goat-card header { display: flex; align-items: center; justify-content: space-between; }
.goat-name { font-weight: 700; font-size: 1.1rem; letter-spacing: -.02em; }
.tag { font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.tag-ok { background: color-mix(in srgb, var(--accent-2) 20%, transparent); color: var(--accent-2); }
.tag-warn { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }
.goat-meta { font-size: .82rem; color: var(--text-faint); margin: 4px 0 12px; }
.goat-log { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 7px; }
.goat-log li { font-size: .88rem; color: var(--text-dim); }
.goat-log .when { font-family: var(--mono); color: var(--text-faint); margin-right: 7px; font-size: .8rem; }
.goat-log .by { color: var(--text-faint); }
.next { font-size: .85rem; color: var(--text-dim); margin: 0; padding-top: 10px; border-top: 1px solid var(--border); }
.next b { color: var(--text); }
.next-warn b { color: var(--warn); }

/* ---------- inspiration / videos ---------- */
.videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 30px;
}
.video { margin: 0; }
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 50px -24px rgba(0,0,0,.6);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video figcaption { padding: 16px 4px 0; }
.video figcaption h3 { margin: 0 0 8px; font-size: 1.08rem; letter-spacing: -.02em; }
.video figcaption p { margin: 0; color: var(--text-dim); font-size: .95rem; max-width: none; }
.video figcaption b { color: var(--text); }

/* ---------- closing cta ---------- */
.band-cta { background: radial-gradient(80% 120% at 50% 0%, color-mix(in srgb, var(--accent) 14%, var(--bg)), var(--bg)); text-align: center; }
.center { text-align: center; }
.big { font-size: clamp(1.7rem, 5.5vw, 3rem); letter-spacing: -.035em; }
.answer-mini { font-size: clamp(1.05rem, 2.6vw, 1.3rem); color: var(--text); margin: 8px auto 0; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 34px clamp(20px,5vw,40px); }
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; gap: 8px 24px; flex-wrap: wrap; align-items: center;
  font-family: var(--mono); font-size: .85rem;
}
.footer-dim { color: var(--text-faint); }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
