:root {
  --paper: #fff6e8;
  --ink: #181414;
  --muted: #5b5451;
  --red: #ff5a36;
  --peach: #ffb36b;
  --yellow: #ffd84d;
  --mint: #4ce0b3;
  --sky: #49a6ff;
  --pink: #ff72b6;
  --glow-yellow: rgba(255, 216, 77, 0.55);
  --glow-pink: rgba(255, 114, 182, 0.35);
  --poster-glow-yellow: rgba(255, 216, 77, 0.5);
  --shape-red: rgba(255, 90, 54, 0.18);
  --shape-mint: rgba(76, 224, 179, 0.25);
  --shape-sky: rgba(73, 166, 255, 0.18);
  --bad-label-bg: rgba(255, 90, 54, 0.18);
  --good-label-bg: rgba(76, 224, 179, 0.2);
  --line: rgba(24, 20, 20, 0.14);
  --shadow: 0 18px 40px rgba(24, 20, 20, 0.12);
  --radius: 1.6rem;
  --bg-gradient:
    radial-gradient(circle at top left, var(--glow-yellow), transparent 22rem),
    radial-gradient(circle at 100% 10%, var(--glow-pink), transparent 18rem),
    linear-gradient(180deg, #fff9f0 0%, #fff2e1 100%);
  --grid-line: rgba(24, 20, 20, 0.04);
  --card-bg: rgba(255, 255, 255, 0.78);
  --poster-bg:
    radial-gradient(circle at top right, var(--poster-glow-yellow), transparent 12rem),
    rgba(255, 255, 255, 0.82);
  --phone-bg: #fffdf9;
  --bad-thread-bg: #fff2ef;
  --good-thread-bg: #eefcf7;
  --bubble-in-bg: #fff;
  --wait-bg: rgba(255, 255, 255, 0.5);
  --typing-bg: #fff;
  --meter-track-bg: rgba(255, 255, 255, 0.7);
  --examples-bg: rgba(255, 255, 255, 0.84);
  --line-card-bg: #fff;
  --source-bg: rgba(255, 255, 255, 0.65);
  --lift-shadow: rgba(24, 20, 20, 0.08);
  --pair-divider: rgba(24, 20, 20, 0.16);
}

:root[data-theme="dark"] {
  --paper: #121318;
  --ink: #f7efe3;
  --muted: #cfbfad;
  --red: #d75a45;
  --peach: #d28d58;
  --yellow: #c89b32;
  --mint: #2aa586;
  --sky: #4a7fda;
  --pink: #c85d93;
  --glow-yellow: rgba(200, 155, 50, 0.18);
  --glow-pink: rgba(200, 93, 147, 0.14);
  --poster-glow-yellow: rgba(200, 155, 50, 0.16);
  --shape-red: rgba(215, 90, 69, 0.12);
  --shape-mint: rgba(42, 165, 134, 0.14);
  --shape-sky: rgba(74, 127, 218, 0.12);
  --bad-label-bg: rgba(215, 90, 69, 0.14);
  --good-label-bg: rgba(42, 165, 134, 0.16);
  --line: rgba(247, 239, 227, 0.22);
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.42);
  --bg-gradient:
    radial-gradient(circle at top left, var(--glow-yellow), transparent 22rem),
    radial-gradient(circle at 100% 10%, var(--glow-pink), transparent 18rem),
    linear-gradient(180deg, #121318 0%, #191b24 100%);
  --grid-line: rgba(247, 239, 227, 0.08);
  --card-bg: rgba(18, 19, 24, 0.86);
  --poster-bg:
    radial-gradient(circle at top right, var(--poster-glow-yellow), transparent 12rem),
    rgba(18, 19, 24, 0.88);
  --phone-bg: #171923;
  --bad-thread-bg: #2b1920;
  --good-thread-bg: #112923;
  --bubble-in-bg: #202332;
  --wait-bg: rgba(17, 20, 30, 0.88);
  --typing-bg: #202332;
  --meter-track-bg: rgba(17, 20, 30, 0.8);
  --examples-bg: rgba(18, 19, 24, 0.9);
  --line-card-bg: #171923;
  --source-bg: rgba(23, 25, 35, 0.9);
  --lift-shadow: rgba(0, 0, 0, 0.25);
  --pair-divider: rgba(247, 239, 227, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: var(--bg-gradient);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -5;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 2rem 2rem;
  opacity: 0.35;
}

.shape {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  z-index: -4;
  filter: blur(6px);
  animation: blobMove 12s ease-in-out infinite alternate;
}

.shape-one {
  width: 14rem;
  height: 14rem;
  top: 2rem;
  left: -3rem;
  background: var(--shape-red);
}

.shape-two {
  width: 10rem;
  height: 10rem;
  top: 24rem;
  right: 4%;
  background: var(--shape-mint);
  animation-duration: 16s;
}

.shape-three {
  width: 12rem;
  height: 12rem;
  bottom: 4rem;
  left: 50%;
  background: var(--shape-sky);
  animation-duration: 18s;
}

a {
  color: inherit;
}

.page {
  width: min(76rem, calc(100% - 1rem));
  margin: 0 auto;
  padding: 0.9rem 0 4rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.84rem;
}

.brand-badge {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 0.9rem;
  background: var(--ink);
  color: var(--paper);
  font-family: "Archivo Black", sans-serif;
  box-shadow: 0 8px 20px rgba(24, 20, 20, 0.12);
}

.source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  min-height: 2.7rem;
  padding: 0.55rem 0.9rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--source-bg);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 6px 0 var(--lift-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--source-bg);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 6px 0 var(--lift-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 220ms ease;
}

.theme-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.source-link:hover,
.source-link:focus-visible,
.theme-toggle:hover,
.theme-toggle:focus-visible,
.jump-link:hover,
.jump-link:focus-visible,
.example-pair:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 0 var(--lift-shadow);
}

body,
body::before,
.hero-copy,
.poster,
.card,
.examples,
.closing,
.thread,
.phone,
.example-pair,
.source-link,
.wait-chip,
.typing {
  transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.layout {
  display: grid;
  gap: 1rem;
}

.hero,
.card,
.examples,
.closing {
  position: relative;
}

.hero {
  display: grid;
  gap: 1rem;
}

.hero-copy,
.poster,
.card,
.examples,
.closing {
  border: 2px solid var(--ink);
  border-radius: 2rem;
  background: var(--card-bg);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 1.2rem;
}

.eyebrow,
.card-tag,
.thread-title,
.line-label,
.closing-kicker,
.badge-live,
.wait-chip {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.eyebrow {
  display: inline-block;
  margin: 0;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: var(--yellow);
  border: 2px solid var(--ink);
}

h1,
h2 {
  margin: 0;
  font-family: "Archivo Black", sans-serif;
  line-height: 0.92;
  text-transform: uppercase;
}

h1 {
  margin-top: 0.9rem;
  font-size: clamp(4rem, 16vw, 8rem);
  letter-spacing: 0.01em;
}

h1 span {
  display: inline-block;
  color: var(--red);
  transform: rotate(-3deg);
}

h2 {
  font-size: clamp(1.8rem, 6vw, 3.6rem);
}

.lead,
.hero-joke,
.card p,
.section-note,
.example-side p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.lead {
  max-width: 30rem;
  margin-top: 0.9rem;
  font-size: clamp(1.05rem, 2.8vw, 1.3rem);
}

.hero-cta-row {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.2rem;
}

.jump-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 3rem;
  padding: 0.8rem 1rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--mint);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 7px 0 rgba(24, 20, 20, 0.1);
}

.hero-joke {
  max-width: 22rem;
  font-size: 0.96rem;
}

.poster {
  position: relative;
  padding: 1rem;
  background: var(--poster-bg);
}

.poster-sticker {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.6rem;
  padding: 0.5rem 0.8rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.sticker-hot {
  top: 1rem;
  right: 1rem;
  background: var(--pink);
  transform: rotate(9deg);
}

.sticker-good {
  left: 1rem;
  bottom: 1rem;
  background: var(--yellow);
  transform: rotate(-8deg);
}

.phone {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.9rem;
  padding: 0.35rem;
  border: 2px solid var(--ink);
  border-radius: 1.6rem;
  background: var(--phone-bg);
}

.phone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.2rem 0.3rem 0.4rem;
}

.lamp {
  width: 0.9rem;
  height: 0.9rem;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--mint);
}

.phone-head p {
  flex: 1;
  margin: 0;
  text-align: center;
  font-weight: 700;
}

.badge-live {
  padding: 0.25rem 0.45rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
}

.thread {
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem;
  border: 2px solid var(--ink);
  border-radius: 1.4rem;
}

.bad-thread { background: var(--bad-thread-bg); }

.good-thread { background: var(--good-thread-bg); }

.thread-title {
  margin: 0;
  color: var(--muted);
}

.bubble {
  width: fit-content;
  max-width: min(90%, 18rem);
  padding: 0.8rem 0.9rem;
  border: 2px solid var(--ink);
  border-radius: 1.2rem;
  box-shadow: 0 5px 0 rgba(24, 20, 20, 0.08);
}

.bubble p,
.bubble .time {
  margin: 0;
}

.bubble .time {
  display: block;
  margin-bottom: 0.22rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--muted);
}

.bubble p {
  color: var(--ink);
  line-height: 1.4;
}

.bubble-out {
  justify-self: end;
  background: var(--sky);
  transform-origin: bottom right;
}

.bubble-in { background: var(--bubble-in-bg); }

.bubble-yo {
  background: var(--pink);
}

.bubble-punch {
  background: var(--yellow);
}

.wait-chip {
  width: fit-content;
  padding: 0.35rem 0.55rem;
  border: 2px dashed var(--ink);
  border-radius: 999px;
  background: var(--wait-bg);
  color: var(--muted);
}

.typing {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  padding: 0.7rem 0.85rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--typing-bg);
}

.typing span {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--ink);
  animation: dotBounce 800ms ease-in-out infinite;
}

.typing span:nth-child(2) {
  animation-delay: 100ms;
}

.typing span:nth-child(3) {
  animation-delay: 200ms;
}

.facts {
  display: grid;
  gap: 1rem;
}

.card {
  padding: 1.15rem;
}

.card-tag {
  margin: 0 0 0.65rem;
  color: var(--red);
}

.rant {
  background: linear-gradient(180deg, var(--card-bg), var(--card-bg));
}

.tilt-card {
  transform: rotate(-1.2deg);
}

.checklist {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  line-height: 1.8;
}

.meter-card {
  background: var(--card-bg);
}

.meter-stack {
  display: grid;
  gap: 0.95rem;
  margin-top: 1rem;
}

.meter-row {
  display: grid;
  gap: 0.4rem;
}

.meter-row span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.84rem;
  text-transform: uppercase;
}

.meter-track {
  height: 1rem;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--meter-track-bg);
}

.meter-fill {
  display: block;
  height: 100%;
  transform: translateX(-104%);
  border-radius: inherit;
}

.tiny {
  width: 18%;
  background: var(--red);
}

.meh {
  width: 46%;
  background: var(--yellow);
}

.huge {
  width: 90%;
  background: linear-gradient(90deg, var(--pink), var(--red));
}

.meter-card.is-visible .meter-fill {
  animation: meterLoad 1s cubic-bezier(.22, .84, .28, 1) forwards;
}

.examples,
.closing {
  padding: 1.15rem;
}

.examples { background: var(--examples-bg); }

.section-top {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.section-note {
  max-width: 22rem;
}

.examples-grid {
  display: grid;
  gap: 0.8rem;
}

.example-pair {
  display: grid;
  gap: 0;
  padding: 0.95rem;
  border: 2px solid var(--ink);
  border-radius: 1.3rem;
  background: var(--line-card-bg);
  box-shadow: 0 6px 0 var(--lift-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.example-side {
  display: grid;
  gap: 0.55rem;
  align-content: center;
  min-height: 100%;
}

.example-divider {
  opacity: 0.8;
}

.line-label {
  width: fit-content;
  padding: 0.25rem 0.45rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
}

.bad-line .line-label {
  background: var(--bad-label-bg);
}

.good-line .line-label {
  background: var(--good-label-bg);
}

.example-side p {
  color: var(--ink);
  font-size: 1rem;
}

.closing {
  text-align: center;
  background: var(--ink);
  color: var(--paper);
}

.closing-kicker {
  display: inline-block;
  margin: 0 0 0.65rem;
  padding: 0.4rem 0.65rem;
  border: 2px solid var(--paper);
  border-radius: 999px;
}

.closing h2 {
  color: var(--paper);
  font-size: clamp(1.7rem, 7vw, 4.2rem);
}

.reveal {
  opacity: 0;
  transform: translateY(1.5rem) rotate(0deg);
  transition: opacity 600ms ease, transform 600ms cubic-bezier(.2, .8, .2, 1);
}

.reveal-live,
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-seq {
  opacity: 0;
  transform: translateY(0.8rem) rotate(1deg) scale(0.96);
  animation: popIn 620ms cubic-bezier(.18, .88, .26, 1) forwards;
}

.bad-thread .reveal-seq:nth-of-type(1) {
  animation-delay: 140ms;
}

.bad-thread .reveal-seq:nth-of-type(2) {
  animation-delay: 1750ms;
}

.good-thread .reveal-seq:nth-of-type(1) {
  animation-delay: 480ms;
}

.good-thread .reveal-seq:nth-of-type(2) {
  animation-delay: 980ms;
}

.good-thread .reveal-seq:nth-of-type(3) {
  animation-delay: 1400ms;
}

@keyframes blobMove {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(1.6rem, 1rem, 0) scale(1.08);
  }
}

@keyframes dotBounce {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }

  50% {
    transform: translateY(-0.22rem);
    opacity: 1;
  }
}

@keyframes popIn {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes meterLoad {
  to {
    transform: translateX(0);
  }
}

@media (min-width: 820px) {
  .page {
    width: min(82rem, calc(100% - 2rem));
  }

  .hero {
    grid-template-columns: minmax(0, 0.92fr) minmax(22rem, 1.08fr);
    align-items: start;
  }

  .hero-copy {
    min-height: 100%;
    padding: 1.5rem;
  }

  .poster {
    padding: 1.25rem;
  }

  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .example-pair {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: stretch;
  }

  .example-side {
    padding: 0.1rem 0.1rem;
  }

  .example-divider {
    width: 0;
    margin: 0 1rem;
    border-left: 2px dashed var(--pair-divider);
  }

  .section-top {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
}

@media (max-width: 819px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .example-pair {
    grid-template-columns: 1fr;
  }

  .example-side {
    padding: 0;
  }

  .example-divider {
    height: 0;
    margin: 0.9rem 0;
    border-top: 2px dashed var(--pair-divider);
  }

  .source-link,
  .jump-link {
    width: 100%;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal,
  .reveal-seq,
  .meter-fill,
  .tilt-card {
    opacity: 1 !important;
    transform: none !important;
  }
}
