/* The publisher page at /game. Values follow the game's art direction (.claude/skills/distracted-art-direction). */
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(/landing/barlow-condensed-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/landing/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(/landing/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 600; font-display: swap; src: url(/landing/ibm-plex-mono-latin-600-normal.woff2) format("woff2"); }

:root {
  color-scheme: dark;
  --gold: #ffc400;
  --white-72: rgb(255 255 255 / .72);
  --white-56: rgb(255 255 255 / .56);
  --white-24: rgb(255 255 255 / .24);
  --rule: rgb(255 255 255 / .1);
  --card-paper: #090909;
  --card-paper-shadow: #171714;
  --suit-spades: #2979ff;
  --suit-hearts: #e62e45;
  --suit-diamonds: #a855f7;
  --suit-clubs: #00b879;
  --suit-stars: #f06d24;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --sans: Inter, system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  /* Springs as linear() curves: a settling one for cards, a livelier one for small pops. */
  --spring: linear(0, .006, .025 2.8%, .101 6.1%, .539 18.9%, .721 25.3%, .849 31.5%, .937 38.1%, .968 41.8%, .991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001);
  --spring-pop: linear(0, .009, .035 2.1%, .141 4.4%, .723 12.9%, .938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, .991, .977 51%, .974 53.8%, .975 57.1%, .997 69.8%, 1.003 76.9%, 1);
  --gutter: clamp(20px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: #000; -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; background: #000; color: #fff; font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The game's Dither background, as players see it: landing.js draws it and sets its 5% strength per section. The edge
   fade is the game's (DitherBackground.tsx, vignette of the Waves fade .25). */
.lamp {
  position: fixed; inset: 0 0 auto; z-index: 0; display: block; width: 100%; height: 100lvh; opacity: 0; pointer-events: none;
  transition: opacity .9s cubic-bezier(.22, 1, .36, 1);
  -webkit-mask-image: radial-gradient(farthest-corner at 50% 50%, #000 45%, rgb(0 0 0 / .844) 58.75%, rgb(0 0 0 / .5) 72.5%, rgb(0 0 0 / .156) 86.25%, transparent 100%);
  mask-image: radial-gradient(farthest-corner at 50% 50%, #000 45%, rgb(0 0 0 / .844) 58.75%, rgb(0 0 0 / .5) 72.5%, rgb(0 0 0 / .156) 86.25%, transparent 100%);
}
.nav, main, .foot { position: relative; z-index: 1; }

.logo { display: block; width: 100%; height: auto; }

/* Header: the logo alone, centred. */
.nav { position: absolute; inset: 0 0 auto; z-index: 2; display: flex; justify-content: center; padding: max(20px, env(safe-area-inset-top)) var(--gutter) 20px; }
.nav__logo { display: block; width: clamp(128px, 12vw, 168px); }

/* Buttons: the game's pills. */
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 3px 28px 0;
  border: 1px solid var(--white-24); border-radius: 999px; color: #fff; text-decoration: none; white-space: nowrap;
  font: 600 19px/1 var(--display); letter-spacing: .05em; text-transform: uppercase;
  transition: transform 150ms var(--ease-out), background-color 160ms ease, border-color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn--gold { min-width: 180px; border-color: var(--gold); background: var(--gold); color: #050505; }
@media (hover: hover) { .btn--gold:hover { border-color: #ffd23d; background: #ffd23d; } }

/* Cards: the game's card face and back (src/styles/app.css .tile-thumb, cardBack.css). */
.card {
  --accent: var(--gold);
  position: absolute; inset: 0; container-type: inline-size; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent); border-radius: 8px;
  background: repeating-linear-gradient(135deg, transparent 0 8px, rgb(255 255 255 / .025) 8px 9px), linear-gradient(145deg, var(--card-paper-shadow), var(--card-paper) 68%);
  color: var(--accent);
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.card[data-suit="spades"] { --accent: var(--suit-spades); }
.card[data-suit="hearts"] { --accent: var(--suit-hearts); }
.card[data-suit="diamonds"] { --accent: var(--suit-diamonds); }
.card[data-suit="clubs"] { --accent: var(--suit-clubs); }
.card[data-suit="stars"] { --accent: var(--suit-stars); }
.card.back { border-color: color-mix(in srgb, var(--gold) 20%, transparent); transform: rotateY(180deg); }
.card__art { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.card__corner { position: absolute; z-index: 2; display: grid; place-items: center; gap: .05em; font: 600 17cqi/.9 var(--mono); }
.card__corner--top { top: 7%; left: 8%; }
.card__corner--bottom { right: 8%; bottom: 7%; transform: rotate(180deg); }
/* The game's winning-card shine, swept once. */
.card.face::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transform: translateX(-85%);
  background: linear-gradient(112deg, transparent 0 34%, color-mix(in srgb, var(--accent) 20%, transparent) 43%, rgb(255 255 255 / .28) 47%, transparent 56%);
}
.flip { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }

/* Hero: five queens dealt into a fan, then the headline. One orchestrated entrance, all CSS. */
.hero { display: flex; min-height: 100svh; flex-direction: column; align-items: center; justify-content: center; padding: clamp(76px, 11svh, 100px) var(--gutter) clamp(36px, 7svh, 64px); text-align: center; }
.hand {
  --cw: clamp(96px, min(14vw, 20svh), 184px);
  --spread: .6;
  position: relative; width: calc(var(--cw) * (1.4 + 4 * var(--spread))); height: calc(var(--cw) * 1.62); margin-bottom: clamp(22px, 4vh, 44px);
  transform: perspective(1100px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
  transition: transform 800ms var(--ease-out);
}
.deal {
  position: absolute; top: 0; left: 50%; width: var(--cw); aspect-ratio: 5 / 7; margin-left: calc(var(--cw) / -2); perspective: 900px; transform-origin: 50% 140%;
  transform: translate(calc(var(--n) * var(--cw) * var(--spread)), calc(var(--n) * var(--n) * var(--cw) * .045)) rotate(calc(var(--n) * 7deg));
  animation: deal 1100ms var(--spring) both; animation-delay: calc(150ms + var(--i) * 85ms);
}
.hand .flip { transition: translate 260ms var(--ease-out); animation: flip 720ms var(--ease-in-out) both; animation-delay: calc(640ms + var(--i) * 85ms); }
.hand .card.face::after { animation: glint 1000ms var(--ease-out) both; animation-delay: calc(1500ms + var(--i) * 80ms); }
@media (hover: hover) and (pointer: fine) { .hand .deal:hover .flip { translate: 0 -14px; } }
@keyframes deal { from { transform: translate(0, 62vh) rotate(calc(var(--n) * -9deg)); } }
@keyframes flip { from { transform: rotateY(180deg); } }
@keyframes glint { from { opacity: .9; transform: translateX(-85%); } to { opacity: 0; transform: translateX(85%); } }

.title { margin: 0; font: 600 clamp(36px, min(4.8vw, 7.6svh), 68px)/.88 var(--display); letter-spacing: -.01em; text-transform: uppercase; }
.title__line { display: block; overflow: hidden; padding: .04em .16em .02em; }
.title__line > span { display: inline-block; animation: rise 900ms var(--ease-out) both; animation-delay: 560ms; }
.title__line + .title__line > span { animation-delay: 650ms; }
/* The game's highlight: a gold bar skewed -12deg behind black type. It wipes in and reveals the words. */
.hl { position: relative; isolation: isolate; padding: .05em .16em 0; color: #050505; }
.hl::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--gold); transform: skewX(-12deg); transform-origin: 0 50%; animation: wipe 700ms var(--ease-out) both 880ms; }
@keyframes rise { from { transform: translateY(110%); } }
@keyframes wipe { from { transform: skewX(-12deg) scaleX(0); } }

.lead { margin: 16px 0 26px; color: var(--white-72); font-size: clamp(15px, 1.2vw, 17px); }
.hero .lead, .hero .actions { animation: up 700ms var(--ease-out) both; }
.hero .lead { animation-delay: 1000ms; }
.hero .actions { animation-delay: 1080ms; }
@keyframes up { from { opacity: 0; transform: translateY(14px); } }

/* Story: pinned while you scroll; landing.js moves the cards through four states and shows one caption at a time. */
.story { position: relative; height: 260svh; }
.story__pin {
  position: sticky; top: 0; display: grid; height: 100svh; max-width: 1240px; margin: 0 auto;
  grid-template-rows: auto auto; align-content: center; justify-items: center; gap: clamp(16px, 3vh, 32px);
  padding: 64px var(--gutter) 40px;
}
.story__steps { display: grid; width: 100%; margin: 0; padding: 0; list-style: none; text-align: center; }
/* All captions share one cell, so the caption area never changes height and the stage never re-centres. */
.story__step { grid-area: 1 / 1; opacity: 0; transform: translateY(16px); transition: opacity 260ms ease, transform 600ms var(--ease-out); }
.story__step.is-active { opacity: 1; transform: none; transition-delay: 120ms; }
.story__num { display: block; margin-bottom: 12px; color: var(--gold); font: 600 12px/1 var(--mono); letter-spacing: .15em; }
.story__step h3 { margin: 0; font: 600 clamp(40px, min(5.4vw, 8svh), 76px)/.9 var(--display); letter-spacing: -.01em; text-transform: uppercase;
  clip-path: inset(0 0 100% 0); transition: clip-path 600ms var(--ease-out); }
.story__step.is-active h3 { clip-path: inset(-10% -5% -10% -5%); transition-delay: 120ms; }
.story__step p { max-width: 26em; margin: 12px auto 0; color: var(--white-72); font-size: clamp(15px, 1.25vw, 18px); }

/* A slow push-in across the whole story, so the pinned stage never sits still while you scroll. */
.story__stage { --cw: 96px; position: relative; width: 100%; height: min(56svh, 540px); transform: translateY(calc((.5 - var(--p, 0)) * 36px)) scale(calc(.96 + var(--p, 0) * .08)); }
.story__box {
  position: absolute; top: 50%; left: 50%; width: auto; height: auto; max-width: min(46%, 330px); max-height: 82%;
  transition: transform 900ms var(--spring), opacity 450ms var(--ease-out);
}
.story__box--king { z-index: 2; transform: translate(-50%, -50%); }
.story__box--joker { transform: translate(-50%, -50%) translateX(-40%) rotate(-9deg) scale(.82); }
.story__box--queen { transform: translate(-50%, -50%) translateX(40%) rotate(9deg) scale(.82); }
.story__stage[data-state="0"] .story__box--king { animation: bob 5s ease-in-out infinite alternate; }
.story__stage:not([data-state="0"]) .story__box { opacity: 0; transform: translate(-50%, -50%) translateY(-16%) scale(.66); }
@keyframes bob { to { translate: 0 -10px; } }

.s-card {
  position: absolute; top: 50%; left: 50%; z-index: 3; width: var(--cw); aspect-ratio: 5 / 7; margin: calc(var(--cw) * -.7) 0 0 calc(var(--cw) / -2);
  perspective: 900px; opacity: 0; transform: translate3d(0, 12%, 0) scale(.6);
  transition: transform 900ms var(--spring), opacity 380ms var(--ease-out); transition-delay: var(--d, 0ms);
}
.s-card .flip { transform: rotateY(180deg); transition: transform 640ms var(--ease-in-out); transition-delay: calc(var(--d, 0ms) + 160ms); }
.s-card.is-up .flip { transform: none; }

.story__readout {
  position: absolute; top: calc(50% + var(--cw) * 1.08); left: 50%; z-index: 4; margin: 0; white-space: nowrap;
  font: 600 clamp(26px, 3vw, 40px)/1 var(--display); text-transform: uppercase;
  opacity: 0; transform: translate(-50%, 18px) scale(.92); transition: opacity 250ms ease, transform 600ms var(--spring-pop);
}
.story__readout span { position: relative; isolation: isolate; display: inline-block; padding: .12em .32em .02em; color: #050505; }
.story__readout span::after { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--gold); transform: skewX(-12deg); }
.story__stage[data-state="3"] .story__readout { opacity: 1; transform: translate(-50%, 0); transition-delay: 420ms; }

/* Sealed deck: card backs dither away into the five aces (landing.js). */
.sealed { padding: clamp(104px, 18vh, 190px) var(--gutter); text-align: center; }
.sealed__row { display: flex; justify-content: center; gap: clamp(8px, 1.5vw, 18px); margin: 0 auto clamp(40px, 6vh, 60px); }
.seal { position: relative; width: clamp(54px, 9vw, 122px); aspect-ratio: 5 / 7; }
.seal .back { z-index: 2; transform: none; -webkit-mask-size: 24px 24px; mask-size: 24px 24px; }
.section-title { margin: 0; font: 600 clamp(42px, 5.6vw, 78px)/.88 var(--display); letter-spacing: -.01em; text-transform: uppercase; }
.sealed p { max-width: 31em; margin: 20px auto 0; color: var(--white-72); font-size: clamp(16px, 1.3vw, 18px); }
/* "Protected by Arcium" from the game (arciumCredit.css); the wordmark keeps its own ink. */
.arcium { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 28px; color: #8a8a8a; font: 500 14px/1 var(--sans); text-decoration: none; transition: color 150ms ease; }
.arcium:hover { color: #fff; }
.arcium img { display: block; width: auto; height: clamp(16px, 1.5vw, 20px); }

/* Close */
.final { display: flex; flex-direction: column; align-items: center; gap: clamp(22px, 3.4vh, 32px); padding: clamp(80px, 14vh, 150px) var(--gutter) clamp(88px, 15vh, 150px); text-align: center; }
.final__logo { width: min(540px, 84vw); }
.final__title { margin: 0; color: var(--white-72); font: 600 clamp(15px, 1.4vw, 19px)/1.3 var(--display); letter-spacing: .16em; text-transform: uppercase; }

.foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; max-width: 1240px; margin: 0 auto;
  padding: 12px var(--gutter) max(16px, env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); color: var(--white-56); font-size: 14px;
}
.foot nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; transition: color 160ms ease; }
.foot a:hover { color: #fff; }
.foot__social { justify-content: center; width: 44px; margin: 0 -10px; }
.foot__social svg { width: 18px; height: 18px; fill: currentColor; }

/* Phones and portrait tablets. */
@media (max-width: 760px) {
  .story { height: 240svh; }
  .story__stage { height: min(52svh, 460px); }
  .story__box { max-width: min(48%, 260px); max-height: 78%; }
}
@media (max-width: 520px) {
  .sealed { padding: 88px var(--gutter) 56px; }
  .final { padding-top: 56px; }
  .hand { --cw: min(23vw, 104px); --spread: .5; }
  .hero .actions, .final .actions { width: 100%; max-width: 360px; flex-direction: column; align-items: stretch; }
}

/* Without scripts the story is a plain list. */
@media (scripting: none) {
  .story { height: auto; }
  .story__pin { position: static; height: auto; }
  .story__steps { gap: 32px; }
  .story__step { grid-area: auto; opacity: 1; transform: none; }
  .story__step h3 { clip-path: none; }
  .seal .back { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .hand, .s-card, .s-card .flip, .story__box, .story__readout, .story__step, .story__step h3 { transition-property: opacity !important; }
  .story__stage { transform: none; }
}
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
