:root {
  --ink: #180d0c;
  --brown: #321916;
  --bark: #5b2d21;
  --rust: #a84922;
  --orange: #f4771f;
  --amber: #ffb62e;
  --cream: #fff2c7;
  --muted: #d6aa77;
  --border: #6b3523;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--cream);
  background: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  image-rendering: pixelated;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.panic-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 6px;
  z-index: 1000;
  background: #120908;
}
.panic-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--rust), var(--amber), #fff4a8);
  box-shadow: 0 0 20px var(--orange);
}

.topbar {
  position: fixed;
  z-index: 900;
  top: 6px;
  left: 0;
  right: 0;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 68px);
  display: flex;
  align-items: center;
  gap: 32px;
  background: rgba(24, 13, 12, .88);
  border-bottom: 3px solid rgba(255, 182, 46, .3);
  backdrop-filter: blur(10px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 1000;
  letter-spacing: .08em;
  color: var(--amber);
}
.brand-eye {
  width: 22px;
  height: 22px;
  background: var(--cream);
  border: 4px solid var(--brown);
  box-shadow: 4px 4px 0 var(--orange);
  position: relative;
}
.brand-eye::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 8px;
  right: 1px;
  top: 3px;
  background: var(--ink);
}
nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 34px);
}
nav a {
  font-size: .84rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #f0c58f;
}
nav a:hover { color: var(--amber); }
.nav-buy {
  padding: 12px 16px;
  color: var(--ink);
  background: var(--amber);
  border: 3px solid var(--cream);
  box-shadow: 5px 5px 0 var(--rust);
  font-weight: 1000;
}

.hero {
  position: relative;
  min-height: 100svh;
  padding: 130px clamp(22px, 7vw, 120px) 84px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(30px, 5vw, 90px);
  isolation: isolate;
  overflow: hidden;
}
.hero-bg, .section-bg {
  position: absolute;
  inset: -8%;
  z-index: -3;
  background-size: cover;
  background-position: center;
  will-change: transform;
}
.hero-bg, .forest-bg { background-image: url("assets/background-panicwood.png"); }
.den-bg { background-image: url("assets/background-den.png"); }
.hero-shade, .forest-vignette {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(90deg, rgba(15, 7, 8, .96) 0%, rgba(24, 10, 8, .68) 48%, rgba(20, 8, 8, .42) 100%);
}
.hero-copy { z-index: 2; max-width: 760px; }
.eyebrow {
  margin: 0 0 16px;
  color: var(--amber);
  font-size: clamp(.8rem, 1.2vw, 1rem);
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 20px;
  color: var(--cream);
  font-size: clamp(4rem, 10vw, 10rem);
  line-height: .78;
  letter-spacing: -.09em;
  text-shadow: 8px 8px 0 var(--rust), 13px 13px 0 var(--ink);
}
h1 span { color: var(--amber); display: block; }
.hero-line {
  max-width: 620px;
  color: #f4d8b3;
  font-size: clamp(1.05rem, 2vw, 1.5rem);
  line-height: 1.5;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
.pixel-btn {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  color: var(--cream);
  background: rgba(40, 18, 15, .92);
  border: 3px solid var(--amber);
  box-shadow: 6px 6px 0 #100706;
  font-weight: 1000;
  letter-spacing: .04em;
  transition: transform .15s ease, box-shadow .15s ease, color .15s ease;
}
.pixel-btn:hover {
  transform: translate(3px, 3px);
  box-shadow: 3px 3px 0 #100706;
  color: var(--amber);
}
.pixel-btn.primary { color: var(--ink); background: var(--amber); border-color: var(--cream); }
.pixel-btn.primary:hover { color: var(--ink); background: #ffd263; }
.contract-line {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 30px;
  color: var(--muted);
  font-size: .84rem;
}
.contract-line span { color: var(--amber); font-weight: 900; }
.contract-line code { overflow: hidden; text-overflow: ellipsis; }

.hero-bear {
  position: relative;
  margin: 0;
  width: min(100%, 620px);
  justify-self: end;
  transform: rotate(1.5deg);
}
.hero-bear::before {
  content: "";
  position: absolute;
  inset: -12px;
  z-index: -1;
  background: var(--amber);
  box-shadow: 14px 14px 0 var(--rust), 28px 28px 0 rgba(13, 6, 6, .8);
}
.hero-bear img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.hero-bear figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: var(--cream);
  background: rgba(24, 13, 12, .9);
  border: 2px solid rgba(255, 182, 46, .6);
  font-size: .76rem;
}
.hero-bear figcaption span { color: var(--muted); }
.hero-bear figcaption strong { color: var(--amber); }
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 25px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: .75rem;
  letter-spacing: .12em;
}
.scroll-cue i { width: 42px; height: 2px; background: var(--amber); animation: cue 1.4s infinite; }

.ticker {
  overflow: hidden;
  padding: 16px 0;
  color: var(--ink);
  background: var(--amber);
  border-top: 5px solid var(--cream);
  border-bottom: 5px solid var(--rust);
  font-weight: 1000;
  letter-spacing: .08em;
  transform: rotate(-.5deg) scale(1.01);
}
.ticker div { display: flex; width: max-content; gap: 28px; animation: ticker 22s linear infinite; }
.ticker span, .ticker b { white-space: nowrap; }

.forest-section {
  position: relative;
  min-height: 82svh;
  padding: 130px clamp(24px, 8vw, 140px);
  display: flex;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
}
.forest-vignette { background: linear-gradient(90deg, rgba(16, 8, 7, .97), rgba(16, 8, 7, .58), rgba(16, 8, 7, .88)); }
.story-intro-inner { width: min(780px, 100%); }
.story-cutout {
  position: absolute;
  z-index: -1;
  right: clamp(-120px, 2vw, 30px);
  bottom: -8%;
  width: min(49vw, 690px);
  filter: drop-shadow(20px 22px 0 rgba(17, 7, 6, .62));
  transform-origin: bottom center;
}
.story-cutout.visible { transform: translateY(0) rotate(2deg); }
h2 {
  color: var(--cream);
  font-size: clamp(2.6rem, 6vw, 6rem);
  line-height: .92;
  letter-spacing: -.065em;
}
.story-intro p:last-child,
.chapter-copy p,
.signal-copy > p,
.trail-stop > p:last-child,
.final-inner > p {
  color: #e4c49f;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.7;
}

.chapters { padding: 10vw clamp(22px, 6vw, 100px); background: #1a0d0c; }
.chapter {
  width: min(1180px, 100%);
  margin: 0 auto clamp(90px, 12vw, 170px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  align-items: center;
  gap: clamp(35px, 7vw, 100px);
}
.chapter-right .chapter-image { order: 2; }
.chapter-image {
  position: relative;
  border: 5px solid var(--border);
  box-shadow: 18px 18px 0 #0d0606;
  overflow: hidden;
}
.chapter-image img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.chapter:hover .chapter-image img { transform: scale(1.035); }
.chapter-number {
  position: absolute;
  left: 18px;
  top: 18px;
  padding: 10px 13px;
  color: var(--ink);
  background: var(--amber);
  border: 3px solid var(--cream);
  font-weight: 1000;
  font-size: 1.2rem;
}
.chapter-copy h2 { margin-bottom: 24px; font-size: clamp(2.6rem, 5vw, 5.4rem); }
.chapter-copy p { max-width: 580px; }

.sightings {
  position: relative;
  padding: 130px clamp(18px, 5vw, 80px) 160px;
  overflow: hidden;
  background:
    linear-gradient(rgba(21, 9, 8, .82), rgba(21, 9, 8, .94)),
    url("assets/background-panicwood.png") center / cover fixed;
  border-top: 5px solid var(--border);
  border-bottom: 5px solid var(--border);
}
.sightings-head {
  width: min(920px, 100%);
  margin: 0 auto 65px;
  text-align: center;
}
.sightings-head h2 { margin-bottom: 22px; }
.sightings-head > p:last-child {
  color: #e4c49f;
  font-size: 1.06rem;
  line-height: 1.65;
}
.sighting-grid {
  width: min(1420px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 42px);
  align-items: start;
}
.sighting-card {
  position: relative;
  background: #28120f;
  border: 4px solid var(--border);
  box-shadow: 12px 12px 0 #090303;
}
.sighting-card:nth-child(2) { margin-top: 70px; }
.sighting-card:nth-child(3) { margin-top: 140px; }
.sighting-image { overflow: hidden; border-bottom: 4px solid var(--border); }
.sighting-image img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform .55s steps(4);
}
.sighting-card:hover .sighting-image img { transform: scale(1.045); }
.sighting-note { min-height: 210px; padding: 24px; }
.sighting-note > span {
  display: block;
  margin-bottom: 14px;
  color: var(--orange);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .12em;
}
.sighting-note h3 { margin-bottom: 12px; color: var(--amber); font-size: 1.5rem; }
.sighting-note p { color: #dab78e; line-height: 1.55; }

.signal {
  position: relative;
  min-height: 100svh;
  padding: 120px clamp(22px, 7vw, 120px);
  display: grid;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
}
.signal::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: rgba(20, 9, 8, .72);
}
.signal-inner {
  width: min(1200px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr .85fr;
  gap: clamp(50px, 8vw, 130px);
  align-items: center;
}
.signal-copy h2 { margin-bottom: 28px; }
.radar { width: min(500px, 100%); justify-self: end; }
.radar-screen {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle, rgba(255,182,46,.18), rgba(22,10,8,.96) 68%);
  border: 9px solid var(--border);
  outline: 3px solid var(--amber);
  box-shadow: 18px 18px 0 rgba(10,4,4,.82), inset 0 0 65px rgba(255,100,20,.25);
}
.radar-rings {
  position: absolute;
  inset: 10%;
  border: 3px solid rgba(255,182,46,.45);
  border-radius: 50%;
  box-shadow: 0 0 0 55px rgba(255,182,46,.08), 0 0 0 58px rgba(255,182,46,.35), 0 0 0 110px rgba(255,182,46,.06), 0 0 0 113px rgba(255,182,46,.25);
}
.radar-sweep {
  position: absolute;
  width: 48%;
  height: 48%;
  left: 50%;
  top: 2%;
  transform-origin: 0 100%;
  background: linear-gradient(135deg, transparent 49%, rgba(255,182,46,.6) 50%, transparent 53%);
  animation: sweep 2.8s linear infinite;
}
.radar-pip {
  position: absolute;
  width: 18px;
  height: 18px;
  left: var(--panic);
  top: calc(88% - var(--panic));
  background: var(--amber);
  box-shadow: 0 0 0 8px rgba(255,182,46,.15), 0 0 28px var(--orange);
}
.radar-screen strong { z-index: 2; font-size: clamp(3rem, 7vw, 6rem); color: var(--cream); text-shadow: 5px 5px 0 var(--rust); }
.radar-screen > span { position: absolute; bottom: 23%; color: var(--amber); font-size: .8rem; letter-spacing: .12em; }
.radar input { width: 100%; margin: 40px 0 14px; accent-color: var(--amber); }
.radar-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: .75rem; }
.radar-message {
  margin-top: 30px;
  min-height: 86px;
  padding: 18px;
  color: var(--amber);
  background: rgba(19,8,7,.88);
  border-left: 6px solid var(--orange);
  font-weight: 900;
  line-height: 1.45;
}

.roadmap {
  position: relative;
  padding: 130px clamp(22px, 7vw, 120px);
  overflow: hidden;
  background: #130908;
}
.roadmap-cutout {
  position: absolute;
  right: -4vw;
  top: 5px;
  width: min(34vw, 460px);
  opacity: .9;
  filter: drop-shadow(16px 18px 0 rgba(8, 3, 3, .65));
  pointer-events: none;
}
.roadmap-cutout.visible { transform: translateY(0) rotate(-3deg); }
.roadmap-head { max-width: 900px; margin-bottom: 80px; }
.trail {
  width: min(1260px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.trail-stop {
  position: relative;
  min-height: 360px;
  padding: 38px 30px;
  background: #2a1512;
  border: 4px solid var(--border);
  box-shadow: 12px 12px 0 #080303;
}
.trail-stop:nth-child(2) { transform: translateY(45px); background: #3a1b14; }
.trail-stop:nth-child(3) { transform: translateY(90px); background: #532216; }
.trail-stop > span { display: block; color: var(--amber); font-size: 4rem; font-weight: 1000; line-height: 1; }
.trail-stop .phase { margin: 34px 0 10px; color: var(--orange); font-size: .8rem; font-weight: 900; letter-spacing: .12em; }
.trail-stop h3 { margin-bottom: 16px; font-size: 1.7rem; }

.chart { padding: 180px clamp(18px, 6vw, 90px) 120px; background: #1d0e0c; }
.chart-head {
  width: min(1320px, 100%);
  margin: 0 auto 42px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
}
.chart-head h2 { margin-bottom: 0; }
.chart-frame {
  position: relative;
  width: min(1320px, 100%);
  height: min(72svh, 780px);
  margin: 0 auto;
  overflow: hidden;
  background: #0d0707;
  border: 6px solid var(--border);
  box-shadow: 18px 18px 0 #090404;
}
.chart-frame iframe { width: 100%; height: 100%; border: 0; }
.chart-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  padding: 34px;
  text-align: left;
  background: radial-gradient(circle at center, #472014, #100707 70%);
}
.chart-placeholder img { width: min(220px, 32vw); border: 4px solid var(--amber); }
.chart-placeholder strong { color: var(--amber); font-size: clamp(1.5rem, 3vw, 2.8rem); }
.chart-placeholder p { max-width: 500px; margin-top: 14px; color: var(--muted); line-height: 1.5; }
.chart-placeholder code { color: var(--cream); }
.chart-placeholder[hidden] { display: none; }

.final-call {
  position: relative;
  min-height: 78svh;
  padding: 120px 24px;
  display: grid;
  place-items: center;
  text-align: center;
  isolation: isolate;
  overflow: hidden;
}
.final-call::after { content: ""; position: absolute; inset: 0; z-index: -2; background: rgba(15,7,7,.72); }
.final-inner { width: min(950px, 100%); }
.final-inner .hero-actions { justify-content: center; }
footer {
  min-height: 110px;
  padding: 30px clamp(20px, 5vw, 80px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  background: #0e0606;
  border-top: 4px solid var(--border);
  font-size: .78rem;
}
footer > span:first-child { color: var(--amber); font-size: 1rem; font-weight: 1000; }
footer p { margin: 0; text-align: center; }

.reveal { transform: translateY(34px); transition: opacity .75s ease, transform .75s ease; }
.js-enabled .reveal { opacity: 0; }
.js-enabled .reveal.visible { opacity: 1; transform: translateY(0); }
body.high-panic .radar-screen { animation: shake .14s infinite; }
body.high-panic .topbar { border-bottom-color: var(--orange); }

@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes cue { 50% { transform: translateX(8px); opacity: .4; } }
@keyframes sweep { to { transform: rotate(360deg); } }
@keyframes shake {
  0%,100% { transform: translate(0,0); }
  25% { transform: translate(3px,-2px); }
  75% { transform: translate(-2px,3px); }
}

@media (max-width: 900px) {
  .topbar nav { display: none; }
  .topbar { min-height: 64px; gap: 12px; }
  .nav-buy { margin-left: auto; padding: 9px 11px; font-size: .76rem; }
  .hero { grid-template-columns: 1fr; padding-top: 115px; }
  .hero-bear { justify-self: center; width: min(88vw, 560px); margin: 25px auto 50px; }
  .scroll-cue { display: none; }
  .chapter, .signal-inner { grid-template-columns: 1fr; }
  .chapter-right .chapter-image { order: 0; }
  .story-cutout { width: min(58vw, 520px); right: -17%; opacity: .72; }
  .sighting-grid { grid-template-columns: 1fr; width: min(620px, 100%); }
  .sighting-card:nth-child(2), .sighting-card:nth-child(3) { margin-top: 20px; }
  .roadmap-cutout { width: min(44vw, 360px); right: -11vw; opacity: .5; }
  .radar { justify-self: center; }
  .trail { grid-template-columns: 1fr; }
  .trail-stop:nth-child(2), .trail-stop:nth-child(3) { transform: none; }
  .chart { padding-top: 120px; }
}

@media (max-width: 620px) {
  .brand { font-size: .86rem; }
  .hero { padding-inline: 18px; }
  h1 { font-size: clamp(3.6rem, 21vw, 6rem); text-shadow: 5px 5px 0 var(--rust), 9px 9px 0 var(--ink); }
  .hero-line br { display: none; }
  .pixel-btn { width: 100%; }
  .contract-line code { max-width: 70vw; }
  .forest-section, .signal, .roadmap { padding-inline: 20px; }
  .story-cutout { width: 86vw; right: -50%; opacity: .55; }
  .chapters { padding-inline: 16px; }
  .chapter { grid-template-columns: 1fr; margin-bottom: 90px; }
  .chapter-image { box-shadow: 10px 10px 0 #0d0606; }
  .chart-head { align-items: stretch; flex-direction: column; }
  .chart-frame { height: 620px; box-shadow: 10px 10px 0 #090404; }
  .chart-placeholder { flex-direction: column; text-align: center; }
  .roadmap-cutout { display: none; }
  footer { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
