:root {
  --ink: #07090e;
  --navy: #0b1c33;
  --navy-deep: #061018;
  --gold: #f5c542;
  --gold-hot: #ffe07a;
  --crimson: #c41e3a;
  --paper: #f3e6c4;
  --paper-dark: #e4d2a4;
  --cream: #fff6df;
  --flag-blue: #1b365d;
  --gutter: #090b10;
  --spine: 44px;
  --frame: 10px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--cream);
  background: var(--ink);
  font-family: "Comic Neue", "Trebuchet MS", sans-serif;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

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

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 80;
  background: var(--gold);
  color: var(--ink);
  padding: 8px 12px;
}

/* Page sitting inside a printed comic issue */
.issue-frame {
  pointer-events: none;
  position: fixed;
  inset: 8px;
  z-index: 60;
  border: 3px solid var(--ink);
  box-shadow:
    0 0 0 5px var(--gold),
    0 0 0 8px var(--ink),
    inset 0 0 0 1px rgba(243, 230, 196, 0.25);
}

.spine {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 55;
  width: var(--spine);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(
      180deg,
      #9b1730 0 18px,
      #c41e3a 18px 36px
    );
  color: var(--gold);
  font-family: "Bangers", system-ui, sans-serif;
  letter-spacing: 0.42em;
  text-orientation: mixed;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  border-right: 4px solid var(--ink);
  text-shadow: 0 2px 0 var(--ink);
}

.dots,
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
}

.dots {
  z-index: 40;
  opacity: 0.09;
  background-image: radial-gradient(circle, #000 1.15px, transparent 1.4px);
  background-size: 7px 7px;
  mix-blend-mode: multiply;
}

.grain {
  z-index: 41;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.page {
  position: relative;
  margin-left: var(--spine);
  background: var(--navy-deep);
}

/* NAV */
.mast {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 22px 10px 18px;
  background: linear-gradient(180deg, #120e0a 0%, #1a140c 100%);
  border-bottom: 4px solid var(--ink);
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.35);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--gold);
  background: var(--navy);
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 0.95;
}

.brand-name strong {
  font-family: "Bangers", system-ui, sans-serif;
  font-size: 1.7rem;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.brand-name span {
  font-family: "Cinzel", serif;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-family: "Bangers", system-ui, sans-serif;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  padding: 8px 12px;
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--crimson);
}

.nav-links a:hover {
  transform: rotate(-2deg) translateY(-1px);
}

.nav-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  font-family: "Bangers", system-ui, sans-serif;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  padding: 8px 12px;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.icon-btn i {
  font-size: 1.05rem;
}

.icon-x {
  background: var(--cream);
  color: var(--ink);
}

.icon-buy {
  background: var(--gold);
  color: var(--ink);
}

.icon-dex {
  background: #1db954;
  color: var(--ink);
}

.icon-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 var(--ink);
}

/* HERO — camera from stage right, cover of the issue */
.hero {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 9, 14, 0.12) 0%, rgba(7, 9, 14, 0.2) 38%, rgba(7, 9, 14, 0.72) 100%),
    url("1.png") left center / cover no-repeat;
  transform: scale(1.06);
  filter: saturate(1.08) contrast(1.05);
}

.hero-speed {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    108deg,
    transparent 0 14px,
    rgba(245, 197, 66, 0.035) 14px 15px
  );
  mix-blend-mode: overlay;
}

.hero-stage {
  perspective: 1600px;
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 100vh;
  padding: 48px 48px 72px 36px;
}

.hero-copy {
  width: min(540px, 100%);
  transform: rotateY(-9deg) rotateX(3deg);
  transform-style: preserve-3d;
}

.hero-mark {
  width: 84px;
  height: 84px;
  object-fit: cover;
  margin-bottom: 12px;
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--gold);
  background: var(--navy);
  transform: rotate(-6deg);
}

.kicker {
  display: inline-block;
  margin-bottom: 10px;
  padding: 5px 10px;
  background: var(--crimson);
  color: var(--gold);
  border: 3px solid var(--ink);
  font-family: "Bangers", system-ui, sans-serif;
  letter-spacing: 0.16em;
  font-size: 0.95rem;
  box-shadow: 4px 4px 0 var(--ink);
}

.hero h1 {
  margin: 0 0 8px;
  font-family: "Cinzel", serif;
  font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  line-height: 1.05;
  color: var(--gold-hot);
  text-shadow:
    3px 3px 0 var(--ink),
    0 0 24px rgba(245, 197, 66, 0.35);
}

.hero h1 em {
  display: block;
  font-style: normal;
  font-family: "Bangers", system-ui, sans-serif;
  font-size: 0.72em;
  letter-spacing: 0.08em;
  color: var(--cream);
}

.sfx {
  display: inline-block;
  margin: 8px 0 14px;
  font-family: "Bangers", system-ui, sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 0.04em;
  color: var(--crimson);
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 5px 5px 0 var(--gold);
  transform: rotate(-3deg);
}

.bubble {
  position: relative;
  margin: 0 0 18px;
  padding: 16px 18px 20px;
  background: var(--cream);
  color: var(--ink);
  border: 4px solid var(--ink);
  border-radius: 28px 28px 28px 8px;
  box-shadow: 8px 10px 0 var(--ink);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.45;
}

.bubble::after {
  content: "";
  position: absolute;
  left: 28px;
  bottom: -18px;
  border-width: 18px 8px 0 22px;
  border-style: solid;
  border-color: var(--ink) transparent transparent transparent;
}

.ca-tape {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 18px 0;
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--crimson);
  background: var(--paper);
  color: var(--ink);
}

.ca-tape span {
  padding: 8px 10px;
  background: var(--gold);
  font-family: "Bangers", system-ui, sans-serif;
  letter-spacing: 0.12em;
  border-right: 4px solid var(--ink);
}

.ca-tape code {
  flex: 1;
  padding: 8px 10px;
  font-size: 0.78rem;
  word-break: break-all;
  font-family: ui-monospace, "Cascadia Code", monospace;
}

.ca-tape button {
  border: 0;
  border-left: 4px solid var(--ink);
  background: var(--navy);
  color: var(--gold);
  padding: 0 12px;
  cursor: pointer;
  font-family: "Bangers", system-ui, sans-serif;
  letter-spacing: 0.08em;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: "Bangers", system-ui, sans-serif;
  letter-spacing: 0.06em;
  font-size: 1.15rem;
  padding: 11px 16px;
  border: 4px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
  transform: rotate(-2deg);
}

.btn-green {
  background: #19b34c;
  color: var(--ink);
  transform: rotate(1.5deg);
}

.btn-paper {
  background: var(--cream);
  color: var(--ink);
}

.btn:hover {
  transform: translate(-2px, -2px) rotate(0deg);
  box-shadow: 8px 8px 0 var(--ink);
}

/* Banner used as a bound insert — never in the hero */
.insert {
  position: relative;
  z-index: 3;
  margin: -28px 28px 0;
  border: 5px solid var(--ink);
  box-shadow: 12px 14px 0 rgba(0, 0, 0, 0.55);
  transform: rotate(-1.4deg);
  overflow: hidden;
  background: var(--navy);
}

.insert img {
  width: 100%;
  height: 168px;
  object-fit: cover;
  object-position: center 30%;
  filter: saturate(1.1);
}

.insert-caption {
  position: absolute;
  right: 14px;
  bottom: 10px;
  padding: 4px 10px;
  background: var(--gold);
  color: var(--ink);
  border: 3px solid var(--ink);
  font-family: "Bangers", system-ui, sans-serif;
  letter-spacing: 0.1em;
}

/* ABOUT — open two-page spread */
.about {
  position: relative;
  padding: 88px 36px 72px;
  isolation: isolate;
}

.about-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 10, 16, 0.78) 0%, rgba(7, 10, 16, 0.55) 48%, rgba(7, 10, 16, 0.22) 100%),
    url("2.png") center 20% / cover no-repeat;
}

.section-head {
  position: relative;
  z-index: 2;
  margin-bottom: 22px;
}

.issue-tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 9px;
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink);
  font-family: "Bangers", system-ui, sans-serif;
  letter-spacing: 0.14em;
}

.section-head h2 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: clamp(2rem, 4vw, 3.1rem);
  color: var(--gold);
  text-shadow: 3px 3px 0 var(--ink);
}

.spread {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 18px 1fr;
  gap: 0;
  perspective: 1800px;
}

.leaf {
  background: linear-gradient(180deg, rgba(243, 230, 196, 0.96), rgba(228, 210, 164, 0.94));
  color: var(--ink);
  border: 4px solid var(--ink);
  padding: 22px 22px 26px;
  min-height: 340px;
}

.leaf-left {
  transform: rotateY(8deg);
  transform-origin: right center;
  box-shadow: -18px 16px 0 rgba(0, 0, 0, 0.35);
}

.leaf-right {
  transform: rotateY(-8deg);
  transform-origin: left center;
  box-shadow: 18px 16px 0 rgba(0, 0, 0, 0.35);
}

.bind {
  background:
    linear-gradient(90deg, #1a120c, #3a2a1c 45%, #1a120c),
    repeating-linear-gradient(180deg, transparent 0 16px, rgba(0, 0, 0, 0.25) 16px 17px);
  border-top: 4px solid var(--ink);
  border-bottom: 4px solid var(--ink);
}

.leaf h3 {
  margin: 0 0 10px;
  font-family: "Bangers", system-ui, sans-serif;
  letter-spacing: 0.06em;
  font-size: 1.7rem;
  color: var(--crimson);
}

.leaf p {
  margin: 0;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 0.98rem;
  line-height: 1.65;
}

.stamps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.stamp {
  padding: 10px 8px;
  text-align: center;
  border: 3px dashed var(--ink);
  background: repeating-linear-gradient(
    45deg,
    #fff6df,
    #fff6df 8px,
    #f3e6c4 8px 16px
  );
  font-family: "Bangers", system-ui, sans-serif;
  letter-spacing: 0.08em;
  font-size: 1.05rem;
  transform: rotate(-1.5deg);
}

.stamp:nth-child(2) {
  transform: rotate(2deg);
}

.stamp:nth-child(3) {
  transform: rotate(1.5deg);
}

.stamp:nth-child(4) {
  transform: rotate(-2.2deg);
}

.stamp small {
  display: block;
  margin-top: 4px;
  font-family: "Comic Neue", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0;
  font-weight: 700;
}

/* HOW TO BUY — exploded comic page, dutch angles */
.howto {
  position: relative;
  padding: 80px 36px 90px;
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 197, 66, 0.08), transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(196, 30, 58, 0.12), transparent 40%),
    repeating-linear-gradient(
      0deg,
      #10161f 0 28px,
      #0d131b 28px 29px
    );
}

.howto .section-head {
  text-align: left;
}

.howto-stage {
  perspective: 1500px;
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 1.1fr;
  grid-template-areas:
    "one one two"
    "three four two";
  gap: 16px;
  margin-top: 10px;
}

.panel {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 4px solid var(--ink);
  box-shadow: 10px 12px 0 var(--ink);
  color: var(--cream);
  transform-style: preserve-3d;
}

.panel-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(0.9) contrast(1.05);
  transform: scale(1.08);
}

.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 9, 14, 0.25), rgba(7, 9, 14, 0.78));
}

.panel-body {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.burst-no {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: var(--gold);
  color: var(--ink);
  border: 3px solid var(--ink);
  font-family: "Bangers", system-ui, sans-serif;
  font-size: 1.5rem;
  clip-path: polygon(
    50% 0%,
    63% 18%,
    84% 12%,
    76% 32%,
    100% 42%,
    78% 54%,
    88% 76%,
    66% 70%,
    58% 100%,
    50% 80%,
    38% 100%,
    34% 70%,
    12% 76%,
    24% 54%,
    0 42%,
    24% 32%,
    16% 12%,
    37% 18%
  );
}

.panel h3 {
  margin: 0 0 6px;
  font-family: "Bangers", system-ui, sans-serif;
  font-size: 1.7rem;
  letter-spacing: 0.04em;
  text-shadow: 3px 3px 0 var(--ink);
}

.panel p {
  margin: 0;
  font-weight: 700;
  line-height: 1.4;
}

.tape {
  position: absolute;
  top: -8px;
  left: 28%;
  z-index: 4;
  width: 86px;
  height: 22px;
  background: rgba(245, 197, 66, 0.55);
  border-left: 2px solid rgba(255, 255, 255, 0.25);
  border-right: 2px solid rgba(255, 255, 255, 0.25);
  transform: rotate(-9deg);
}

.p1 {
  grid-area: one;
  transform: rotateY(-11deg) rotateZ(-1.5deg);
}

.p2 {
  grid-area: two;
  transform: rotateY(10deg) rotateX(3deg);
}

.p3 {
  grid-area: three;
  transform: rotateY(-7deg) rotateZ(1.5deg);
}

.p4 {
  grid-area: four;
  transform: rotateY(8deg) rotateZ(-2deg);
}

.p1 .panel-bg {
  background-image: url("logo.png");
  background-color: #1a140c;
  background-size: contain;
  background-repeat: no-repeat;
}

.p2 .panel-bg {
  background-image: url("2.png");
}

.p3 .panel-bg {
  background-image: url("1.png");
}

.p4 .panel-bg {
  background-image: url("3.png");
}

.howto-note {
  position: relative;
  z-index: 2;
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.howto-note .sfx {
  margin: 0;
  color: var(--gold);
}

/* COMMUNITY — back-cover rally poster */
.community {
  position: relative;
  min-height: 86vh;
  padding: 80px 40px 100px;
  isolation: isolate;
  overflow: hidden;
}

.community-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 12, 22, 0.86) 0%, rgba(6, 12, 22, 0.55) 42%, rgba(6, 12, 22, 0.18) 100%),
    url("3.png") right center / cover no-repeat;
}

.poster {
  position: relative;
  z-index: 2;
  max-width: 560px;
  transform: rotateY(8deg) rotateZ(-1deg);
  transform-style: preserve-3d;
  background: rgba(243, 230, 196, 0.94);
  color: var(--ink);
  border: 5px solid var(--ink);
  padding: 26px 24px 22px;
  box-shadow: 18px 20px 0 rgba(0, 0, 0, 0.45);
}

.poster .issue-tag {
  background: var(--crimson);
  color: var(--gold);
}

.poster h2 {
  margin: 8px 0 12px;
  font-family: "Cinzel", serif;
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  line-height: 1.1;
}

.poster p {
  margin: 0 0 18px;
  font-family: "Libre Baskerville", Georgia, serif;
  line-height: 1.6;
}

.poster-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.poster-logo {
  margin-top: 18px;
  width: 92px;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--gold);
}

/* FOOTER uses the banner as a closing credits plate */
.credits {
  position: relative;
  border-top: 6px solid var(--ink);
}

.credits img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  object-position: center 40%;
  filter: saturate(1.05);
}

.credits-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 28px 22px;
  background: #100c08;
  color: var(--paper);
  font-size: 0.88rem;
  border-top: 4px solid var(--ink);
}

.credits-bar strong {
  font-family: "Bangers", system-ui, sans-serif;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.menu-btn {
  display: none;
  background: var(--gold);
  color: var(--ink);
  border: 3px solid var(--ink);
  font-family: "Bangers", system-ui, sans-serif;
  letter-spacing: 0.08em;
  padding: 8px 12px;
  cursor: pointer;
}

@media (max-width: 1080px) {
  .hero-stage {
    padding: 36px 22px 64px;
  }

  .hero-copy,
  .leaf-left,
  .leaf-right,
  .p1,
  .p2,
  .p3,
  .p4,
  .poster {
    transform: none;
  }

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

  .bind {
    height: 14px;
  }

  .howto-stage {
    grid-template-columns: 1fr;
    grid-template-areas:
      "one"
      "two"
      "three"
      "four";
  }

  .insert {
    margin: -16px 14px 0;
  }

  .insert img {
    height: 110px;
  }
}

@media (max-width: 820px) {
  .spine,
  .issue-frame {
    display: none;
  }

  .page {
    margin-left: 0;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 74px;
    left: 12px;
    right: 12px;
    flex-direction: column;
    background: var(--paper);
    border: 4px solid var(--ink);
    padding: 10px;
    box-shadow: 8px 8px 0 var(--ink);
  }

  .nav-links.open {
    display: flex;
  }

  .menu-btn {
    display: inline-block;
  }

  .nav-actions .icon-btn span {
    display: none;
  }

  .mast {
    padding: 10px 12px;
  }
}

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

  .hero-copy,
  .leaf-left,
  .leaf-right,
  .p1,
  .p2,
  .p3,
  .p4,
  .poster,
  .insert {
    transform: none;
  }
}
