:root {
  --paper: #f2ead9;
  --paper-deep: #e7dac2;
  --ink: #27231d;
  --ink-soft: #5f574b;
  --rule: rgba(39, 35, 29, 0.22);
  --tomato: #c9573f;
  --olive: #5b6b3a;
  --brass: #c9a75e;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", Helvetica, sans-serif;
  --mono: "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 0 calc(50% - 1px), rgba(39, 35, 29, 0.035) 50%, transparent calc(50% + 1px)),
    radial-gradient(circle at 87% 6%, rgba(201, 87, 63, 0.12), transparent 27rem),
    radial-gradient(circle at 3% 44%, rgba(91, 107, 58, 0.08), transparent 24rem),
    var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  opacity: 0.28;
  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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

a {
  color: inherit;
}

.skip {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 30;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-150%);
  font: 700 11px/1 var(--mono);
  letter-spacing: 0.12em;
  text-decoration: none;
}

.skip:focus {
  transform: none;
}

.site-header {
  width: min(1320px, calc(100% - 56px));
  margin: 0 auto;
  min-height: 98px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--rule);
  position: relative;
  z-index: 5;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  font: 700 11px/1.05 var(--mono);
  letter-spacing: 0.17em;
  text-decoration: none;
}

.wordmark-mark {
  width: 33px;
  height: 33px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  padding: 5px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  transform: rotate(8deg);
}

.wordmark-mark i {
  display: block;
  background: var(--ink);
  border-radius: 50%;
}

.wordmark-mark i:first-child {
  grid-row: span 2;
  border-radius: 20px 2px 2px 20px;
  background: var(--tomato);
}

.wordmark-mark i:last-child {
  border-radius: 50% 50% 2px 50%;
}

.site-header nav {
  display: flex;
  gap: 34px;
  font: 600 11px/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-header nav a {
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 1px solid transparent;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  border-color: var(--ink);
}

.issue {
  justify-self: end;
  margin: 0;
  text-align: right;
  font: 500 9px/1.55 var(--mono);
  letter-spacing: 0.16em;
  color: var(--ink-soft);
}

main {
  width: min(1320px, calc(100% - 56px));
  margin: 0 auto;
}

.hero {
  min-height: min(760px, calc(100svh - 98px));
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(290px, 0.7fr);
  align-items: center;
  gap: clamp(40px, 8vw, 150px);
  padding: 70px 0 84px;
  position: relative;
}

.hero-copy {
  max-width: 820px;
}

.kicker,
.section-number {
  margin: 0 0 26px;
  font: 600 10px/1.2 var(--mono);
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--tomato);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(64px, 10.4vw, 156px);
  line-height: 0.82;
  letter-spacing: -0.065em;
}

.hero h1 em {
  color: var(--tomato);
  font-weight: 400;
  position: relative;
  display: inline-block;
  padding-right: 0.08em;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  left: 0.02em;
  right: 0.08em;
  bottom: 0.02em;
  height: 0.055em;
  background: currentColor;
  transform: rotate(-1.2deg) scaleX(0.9);
  transform-origin: left;
  opacity: 0.55;
}

.lede {
  margin: 38px 0 0;
  max-width: 610px;
  font-size: clamp(16px, 1.55vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 36px;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  gap: 30px;
  padding: 17px 21px 16px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font: 700 11px/1 var(--mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  box-shadow: 5px 5px 0 rgba(39, 35, 29, 0.18);
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.primary-link span {
  font-size: 17px;
  line-height: 0;
}

.primary-link:hover,
.primary-link:focus-visible {
  background: var(--tomato);
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 rgba(39, 35, 29, 0.16);
}

.install-link {
  display: inline-flex;
  align-items: center;
  padding: 16px 19px 15px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: 700 11px/1 var(--mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.install-link[hidden] {
  display: none;
}

.install-link:hover,
.install-link:focus-visible {
  background: var(--ink);
  color: var(--paper);
  transform: translate(-2px, -2px);
}

.micro {
  max-width: 220px;
  font: 500 9px/1.6 var(--mono);
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.hero-plate {
  justify-self: center;
  width: min(32vw, 370px);
  min-width: 290px;
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: 50%;
}

.hero-plate::before,
.hero-plate::after {
  content: "";
  position: absolute;
  inset: 7%;
  border: 1px solid var(--rule);
  border-radius: 50%;
}

.hero-plate::after {
  inset: -12px;
  border-style: dashed;
  opacity: 0.6;
  animation: orbit 80s linear infinite;
}

.plate-ring {
  position: absolute;
  border: 1px solid var(--rule);
  border-radius: 50%;
}

.ring-a {
  inset: 18%;
}

.ring-b {
  inset: 28%;
  border-style: dotted;
}

.plate-core {
  width: 36%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--tomato);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transform: rotate(-7deg);
  box-shadow: 8px 9px 0 rgba(39, 35, 29, 0.1);
}

.plate-core span {
  font-family: var(--serif);
  font-size: clamp(58px, 7vw, 88px);
  line-height: 0.74;
}

.plate-core small {
  margin-top: 9px;
  font: 700 9px/1 var(--mono);
  letter-spacing: 0.2em;
}

.plate-note {
  position: absolute;
  right: -6%;
  bottom: 2%;
  margin: 0;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--rule);
  font: 500 8px/1.7 var(--mono);
  letter-spacing: 0.11em;
  transform: rotate(4deg);
}

.shelf {
  padding: 90px 0 110px;
  border-top: 1px solid var(--rule);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: end;
  gap: 50px;
  margin-bottom: 42px;
}

.section-number {
  margin-bottom: 14px;
}

.section-head h2,
.about h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 5.4vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.section-intro {
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.game-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
  background: var(--paper);
  overflow: hidden;
  isolation: isolate;
}

.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 0 solid var(--ink);
  transition: border-width 180ms ease;
  pointer-events: none;
}

.game-card:hover::after,
.game-card:focus-visible::after {
  border-width: 6px;
}

.game-card:focus-visible {
  outline: none;
}

.card-number {
  position: absolute;
  top: 18px;
  left: 20px;
  z-index: 4;
  font: 700 11px/1 var(--mono);
  letter-spacing: 0.12em;
  mix-blend-mode: difference;
  color: #fff;
}

.badge {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 4;
  min-width: 48px;
  padding: 7px 9px 6px;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--ink);
  font: 700 8px/1 var(--mono);
  letter-spacing: 0.14em;
}

.badge-old {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.card-art {
  display: block;
  aspect-ratio: 400 / 280;
  background: #0b100a;
  overflow: hidden;
}

.card-art svg {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 700ms cubic-bezier(.2, .7, .1, 1);
}

.game-card:hover .card-art svg {
  transform: scale(1.025);
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px 26px 24px;
  min-height: 242px;
}

.card-meta {
  font: 600 9px/1.3 var(--mono);
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

.card-title {
  display: block;
  margin-top: 13px;
  font-family: var(--serif);
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.card-hook {
  display: block;
  margin-top: 11px;
  max-width: 470px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.card-foot {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 28px;
}

.play-link {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font: 700 10px/1 var(--mono);
  letter-spacing: 0.16em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 7px;
}

.play-link span {
  transition: transform 180ms ease;
}

.game-card:hover .play-link span {
  transform: translateX(4px);
}

.card-stat {
  font: 500 8px/1.4 var(--mono);
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-align: right;
}

.game-card.mainspring {
  background: #f0efdb;
}

.game-card.moth {
  background: #eee8db;
}

.game-card.lantern {
  background: #ece5d2;
}

.game-card.fair {
  background: #f2e7d1;
}

.game-card.carry {
  background: #e8e5da;
}

.game-card.mainspring .card-title {
  color: #294016;
}

.game-card.lantern .card-title {
  color: #12343a;
}

.game-card.fair .card-title {
  color: #7a392c;
}

.game-card.carry .card-title {
  color: #23354f;
}

@media (min-width: 760px) {
  .game-card.carry {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  }

  .game-card.carry .card-art {
    aspect-ratio: auto;
    min-height: 340px;
  }

  .game-card.carry .card-body {
    min-height: 0;
    padding: 32px 34px;
  }
}

/* Small in-card animations */
.gear-a {
  transform-origin: 198px 140px;
  animation: gear-turn 42s linear infinite;
}

.gear-b {
  transform-origin: 305px 78px;
  animation: gear-turn-reverse 28s linear infinite;
}

.moth-figure {
  transform-origin: 213px 141px;
  animation: moth-drift 5s ease-in-out infinite;
}

.beam {
  transform-origin: 293px 91px;
  animation: beam-sweep 9s ease-in-out infinite;
}

.flower {
  animation: flower-glow 4s ease-in-out infinite;
}

.about {
  display: grid;
  grid-template-columns: 100px minmax(0, 1.4fr) minmax(280px, 0.75fr);
  gap: 48px;
  align-items: start;
  padding: 100px 0 112px;
  border-top: 1px solid var(--rule);
}

.about-index {
  font-family: var(--serif);
  font-size: 82px;
  line-height: 0.8;
  color: var(--tomato);
}

.about-copy h2 {
  max-width: 700px;
  margin-bottom: 28px;
}

.about-copy p {
  max-width: 650px;
  color: var(--ink-soft);
  font-size: 15px;
}

.about-facts {
  margin: 0;
  border-top: 1px solid var(--ink);
}

.about-facts div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 18px;
  padding: 13px 0 12px;
  border-bottom: 1px solid var(--rule);
}

.about-facts dt {
  font: 600 8px/1.5 var(--mono);
  letter-spacing: 0.12em;
  color: var(--tomato);
}

.about-facts dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.manifesto {
  margin-bottom: 110px;
  padding: 54px clamp(26px, 6vw, 84px) 48px;
  background: var(--ink);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}

.manifesto::after {
  content: "4";
  position: absolute;
  right: 2%;
  top: -30%;
  font-family: var(--serif);
  font-size: 420px;
  line-height: 1;
  color: var(--paper);
  opacity: 0.035;
}

.manifesto-quote {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 940px;
  font-family: var(--serif);
  font-size: clamp(30px, 4.5vw, 57px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.manifesto-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 30px;
  margin-top: 38px;
  font: 600 8px/1 var(--mono);
  letter-spacing: 0.16em;
  color: rgba(242, 234, 217, 0.58);
}

.site-footer {
  width: min(1320px, calc(100% - 56px));
  margin: 0 auto;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  border-top: 1px solid var(--rule);
  font: 500 8px/1.6 var(--mono);
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

.site-footer a {
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: var(--tomato);
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 650ms ease, transform 650ms cubic-bezier(.2, .7, .1, 1);
}

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

.delay-1 { transition-delay: 55ms; }
.delay-2 { transition-delay: 110ms; }
.delay-3 { transition-delay: 165ms; }
.delay-4 { transition-delay: 220ms; }

@keyframes gear-turn {
  to { transform: rotate(360deg); }
}

@keyframes gear-turn-reverse {
  to { transform: rotate(-360deg); }
}

@keyframes moth-drift {
  0%, 100% { transform: translate(213px, 141px) rotate(-13deg) translateY(0); }
  50% { transform: translate(213px, 141px) rotate(-10deg) translateY(-8px); }
}

@keyframes beam-sweep {
  0%, 100% { transform: rotate(-3deg); opacity: 0.7; }
  50% { transform: rotate(4deg); opacity: 1; }
}

@keyframes flower-glow {
  0%, 100% { opacity: 0.76; }
  50% { opacity: 1; }
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

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

  .site-header nav {
    display: none;
  }

  .issue {
    grid-column: 2;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 56px;
    padding-top: 66px;
  }

  .hero-plate {
    justify-self: start;
    margin-left: 7vw;
    width: min(58vw, 350px);
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .section-intro {
    max-width: 560px;
  }

  .about {
    grid-template-columns: 70px 1fr;
  }

  .about-facts {
    grid-column: 2;
    margin-top: 24px;
  }
}

@media (max-width: 720px) {
  .site-header,
  main,
  .site-footer {
    width: calc(100% - 32px);
  }

  .site-header {
    min-height: 78px;
  }

  .issue {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 56px 0 72px;
  }

  .hero h1 {
    font-size: clamp(58px, 19vw, 110px);
    line-height: 0.84;
  }

  .lede {
    margin-top: 28px;
    font-size: 16px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 17px;
  }

  .primary-link {
    width: 100%;
    justify-content: space-between;
  }

  .hero-plate {
    width: min(76vw, 330px);
    min-width: 0;
    margin-left: 0;
    justify-self: center;
  }

  .shelf {
    padding: 62px 0 74px;
  }

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

  .card-body {
    min-height: 230px;
    padding: 22px 21px;
  }

  .card-title {
    font-size: 48px;
  }

  .about {
    display: block;
    padding: 72px 0 76px;
  }

  .about-index {
    display: none;
  }

  .about-facts {
    margin-top: 34px;
  }

  .manifesto {
    margin-bottom: 76px;
    padding: 38px 24px 34px;
  }

  .manifesto-quote {
    font-size: clamp(28px, 9vw, 44px);
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 26px 0;
  }

  .site-footer p {
    margin: 0;
  }
}

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

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

  .reveal {
    opacity: 1;
    transform: none;
  }
}
