/* Haven 52 — site styles. Palette and card geometry follow the app's tokens
   (app/lib/design/tokens.dart) and the approved R3 card face. */

@font-face {
  font-family: "Eczar";
  src: url("../fonts/eczar-latin.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #101010;
  --ink-raised: #191919;
  --ink-deep: #080808;
  --paper: #ffffff;
  --red: #d51024;
  --red-on-ink: #e30b2d;
  --felt: #c8092a;
  --felt-shade: #9d001d;
  --felt-dark: #53000f;
  --felt-rim: #5d0011;
  --on-felt-2: #f8e6e8;
  --on-red-2: #fbe7e9;
  --on-ink-2: #bbbbbb;
  --ink-2: #595959;
  --sep: #d8d8d8;
  --sep-ink: #36363a;
  --quiet: #f5f5f5;
  --card-edge: #c9c2b8;

  --display: "Eczar", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(16px, 4.2vw, 64px);
  --wrap: 1320px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in: cubic-bezier(.7, 0, .84, 0);
  --card-shadow: 0 1px 1px rgba(36, 0, 8, .28), 0 12px 24px -8px rgba(36, 0, 8, .55);
  --card-shadow-lift: 0 2px 3px rgba(36, 0, 8, .3), 0 26px 40px -12px rgba(36, 0, 8, .6);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  scrollbar-color: var(--felt-shade) var(--ink);
  -webkit-text-size-adjust: 100%;
  background: var(--ink);
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--paper);
  background: var(--ink);
  caret-color: var(--red);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01" 0, "cv11" 1;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
dl, dd, ol, ul { margin: 0; padding: 0; }

::selection { background: var(--ink); color: var(--paper); }
.paper ::selection { background: var(--red); color: var(--paper); }

:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; border-radius: 4px; }

[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--paper); color: var(--ink); padding: 10px 16px; border-radius: 8px;
  font-weight: 600; text-decoration: none; transition: top .2s var(--ease-out);
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.i { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- grounds ---------- */

.felt {
  color: var(--paper);
  background-color: var(--felt);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(70% 80% at 52% 42%, rgba(255, 92, 112, .16), rgba(255, 92, 112, 0) 70%),
    linear-gradient(90deg, var(--felt-shade) 0%, var(--felt) 30%, var(--felt) 62%, #8a0019 86%, var(--felt-dark) 100%);
  background-blend-mode: soft-light, normal, normal;
}
.felt ::selection { background: var(--paper); color: var(--felt-shade); }
.ink { background: var(--ink); color: var(--paper); --card-shadow: 0 1px 1px rgba(0, 0, 0, .45), 0 12px 24px -8px rgba(0, 0, 0, .65); }
.paper { background: var(--paper); color: var(--ink); --card-shadow: 0 1px 1px rgba(0, 0, 0, .18), 0 12px 24px -8px rgba(0, 0, 0, .35); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: 0 1.4em;
  border: 0; border-radius: 10px;
  font-family: var(--sans); font-size: 1.0625rem; font-weight: 600; letter-spacing: -.005em;
  text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background-color .2s, color .2s;
}
.btn .i { transition: transform .3s var(--ease-out); }
.btn:hover .i { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 60px; font-size: 1.125rem; padding: 0 1.7em; }

.btn-paper { background: var(--paper); color: var(--ink); box-shadow: 0 1px 1px rgba(36, 0, 8, .3), 0 10px 22px -10px rgba(36, 0, 8, .7); }
.btn-paper:hover { box-shadow: 0 2px 2px rgba(36, 0, 8, .3), 0 18px 30px -12px rgba(36, 0, 8, .75); transform: translateY(-1px); }
.btn-paper:focus-visible { outline-color: var(--paper); outline-offset: 4px; }

.btn-ink-on-felt { background: var(--ink); color: var(--paper); }
.btn-ink-on-felt:hover { background: #000; }
.btn-ink-on-felt:focus-visible { outline-color: var(--paper); }

.btn-red { background: var(--red); color: var(--paper); }
.btn-red:hover { background: #e3132a; }
.btn-red:focus-visible { outline-color: var(--paper); }

.btn-ghost-ink { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55); }
.btn-ghost-ink:hover { box-shadow: inset 0 0 0 1.5px var(--paper); }

.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #000; }

.link-quiet {
  display: inline-flex; align-items: center; gap: .45em; min-height: 44px;
  font-weight: 600; text-decoration: none; color: var(--on-felt-2);
}
.link-quiet:hover { color: var(--paper); }
.link-quiet .i { transition: transform .3s var(--ease-out); }
.link-quiet:hover .i { transform: translateY(3px); }

/* ---------- top bar ---------- */

.topbar {
  position: fixed; inset: 0 0 auto; z-index: 60;
  height: 72px; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 24px;
  color: var(--paper);
  transition: background-color .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.topbar.is-solid { background: rgba(16, 16, 16, .97); box-shadow: 0 1px 0 var(--sep-ink); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 1px 1px rgba(0, 0, 0, .25), 0 6px 14px -6px rgba(0, 0, 0, .5); }
.brand span { font-family: var(--display); font-weight: 700; font-size: 1.45rem; letter-spacing: -.01em; line-height: 1; padding-top: .12em; }
.topnav { display: flex; gap: 4px; }
.topnav a {
  padding: 10px 14px; border-radius: 8px; font-size: .95rem; font-weight: 500; text-decoration: none;
  color: var(--on-felt-2); transition: color .2s, background-color .2s;
}
.topnav a:hover { color: var(--paper); background: rgba(255, 255, 255, .08); }
.topbar-cta {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px;
  border-radius: 8px; font-size: .95rem; font-weight: 600; text-decoration: none;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .7);
  transition: box-shadow .2s, background-color .2s, color .2s;
}
.topbar-cta:hover { background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--paper); }

/* ---------- hero: the table and your hand ---------- */

.hero {
  --hand-w: clamp(98px, 6vw + 64px, 178px);
  --hand-h: calc(var(--hand-w) * 311 / 210);
  --peek: calc(var(--hand-h) * .6);
  --slot-w: clamp(150px, min(18.5vw, 36vh), 292px);
  position: relative; isolation: isolate; overflow: hidden;
  min-height: max(100svh, 720px);
  box-shadow: inset 0 -40px 70px -40px rgba(40, 0, 8, .55);
}
.relief {
  position: absolute; z-index: -1; pointer-events: none;
  height: 122%; width: auto; aspect-ratio: 557 / 600;
  top: -11%; left: 38%;
  transform: rotate(-8deg);
  opacity: .78;
}
.hero-inner {
  position: relative;
  max-width: var(--wrap); margin-inline: auto;
  min-height: inherit;
  padding: calc(84px + 4vh) var(--gutter) calc(var(--peek) + 40px);
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(28px, 4.5vw, 72px); align-items: center;
}
.hero h1 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(3.1rem, min(5.9vw, 11vh), 5.6rem);
  line-height: .94; letter-spacing: -.022em;
  text-shadow: 0 2px 6px rgba(70, 0, 14, .25);
  max-width: 11.5ch;
}
.lede {
  margin-top: clamp(18px, 2.6vh, 28px);
  font-size: clamp(1.06rem, .96rem + .38vw, 1.28rem); line-height: 1.55;
  color: var(--on-felt-2); max-width: 34ch;
}
.cta-row { margin-top: clamp(24px, 4vh, 40px); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }

.table-area {
  position: relative;
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  align-items: center; gap: clamp(22px, 3.2vw, 52px);
}
.slot { position: relative; padding: 20px; }
.bracket { position: absolute; width: 26px; height: 26px; border: 2px solid rgba(255, 255, 255, .78); }
.b-tl { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 7px; }
.b-tr { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 7px; }
.b-bl { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 7px; }
.b-br { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 7px; }
.slot.is-armed .bracket { border-color: var(--paper); }
.slot.is-armed { animation: none; }

.pc {
  position: relative; display: block;
  width: var(--w, 100px); aspect-ratio: 210 / 311;
  border-radius: 6.19% / 4.18%;
  background: var(--paper);
}
.pc > svg { width: 100%; height: 100%; }
.slot-card {
  --w: var(--slot-w);
  transform: rotate(-3deg);
  box-shadow: var(--card-shadow-lift);
  animation: land 900ms var(--ease-out) 650ms backwards;
}
.flyer { box-shadow: var(--card-shadow-lift); pointer-events: none; will-change: transform; }

.slot-info { display: grid; min-width: 0; }
.slot-info > .slot-text { grid-area: 1 / 1; }
.slot-name {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.3rem, 1.4rem + 2.6vw, 4.2rem); line-height: .95; letter-spacing: -.02em;
}
.slot-name.is-long { font-size: clamp(2rem, 1.1rem + 2.1vw, 3.3rem); line-height: .98; }
.slot-premise { margin-top: 10px; font-size: clamp(1.05rem, .98rem + .35vw, 1.3rem); font-weight: 500; line-height: 1.35; max-width: 22ch; }
.slot-more {
  margin-top: 18px; display: inline-flex; align-items: center; gap: .4em; min-height: 44px;
  font-weight: 600; font-size: .98rem; color: var(--on-felt-2); text-decoration: none;
}
.slot-more:hover { color: var(--paper); }
.hand-hint {
  grid-column: 1 / -1; font-size: .875rem; color: var(--on-felt-2);
  display: flex; align-items: center; gap: 10px;
}
.hand-hint::before { content: ""; width: 28px; height: 1.5px; background: currentColor; opacity: .7; }

/* facts */
.facts { display: flex; flex-wrap: wrap; gap: 14px 30px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--facts-rule, rgba(255, 255, 255, .3)); }
.facts dt { font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--facts-label, var(--on-felt-2)); }
.facts dd { font-size: 1rem; font-weight: 600; line-height: 1.35; margin-top: 3px; }
.facts-ink { --facts-rule: var(--sep-ink); --facts-label: var(--on-ink-2); }
.facts-paper { --facts-rule: var(--sep); --facts-label: var(--ink-2); }

/* the hand */
.hand {
  position: absolute; z-index: 5; left: 50%; bottom: 0;
  width: calc(var(--hand-w) * 3); height: calc(var(--peek) + 40px);
  transform: translateX(-50%);
}
.hand-card {
  --x: calc(var(--i) * var(--hand-w) * .74);
  position: absolute; left: 50%; bottom: calc(var(--peek) - var(--hand-h));
  width: var(--hand-w); margin-left: calc(var(--hand-w) / -2);
  padding: 0; border: 0; background: none; cursor: pointer;
  transform-origin: 50% 150%;
  transform: translateX(var(--x)) translateY(calc(var(--i) * var(--i) * 14px)) rotate(calc(var(--i) * 9deg));
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.hand-card:focus-visible { outline: none; }
.hand-card .pc {
  --w: var(--hand-w);
  box-shadow: var(--card-shadow);
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out);
  animation: deal-in 760ms var(--ease-out) backwards;
  animation-delay: calc(120ms + (var(--i) + 1) * 90ms);
}
.hand-card:hover .pc, .hand-card:focus-visible .pc { transform: translateY(-26px); box-shadow: var(--card-shadow-lift); }
.hand-card:focus-visible .pc { outline: 3px solid var(--paper); outline-offset: 5px; }
.hand-label {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 10px);
  font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--paper); text-align: center;
  transition: transform .35s var(--ease-out), opacity .3s;
  animation: deal-in 760ms var(--ease-out) backwards;
  animation-delay: calc(120ms + (var(--i) + 1) * 90ms);
}
.hand-card:hover .hand-label, .hand-card:focus-visible .hand-label { transform: translateY(-26px); }
.hand-card.is-played { cursor: default; }
.hand-card.is-played .pc { background: transparent; box-shadow: none; outline: 2px dashed rgba(255, 255, 255, .5); outline-offset: -2px; transform: none; }
.hand-card.is-played .pc > svg { opacity: 0; }
.hand-card.is-played .hand-label { opacity: .6; transform: none; }
.hand-card.is-lifted .pc > svg { opacity: 0; }
.hand-card.is-lifted .pc { box-shadow: none; background: transparent; outline: 2px dashed rgba(255, 255, 255, .5); outline-offset: -2px; transform: none; }

@keyframes deal-in {
  from { transform: translateY(115%) rotate(6deg); }
}
@keyframes land {
  from { transform: translate(-46%, 62%) rotate(-24deg) scale(.86); box-shadow: 0 2px 3px rgba(36, 0, 8, .2), 0 50px 60px -10px rgba(36, 0, 8, .5); }
}

/* ---------- rooms intro ---------- */

.rooms-intro { padding-block: clamp(84px, 12vw, 168px); }
.rooms-intro .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px 64px; align-items: end; }
.rooms-intro h2 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.6rem, 1.4rem + 4.6vw, 5.6rem); line-height: .96; letter-spacing: -.022em;
}
.on-ink-red { color: var(--red-on-ink); display: block; }
.rooms-intro-side p { color: var(--on-ink-2); max-width: 44ch; }
.doors { margin-top: 28px; border-top: 1px solid var(--sep-ink); }
.doors a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 0; border-bottom: 1px solid var(--sep-ink);
  font-family: var(--display); font-weight: 700; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); line-height: 1.1;
  text-decoration: none; transition: color .2s;
}
.doors a span { transition: transform .35s var(--ease-out); }
.doors a:hover { color: var(--red-on-ink); }
.doors a:hover span { transform: translateX(8px); }
.doors a .i { transition: transform .3s var(--ease-out); }
.doors a:hover .i { transform: translateY(3px); }

/* ---------- rooms ---------- */

.room { padding-block: clamp(80px, 10vw, 150px); overflow: hidden; }
.room-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.room-grid-flip .room-copy { order: 2; }
.room-name {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(3.4rem, 1.8rem + 6vw, 6rem); line-height: .9; letter-spacing: -.025em;
}
.room-joker .room-name { font-size: clamp(2.8rem, 1.5rem + 4.4vw, 5rem); line-height: .94; }
.room-premise { margin-top: 16px; font-size: clamp(1.25rem, 1.08rem + .7vw, 1.65rem); font-weight: 600; line-height: 1.28; letter-spacing: -.01em; max-width: 24ch; }
.room-body { margin-top: 16px; max-width: 50ch; color: var(--body-2, var(--on-felt-2)); }
.room-bluff { --body-2: var(--on-ink-2); }
.room-joker { --body-2: var(--ink-2); }

.steps { list-style: none; margin-top: 30px; counter-reset: none; }
.steps li { display: grid; grid-template-columns: 44px 1fr; align-items: baseline; padding: 13px 0; border-top: 1px solid var(--steps-rule, rgba(255, 255, 255, .3)); }
.steps li:last-child { border-bottom: 1px solid var(--steps-rule, rgba(255, 255, 255, .3)); }
.step-n { font-family: var(--display); font-weight: 700; font-size: 1.45rem; line-height: 1; color: var(--step-n, var(--paper)); }
.steps strong { font-weight: 700; margin-right: .45em; }
.steps-ink { --steps-rule: var(--sep-ink); --step-n: var(--red-on-ink); }
.steps-ink span:last-child { color: var(--on-ink-2); }
.steps-ink strong { color: var(--paper); }
.steps-paper { --steps-rule: var(--sep); --step-n: var(--red); }
.steps-paper span:last-child { color: var(--ink-2); }
.steps-paper strong { color: var(--ink); }

/* demos */
.demo { margin: 0; --dw: clamp(60px, 6.4vw + 14px, 108px); }
.demo .pc { --w: var(--dw); box-shadow: var(--card-shadow); flex: none; }
.demo-stage { position: relative; border-radius: 28px; padding: clamp(18px, 2.6vw, 32px); }
.zone-label { font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.demo-bar { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.demo-says { flex: 1 1 280px; max-width: 46ch; font-size: .98rem; line-height: 1.5; min-height: 3em; }
.demo-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.is-target::after {
  content: ""; position: absolute; inset: -9px; pointer-events: none; color: var(--paper);
  background:
    linear-gradient(currentColor 0 0) top left / 16px 2px, linear-gradient(currentColor 0 0) top left / 2px 16px,
    linear-gradient(currentColor 0 0) top right / 16px 2px, linear-gradient(currentColor 0 0) top right / 2px 16px,
    linear-gradient(currentColor 0 0) bottom left / 16px 2px, linear-gradient(currentColor 0 0) bottom left / 2px 16px,
    linear-gradient(currentColor 0 0) bottom right / 16px 2px, linear-gradient(currentColor 0 0) bottom right / 2px 16px;
  background-repeat: no-repeat;
}

/* Seep demo */
.demo-seep .demo-stage {
  background: rgba(70, 0, 14, .32);
  box-shadow: inset 0 2px 0 rgba(40, 0, 8, .35), inset 0 0 0 1px rgba(255, 255, 255, .1), inset 0 30px 60px -30px rgba(40, 0, 8, .5);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto minmax(28px, 1fr) auto auto;
  gap: 14px 24px; min-height: clamp(420px, 40vw, 540px);
  color: var(--on-felt-2);
}
.zl-floor { grid-column: 1 / -1; }
.floor { grid-column: 1 / -1; display: flex; justify-content: center; gap: clamp(8px, 1.4vw, 16px); min-height: calc(var(--dw) * 311 / 210); }
.floor .pc { transform: rotate(var(--r, 0deg)); }
.floor .pc:nth-child(1) { --r: -4deg; }
.floor .pc:nth-child(2) { --r: 3deg; }
.floor .pc:nth-child(3) { --r: -1.5deg; }
.floor .pc:nth-child(4) { --r: 5deg; }
.score-chips { grid-column: 1; grid-row: 3; align-self: center; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-size: .9rem; font-weight: 600;
  opacity: 0; transform: translateY(8px); transition: opacity .4s var(--ease-out), transform .5s var(--ease-out);
}
.chip-sweep { background: var(--paper); color: var(--felt-shade); }
.score-chips.is-on .chip { opacity: 1; transform: none; }
.score-chips.is-on .chip:nth-child(2) { transition-delay: .12s; }
.pile-spot {
  grid-column: 2; grid-row: 3 / span 3; align-self: end; position: relative;
  width: var(--dw); aspect-ratio: 210 / 311; border-radius: 6.19% / 4.18%;
  outline: 2px dashed rgba(255, 255, 255, .42); outline-offset: -2px;
  display: grid; place-items: center; text-align: center;
}
.pile-spot > span { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 0 6px; line-height: 1.3; }
.pile-spot > .pc { position: absolute; inset: 0 auto auto 0; transform: translate(calc(var(--n, 0) * 2px), calc(var(--n, 0) * -3px)) rotate(var(--rr, 0deg)); }
.zl-hand { grid-column: 1; grid-row: 4; }
.demo-hand { grid-column: 1; grid-row: 5; display: flex; gap: 0; padding-left: 4px; padding-top: 22px; }
.demo-hand .pc + .pc { margin-left: calc(var(--dw) * -.22); }
.demo-hand .pc.dim { filter: brightness(.86); }
.demo-hand .pc.is-target { transform: translateY(-14px); z-index: 2; }
.demo-seep .demo-says { color: var(--on-felt-2); }

/* Bluff demo */
.demo-bluff .demo-stage {
  background: var(--ink-raised);
  box-shadow: inset 0 0 0 1px var(--sep-ink);
  min-height: clamp(400px, 38vw, 520px);
  display: grid; place-items: center; overflow: hidden;
}
.claimant { position: absolute; top: clamp(18px, 2.6vw, 30px); left: clamp(18px, 2.6vw, 32px); right: clamp(18px, 2.6vw, 32px); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; z-index: 3; }
.claimant-seat { width: 34px; height: 34px; flex: none; }
.claimant-name { font-size: .85rem; color: var(--on-ink-2); }
.claim-tag {
  margin-left: auto; padding: 8px 16px; border-radius: 12px 12px 12px 4px;
  background: var(--paper); color: var(--ink);
  font-family: var(--display); font-weight: 700; font-size: clamp(1.15rem, .9rem + .8vw, 1.5rem); line-height: 1.1;
}
.bluff-pile, .claim { grid-area: 1 / 1; position: relative; width: calc(var(--dw) * 1.45); aspect-ratio: 210 / 311; }
.bluff-pile .back { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 6.19% / 4.18%; box-shadow: var(--card-shadow); }
.b1 { transform: rotate(-11deg) translate(-8px, 4px); }
.b2 { transform: rotate(7deg) translate(6px, -2px); }
.b3 { transform: rotate(-2deg); }
.claim { perspective: 1000px; transform: translate(34%, 10%); }
.claim .flip { position: absolute; inset: 0; }
.claim .flip:first-child { transform: rotate(-9deg) translate(-26%, 0); }
.claim .flip:last-child { transform: rotate(8deg) translate(22%, 6%); }
.flip { display: block; transform-style: preserve-3d; transition: transform .7s var(--ease-out); }
.flip .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 6.19% / 4.18%; }
.flip .face img, .flip .face svg { display: block; width: 100%; height: 100%; border-radius: inherit; }
.flip .face-back { box-shadow: var(--card-shadow); }
.flip .face-front { transform: rotateY(180deg); width: 100%; }
.claim .flip.is-up:first-child { transform: rotate(-9deg) translate(-26%, 0) rotateY(180deg); }
.claim .flip.is-up:last-child { transform: rotate(8deg) translate(22%, 6%) rotateY(180deg); transition-delay: .12s; }
.demo-bluff .demo-says { color: var(--on-ink-2); }
.demo-bluff .demo-says strong { color: var(--paper); }

/* Joker demo */
.demo-joker .demo-stage {
  color: var(--paper);
  min-height: clamp(420px, 40vw, 540px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto 1fr auto auto;
  gap: 14px 24px; overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}
.demo-joker .demo-stage::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(118deg, transparent 0 62%, rgba(16, 16, 16, .9) 62% 74%, transparent 74%);
  opacity: .14;
}
.demo-joker .zone-label { grid-column: 1 / -1; color: var(--on-red-2); position: relative; }
.demo-joker .zone-label:nth-of-type(2) { grid-column: 1; grid-row: 4; }
.their-hand { grid-column: 1 / -1; display: flex; justify-content: center; padding-top: 6px; min-height: calc(var(--dw) * 311 / 210 + 10px); position: relative; }
.draw {
  position: relative; padding: 0; border: 0; background: none; cursor: pointer;
  width: var(--dw); aspect-ratio: 210 / 311; flex: none;
  transform: rotate(calc((var(--k) - 1.5) * 6deg)) translateY(calc((var(--k) - 1.5) * (var(--k) - 1.5) * 4px));
  margin-left: calc(var(--dw) * -.18);
  transition: transform .35s var(--ease-out);
  border-radius: 6.19% / 4.18%;
}
.draw:first-child { margin-left: 0; }
.draw .flip { position: absolute; inset: 0; }
.draw:hover:not(:disabled), .draw:focus-visible { transform: rotate(calc((var(--k) - 1.5) * 6deg)) translateY(-14px); }
.draw:focus-visible { outline: 3px solid var(--paper); outline-offset: 4px; }
.draw:disabled { cursor: default; }
.their-hand.is-done .draw:not(.is-taken) { transform: rotate(calc((var(--k) - 1.5) * 6deg)) translateY(10px); }
.their-hand.is-done .draw:not(.is-taken) .face-back { filter: brightness(.6) saturate(.9); }
.draw.is-taken { visibility: hidden; }
.discard {
  grid-column: 2; grid-row: 3 / span 3; align-self: end; position: relative;
  width: var(--dw); aspect-ratio: 210 / 311; border-radius: 6.19% / 4.18%;
  outline: 2px dashed rgba(255, 255, 255, .55); outline-offset: -2px;
  display: grid; place-items: center; text-align: center;
}
.discard > span { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--on-red-2); padding: 0 6px; line-height: 1.3; }
.your-hand { grid-column: 1; grid-row: 5; display: flex; align-items: flex-end; padding-left: 4px; perspective: 1000px; }
.your-hand > * + * { margin-left: calc(var(--dw) * -.2); }
.your-hand .flip { position: relative; width: var(--dw); aspect-ratio: 210 / 311; flex: none; }
.your-hand .flip.is-up { transform: rotateY(180deg) translateY(0); }
.your-hand .flip .face-front { box-shadow: var(--card-shadow); }
.demo-joker .demo-says { color: var(--ink-2); }
.demo-joker .demo-says strong { color: var(--ink); }

/* ---------- the cut: public or private ---------- */

.cut { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; background: var(--ink); color: var(--paper); }
.cut::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--red);
  clip-path: polygon(57% 0, 100% 0, 100% 100%, 43% 100%);
  transition: clip-path 1s var(--ease-out);
}
.cut.is-armed::before { clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); }
.cut-half { padding: clamp(84px, 10vw, 150px) var(--gutter); }
.cut-public { padding-right: calc(9vw + var(--gutter)); justify-self: end; max-width: 700px; width: 100%; }
.cut-private { padding-left: calc(9vw + var(--gutter)); max-width: 700px; width: 100%; }
.cut h3 { font-family: var(--display); font-weight: 800; font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4.4rem); line-height: .95; letter-spacing: -.02em; }
.cut-lede { margin-top: 16px; font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); font-weight: 500; line-height: 1.4; max-width: 28ch; }
.cut-public .cut-lede { color: var(--paper); }
.stakes { list-style: none; margin-top: 30px; display: flex; flex-wrap: wrap; gap: 8px; }
.stakes li {
  min-width: 70px; padding: 12px 16px; border-radius: 10px; text-align: center;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .28);
  font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1; font-variant-numeric: lining-nums tabular-nums;
}
.stakes li:nth-child(2) { background: var(--paper); color: var(--ink); box-shadow: none; }
.stakes-note { margin-top: 10px; font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--on-ink-2); }
.cut-private .stakes-note { color: var(--on-red-2); }
.code { margin-top: 30px; display: flex; gap: 8px; }
.code span {
  width: clamp(40px, 3.6vw, 56px); height: clamp(52px, 4.6vw, 68px); border-radius: 10px;
  display: grid; place-items: center; background: var(--paper); color: var(--ink);
  font-weight: 700; font-size: clamp(1.4rem, 1rem + 1.2vw, 2.1rem); font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 1px rgba(60, 0, 10, .3), 0 10px 20px -10px rgba(60, 0, 10, .6);
}
.code span:nth-child(3) { margin-right: 10px; }
.ticks { list-style: none; margin-top: 34px; display: grid; gap: 14px; max-width: 46ch; }
.ticks li { position: relative; padding-left: 26px; line-height: 1.5; }
.ticks li::before { content: ""; position: absolute; left: 3px; top: .5em; width: 9px; height: 9px; transform: rotate(45deg); background: var(--red-on-ink); }
.cut-public .ticks li { color: var(--on-ink-2); }
.cut-private .ticks li { color: var(--on-red-2); }
.cut-private .ticks li::before { background: var(--paper); }

/* ---------- house rules: the club pass ---------- */

.house { padding-block: clamp(84px, 11vw, 160px); }
.house h2 {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2.6rem, 1.4rem + 4.6vw, 5.6rem); line-height: .96; letter-spacing: -.022em;
  max-width: 12ch;
}
.pass {
  --stub: clamp(190px, 18vw, 240px);
  margin-top: clamp(36px, 5vw, 64px);
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--stub);
  background: var(--ink); color: var(--paper); border-radius: 22px; overflow: hidden;
  box-shadow: 0 2px 2px rgba(0, 0, 0, .08), 0 40px 60px -30px rgba(0, 0, 0, .45);
}
.pass::before, .pass::after {
  content: ""; position: absolute; right: calc(var(--stub) - 15px); width: 30px; height: 30px; border-radius: 50%; background: var(--paper);
}
.pass::before { top: -15px; }
.pass::after { bottom: -15px; }
.pass-main { padding: clamp(26px, 3.6vw, 52px); }
.rules { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(28px, 4vw, 56px); }
.rules > div { padding: 22px 0; border-top: 1px solid var(--sep-ink); }
.rules > div:nth-child(-n+2) { border-top: 0; padding-top: 0; }
.rules dt { font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 1.12rem + .6vw, 1.6rem); line-height: 1.15; }
.rules dd { margin-top: 8px; color: var(--on-ink-2); font-size: 1rem; line-height: 1.55; }
.pass-stub {
  border-left: 2px dashed rgba(255, 255, 255, .26);
  padding: 32px 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px;
  background:
    linear-gradient(135deg, transparent 0 74%, rgba(213, 16, 36, .92) 74% 81%, transparent 81%) no-repeat,
    var(--ink);
  background-size: 100% 100%;
}
.pass-stub img { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 10px 20px -8px rgba(0, 0, 0, .6); }
.stub-name { font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1; }
.stub-games { font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; line-height: 1.9; color: var(--on-ink-2); }

/* ---------- close ---------- */

.close {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(96px, 12vw, 168px) var(--gutter) clamp(96px, 11vw, 150px);
  display: flex; flex-direction: column; align-items: center;
}
.close-fan { position: relative; width: clamp(96px, 9vw, 138px); aspect-ratio: 210 / 311; margin-bottom: clamp(36px, 5vw, 56px); }
.close-fan .pc {
  --w: 100%; position: absolute; inset: 0; box-shadow: var(--card-shadow);
  transform-origin: 50% 130%; transform: translateX(var(--x)) rotate(var(--r));
}
.close h2 { font-family: var(--display); font-weight: 800; font-size: clamp(3rem, 1.8rem + 5vw, 6rem); line-height: .92; letter-spacing: -.024em; }
.close p { margin: 18px 0 30px; color: var(--on-felt-2); font-size: 1.125rem; }

/* ---------- footer ---------- */

.footer { padding-block: 56px 40px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 28px 40px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 14px; }
.footer-brand img { border-radius: 11px; }
.footer-name { font-family: var(--display); font-weight: 700; font-size: 1.35rem; line-height: 1.1; }
.footer-note { color: var(--on-ink-2); font-size: .9rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 26px; }
.footer-links a { color: var(--paper); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.footer-links a:hover { text-decoration: underline; }
.footer-legal { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--sep-ink); color: var(--on-ink-2); font-size: .82rem; }

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; align-content: center; gap: 36px; }
  .hero h1 { max-width: 12ch; }
  .relief { left: 30%; }
  .room-grid { grid-template-columns: 1fr; }
  .room-grid-flip .room-copy { order: 0; }
  .rooms-intro .wrap { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .topnav { display: none; }
  .cut { grid-template-columns: 1fr; }
  .cut::before { display: none; }
  .cut-public, .cut-private { padding: 76px var(--gutter); max-width: none; justify-self: stretch; }
  .cut-public { padding-bottom: 96px; }
  .cut-private { background: var(--red); margin-top: -56px; padding-top: 128px; clip-path: polygon(0 56px, 100% 0, 100% 100%, 0 100%); }
  .rules { grid-template-columns: 1fr; }
  .rules > div:nth-child(2) { border-top: 1px solid var(--sep-ink); padding-top: 22px; }
  .pass { grid-template-columns: 1fr; }
  .pass::before, .pass::after { right: auto; top: auto; bottom: calc(var(--stub-h, 168px) - 15px); }
  .pass::before { left: -15px; }
  .pass::after { right: -15px; left: auto; }
  .pass-stub { --stub-h: 168px; border-left: 0; border-top: 2px dashed rgba(255, 255, 255, .26); display: grid; grid-template-columns: auto 1fr; align-content: center; justify-items: start; text-align: left; min-height: 168px; padding: 24px 26px; gap: 6px 18px;
    background: linear-gradient(118deg, transparent 0 82%, rgba(213, 16, 36, .92) 82% 88%, transparent 88%) no-repeat, var(--ink); }
  .pass-stub img { grid-row: span 2; }
  .stub-games { line-height: 1.6; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .topbar { height: 64px; }
  .brand span { font-size: 1.3rem; }
  .brand img { width: 36px; height: 36px; }
  .hero { --hand-w: 96px; --slot-w: 116px; min-height: max(100svh, 760px); }
  .hero-inner { padding-top: 92px; align-content: start; gap: 28px; }
  .hero h1 { font-size: clamp(2.9rem, 13.4vw, 3.6rem); }
  .cta-row { gap: 6px 18px; }
  .cta-row .btn { width: 100%; }
  .table-area { gap: 18px; align-items: start; }
  .slot { padding: 12px; }
  .bracket { width: 18px; height: 18px; }
  .slot-name { font-size: 2.1rem; }
  .slot-premise { font-size: 1rem; }
  .facts { gap: 8px 18px; margin-top: 14px; padding-top: 12px; }
  .facts-felt dd { font-size: .92rem; }
  .table-area .slot-more { margin-top: 6px; }
  .table-area .facts { display: none; }
  .slot-premise { max-width: 16ch; }
  .hand-hint { display: none; }
  .relief { left: 4%; top: 18%; height: 90%; }
  .demo-hand .pc + .pc { margin-left: calc(var(--dw) * -.3); }
  .demo { --dw: clamp(56px, 17vw, 76px); }
  .demo-seep .demo-stage, .demo-joker .demo-stage, .demo-bluff .demo-stage { min-height: 0; }
  .demo-bluff .demo-stage { padding-top: 120px; padding-bottom: 40px; }
  .claim-tag { margin-left: 0; }
  .stakes li { min-width: 0; flex: 1 1 0; padding: 12px 6px; font-size: 1.25rem; }
  .code { gap: 6px; }
  .code span:nth-child(3) { margin-right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
}

/* ---------- late additions: drop target and stacked piles ---------- */
.slot .bracket { transition: transform .35s var(--ease-out), border-color .2s; }
.slot.is-over .b-tl { transform: translate(-7px, -7px); }
.slot.is-over .b-tr { transform: translate(7px, -7px); }
.slot.is-over .b-bl { transform: translate(-7px, 7px); }
.slot.is-over .b-br { transform: translate(7px, 7px); }
.slot.is-over .bracket, .slot.is-armed .bracket { border-color: var(--paper); }

.discard { perspective: 1000px; }
.discard > .pc, .discard > .flip {
  position: absolute; margin: 0; width: var(--dw); aspect-ratio: 210 / 311;
  left: calc(var(--n, 0) * 14px); top: calc(var(--n, 0) * -8px); rotate: var(--rr, 0deg); z-index: calc(var(--n, 0) + 1);
}
.discard > .flip.is-up { transform: rotateY(180deg); }
.your-hand .pc { box-shadow: var(--card-shadow); }

/* ---------- document pages: privacy, delete account ---------- */
.doc-page { background: var(--paper); color: var(--ink); }
.topbar.is-static { position: sticky; }
.doc { padding: clamp(56px, 8vw, 104px) var(--gutter) clamp(72px, 10vw, 128px); }
.doc > * { max-width: 46rem; margin-inline: auto; }
.doc-head h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2.8rem, 1.8rem + 4vw, 4.8rem); line-height: .95; letter-spacing: -.022em; }
.doc-meta { margin-top: 14px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.doc-lede { margin-top: 22px; font-size: 1.2rem; line-height: 1.55; max-width: 40ch; }
.doc-toc { margin-top: 40px; padding: 18px 0; border-block: 1px solid var(--sep); display: flex; flex-wrap: wrap; gap: 6px 22px; }
.doc-toc a { font-size: .95rem; font-weight: 500; color: var(--ink-2); text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }
.doc-toc a:hover { color: var(--red); }
.doc-section { margin-top: clamp(44px, 6vw, 64px); }
.doc-section h2 { font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); line-height: 1.1; margin-bottom: 14px; scroll-margin-top: 90px; }
.doc-section p + p, .doc-section ul + p, .doc-section p + ul, .doc-section dl + p, .doc-section p + dl, .doc-section ol + p { margin-top: 14px; }
.doc-section ul, .doc-section ol { padding-left: 0; list-style: none; display: grid; gap: 10px; }
.doc-section ul li { position: relative; padding-left: 24px; }
.doc-section ul li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; transform: rotate(45deg); background: var(--red); }
.doc-steps { counter-reset: step; }
.doc-steps li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--sep); }
.doc-steps li:last-child { border-bottom: 1px solid var(--sep); }
.doc-steps li::before { content: counter(step); font-family: var(--display); font-weight: 700; font-size: 1.35rem; color: var(--red); }
.doc a:not(.btn) { color: var(--red); text-decoration-thickness: 1.5px; }
.doc a:not(.btn):hover { color: var(--ink); }
.doc-dl { display: grid; gap: 0; margin-top: 16px; }
.doc-dl > div { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: 4px 24px; padding: 14px 0; border-top: 1px solid var(--sep); }
.doc-dl > div:last-child { border-bottom: 1px solid var(--sep); }
.doc-dl dt { font-weight: 700; }
.doc-dl dd { color: var(--ink-2); }
@media (max-width: 600px) { .doc-dl > div { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */
.lost { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 18px; padding: 48px var(--gutter); }
.lost-back { width: 120px; height: auto; border-radius: 7.5px; transform: rotate(-8deg); box-shadow: var(--card-shadow-lift); margin-bottom: 18px; }
.lost h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2.8rem, 2rem + 4vw, 4.8rem); line-height: .95; letter-spacing: -.02em; }
.lost p { color: var(--on-felt-2); margin-bottom: 12px; }
