:root {
  color-scheme: dark;
  --ink: #050403;
  --black: #090705;
  --panel: #12100d;
  --cream: #ffe5bd;
  --paper: #f5d5aa;
  --amber: #d98b42;
  --muted: #9d876d;
  --line: rgba(255, 229, 189, 0.28);
  --pointer-x: 50vw;
  --pointer-y: 30vh;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  color: var(--cream);
  background:
    radial-gradient(circle at 52% 18%, rgba(146, 79, 27, 0.14), transparent 28rem),
    var(--ink);
  font-family: Consolas, "Courier New", monospace;
  font-size: 16px;
  line-height: 1.55;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.08;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    #ffd6a0 4px
  );
  mix-blend-mode: screen;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(90deg, transparent 49%, rgba(255, 222, 177, 0.15) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(255, 222, 177, 0.08) 50%, transparent 51%);
  background-size: 83px 97px, 71px 61px;
  filter: contrast(170%);
}

.cursor-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    18rem circle at var(--pointer-x) var(--pointer-y),
    rgba(217, 139, 66, 0.09),
    transparent 70%
  );
}

.site-header {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(100% - 2rem, 1440px);
  min-height: 78px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  width: fit-content;
  text-decoration: none;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: var(--black);
  background: var(--cream);
  box-shadow: 4px 4px 0 #6f4b2d;
}

nav {
  display: flex;
  gap: clamp(1rem, 4vw, 3.5rem);
}

nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 140ms ease, text-shadow 140ms ease;
}

nav a:hover,
nav a:focus-visible {
  color: var(--cream);
  text-shadow: 0 0 14px var(--amber);
}

.live-state {
  justify-self: end;
  color: var(--muted);
  font-size: 0.82rem;
}

.live-state i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 0.45rem;
  background: var(--amber);
  box-shadow: 0 0 12px var(--amber);
  animation: blink 1.8s steps(1) infinite;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  align-items: center;
  width: min(100% - 2rem, 1440px);
  min-height: calc(100vh - 78px);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 7rem) 0;
  gap: clamp(2rem, 7vw, 8rem);
}

.eyebrow,
.section-label,
.token-kicker {
  margin: 0 0 1.2rem;
  color: var(--amber);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 0;
  color: var(--cream);
  font-family: "Arial Black", Arial, sans-serif;
  font-size: clamp(4.25rem, 9vw, 8.75rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.02em;
  font-kerning: normal;
  text-transform: lowercase;
  text-shadow:
    3px 3px 0 #6d4930,
    6px 6px 0 rgba(0, 0, 0, 0.88),
    0 0 18px rgba(255, 207, 151, 0.15);
}

.glitch::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: var(--amber);
  clip-path: inset(42% 0 43% 0);
  transform: translateX(0.035em);
  animation: glitch 4.6s steps(1) infinite;
}

.ticker {
  width: fit-content;
  margin: 1.45rem 0 2rem;
  padding: 0.32rem 0.65rem;
  color: var(--black);
  background: var(--cream);
  box-shadow: 5px 5px 0 #6d4930;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-line {
  margin-bottom: 0.45rem;
  font-size: clamp(1.45rem, 2.5vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
}

.hero-body {
  max-width: 39rem;
  margin-bottom: 2rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions,
.token-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.pixel-button {
  position: relative;
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1.25rem 0.75rem 0.75rem;
  color: var(--black);
  border: 2px solid var(--cream);
  background: var(--cream);
  box-shadow: 5px 5px 0 #6d4930;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  transition: transform 100ms steps(2), box-shadow 100ms steps(2), background 120ms ease;
}

.pixel-button::after {
  content: "";
  position: absolute;
  inset: 4px -6px -6px 4px;
  z-index: -1;
  border-right: 2px solid rgba(255, 229, 189, 0.32);
  border-bottom: 2px solid rgba(255, 229, 189, 0.32);
}

.pixel-button:hover,
.pixel-button:focus-visible {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 #6d4930;
  background: #fff0d6;
}

.button-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--cream);
  background: var(--black);
  font-family: Impact, sans-serif;
  font-size: 1.1rem;
}

.signal-frame {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  margin: 0;
  transform: perspective(900px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  transition: transform 160ms ease-out;
}

.signal-frame::before,
.signal-frame::after {
  content: "";
  position: absolute;
  z-index: -1;
  background: rgba(255, 218, 168, 0.08);
}

.signal-frame::before {
  inset: 8% -3% -3% 7%;
  border: 1px solid var(--line);
}

.signal-frame::after {
  inset: -3% 8% 5% -3%;
  border: 1px solid rgba(217, 139, 66, 0.16);
}

.screen-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 229, 189, 0.42);
  background: #000;
  box-shadow:
    0 0 55px rgba(217, 139, 66, 0.18),
    12px 12px 0 rgba(56, 39, 26, 0.58);
}

.screen-shell img {
  display: block;
  width: 100%;
  height: auto;
  filter: contrast(1.08) sepia(0.08);
}

.screen-scan {
  position: absolute;
  inset: -40% 0 auto;
  height: 40%;
  opacity: 0.26;
  background: linear-gradient(transparent, rgba(255, 229, 189, 0.24), transparent);
  animation: scan 5.5s linear infinite;
}

figcaption {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

.manifesto {
  width: min(100% - 2rem, 1440px);
  margin: 0 auto;
  padding: clamp(5rem, 10vw, 10rem) 0;
  border-top: 1px solid var(--line);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label span {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border: 1px solid currentColor;
}

.section-label p {
  margin: 0;
}

.manifesto-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  align-items: end;
  gap: clamp(2rem, 8vw, 9rem);
}

.manifesto h2,
.token-panel h2 {
  margin-bottom: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(3rem, 7vw, 7.4rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.manifesto-copy > p {
  margin-bottom: 0.6rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.signal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(3rem, 7vw, 7rem);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.signal-grid article {
  min-height: 220px;
  padding: 1.5rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 229, 189, 0.025), transparent 60%);
}

.signal-grid article > span {
  color: var(--amber);
  font-size: 0.78rem;
}

.signal-grid h3 {
  margin: 5.7rem 0 0.2rem;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.signal-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.token-section {
  padding: clamp(4rem, 8vw, 8rem) max(1rem, calc((100vw - 1440px) / 2));
  color: var(--black);
  background: var(--paper);
  box-shadow: inset 0 18px 40px rgba(52, 29, 12, 0.22);
}

.section-label.light,
.token-kicker {
  color: #76502e;
}

.token-panel {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 7vw, 7rem);
  align-items: end;
}

.token-panel h2 {
  font-size: clamp(3.6rem, 8vw, 8.8rem);
}

.token-note {
  max-width: 30rem;
  margin: 1.2rem 0 0;
  color: #705a43;
}

.ca-box {
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  padding: 1.35rem;
  overflow: hidden;
  color: var(--cream);
  border: 0;
  outline: 2px solid var(--black);
  outline-offset: 5px;
  background: var(--black);
  cursor: pointer;
  text-align: left;
  box-shadow: 10px 10px 0 rgba(81, 52, 28, 0.48);
}

.ca-box:hover,
.ca-box:focus-visible {
  background: #18110c;
  outline-color: #734820;
}

.ca-box span,
.ca-box em {
  color: var(--amber);
  font-size: 0.72rem;
  font-style: normal;
  letter-spacing: 0.15em;
}

.ca-box strong {
  display: block;
  max-width: 100%;
  margin: 0.85rem 0 1.1rem;
  overflow-wrap: anywhere;
  font-size: clamp(1rem, 2vw, 1.45rem);
}

.copy-status {
  grid-column: 2;
  min-height: 1.5rem;
  margin: -1.2rem 0 0;
  color: #705a43;
  font-size: 0.88rem;
}

.token-actions {
  grid-column: 2;
}

.pixel-button.dark {
  color: var(--cream);
  border-color: var(--black);
  background: var(--black);
  box-shadow: 5px 5px 0 #76502e;
}

.pixel-button.dark:hover,
.pixel-button.dark:focus-visible {
  background: #211710;
}

.pixel-button.dark .button-icon {
  color: var(--black);
  background: var(--cream);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem max(1rem, calc((100vw - 1440px) / 2));
  color: var(--muted);
  background: var(--black);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

footer p {
  margin: 0;
}

@keyframes blink {
  0%, 68% { opacity: 1; }
  69%, 100% { opacity: 0.25; }
}

@keyframes glitch {
  0%, 86%, 100% { transform: translateX(0.035em); }
  87% { transform: translateX(-0.025em); }
  89% { transform: translateX(0.06em); }
  91% { transform: translateX(0); }
}

@keyframes scan {
  from { transform: translateY(0); }
  to { transform: translateY(350%); }
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-header nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 5rem;
  }

  .hero-copy {
    position: relative;
    z-index: 2;
  }

  .signal-frame {
    width: min(100%, 680px);
  }

  .manifesto-copy,
  .token-panel {
    grid-template-columns: 1fr;
  }

  .copy-status,
  .token-actions {
    grid-column: 1;
  }
}

@media (max-width: 640px) {
  .site-header {
    width: min(100% - 1.25rem, 1440px);
  }

  .brand {
    font-size: 0.86rem;
  }

  .live-state {
    font-size: 0.7rem;
  }

  .hero,
  .manifesto {
    width: min(100% - 1.25rem, 1440px);
  }

  .hero {
    min-height: auto;
    gap: 4rem;
  }

  h1 {
    font-size: clamp(3.65rem, 19vw, 6rem);
    line-height: 0.96;
    letter-spacing: -0.025em;
  }

  .hero-actions,
  .token-actions {
    display: grid;
  }

  .pixel-button {
    width: 100%;
  }

  figcaption {
    gap: 0.6rem;
    font-size: 0.65rem;
  }

  .manifesto h2 {
    font-size: clamp(2.7rem, 14vw, 4.4rem);
  }

  .signal-grid {
    grid-template-columns: 1fr;
  }

  .signal-grid article {
    min-height: 160px;
  }

  .signal-grid h3 {
    margin-top: 3.4rem;
  }

  footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
