:root {
  color-scheme: only light;
  --ink: #151512;
  --paper: #e8e2d2;
  --paper-light: #f5f1e7;
  --line: clamp(2px, 0.25vw, 4px);
}

@font-face {
  font-family: "Alfa Slab One";
  src: url("assets/fonts/alfa-slab-one.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

* { box-sizing: border-box; }
html { background: var(--ink); scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--ink);
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}
button, a { font: inherit; }
button { color: inherit; }

.poster {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background:
    repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), rgb(20 20 18 / 0.045) calc(25% - 1px) 25%),
    repeating-linear-gradient(0deg, rgb(20 20 18 / 0.035) 0 1px, transparent 1px 4px),
    var(--paper);
}
.poster::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(ellipse at 18% 14%, rgb(255 255 255 / 0.3), transparent 25%),
    radial-gradient(ellipse at 72% 82%, rgb(20 20 18 / 0.08), transparent 36%);
  content: "";
  opacity: 0.25;
  pointer-events: none;
}
.grain {
  position: absolute;
  z-index: 20;
  inset: -60%;
  opacity: 0.12;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  animation: grain 0.22s steps(2) infinite;
  mix-blend-mode: multiply;
}

.masthead {
  position: relative;
  z-index: 10;
  display: flex;
  min-height: 58px;
  align-items: stretch;
  justify-content: space-between;
  border-top: 1px solid var(--ink);
  border-bottom: 5px double var(--ink);
  background: var(--paper-light);
}
.coin-mark {
  display: flex;
  align-items: center;
  padding: 0.65rem clamp(0.8rem, 2vw, 1.5rem);
  color: inherit;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-decoration: none;
}
.coin-mark__ram {
  font-family: "Alfa Slab One", Georgia, serif;
  font-size: 1.35rem;
  letter-spacing: 0.03em;
}
.coin-mark__dot { width: 8px; aspect-ratio: 1; border-radius: 50%; background: var(--ink); }
.nav { display: flex; }
.nav a, .nav button {
  display: grid;
  min-width: 74px;
  place-items: center;
  padding: 0.65rem 0.9rem;
  border: 0;
  border-left: var(--line) solid var(--ink);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease;
}
.nav a:hover, .nav a:focus-visible, .nav button:hover, .nav button:focus-visible {
  outline: 0;
  background: var(--ink);
  color: var(--paper-light);
}

.hero {
  position: relative;
  display: grid;
  min-height: calc(100svh - 104px);
  padding: clamp(1rem, 2.2vw, 2rem) clamp(1rem, 3vw, 3rem) clamp(3.5rem, 6vw, 5rem);
  grid-template-columns: minmax(15rem, 0.82fr) minmax(21rem, 1.18fr) minmax(11rem, 0.42fr);
  grid-template-rows: 1fr;
  gap: clamp(0.8rem, 2vw, 2rem);
  align-items: center;
}
.hero-copy { position: relative; z-index: 4; align-self: center; }
h1 {
  margin: 0;
  color: var(--ink);
  font-family: "Alfa Slab One", Georgia, serif;
  font-size: clamp(3.4rem, 8.8vw, 8.9rem);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.73;
  text-transform: uppercase;
  transform: scaleX(0.85);
  transform-origin: left center;
}
h1 span { display: block; }
h1 span:last-child {
  margin: 0.12em 0 0 0.3em;
  letter-spacing: 0.02em;
}
.meme-line {
  width: fit-content;
  margin: clamp(1.2rem, 3vw, 2.5rem) 0 0;
  padding: 0.58rem 0.8rem 0.5rem;
  background: var(--ink);
  color: var(--paper-light);
  font-family: "Courier New", monospace;
  font-size: clamp(0.72rem, 1.2vw, 1rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.15;
  transform: rotate(-2deg);
}
.catchphrase {
  position: absolute;
  z-index: 8;
  right: -2.2rem;
  bottom: -7.8rem;
  margin: 0;
  padding: 0.55rem 0.75rem;
  border: 3px solid var(--ink);
  background: var(--paper-light);
  font-family: "Alfa Slab One", Georgia, serif;
  font-size: clamp(1rem, 1.65vw, 1.55rem);
  letter-spacing: 0.025em;
  line-height: 0.92;
  text-align: center;
  transform: rotate(4deg);
  box-shadow: 5px 5px 0 var(--ink);
}
.catchphrase b { font-size: 1.25em; }

.ram-scene {
  position: relative;
  z-index: 3;
  display: block;
  width: 100%;
  max-width: 700px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  justify-self: center;
  transform: rotate(-1.4deg);
}
.scene-stack {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.12;
  border: var(--line) solid var(--ink);
  background: var(--ink);
  box-shadow: 14px 14px 0 var(--ink);
  overflow: hidden;
  transition: transform 220ms cubic-bezier(.2,.9,.2,1), box-shadow 220ms ease;
}
.ram-scene:hover .scene-stack, .ram-scene:focus-visible .scene-stack {
  transform: translate(-4px, -4px) rotate(1deg);
  box-shadow: 20px 20px 0 var(--ink);
}
.ram-scene:focus-visible { outline: 3px dashed var(--ink); outline-offset: 9px; }
.scene {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.12);
  opacity: 1;
  transform: scale(1);
}
.scene.is-active { opacity: 1; transform: scale(1); }
.burst {
  position: absolute;
  z-index: 5;
  color: var(--paper-light);
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 1;
  text-shadow: -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 2px 2px 0 var(--ink);
  pointer-events: none;
}
.burst-one { top: -0.35em; right: -0.22em; animation: twitch 2.4s steps(2) infinite; }
.burst-two { bottom: 0.12em; left: -0.36em; font-size: clamp(1.8rem, 3vw, 3rem); animation: twitch 1.8s 0.4s steps(2) infinite reverse; }
.baa {
  position: absolute;
  z-index: 8;
  top: 9%;
  right: -2%;
  padding: 0.2em 0.28em;
  border: 3px solid var(--ink);
  background: var(--paper-light);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(2.2rem, 5vw, 5rem);
  letter-spacing: 0.02em;
  opacity: 0;
  transform: rotate(9deg) scale(0.2);
  pointer-events: none;
}
.ram-scene.is-baa .baa { animation: baa-pop 760ms cubic-bezier(.2,1.3,.2,1); }
.ram-scene.is-baa .scene-stack { animation: ram-hit 520ms ease; }
.tap-note {
  position: absolute;
  z-index: 6;
  right: -0.8rem;
  bottom: -1.1rem;
  padding: 0.5rem 0.7rem;
  border: 2px solid var(--ink);
  background: var(--paper-light);
  font-family: "Courier New", monospace;
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  transform: rotate(2deg);
}

.payout {
  position: relative;
  z-index: 5;
  display: flex;
  width: 100%;
  flex-direction: column;
  padding: clamp(1rem, 2vw, 1.5rem);
  border: var(--line) solid var(--ink);
  background: var(--paper-light);
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(1.5deg);
}
.payout::after { position: absolute; right: 0.55rem; bottom: 0.45rem; content: "★"; font-size: 1.25rem; }
.payout__stamp, .payout__code {
  font-family: "Courier New", monospace;
  font-size: clamp(0.58rem, 0.78vw, 0.72rem);
  font-weight: 900;
  letter-spacing: 0.11em;
}
.payout__stamp { padding-bottom: 0.55rem; border-bottom: 1px solid var(--ink); }
.payout strong { margin-top: 0.7rem; font-family: Georgia, serif; font-size: clamp(1.65rem, 2.5vw, 2.7rem); letter-spacing: -0.05em; line-height: 1; }
.payout__code { margin-top: 0.35rem; }
.payout__line {
  margin-top: 1.2rem;
  padding-top: 0.9rem;
  border-top: 2px solid var(--ink);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(1.05rem, 1.8vw, 1.5rem);
  letter-spacing: 0.03em;
  line-height: 0.95;
}
.status {
  position: absolute;
  z-index: 12;
  top: 4.5rem;
  right: 1rem;
  margin: 0;
  padding: 0.42rem 0.65rem;
  background: var(--ink);
  color: var(--paper-light);
  font-family: "Courier New", monospace;
  font-size: 0.68rem;
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-5px);
  transition: opacity 160ms ease, transform 160ms ease;
}
.status:not(:empty) { opacity: 1; transform: translateY(0); }
.ticker {
  position: absolute;
  z-index: 15;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  border-top: var(--line) solid var(--ink);
  background: var(--ink);
  color: var(--paper-light);
}
.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 24s linear infinite;
  font-family: "Courier New", monospace;
  font-size: clamp(0.68rem, 0.9vw, 0.83rem);
  font-weight: 900;
  letter-spacing: 0.07em;
  line-height: 2.7rem;
  white-space: nowrap;
}
.ticker__group { display: flex; min-width: max-content; }
.ticker__group span { min-width: max-content; }

@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes grain { 0% { transform: translate(0); } 25% { transform: translate(2%, -1%); } 50% { transform: translate(-1%, 2%); } 75% { transform: translate(1%, 1%); } 100% { transform: translate(-2%, -1%); } }
@keyframes twitch { 50% { transform: rotate(11deg) scale(0.86); } }
@keyframes baa-pop { 0% { opacity: 0; transform: rotate(9deg) scale(0.2); } 30% { opacity: 1; transform: rotate(-5deg) scale(1); } 75% { opacity: 1; transform: rotate(-2deg) scale(0.94); } 100% { opacity: 0; transform: rotate(8deg) scale(1.25); } }
@keyframes ram-hit { 35% { transform: translateX(12px) rotate(1deg); } 60% { transform: translateX(-5px) rotate(-0.5deg); } }

@media (max-width: 900px) {
  .coin-mark__dot { display: none; }
  .nav a, .nav button { min-width: auto; padding-inline: 0.72rem; }
  .hero {
    min-height: calc(100svh - 104px);
    padding-top: 0.8rem;
    grid-template-columns: minmax(10rem, 0.75fr) minmax(17rem, 1.25fr);
    grid-template-rows: 1fr;
  }
  .hero-copy { align-self: start; }
  h1 { font-size: clamp(4.4rem, 15vw, 8rem); }
  .catchphrase { right: -1rem; bottom: -8.5rem; }
  .payout { grid-column: 1; align-self: end; }
  .ram-scene { grid-column: 2; grid-row: 1; }
}

@media (min-width: 621px) and (max-width: 800px) {
  .hero {
    display: block;
    min-height: calc(100svh - 104px);
    padding: 1rem 1.25rem 4rem;
  }

  .hero-copy {
    width: 100%;
  }

  h1 {
    font-size: clamp(5.5rem, 14vw, 6.5rem);
    line-height: 0.72;
    text-align: center;
    transform: none;
  }

  h1 span:last-child {
    width: min(21rem, 68%);
    margin: 0.14em auto 0;
  }

  .meme-line {
    position: absolute;
    top: calc(100% + 1.2rem);
    left: 0.4rem;
    margin: 0;
    font-size: 0.68rem;
  }

  .catchphrase {
    top: calc(100% + 1.4rem);
    right: 0.6rem;
    bottom: auto;
    font-size: 1rem;
  }

  .ram-scene {
    width: min(68vw, 32rem);
    margin: 3.3rem auto 0;
  }

  .scene-stack {
    aspect-ratio: 1.12;
    box-shadow: 10px 10px 0 var(--ink);
  }

  .payout {
    position: absolute;
    bottom: 4.4rem;
    left: 1.5rem;
    width: 14rem;
    padding: 0.85rem;
    box-shadow: 6px 6px 0 var(--ink);
  }

  .payout strong { font-size: 1.7rem; }
  .payout__line { margin-top: 0.7rem; padding-top: 0.6rem; font-size: 1rem; }
}

@media (max-width: 620px) {
  .poster { min-height: 100svh; }
  .masthead { min-height: 48px; }
  .coin-mark { padding-inline: 0.7rem; }
  .coin-mark__ram { font-size: 1.05rem; }
  .nav a, .nav button { padding: 0.5rem 0.48rem; font-size: 0.54rem; }
  .nav a:nth-child(1) { display: none; }
  .hero { display: block; min-height: calc(100svh - 92px); padding: 0.8rem 0.75rem 4rem; }
  .hero-copy { position: relative; z-index: 7; }
  h1 { font-size: clamp(3.6rem, 20vw, 6.2rem); line-height: 0.72; }
  h1 span:last-child { margin-left: 0.46em; }
  .meme-line { position: absolute; top: calc(100% + 0.8rem); left: 0; margin: 0; font-size: 0.62rem; }
  .catchphrase { right: -0.1rem; bottom: -6.1rem; font-size: 0.9rem; box-shadow: 3px 3px 0 var(--ink); }
  .ram-scene { width: 89%; margin: -0.25rem 0 0 auto; transform: rotate(-1.4deg); }
  .scene-stack { aspect-ratio: 1.07; box-shadow: 8px 8px 0 var(--ink); }
  .tap-note { right: -0.4rem; bottom: -0.85rem; font-size: 0.55rem; }
  .burst-one { right: -0.08em; }
  .burst-two { left: -0.3em; }
  .payout { position: relative; z-index: 8; width: min(16rem, 72%); margin: -1.15rem 0 0 0.15rem; padding: 0.75rem; box-shadow: 5px 5px 0 var(--ink); transform: rotate(1deg); }
  .payout strong { font-size: 1.45rem; }
  .payout__line { margin-top: 0.65rem; padding-top: 0.55rem; font-size: 0.92rem; }
  .status { top: 3.4rem; }
  .ticker__track { line-height: 2.4rem; }
}

@media (max-width: 380px) {
  .nav a, .nav button { padding-inline: 0.38rem; font-size: 0.49rem; }
  h1 { font-size: 4rem; }
  .ram-scene { width: 92%; margin-top: 0.2rem; }
  .payout { margin-top: -0.8rem; }
}

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

/* Final layout guard: editorial elements never cover the hero photograph. */
@media (min-width: 801px) {
  .hero {
    grid-template-columns: minmax(15rem, 0.9fr) minmax(21rem, 1.15fr) minmax(11rem, 0.5fr);
  }

  h1 {
    font-size: clamp(3rem, 7.2vw, 7.2rem);
    transform: scaleX(0.76);
  }

  .catchphrase {
    position: static;
    width: fit-content;
    margin: 1rem 0 0 auto;
    transform: rotate(2deg);
  }
}

@media (min-width: 801px) and (max-width: 1100px) {
  .hero {
    grid-template-columns: minmax(13rem, 0.58fr) minmax(0, 1.55fr);
    grid-template-rows: auto auto;
    column-gap: clamp(1.25rem, 3vw, 2rem);
    row-gap: 1.4rem;
  }

  .hero-copy {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
  }

  h1 {
    font-size: clamp(3.4rem, 7.2vw, 5.4rem);
  }

  .ram-scene {
    width: 100%;
    max-width: none;
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .payout {
    width: 100%;
    grid-column: 1;
    grid-row: 2;
    align-self: end;
  }
}

@media (max-width: 800px) {
  .poster { overflow: hidden; }

  .hero {
    display: flex;
    min-height: auto;
    padding: 1rem clamp(0.75rem, 3vw, 1.4rem) 2rem;
    flex-direction: column;
    gap: 1.15rem;
  }

  .hero-copy {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    align-items: start;
  }

  h1 {
    grid-column: 1 / -1;
    font-size: clamp(3.6rem, 14vw, 6.5rem);
    line-height: 0.72;
    text-align: center;
    transform: none;
  }

  h1 span:last-child {
    width: min(21rem, 68%);
    margin: 0.14em auto 0;
  }

  .meme-line,
  .catchphrase {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    margin: 0;
  }

  .meme-line { justify-self: start; }

  .catchphrase {
    justify-self: end;
    align-self: center;
    font-size: clamp(0.78rem, 2.1vw, 1rem);
    transform: rotate(2deg);
  }

  .ram-scene {
    width: min(90%, 32rem);
    margin: 0 auto;
    align-self: center;
  }

  .scene-stack {
    aspect-ratio: 1.12;
    box-shadow: 9px 9px 0 var(--ink);
  }

  .payout {
    position: static;
    width: min(100%, 22rem);
    margin: 0;
    align-self: flex-start;
    padding: 0.85rem;
    box-shadow: 6px 6px 0 var(--ink);
  }

  .payout strong { font-size: 1.7rem; }
  .payout__line { margin-top: 0.7rem; padding-top: 0.6rem; font-size: 1rem; }

  .ticker { position: relative; }
}

@media (max-width: 620px) {
  .hero { padding-top: 0.7rem; gap: 0.9rem; }
  h1 { font-size: clamp(3.2rem, 17vw, 5.1rem); }
  .ram-scene { width: min(94%, 29rem); }
  .payout { width: min(72%, 16rem); }
}
