*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --lime: #c8ff00;
  --lime-hot: #dfff3a;
  --forest: #0b2405;
  --forest-mid: #14380c;
  --moss: #1a5c12;
  --leaf: #2e8b23;
  --ink: #0b2405;
  --muted: #3d5a36;
  --paper: #e8f2c8;
  --white: #ffffff;
  --font-pixel: "Pixelify Sans", sans-serif;
  --font-body: "Sora", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --rail-w: 220px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--forest);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.pixel-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ── Shell: rail + stage ── */
.shell {
  display: grid;
  grid-template-columns: var(--rail-w) 1fr;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  z-index: 1;
}

/* ── Left rail ── */
.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1.5rem 1.25rem;
  background: var(--lime);
  border-right: 3px solid var(--forest);
  z-index: 50;
}

.rail-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--forest);
}

.rail-mark {
  width: 64px;
  height: 64px;
  object-fit: cover;
  image-rendering: pixelated;
  border: 3px solid var(--forest);
  animation: mark-bob 4s ease-in-out infinite;
}

.rail-word {
  font-family: var(--font-pixel);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  writing-mode: horizontal-tb;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.rail-link {
  font-family: var(--font-pixel);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: rgba(11, 36, 5, 0.55);
  padding: 0.55rem 0.65rem;
  border-left: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.rail-link:hover,
.rail-link.is-active {
  color: var(--forest);
  border-left-color: var(--forest);
  background: rgba(11, 36, 5, 0.08);
}

.rail-foot {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rail-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 2px solid var(--forest);
  color: var(--forest);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.rail-x:hover {
  background: var(--forest);
  color: var(--lime);
  transform: translate(-2px, -2px);
}

.rail-cta {
  width: 100%;
  justify-content: center;
  padding: 0.75rem 0.85rem !important;
  font-size: 0.85rem !important;
}

.rail-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 2px solid var(--forest);
  cursor: pointer;
  padding: 8px;
}

.rail-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--forest);
}

/* ── Stage ── */
.stage {
  background: var(--paper);
  min-width: 0;
}

/* ── Cinema (hero) ── */
.cinema {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
  background: var(--lime);
}

.cinema-visual {
  position: relative;
  min-height: 58vh;
  overflow: hidden;
}

.cinema-banner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  animation: banner-drift 30s var(--ease-out) infinite alternate;
  will-change: transform;
}

.cinema-fade {
  position: absolute;
  inset: auto 0 0;
  height: 35%;
  background: linear-gradient(to top, var(--lime), transparent);
  pointer-events: none;
}

.cinema-dock {
  position: relative;
  z-index: 2;
  padding: 1.5rem clamp(1.25rem, 4vw, 3.5rem) 3rem;
  background: var(--lime);
  animation: rise-in 0.9s var(--ease-out) both;
}

.cinema-brand {
  font-family: var(--font-pixel);
  font-size: clamp(3rem, 9vw, 6.5rem);
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 0.9;
  color: var(--forest);
  text-shadow: 3px 3px 0 rgba(255, 255, 255, 0.35);
  margin-bottom: 0.4rem;
}

.cinema-title {
  font-family: var(--font-pixel);
  font-size: clamp(1.4rem, 3.5vw, 2.35rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--moss);
  margin-bottom: 0.75rem;
}

.cinema-lede {
  max-width: 32rem;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: rgba(11, 36, 5, 0.72);
  font-weight: 500;
  margin-bottom: 1.75rem;
}

.cinema-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@keyframes banner-drift {
  from { transform: scale(1.02); }
  to { transform: scale(1.08) translate(-0.8%, -0.5%); }
}

@keyframes mark-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Shared type ── */
.kicker {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--moss);
  margin-bottom: 0.85rem;
}

.display {
  font-family: var(--font-pixel);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.1;
  color: var(--forest);
  margin-bottom: 1.15rem;
}

.lede {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 36rem;
  margin-bottom: 1.5rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s var(--ease-out), background 0.2s, color 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translate(-2px, -2px);
}

.btn-primary {
  background: var(--forest);
  color: var(--lime);
  border-color: var(--forest);
  box-shadow: 4px 4px 0 rgba(11, 36, 5, 0.25);
}

.btn-primary:hover {
  background: var(--forest-mid);
  box-shadow: 6px 6px 0 rgba(11, 36, 5, 0.3);
}

.btn-ghost {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
}

.btn-ghost:hover {
  background: var(--forest);
  color: var(--lime);
}

.btn-dark {
  background: var(--forest);
  color: var(--lime);
  border-color: var(--forest);
  box-shadow: 4px 4px 0 var(--lime);
}

.btn-dark:hover {
  background: var(--moss);
  box-shadow: 6px 6px 0 var(--lime);
}

.btn-outline {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
}

.btn-outline:hover {
  background: var(--lime);
}

.btn-copy {
  flex-shrink: 0;
  padding: 0.65rem 1.1rem;
  font-size: 0.85rem;
}

.btn-copy.copied {
  background: var(--lime);
  color: var(--forest);
  border-color: var(--forest);
}

/* ── Manifest ── */
.manifest {
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1.25rem, 4vw, 3.5rem);
  background:
    radial-gradient(ellipse at 0% 50%, rgba(200, 255, 0, 0.35), transparent 50%),
    var(--paper);
  border-top: 3px solid var(--forest);
}

.manifest-grid {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  max-width: 1100px;
}

.manifest-mark {
  position: relative;
}

.manifest-mark img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  image-rendering: pixelated;
  border: 3px solid var(--forest);
  box-shadow: 10px 10px 0 var(--forest);
  display: block;
  animation: mark-bob 5s ease-in-out infinite;
}

.manifest-dust {
  position: absolute;
  inset: -8% auto auto -12%;
  width: 45%;
  height: 45%;
  background-image:
    radial-gradient(circle, var(--leaf) 1.5px, transparent 2px),
    radial-gradient(circle, var(--forest) 1px, transparent 1.5px);
  background-size: 11px 11px, 16px 16px;
  opacity: 0.7;
  animation: dust-drift 6s ease-in-out infinite alternate;
  pointer-events: none;
  mask-image: linear-gradient(135deg, black, transparent 70%);
}

@keyframes dust-drift {
  from { transform: translate(0, 0); }
  to { transform: translate(8px, -6px); }
}

.traits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  list-style: none;
}

.traits li {
  font-family: var(--font-pixel);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.9rem;
  background: var(--forest);
  color: var(--lime);
}

/* ── Terminal ── */
.terminal {
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.25rem, 4vw, 3.5rem);
  background: var(--forest);
  color: var(--white);
  border-top: 3px solid var(--lime);
}

.terminal .kicker {
  color: rgba(200, 255, 0, 0.7);
}

.terminal .display {
  color: var(--white);
}

.terminal-head {
  margin-bottom: 2.25rem;
  max-width: 1100px;
}

.terminal-board {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  max-width: 1100px;
  align-items: start;
}

.ca-panel {
  background: rgba(200, 255, 0, 0.08);
  border: 2px solid rgba(200, 255, 0, 0.45);
  padding: 1.5rem;
}

.panel-label {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--lime);
  margin-bottom: 1rem;
}

.ca-row {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.ca-address {
  flex: 1;
  font-family: var(--font-mono);
  font-size: clamp(0.62rem, 1.8vw, 0.82rem);
  color: var(--white);
  word-break: break-all;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.85rem 1rem;
  border: 1px solid rgba(200, 255, 0, 0.25);
}

.copy-toast {
  min-height: 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--lime);
  opacity: 0;
  transition: opacity 0.3s;
  margin-bottom: 1rem;
}

.copy-toast.show {
  opacity: 1;
}

.ca-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.terminal .btn-outline {
  color: var(--lime);
  border-color: rgba(200, 255, 0, 0.5);
}

.terminal .btn-outline:hover {
  background: var(--lime);
  color: var(--forest);
}

.path {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 2px solid rgba(200, 255, 0, 0.35);
  margin-left: 0.85rem;
}

.path li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 0 0 1.5rem 1.25rem;
  position: relative;
}

.path li:last-child {
  padding-bottom: 0;
}

.path-n {
  font-family: var(--font-pixel);
  font-size: 1.15rem;
  color: var(--lime);
  line-height: 1.2;
  position: relative;
}

.path-n::before {
  content: "";
  position: absolute;
  left: calc(-1.25rem - 5px);
  top: 0.35rem;
  width: 8px;
  height: 8px;
  background: var(--lime);
}

.path h3 {
  font-family: var(--font-pixel);
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
  color: var(--white);
}

.path p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ── Signal ── */
.signal {
  padding: clamp(3.5rem, 8vw, 6rem) clamp(1.25rem, 4vw, 3.5rem);
  background:
    linear-gradient(180deg, #d8eb9a, var(--paper));
  border-top: 3px solid var(--forest);
}

.signal-head {
  max-width: 1100px;
  margin-bottom: 1.75rem;
}

.signal-note {
  margin-bottom: 0;
}

.signal-frame {
  max-width: 1100px;
  border: 3px solid var(--forest);
  background: #0a1a06;
  min-height: 480px;
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--forest);
}

.dexscreener-embed {
  width: 100%;
  height: 540px;
  border: none;
  display: block;
}

.dexscreener-embed.hidden {
  display: none;
}

.chart-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 480px;
  padding: 2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.chart-placeholder code {
  color: var(--lime);
  background: rgba(200, 255, 0, 0.12);
  padding: 0.15rem 0.4rem;
}

.chart-placeholder.hidden {
  display: none;
}

.signal-link {
  max-width: 1100px;
  margin-top: 1.15rem;
}

.text-link {
  color: var(--forest);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.95rem;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ── Footer ── */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 2rem clamp(1.25rem, 4vw, 3.5rem);
  background: var(--forest);
  border-top: 3px solid var(--lime);
  color: rgba(255, 255, 255, 0.5);
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.foot-brand img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  image-rendering: pixelated;
  border: 2px solid var(--lime);
}

.foot-brand strong {
  display: block;
  font-family: var(--font-pixel);
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  color: var(--lime);
  line-height: 1;
}

.foot-brand span {
  font-size: 0.8rem;
}

.foot-note {
  font-size: 0.72rem;
  max-width: 420px;
  line-height: 1.6;
}

/* ── Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ── Mobile ── */
@media (max-width: 960px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .rail {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-right: none;
    border-bottom: 3px solid var(--forest);
  }

  .rail-brand {
    flex-direction: row;
    align-items: center;
    gap: 0.55rem;
  }

  .rail-mark {
    width: 40px;
    height: 40px;
  }

  .rail-word {
    font-size: 1.15rem;
  }

  .rail-nav,
  .rail-foot {
    display: none;
  }

  .rail.open {
    flex-wrap: wrap;
  }

  .rail.open .rail-nav {
    display: flex;
    flex-direction: column;
    flex: 1 1 100%;
    order: 3;
    gap: 0.25rem;
    padding-top: 0.5rem;
  }

  .rail.open .rail-foot {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex: 1 1 100%;
    order: 4;
    gap: 0.75rem;
    padding-bottom: 0.35rem;
  }

  .rail.open .rail-cta {
    width: auto;
    flex: 1;
  }

  .rail-toggle {
    display: flex;
    margin-left: auto;
  }

  .stage {
    padding-top: 64px;
  }

  .manifest-grid,
  .terminal-board {
    grid-template-columns: 1fr;
  }

  .manifest-mark {
    max-width: 240px;
  }

  .cinema-visual {
    min-height: 42vh;
  }

  .foot {
    flex-direction: column;
    text-align: center;
  }

  .foot-brand {
    flex-direction: column;
  }

  .dexscreener-embed {
    height: 440px;
  }
}

@media (max-width: 480px) {
  .cinema-actions {
    width: 100%;
  }

  .cinema-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .ca-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-copy {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cinema-banner,
  .rail-mark,
  .manifest-mark img,
  .manifest-dust {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .pixel-field {
    display: none;
  }
}
