:root {
  --ink: #14110e;
  --paper: #f4ecdc;
  --yellow: #ffe15a;
  --sky: #b9e4ff;
  --peach: #ffd0a6;
  --pink: #ff6d8a;
  --desk: #10283a;
  --display: "Knewave", "Comic Sans MS", cursive;
  --body: "Comic Neue", "Comic Sans MS", cursive;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.08rem;
  line-height: 1.45;
  background: var(--desk);
  overflow-x: hidden;
}

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

a { color: inherit; }

button, a { font-family: inherit; }

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 120%, #061018 0%, transparent 55%),
    radial-gradient(ellipse at 50% -10%, #1d4a66 0%, transparent 50%),
    var(--desk);
}

.lamp {
  position: absolute;
  width: 70vw;
  height: 55vh;
  left: -10vw;
  top: -18vh;
  background: radial-gradient(ellipse at center, rgba(255, 226, 176, 0.42), rgba(255, 226, 176, 0) 68%);
  filter: blur(2px);
}

.sweep {
  position: absolute;
  top: -30%;
  bottom: -30%;
  width: 32%;
  left: -40%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.02) 30%,
    rgba(255, 255, 255, 0.62) 50%,
    rgba(255, 255, 255, 0.02) 70%,
    transparent 100%
  );
  transform: skewX(-16deg);
  animation: shine 7.5s ease-in-out infinite;
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    118deg,
    transparent 18%,
    rgba(255, 244, 214, 0.16) 36%,
    rgba(255, 255, 255, 0.28) 46%,
    transparent 62%
  );
}

.stage {
  position: relative;
  z-index: 1;
  perspective: 1600px;
  padding: 4.5vh 5vw 8vh;
}

.issue {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1rem;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(20, 17, 14, 0.16) 0.7px, transparent 0.8px);
  background-size: 6px 6px;
  border: 4px solid var(--ink);
  box-shadow:
    0 30px 50px rgba(0, 0, 0, 0.35),
    18px 28px 0 rgba(0, 0, 0, 0.28);
  transform: rotateX(8deg) rotateY(-7deg);
  transform-origin: center top;
  transition: transform 0.45s ease;
}

.issue:hover { transform: rotateX(3deg) rotateY(-2deg); }

.mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
  padding: 0.35rem 0.2rem 0.7rem;
  border-bottom: 4px solid var(--ink);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.logo img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  object-position: center 28%;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #fff;
}

.logo strong {
  display: block;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.logo em {
  font-style: normal;
  font-weight: 700;
  font-size: 0.86rem;
}

.issue-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.issue-nav a,
.ink-btn,
.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0.3rem 0.75rem;
  border: 3px solid var(--ink);
  background: #fff;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}

.issue-nav a:hover,
.ink-btn:hover,
.menu-btn:hover { background: var(--yellow); }

.nav-buy,
.ink-btn { background: var(--pink); }

.menu-btn { display: none; }

.panels { display: grid; gap: 12px; }

.panel {
  position: relative;
  border: 4px solid var(--ink);
  background: #fffdf8;
  overflow: hidden;
}

.panel-no {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  margin: 0;
  padding: 0.1rem 0.45rem;
  background: var(--ink);
  color: #fff;
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.splash {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  min-height: 460px;
  background:
    repeating-linear-gradient(-18deg, transparent, transparent 10px, rgba(20, 17, 14, 0.05) 10px, rgba(20, 17, 14, 0.05) 12px),
    var(--yellow);
}

.splash-copy {
  padding: 1.4rem 1.2rem 1.3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kicker {
  margin: 0 0 0.3rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  line-height: 0.9;
}

h1 { font-size: clamp(4.2rem, 8vw, 6.4rem); }

h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 0.55rem; }

.bubble {
  position: relative;
  align-self: flex-start;
  max-width: 22rem;
  margin: 0.8rem 0 0;
  padding: 0.7rem 0.9rem 0.75rem;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 18px 18px 18px 4px;
  font-weight: 700;
}

.stamp {
  align-self: flex-start;
  margin: 0.9rem 0 0;
  padding: 0.15rem 0.55rem;
  background: var(--pink);
  border: 3px solid var(--ink);
  font-family: var(--display);
  font-size: 1.7rem;
  transform: rotate(-2deg);
}

.ca-strip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  margin-top: 0.95rem;
  margin-bottom: 1.2rem;
  padding: 0.35rem 0.4rem 0.35rem 0.7rem;
  background: #fff;
  border: 3px solid var(--ink);
}

.ca-strip span {
  font-family: var(--display);
  font-size: 1rem;
}

.ca-strip code {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.86rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ca-strip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 3px solid var(--ink);
  background: var(--yellow);
  cursor: pointer;
}

.ca-strip button.is-copied { background: #9ae6a0; }

.ca-strip em {
  position: absolute;
  left: 0;
  top: calc(100% + 0.2rem);
  font-style: normal;
  font-weight: 700;
  font-size: 0.85rem;
}

.splash-art {
  margin: 0;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.splash-art img {
  width: min(520px, 100%);
  mix-blend-mode: multiply;
  cursor: pointer;
  transform-origin: center bottom;
}

.splash-art img.shake { animation: boing 0.45s ease; }

.pow {
  position: absolute;
  top: 12%;
  right: 6%;
  margin: 0;
  padding: 0.2rem 0.7rem;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 999px;
  font-family: var(--display);
  font-size: 1.8rem;
  opacity: 0;
  transform: rotate(8deg) scale(0.7);
}

.pow.show { animation: pop 0.7s ease; }

.inset {
  background: var(--sky);
  min-height: 280px;
}

.inset img,
.wide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
}

.inset img {
  height: 300px;
  object-fit: contain;
  object-position: center 20%;
}

.caption {
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  bottom: 0.6rem;
  margin: 0;
  padding: 0.35rem 0.55rem;
  background: var(--yellow);
  border: 3px solid var(--ink);
  font-weight: 700;
}

.narration {
  padding: 1.5rem 1.15rem 1.2rem;
  background: #fff;
}

.narration p { margin: 0 0 0.8rem; font-weight: 700; }

.narration ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.narration li {
  padding: 0.35rem 0.55rem;
  border: 3px solid var(--ink);
  background: var(--sky);
  font-weight: 700;
}

.narration b {
  display: inline-block;
  margin-right: 0.4rem;
  font-family: var(--display);
  font-weight: 400;
}

.panels {
  grid-template-columns: 0.85fr 1.15fr;
}

.splash,
.wide,
.stats,
.buy-row,
.mail { grid-column: 1 / -1; }

.wide {
  background: var(--peach);
  min-height: 340px;
}

.wide img {
  height: 440px;
  object-fit: contain;
  object-position: center bottom;
}

.wide-cap { left: auto; right: 1rem; max-width: 16rem; background: #fff; }

.stats,
.buy-row {
  display: grid;
  gap: 12px;
}

.stats { grid-template-columns: repeat(4, 1fr); }

.buy-row { grid-template-columns: repeat(3, 1fr); }

.stat, .step {
  min-height: 180px;
  padding: 1.5rem 0.9rem 0.9rem;
}

.stat:nth-child(1) { background: var(--yellow); }
.stat:nth-child(2) { background: var(--sky); }
.stat:nth-child(3) { background: var(--peach); }
.stat:nth-child(4) { background: #ffd0dc; }

.stat h3, .step h3 {
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
}

.big {
  margin: 0.2rem 0 0.5rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.stat .caption {
  position: static;
  margin-top: 0.6rem;
}

.step { background: #fff; }

.step p { margin: 0.35rem 0 0.8rem; font-weight: 700; }

.step-last { background: var(--yellow); }

.ink-btn { margin-top: 0.2rem; }

.mail {
  padding: 1.4rem 1.15rem 1.2rem;
  background-color: #fffdf6;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 27px,
    rgba(20, 17, 14, 0.18) 27px,
    rgba(20, 17, 14, 0.18) 28px
  );
  background-position: 0 1.1rem;
}

.mail h2, .mail > p { position: relative; }

.mail > p { margin: 0.4rem 0 0.9rem; font-weight: 700; }

.mail-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.mail-links a {
  min-height: 2.6rem;
  padding: 0.4rem 0.9rem;
  display: inline-flex;
  align-items: center;
  background: var(--ink);
  color: #fff;
  border: 3px solid var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.mail-links a:hover { background: var(--pink); color: var(--ink); }

.colophon {
  margin-top: 0.8rem;
  padding-top: 0.7rem;
  border-top: 4px solid var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
}

.colophon p { margin: 0.15rem 0; }

:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
}

@keyframes shine {
  0% { left: -45%; }
  55% { left: 120%; }
  100% { left: 120%; }
}

@keyframes boing {
  0% { transform: scale(1, 1); }
  35% { transform: scale(1.05, 0.93) rotate(-1deg); }
  70% { transform: scale(0.97, 1.04) rotate(1deg); }
  100% { transform: scale(1, 1); }
}

@keyframes pop {
  0% { opacity: 0; transform: rotate(8deg) scale(0.6); }
  30% { opacity: 1; transform: rotate(-6deg) scale(1.08); }
  100% { opacity: 0; transform: translateY(-16px) rotate(-4deg) scale(1); }
}

@media (max-width: 860px) {
  .stage { perspective: none; padding: 1rem 0.8rem 2rem; }

  .issue { transform: none; box-shadow: 8px 10px 0 rgba(0, 0, 0, 0.28); }

  .issue:hover { transform: none; }

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

  .issue-nav {
    display: none;
    position: absolute;
    z-index: 5;
    top: 5.4rem;
    left: 1rem;
    right: 1rem;
    flex-direction: column;
    padding: 0.5rem;
    background: var(--paper);
    border: 4px solid var(--ink);
  }

  .mast { position: relative; }

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

  .panels,
  .stats,
  .buy-row,
  .splash { grid-template-columns: 1fr; }

  .splash { min-height: 0; }

  h1 { font-size: 3.6rem; }

  .wide img { height: 280px; }
}

@media (prefers-reduced-motion: reduce) {
  .sweep { animation: none; opacity: 0.35; left: 20%; }
  .issue, .issue:hover { transform: none; transition: none; }
}
