:root {
  --felt: #1b1b2f;
  --ink: #11111d; /* text on the red accent, for AA */
  --felt-2: #24243d;
  --cream: #f6e7cb;
  --cream-2: rgba(246, 231, 203, .82);
  --cream-3: rgba(246, 231, 203, .7);
  --line: rgba(246, 231, 203, .16);
  --accent: #e94560;
  --gold: #ffbd39;
  --pad: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --slab: "Zilla Slab", Georgia, serif;
  --body: Bitter, Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--felt);
  color: var(--cream);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: clip;
  /* felt grain: one small tiled SVG, scrolls with the page */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .96 0 0 0 0 .9 0 0 0 0 .8 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
h1, h2, h3, .hero-tag { text-wrap: balance; }
p, li { text-wrap: pretty; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0; }
[id] { scroll-margin-top: 84px; }
main:focus { outline: none; }
:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: var(--pad); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 12px 18px; background: var(--cream); color: var(--felt);
  font-weight: 700; border-radius: 6px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* header */
.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(27, 27, 47, .94);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .top { background: rgba(27, 27, 47, .82); backdrop-filter: blur(10px); }
}
.top-in { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--slab); font-weight: 700; font-size: 24px;
  text-decoration: none; min-height: 44px;
}
.brand-hex {
  width: 22px; height: 20px; background: var(--accent);
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
.nav { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-weight: 600; font-size: 15px; text-decoration: none; color: var(--cream-2);
  border-radius: 6px;
}
.top nav { margin-left: auto; }
.top .btn-sm { margin-left: 8px; }
.cta-short { display: none; }
@media (max-width: 480px) { .cta-long { display: none; } .cta-short { display: inline; } }
@media (max-width: 860px) {
  .top nav { display: none; }
  .top .btn-sm { margin-left: auto; }
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px;
  font-family: var(--body); font-weight: 700; font-size: 17px; line-height: 1.1;
  text-decoration: none; text-align: center; white-space: nowrap;
  border-radius: 8px; border: 2px solid transparent; cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 15px; }

/* hero */
.hero {
  position: relative;
  padding: clamp(28px, 5vw, 64px) 0 clamp(40px, 6vw, 80px);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "head hand" "body hand";
  column-gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
.hero-head { grid-area: head; align-self: end; padding-top: 24px; }
.hero-hand { grid-area: hand; }
.hero-body { grid-area: body; }
h1 {
  margin-top: 0;
  font-family: var(--slab);
  font-size: clamp(60px, 7vw, 112px);
  line-height: 1;
}
.hero-tag {
  margin-top: 20px; max-width: 26ch; text-wrap: balance;
  font-size: clamp(21px, 2.3vw, 28px); line-height: 1.25; font-weight: 600;
}
.hero-copy { margin-top: 24px; max-width: 40ch; color: var(--cream-2); font-size: 18px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-meta { margin-top: 18px; font-size: 15px; font-weight: 600; color: var(--cream-3); }

/* the hand */
.hand {
  --cw: 204px; --step: 66px; --ang: 6.5deg; --drop: 8px;
  position: relative;
  height: calc(var(--cw) * 1.397 + 72px);
  margin: 8px 0 0; padding: 0; list-style: none;
}
.slot {
  position: absolute; left: 50%; bottom: 30px;
  width: var(--cw); margin-left: calc(var(--cw) / -2);
  transform-origin: 50% 130%;
  transform: translateX(calc(var(--i) * var(--step))) translateY(calc(var(--a) * var(--drop))) rotate(calc(var(--i) * var(--ang)));
  z-index: calc(var(--n) + 1);
  transition: transform .9s var(--ease) calc(var(--n) * 70ms);
}
/* deal-in: site.js adds .is-dealt after first paint; without JS the hand is already fanned */
html.js .hand:not(.is-dealt) .slot { transform: translateY(26px) rotate(0deg); transition: none; }
html.js .hand:not(.is-dealt) .card.is-up { transform: rotateY(180deg); transition: none; }
.hand.is-dealt .card.intro { transition-delay: .75s; }
.slot.is-active { z-index: 20; }
.lift { display: block; container-type: inline-size; perspective: 1400px; transition: transform .35s var(--ease); }
.slot.is-active .lift { transform: translateY(-26px) scale(1.06); }
.card {
  display: block; position: relative; width: 100%; aspect-ratio: 63 / 88;
  margin: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit;
  cursor: pointer; border-radius: 12px;
  transform-style: preserve-3d;
  transform: rotateY(180deg);
  transition: transform .6s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.card.is-up { transform: rotateY(0deg); }
.card:focus-visible { outline: 3px solid var(--cream); outline-offset: 5px; }
.card-face, .card-back {
  position: absolute; inset: 0;
  display: block;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: calc(var(--cw) * .055);
  box-shadow: 0 22px 34px -14px rgba(0, 0, 0, .7), 0 2px 0 rgba(0, 0, 0, .25);
  container-type: inline-size;
}
.card-back {
  transform: rotateY(180deg);
  display: grid; place-items: center;
  background-color: var(--felt);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cpath fill='%23ffbd39' fill-opacity='.2' d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/svg%3E");
  background-size: 14cqw auto;
  box-shadow: inset 0 0 0 3.2cqw var(--cream), inset 0 0 0 4.4cqw var(--accent), 0 22px 34px -14px rgba(0, 0, 0, .7);
}
.cb-mark {
  display: grid; place-items: center;
  width: 40cqw; height: 35cqw;
  background: var(--accent); color: var(--ink);
  font-family: var(--slab); font-weight: 700; font-size: 22cqw; line-height: 1;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
html:not(.js) .slot:focus-within { z-index: 21; }
html:not(.js) .card:focus { transform: rotateY(0deg); }

.hand-hint { margin-top: 6px; text-align: center; font-size: 14px; color: var(--cream-3); }
.hint-coarse { display: none; }
@media (hover: none) { .hint-fine { display: none; } .hint-coarse { display: inline; } }
.hand-read {
  max-width: 50ch; min-height: 4.6em; margin: 8px auto 0;
  text-align: center; font-size: 16px; line-height: 1.45; color: var(--cream);
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "hand" "body"; }
  .hero-head { padding-top: 0; }
  h1 { font-size: clamp(52px, 17vw, 96px); }
  .hand { --cw: 176px; --step: 64px; --ang: 7deg; margin-top: 4px; }
  .hero-body { text-align: left; }
}
@media (max-width: 560px) {
  .hand { --cw: 140px; --step: 30px; --ang: 4.5deg; --drop: 4px; height: calc(var(--cw) * 1.397 + 48px); margin-top: 30px; }
  .slot { transform-origin: 50% 100%; }
  .slot.is-active .lift { transform: translateY(-20px) scale(1.1); }
  .hero-tag { margin-top: 14px; }
  .hand-read { font-size: 15px; }
  .cta-row .btn { flex: 1 1 100%; }
}

/* numbers */
.stats { border-block: 1px solid var(--line); background: var(--felt-2); }
.stats-row {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0 auto; list-style: none;
}
.stats-row li { padding: 26px 16px 24px; border-left: 1px solid var(--line); }
.stats-row li:first-child { border-left: 0; padding-left: 0; }
.stats-row b { display: block; font-family: var(--slab); font-weight: 700; font-size: clamp(34px, 3.8vw, 50px); line-height: 1; }
.stats-row span { display: block; margin-top: 8px; font-size: 15px; color: var(--cream-2); }
@media (max-width: 760px) {
  .stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats-row li { padding: 20px 10px; }
  .stats-row li:nth-child(3n + 1) { border-left: 0; padding-left: 0; }
  .stats-row li:nth-child(n + 4) { border-top: 1px solid var(--line); }
}

/* sections */
.sec { padding: clamp(72px, 10vw, 128px) 0; }
.sec-head { margin-bottom: 40px; }
h2 { font-family: var(--slab); font-size: clamp(40px, 5.6vw, 72px); line-height: 1.05; }
.lede { max-width: 50ch; font-size: clamp(17px, 1.6vw, 20px); color: var(--cream-2); }
h2 + .lede { margin-top: 18px; }
@media (max-width: 760px) { .sec-head { margin-bottom: 28px; } }
.fine { margin-top: 16px; font-size: 15px; color: var(--cream-3); max-width: 60ch; }
.fine a { color: var(--cream); }

/* the cards */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  font: 600 15px/1 var(--body); color: var(--cream);
  background: transparent; border: 2px solid rgba(246, 231, 203, .3); border-radius: 999px;
  cursor: pointer; transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.chip span { color: var(--cream-3); font-weight: 400; }
.chip[aria-pressed="true"] { background: var(--cream); border-color: var(--cream); color: var(--felt); }
.chip[aria-pressed="true"] span { color: var(--felt); }
.grid-count { min-height: 1.5em; margin-bottom: 20px; font-size: 15px; color: var(--cream-3); }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 32px 24px; margin: 0; padding: 0; list-style: none;
}
.tile-card { container-type: inline-size; max-width: 300px; }
.tile-card .cf { box-shadow: inset 0 0 0 1.8cqw var(--cream), inset 0 0 0 2.4cqw rgba(27, 27, 47, .9), 0 16px 28px -16px rgba(0, 0, 0, .8); }
.tile-meta { margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--cream-2); }
@media (max-width: 640px) {
  .grid {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 216px;
    gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--pad) * -1); padding: 4px var(--pad) 16px;
    scroll-padding-inline: var(--pad);
  }
  .tile { scroll-snap-align: start; }
}

/* rules sheet */
.sec-rules { background-color: var(--felt-2); }
.rules-sheet {
  position: relative;
  background: var(--cream); color: var(--felt);
  border-radius: 6px;
  padding: clamp(22px, 4vw, 52px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
}
.rs-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; padding-bottom: 16px; border-bottom: 3px double var(--felt); }
.rules-sheet .rs-title { margin: 0; font-family: var(--slab); font-weight: 700; font-size: clamp(34px, 4vw, 50px); line-height: 1; }
.rules-sheet .rs-sub { margin: 0; font-size: 15px; font-weight: 600; }
.rs-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; }
.rs-col + .rs-col { border-left: 1px solid rgba(27, 27, 47, .2); padding-left: 40px; }
.rules-sheet h3 { margin-top: 24px; font-family: var(--slab); font-size: 23px; line-height: 1.15; }
.rules-sheet p, .rules-sheet li { font-size: 16px; line-height: 1.5; }
.rules-sheet p { margin-top: 8px; }
.rules-sheet ul, .rules-sheet ol { margin: 8px 0 0; padding-left: 22px; }
.rules-sheet li + li { margin-top: 4px; }
.rs-sum { padding: 10px 14px; background: rgba(27, 27, 47, .07); font-weight: 600; }
@media (max-width: 900px) {
  .rs-cols { grid-template-columns: minmax(0, 1fr); }
  .rs-col + .rs-col { border-left: 0; padding-left: 0; border-top: 1px solid rgba(27, 27, 47, .2); margin-top: 24px; }
}

/* print and play */
.print-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: center; }
.steps { margin: 32px 0 36px; padding: 0; list-style: none; counter-reset: s; max-width: 58ch; }
.steps li { position: relative; min-height: 40px; padding-left: 60px; counter-increment: s; color: var(--cream-2); }
.steps li + li { margin-top: 24px; }
.steps li::before {
  content: counter(s);
  position: absolute; left: 0; top: -2px;
  display: grid; place-items: center; width: 42px; height: 37px;
  background: var(--accent); color: var(--ink);
  font-family: var(--slab); font-weight: 700; font-size: 22px;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
}
.steps b { color: var(--cream); }
.a4 { margin: 0; justify-self: center; width: min(100%, 380px); }
.a4-sheet {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  aspect-ratio: 210 / 297; padding: 9% 5%;
  background: #fbf3e2;
  box-shadow: 0 30px 50px -24px rgba(0, 0, 0, .9);
  transform: rotate(-2.5deg);
  align-content: start;
}
.a4-sheet img {
  display: block; width: 100%; height: auto; aspect-ratio: 63 / 88; object-fit: cover;
  padding: 6%; outline: 1px dashed rgba(27, 27, 47, .45); outline-offset: -1px;
  background: var(--cream);
}
@media (max-width: 860px) {
  .print-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .a4 { width: min(78%, 320px); }
}

/* box */
.box-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.box-fig { margin: 0; }
.box-fig figcaption { margin-top: 18px; font-size: 14px; color: var(--cream-3); }
.box-fig img { display: block; width: 100%; border-radius: 10px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9); }
.spec { margin: 28px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.spec li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.spec span { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cream-3); padding-top: 3px; }
.h3 { margin-top: 44px; font-family: var(--slab); font-size: 26px; line-height: 1.15; }
@media (max-width: 860px) { .box-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; } }

/* newsletter */
.news { margin-top: 48px; }
.news .h3 { margin-top: 0; }
.news-lede { margin: 8px 0 20px; color: var(--cream-2); }
.news-form { display: grid; gap: 8px; }
/* Tom's note: the one hand-written thing on the page */
.note {
  position: relative; max-width: 360px; margin: -36px 0 0 auto; padding: 16px 20px 14px;
  background: var(--cream); color: var(--felt);
  font-family: Caveat, "Comic Sans MS", cursive; font-weight: 500; font-size: 23px; line-height: 1.2;
  transform: rotate(-2.2deg); box-shadow: 0 14px 24px -14px rgba(0, 0, 0, .8);
}
.note time { font-weight: 500; }
.note-sig { display: block; margin-top: 4px; text-align: right; font-size: 26px; }
.quote { margin: 36px 0 0; padding: 0; max-width: 46ch; }
.quote p { font-size: 20px; line-height: 1.45; font-style: italic; color: var(--cream); }
.quote footer { margin-top: 8px; font-size: 15px; font-weight: 600; color: var(--cream-3); }
.news-form label { font-weight: 600; font-size: 15px; }
.news-form label:not(:first-child) { margin-top: 10px; }
.news-form input, .news-form select, .news-form textarea {
  width: 100%; min-height: 52px; padding: 12px 14px;
  font: 400 17px/1.4 var(--body); color: var(--cream);
  background: var(--felt-2); border: 2px solid rgba(246, 231, 203, .35); border-radius: 6px;
}
.news-form textarea { min-height: 220px; resize: vertical; }
.news-form ::placeholder { color: rgba(246, 231, 203, .6); }
.news-form input:focus, .news-form select:focus, .news-form textarea:focus { border-color: var(--cream); }
.news-form .btn { margin-top: 18px; justify-self: start; }
.draft { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.draft-note { font-weight: 600; }
.draft-note:empty { display: none; }
@media (max-width: 860px) { .news-form .btn { justify-self: stretch; } }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: 15px; color: var(--cream-3); }
.foot-in { display: grid; grid-template-columns: auto auto; justify-content: start; gap: 6px 40px; align-items: start; }
.foot-in .brand-foot { grid-row: span 2; min-height: 0; }
.brand-foot { color: var(--cream); }
.foot a { color: var(--cream); }
@media (max-width: 860px) { .foot-in { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slot, .card, .lift, .btn, .chip { transition: none; }
}

/* hover only where a pointer can hover */
@media (hover: hover) {
  .nav a:hover { color: var(--cream); background: var(--felt-2); }
  .btn-primary:hover { background: var(--cream); border-color: var(--cream); }
  .chip:hover { border-color: var(--cream); }
  .chip[aria-pressed="true"]:hover { background: var(--cream); }
  .fine a:hover, .foot a:hover { color: var(--gold); }
  .tile-card .cf { transition: transform .25s var(--ease); }
  .tile:hover .tile-card .cf { transform: translateY(-4px) rotate(-1deg); }
  html:not(.js) .slot:hover { z-index: 21; }
  html:not(.js) .slot:hover .card { transform: rotateY(0deg); }
}
.fine a:focus-visible, .foot a:focus-visible, .brand:focus-visible { border-radius: 2px; }

/* wide screens: more room, bigger hand */
@media (min-width: 1600px) {
  .wrap { max-width: 1380px; }
  .hero { padding: 64px 0; min-height: calc(100svh - 65px - 130px); display: grid; align-content: center; }
  .news-form { max-width: none; }
  .hand { --cw: 240px; --step: 80px; --ang: 6.5deg; --drop: 10px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .tile-card { max-width: 320px; }
  .lede { font-size: 21px; }
}

/* scroll-driven reveals: content is fully visible by default; this only adds a short rise */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .sec-head, .tile, .rules-sheet, .steps li, .a4, .box-fig, .spec, .news, .quote, .stats-row li {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
    @keyframes rise { from { transform: translateY(14px); } to { transform: none; } }
  }
}
@media (max-width: 600px) { .note { max-width: 290px; margin-top: -28px; font-size: 21px; } }
