/* House Edge Systems — v1. Art direction: DIRECTION.md */

:root {
  --night: #050b09;
  --felt: #0b3224;
  --felt-2: #0f3d2d;
  --panel: #0a1512;
  --line: rgba(239, 233, 220, 0.11);
  --line-hi: rgba(239, 233, 220, 0.24);
  --ivory: #efe9dc;
  --mute: #9aa59f;
  --gold: #c9a24a;
  --gold-hi: #dfbd67;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --max: 1200px;
  --gutter: clamp(18px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--night); color: var(--ivory); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 400 16.5px/1.65 var(--sans); font-variant-numeric: lining-nums; background: var(--night); overflow-x: clip; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: inherit; }
::selection { background: var(--gold); color: var(--night); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: fixed; left: 12px; top: 12px; z-index: 400; padding: 10px 16px; background: var(--gold); color: var(--night); font-weight: 600; text-decoration: none; border-radius: 4px; transform: translateY(-160%); transition: transform 0.3s var(--ease-out); }
.skip:focus { transform: none; }

/* ── stage ──────────────────────────────────────────────────────────────── */
.stage { position: fixed; inset: 0; width: 100%; height: 100vh; z-index: 0; opacity: 0; transition: opacity 1.2s var(--ease-io); }
.stage.on { opacity: 1; }
main { position: relative; z-index: 1; }
/* fine grain on top of everything: breaks up 8-bit banding in the dark gradients
   (two crossed gradients were stepping into a visible grid) */
.grain {
  position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0.06;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.no-3d body { background: radial-gradient(70% 55% at 65% 35%, var(--felt-2), var(--night) 72%) fixed; }

/* ── intro: a royal flush is dealt and turned over ─────────────────────── */
.intro { display: none; }
.js .intro {
  --cw: clamp(56px, 13vw, 108px);
  position: fixed; inset: 0; z-index: 300; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(26px, 5vh, 44px);
  background: radial-gradient(60% 50% at 50% 45%, #0c2a1f, var(--night) 75%);
  animation: intro-out 0.7s var(--ease-io) 2.55s forwards;
}
.js .intro.done { animation: intro-out 0.35s var(--ease-io) forwards; }
.js.intro-seen .intro { display: none; }
@keyframes intro-out { to { opacity: 0; visibility: hidden; } }

.hand { position: relative; width: 100%; height: calc(var(--cw) * 1.4 + 30px); perspective: 900px; }
.card {
  position: absolute; left: 50%; top: 0; width: var(--cw); aspect-ratio: 5 / 7;
  opacity: 0; animation: deal 0.75s var(--ease-out) calc(0.1s + var(--i) * 0.08s) forwards;
}
.card:nth-child(1) { --x: -2; --r: -14deg; --y: 16px; }
.card:nth-child(2) { --x: -1; --r: -7deg; --y: 4px; }
.card:nth-child(3) { --x: 0; --r: 0deg; --y: 0px; }
.card:nth-child(4) { --x: 1; --r: 7deg; --y: 4px; }
.card:nth-child(5) { --x: 2; --r: 14deg; --y: 16px; }
@keyframes deal {
  from { opacity: 0; transform: translate(-50%, 60vh) rotate(0deg); }
  30% { opacity: 1; }
  to { opacity: 1; transform: translate(calc(-50% + var(--x) * var(--cw) * 0.68), var(--y)) rotate(var(--r)); }
}
.card-in {
  position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateY(180deg);
  animation: flip 0.55s var(--ease-io) calc(0.95s + var(--i) * 0.11s) forwards;
}
@keyframes flip { to { transform: rotateY(0deg); } }
.face, .back {
  position: absolute; inset: 0; border-radius: calc(var(--cw) * 0.08); backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}
.back {
  transform: rotateY(180deg);
  background:
    repeating-linear-gradient(45deg, rgba(201, 162, 74, 0.22) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(-45deg, rgba(201, 162, 74, 0.22) 0 2px, transparent 2px 9px),
    #0b3224;
  box-shadow: inset 0 0 0 calc(var(--cw) * 0.05) #0b3224, inset 0 0 0 calc(var(--cw) * 0.065) var(--gold), 0 10px 28px rgba(0, 0, 0, 0.55);
}
.face { background: #f4efe3; color: #111; display: grid; place-items: center; }
.corner { position: absolute; top: 7%; left: 9%; display: flex; flex-direction: column; align-items: center; font: 600 calc(var(--cw) * 0.2)/0.9 var(--serif); }
.corner i { font-style: normal; font-size: 0.8em; }
.corner.br { top: auto; left: auto; bottom: 7%; right: 9%; transform: rotate(180deg); }
.card-pip { font: 400 calc(var(--cw) * 0.5)/1 var(--serif); }
.card-pip.rank { font-style: italic; font-weight: 500; font-size: calc(var(--cw) * 0.56); }
.chip-face {
  width: 58%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: repeating-conic-gradient(#f3e8cf 0 11deg, #b8893a 11deg 45deg);
}
.chip-face::before { content: ""; position: absolute; inset: 16%; border-radius: 50%; background: #b8893a; box-shadow: 0 0 0 2px #f3e8cf; }
.chip-face span { position: relative; font: italic 600 calc(var(--cw) * 0.17)/1 var(--serif); color: #f6ecd4; }
/* the winner: the ace rises and catches the light */
.card.ace { animation: deal 0.75s var(--ease-out) calc(0.1s + var(--i) * 0.08s) forwards, win 0.6s var(--ease-out) 2s forwards; }
@keyframes win { to { translate: 0 -16px; filter: drop-shadow(0 0 22px rgba(201, 162, 74, 0.7)); } }

.intro-mark { display: flex; align-items: baseline; gap: 10px; opacity: 0; transform: translateY(10px); animation: mark-in 0.6s var(--ease-out) 1.85s forwards; }
.intro-mark .brand-name { font-size: clamp(30px, 5vw, 44px); }
@keyframes mark-in { to { opacity: 1; transform: none; } }

/* ── type ───────────────────────────────────────────────────────────────── */
.display { font-family: var(--serif); font-weight: 500; line-height: 1; letter-spacing: -0.015em; }
.display em { font-style: italic; font-weight: 400; color: var(--gold); }
.eyebrow { display: flex; align-items: center; gap: 10px; font: 600 11.5px/1.4 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--mute); }
.pip { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: inset 0 0 0 2px var(--night), 0 0 0 1px var(--gold); }

.ln { display: block; overflow: hidden; padding: 0.04em 0.1em 0.14em 0; margin: -0.04em 0 -0.14em; }
.ln > span { display: inline-block; }
.js-ready .ln > span { transform: translateY(108%); transition: transform 1s var(--ease-out); }
.js-ready .is-in .ln > span { transform: none; }
.js-ready .is-in .ln:nth-child(2) > span { transition-delay: 0.08s; }
.js-ready [data-reveal] :is(.eyebrow, .lede, .ctas, .leak, .leak-close, .chip-card, .steps li, .about-copy, .about-sign, .rule, .finale-lede) {
  opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.js-ready [data-reveal].is-in :is(.eyebrow, .lede, .ctas, .leak, .leak-close, .chip-card, .steps li, .about-copy, .about-sign, .rule, .finale-lede) { opacity: 1; transform: none; }
.js-ready [data-reveal].is-in :is(.leak, .chip-card, .steps li):nth-child(2) { transition-delay: 0.08s; }
.js-ready [data-reveal].is-in :is(.leak, .chip-card, .steps li):nth-child(3) { transition-delay: 0.16s; }
.js-ready [data-reveal].is-in :is(.steps li):nth-child(4) { transition-delay: 0.24s; }
.js-ready .leak-close.is-in, .js-ready .leak-close[data-reveal].is-in { opacity: 1; transform: none; }

/* ── buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px; border-radius: 999px;
  font: 600 15px/1 var(--sans); letter-spacing: 0.01em; text-decoration: none; white-space: nowrap;
  color: var(--night); background: var(--gold); border: 1px solid var(--gold);
  transition: background 0.25s, border-color 0.25s, transform 0.4s var(--ease-out), box-shadow 0.35s;
}
.btn:hover { background: var(--gold-hi); border-color: var(--gold-hi); transform: translateY(-1px); box-shadow: 0 10px 30px rgba(201, 162, 74, 0.22); }
.btn:active { transform: scale(0.98); }
.btn.ghost { background: rgba(5, 11, 9, 0.35); color: var(--ivory); border-color: var(--line-hi); }
.btn.ghost:hover { border-color: var(--ivory); box-shadow: none; }
.btn.sm { min-height: 40px; padding: 0 18px; font-size: 14px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.ctas.center { justify-content: center; }

/* ── nav ────────────────────────────────────────────────────────────────── */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; border-bottom: 1px solid transparent; transition: background 0.4s, border-color 0.4s; }
.nav::before { content: ""; position: absolute; inset: 0 0 -40px; z-index: -1; pointer-events: none; background: linear-gradient(to bottom, rgba(5, 11, 9, 0.8), rgba(5, 11, 9, 0)); transition: opacity 0.4s; }
.nav.solid { background: rgba(5, 11, 9, 0.78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.nav.solid::before { opacity: 0; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 70px; }
.brand { display: inline-flex; align-items: baseline; gap: 9px; text-decoration: none; white-space: nowrap; }
.brand-name { font: 500 25px/1 var(--serif); letter-spacing: -0.01em; }
.brand-name em { font-style: italic; color: var(--gold); }
.brand-caps { font: 600 10.5px/1 var(--sans); letter-spacing: 0.3em; text-transform: uppercase; color: var(--mute); }
.nav-links { display: flex; gap: 30px; margin: 0; padding: 0; list-style: none; }
.nav-links a { text-decoration: none; font: 500 14px/1 var(--sans); color: var(--mute); transition: color 0.2s; }
.nav-links a:hover { color: var(--ivory); }
@media (max-width: 820px) { .nav nav { display: none; } }

/* ── hero ───────────────────────────────────────────────────────────────── */
.hero { position: relative; height: 170vh; height: 170svh; }
.hero-pin { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 600px; overflow: hidden; display: flex; align-items: flex-end; }
.hero-scrim { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(5, 11, 9, 0.9) 0%, rgba(5, 11, 9, 0.62) 38%, rgba(5, 11, 9, 0) 66%),
              linear-gradient(to top, rgba(5, 11, 9, 0.85) 0%, rgba(5, 11, 9, 0) 45%); }
.hero-copy { position: relative; padding-bottom: clamp(40px, 9vh, 96px); opacity: var(--a, 1); transform: translateY(calc((1 - var(--a, 1)) * -40px)); }
.hero.a-off .hero-copy { visibility: hidden; }
.hero-title { font-size: clamp(54px, 8.6vw, 124px); margin: 20px 0 22px; max-width: 12ch; }
.lede { max-width: 46ch; color: #cfd3cd; font-size: 17.5px; }
.hero .ctas { margin-top: 30px; }
.js-ready .hero.is-in .ln > span { transition-delay: 0.35s; }
.js-ready .hero.is-in .ln:nth-child(2) > span { transition-delay: 0.45s; }
.js-ready .hero.is-in :is(.eyebrow, .lede, .ctas) { transition-delay: 0.6s; }
/* when the intro plays, the headline waits for the hand to clear */
.js-ready.js:not(.intro-seen) .hero.is-in .ln > span { transition-delay: 2.75s; }
.js-ready.js:not(.intro-seen) .hero.is-in .ln:nth-child(2) > span { transition-delay: 2.85s; }
.js-ready.js:not(.intro-seen) .hero.is-in :is(.eyebrow, .lede, .ctas) { transition-delay: 3s; }
@media (max-width: 820px) {
  .hero { height: 150vh; height: 150svh; }
  .hero-scrim { background: linear-gradient(to top, rgba(5, 11, 9, 0.95) 0%, rgba(5, 11, 9, 0.8) 45%, rgba(5, 11, 9, 0.2) 75%, rgba(5, 11, 9, 0) 100%); }
  .hero-title { font-size: clamp(46px, 13vw, 64px); }
  .hero .eyebrow { letter-spacing: 0.13em; font-size: 11px; }
  .lede { font-size: 16px; }
  .hero .ctas .btn { flex: 1 1 auto; }
}

/* ── sections ───────────────────────────────────────────────────────────── */
.section { position: relative; background: var(--night); padding: clamp(90px, 12vw, 150px) 0; border-top: 1px solid var(--line); }
.sec-head { display: grid; gap: 20px; }
.sec-head .display { font-size: clamp(44px, 6.4vw, 92px); }

.leaks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: clamp(44px, 6vw, 72px); }
.leak { border-top: 1px solid var(--line-hi); padding-top: 22px; }
.leak .n, .steps .n { font: 600 12px/1 var(--sans); letter-spacing: 0.16em; color: var(--gold); }
.leak p { margin-top: 14px; font: 400 clamp(22px, 2.2vw, 28px)/1.3 var(--serif); }
.leak-close { margin-top: clamp(40px, 5vw, 64px); max-width: 52ch; color: var(--mute); font-size: 17.5px; }

.chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: clamp(44px, 6vw, 72px); }
.chip-card { position: relative; display: flex; flex-direction: column; padding: 30px 26px 26px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, rgba(15, 61, 45, 0.35), rgba(10, 21, 18, 0.9)); }
.chip-card h3 { margin-top: 22px; font: 500 30px/1.1 var(--serif); }
.chip-card p { margin-top: 12px; color: #c3c9c3; font-size: 15.5px; }
.chip-card .price { margin-top: auto; padding-top: 24px; font: 500 32px/1 var(--serif); color: var(--gold); }
.chip-card .price span { display: block; margin-bottom: 6px; font: 600 11px/1 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--mute); }
.chip-mark { width: 54px; height: 54px; border-radius: 50%; position: relative;
  background: repeating-conic-gradient(var(--spot) 0 10deg, var(--base) 10deg 45deg);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45); }
.chip-mark::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--base); box-shadow: 0 0 0 2px var(--spot); }
.chip-mark.gold { --base: #b8893a; --spot: #f3e8cf; }
.chip-mark.black { --base: #16191b; --spot: #c9a24a; }
.chip-mark.emerald { --base: #0f5a42; --spot: #efe9dc; }

.steps { list-style: none; margin: clamp(44px, 6vw, 72px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.steps li { border-top: 1px solid var(--line-hi); padding-top: 22px; }
.steps h3 { margin: 14px 0 8px; font: 500 30px/1.1 var(--serif); }
.steps p { color: #c3c9c3; font-size: 15.5px; }

.about { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(36px, 6vw, 96px); align-items: center; }
.about-mark { aspect-ratio: 1; max-width: 360px; width: 100%; border-radius: 50%; display: grid; place-items: center;
  background: repeating-conic-gradient(#f3e8cf 0 12deg, #b8893a 12deg 45deg); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55); position: relative; }
.about-mark::before { content: ""; position: absolute; inset: 13%; border-radius: 50%; background: #b8893a; box-shadow: 0 0 0 4px #f3e8cf, inset 0 0 0 10px #a37a31; }
.about-mark span { position: relative; font: italic 500 clamp(64px, 10vw, 120px)/1 var(--serif); color: #f6ecd4; }
.about .display { font-size: clamp(44px, 6vw, 84px); margin-top: 20px; }
.about-copy { margin-top: 26px; max-width: 50ch; color: #cfd3cd; font-size: 17.5px; }
.about-sign { margin-top: 20px; font: 600 12px/1.4 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--mute); }

@media (max-width: 900px) {
  .leaks, .chips { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .about { grid-template-columns: 1fr; }
  .about-mark { max-width: 200px; }
}
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* ── finale ─────────────────────────────────────────────────────────────── */
.finale { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 130px 0; border-top: 1px solid var(--line); }
.finale::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, var(--night) 0%, rgba(5, 11, 9, 0.2) 24%, rgba(5, 11, 9, 0.3) 76%, var(--night) 100%),
              radial-gradient(52% 42% at 50% 50%, rgba(5, 11, 9, 0.85), rgba(5, 11, 9, 0.45) 65%, transparent 100%); }
.finale .wrap { position: relative; display: grid; justify-items: center; }
.rule { font: 600 12px/1 var(--sans); letter-spacing: 0.24em; text-transform: uppercase; color: var(--mute); }
.finale .display { margin-top: 24px; font-size: clamp(52px, 9vw, 136px); }
.finale-lede { margin-top: 24px; max-width: 34ch; color: #cfd3cd; font-size: 18px; text-wrap: balance; }
.finale .ctas { margin-top: 34px; }

.footer { position: relative; background: var(--night); border-top: 1px solid var(--line); padding: 26px 0 36px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: 13px; color: var(--mute); }
.footer a { color: var(--mute); text-decoration: none; }
.footer a:hover { color: var(--ivory); }

.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 110; display: grid; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(5, 11, 9, 0.88); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform 0.5s var(--ease-out); }
.dock.show { transform: none; }
@media (min-width: 821px) { .dock { display: none; } }
@media (max-width: 820px) { .footer { padding-bottom: calc(92px + env(safe-area-inset-bottom)); } }

/* Netlify's injected badge (free plan) — keep the booking bar above it; set by main.js */
@media (max-width: 820px) {
  .has-badge .dock { bottom: var(--badge-space); transform: translateY(calc(110% + var(--badge-space))); box-shadow: 0 var(--badge-space) 0 0 rgba(5, 11, 9, 0.94); }
  .has-badge .dock.show { transform: none; }
  .has-badge .footer { padding-bottom: calc(var(--badge-space) + 100px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .intro { display: none; }
  .js-ready .ln > span, .js-ready [data-reveal] * { transform: none !important; opacity: 1 !important; transition: none !important; }
  .hero { height: auto; }
  .hero-pin { position: relative; }
  .hero-copy { opacity: 1 !important; transform: none !important; visibility: visible !important; }
}
