/* ============================================================
   THE PRIVATE SALON — shared design system for pokerchipsroyale.com
   Tokens mirror the app (ios/.../Design/TableTheme.swift) and the
   companion (/join). Pages add page-specific rules in their own
   <style> block; this file is the shared foundation.
   ============================================================ */
:root {
  --noir: #0c0a06;
  --felt-dark: #08281a;
  --felt-mid: #0d3823;
  --felt-light: #16502f;
  --felt-edge: #051b11;
  --gold: #d4af5f;
  --gold-rgb: 212,175,95;
  --gold-deep: #a97f35;
  --gold-light: #f0d99a;
  --gold-dim: rgba(212, 175, 95, .55);
  --ivory: #f6f0dd;
  --ivory-dim: rgba(246, 240, 221, .58);
  --panel-hi: rgba(24, 32, 25, .93);
  --panel-lo: rgba(7, 11, 9, .93);
  --danger: #a03028;
  --confirm: #2f7a4c;
  --burgundy: #6e1f33;
  --font-display: "Didot", "Playfair Display", "Bodoni 72", Georgia, serif;
  --font-num: ui-rounded, "SF Pro Rounded", "Avenir Next", "Helvetica Neue", system-ui, sans-serif;
  --font-ui: "Avenir Next", "Helvetica Neue", system-ui, sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background:
    radial-gradient(ellipse 130% 60% at 50% 0%, var(--felt-mid) 0%, var(--felt-dark) 55%, var(--felt-edge) 100%),
    var(--noir);
  color: var(--ivory);
  font-family: var(--font-ui);
  line-height: 1.6;
  min-height: 100vh;
}
/* Felt grain + vignette overlay */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 60% 30% at 50% 8%, rgba(255,244,200,.05), transparent 70%),
    radial-gradient(ellipse at 50% 50%, transparent 40%, rgba(0,0,0,.5) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
}
main, header, footer { position: relative; z-index: 1; }
a { color: var(--gold); }

/* ---------- Typography helpers ---------- */
.gold-text {
  background: linear-gradient(180deg, #f8ecc4 0%, #ecd191 34%, #c49a4e 62%, #e8cd8b 88%, #f4e3ae 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.55));
}
.kicker {
  font-family: var(--font-ui); font-size: 13px; letter-spacing: 4px;
  text-transform: uppercase; color: var(--gold-dim);
}
.rule-kicker { display: flex; align-items: center; gap: 12px; justify-content: center; }
.rule-kicker::before, .rule-kicker::after {
  content: ""; height: 1px; flex: 1; max-width: 70px;
  background: linear-gradient(90deg, transparent, var(--gold-dim));
}
.rule-kicker::after { background: linear-gradient(90deg, var(--gold-dim), transparent); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; }
h1 { font-size: clamp(34px, 7vw, 62px); letter-spacing: 1px; }
h2 { font-size: clamp(26px, 4.5vw, 40px); }
h3 { font-size: clamp(19px, 3vw, 24px); }

/* ---------- Layout ---------- */
.container { max-width: 1080px; margin: 0 auto; padding: 0 clamp(18px, 5vw, 48px); }
.narrow { max-width: 760px; }
section { padding: clamp(48px, 9vw, 110px) 0; }
.section-head { text-align: center; margin-bottom: clamp(28px, 5vw, 56px); }
.section-head p { color: var(--ivory-dim); max-width: 560px; margin: 12px auto 0; }

/* ---------- Header / nav ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(var(--safe-top) + 16px) clamp(18px, 5vw, 48px) 16px;
  max-width: 1080px; margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: 19px; letter-spacing: 1.5px;
  color: var(--ivory); text-decoration: none; white-space: nowrap;
}
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.site-header nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); }
.site-header nav a {
  color: var(--ivory-dim); text-decoration: none; font-size: 14px;
  letter-spacing: 1px; text-transform: uppercase; transition: color .2s;
}
.site-header nav a:hover { color: var(--gold-light); }
.site-header nav a.btn-nav {
  color: #241a08; padding: 9px 18px; border-radius: 99px; font-weight: 600;
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 4px 16px rgba(var(--gold-rgb),.3);
}
@media (max-width: 560px) {
  .site-header { padding-left: 14px; padding-right: 14px; }
  .site-header nav a:not(.btn-nav) { display: none; }
  .brand { font-size: 16px; letter-spacing: 1px; gap: 8px; }
  .brand img { width: 26px; height: 26px; }
  .site-header nav a.btn-nav { padding: 8px 14px; font-size: 13px; }
}
@media (max-width: 360px) {
  .brand { font-size: 14px; }
  .site-header nav a.btn-nav { padding: 7px 12px; font-size: 12px; }
}

/* ---------- Cards, buttons, badges ---------- */
.card {
  background: linear-gradient(160deg, var(--panel-hi), var(--panel-lo));
  border: 1px solid rgba(var(--gold-rgb),.32);
  border-radius: 22px; padding: 24px;
  box-shadow: 0 14px 40px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.05);
}
.btn-primary {
  display: inline-block; cursor: pointer; border: 1px solid rgba(0,0,0,.35);
  border-radius: 99px; padding: 17px 40px; min-height: 56px;
  font-family: var(--font-display); font-size: 19px; font-weight: 600;
  letter-spacing: 2.5px; text-transform: uppercase; text-decoration: none;
  color: #241a08; text-align: center;
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 8px 30px rgba(var(--gold-rgb),.35), inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 0 rgba(0,0,0,.25);
  transition: transform .12s, box-shadow .2s;
}
.btn-primary:hover { box-shadow: 0 10px 36px rgba(var(--gold-rgb),.5), inset 0 1px 0 rgba(255,255,255,.55); }
.btn-primary:active { transform: scale(.97); }
.btn-ghost {
  display: inline-block; cursor: pointer; border-radius: 99px; padding: 15px 34px;
  font-family: var(--font-ui); font-size: 15px; letter-spacing: 1.5px;
  text-transform: uppercase; text-decoration: none; color: var(--gold-light);
  border: 1px solid rgba(var(--gold-rgb),.5); background: rgba(0,0,0,.25);
  transition: border-color .2s, background .2s;
}
.btn-ghost:hover { border-color: var(--gold-light); background: rgba(var(--gold-rgb),.08); }

/* Store badges — custom-drawn (official artwork dropped in later with the
   real store links). Keep dimensions stable: 190×58. */
.store-badges { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.badge {
  display: flex; align-items: center; gap: 11px; width: 190px; min-height: 58px;
  padding: 9px 18px; border-radius: 13px; text-decoration: none;
  border: 1px solid rgba(var(--gold-rgb),.55);
  background: linear-gradient(160deg, rgba(20,16,8,.95), rgba(5,4,2,.95));
  box-shadow: 0 8px 24px rgba(0,0,0,.5), inset 0 1px 0 rgba(var(--gold-rgb),.18);
  transition: transform .12s, border-color .2s;
}
.badge:hover { transform: translateY(-2px); border-color: var(--gold-light); }
.badge svg { width: 26px; height: 26px; flex: none; }
.badge .badge-copy { display: flex; flex-direction: column; line-height: 1.2; }
.badge .badge-copy small { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--ivory-dim); }
.badge .badge-copy strong { font-size: 16px; font-family: var(--font-num); color: var(--ivory); font-weight: 600; }
.badge.badge-soon { opacity: .8; }

/* ---------- Steps (How it works) ---------- */
.steps { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step { text-align: center; padding: 28px 22px; }
.step .step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; margin-bottom: 14px;
  font-family: var(--font-display); font-size: 20px; color: #241a08;
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, var(--gold-deep));
  box-shadow: 0 4px 14px rgba(var(--gold-rgb),.35);
}
.step p { color: var(--ivory-dim); font-size: 15px; margin-top: 8px; }

/* ---------- Feature grid ---------- */
.features-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.feature h3 { margin-bottom: 8px; }
.feature p { color: var(--ivory-dim); font-size: 15px; }

/* ---------- FAQ ---------- */
.faq details {
  border-bottom: 1px solid rgba(var(--gold-rgb),.2); padding: 18px 4px;
}
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between;
  align-items: center; gap: 16px; font-family: var(--font-display); font-size: 19px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-size: 24px; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ivory-dim); padding-top: 10px; max-width: 640px; }

/* ---------- Phone mockup frame ---------- */
.phone {
  width: min(300px, 72vw); aspect-ratio: 430 / 932; border-radius: 44px;
  border: 2px solid rgba(var(--gold-rgb),.5); background: #000;
  box-shadow: 0 30px 80px rgba(0,0,0,.65), 0 0 60px rgba(var(--gold-rgb),.12), inset 0 0 0 6px #000;
  overflow: hidden; position: relative; margin: 0 auto;
}
.phone img, .phone video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Article typography ---------- */
.prose { max-width: 720px; margin: 0 auto; }
.prose h2 { margin: 44px 0 14px; }
.prose h3 { margin: 30px 0 10px; }
.prose p, .prose li { color: var(--ivory-dim); font-size: 17px; }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 18px 22px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--gold-light); text-decoration-color: rgba(var(--gold-rgb),.5); }
.prose strong { color: var(--ivory); }
.prose blockquote {
  border-left: 2px solid var(--gold); padding: 4px 0 4px 18px; margin: 0 0 18px;
  font-family: var(--font-display); font-size: 19px; color: var(--ivory);
}
.breadcrumbs { font-size: 13px; letter-spacing: 1px; color: var(--ivory-dim); margin-bottom: 26px; }
.breadcrumbs a { color: var(--gold-dim); text-decoration: none; }
.breadcrumbs a:hover { color: var(--gold-light); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid rgba(var(--gold-rgb),.22);
  margin-top: clamp(40px, 8vw, 90px);
  padding: 40px clamp(18px, 5vw, 48px) calc(var(--safe-bottom) + 40px);
  text-align: center; color: var(--ivory-dim); font-size: 14px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; margin-bottom: 18px; }
.site-footer nav.legal { gap: 18px; margin-top: -6px; }
.site-footer nav.legal a { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--gold-dim); }
.site-footer a { color: var(--ivory-dim); text-decoration: none; letter-spacing: 1px; }
.site-footer a:hover { color: var(--gold-light); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* ---------- Cookie consent banner ---------- */
.cookie-banner {
  position: fixed; z-index: 50;
  left: 50%; bottom: calc(var(--safe-bottom) + 16px);
  width: min(680px, calc(100vw - 28px));
  transform: translate(-50%, calc(100% + 24px));
  opacity: 0; pointer-events: none;
  transition: transform .38s cubic-bezier(.2,.7,.2,1), opacity .38s ease;
}
.cookie-banner.is-open { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.cookie-banner-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px;
  padding: 18px clamp(18px, 3vw, 24px);
  background: linear-gradient(180deg, var(--panel-hi), var(--panel-lo));
  border: 1px solid rgba(var(--gold-rgb),.4);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.55), inset 0 1px 0 rgba(var(--gold-rgb),.14);
}
.cookie-banner-text {
  flex: 1 1 300px; margin: 0;
  font-size: 14px; line-height: 1.55; color: var(--ivory-dim);
}
.cookie-banner-text a { color: var(--gold-light); text-decoration-color: rgba(var(--gold-rgb),.5); }
.cookie-banner-actions {
  flex: 0 0 auto; display: flex; gap: 12px; align-items: center; margin-left: auto;
}
.cookie-banner .btn-primary,
.cookie-banner .btn-ghost { cursor: pointer; border: 0; }
.cookie-banner .btn-primary { padding: 11px 26px; font-size: 16px; }
.cookie-banner .btn-ghost { padding: 10px 22px; border: 1px solid rgba(var(--gold-rgb),.5); }
@media (max-width: 520px) {
  .cookie-banner-actions { width: 100%; }
  .cookie-banner-actions .btn-primary,
  .cookie-banner-actions .btn-ghost { flex: 1; text-align: center; }
}
.cookie-reopen { cursor: pointer; }

/* ============================================================
   Accessibility & mobile ergonomics (additive overrides)
   ============================================================ */

/* Visible keyboard focus — the salon look, but findable.
   (Outlines follow each element's own border-radius; don't set radius here.) */
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.btn-primary:focus-visible, .btn-ghost:focus-visible,
.site-header nav a.btn-nav:focus-visible, .badge:focus-visible { outline-offset: 4px; }

/* Comfortable tap targets on touch screens: enlarge the hit area with
   padding + matching negative margin so the visual layout is unchanged. */
.site-header nav a:not(.btn-nav) { padding: 12px 4px; margin: -12px -4px; }
.brand { padding: 8px 4px; margin: -8px -4px; }
.site-header nav a.btn-nav { position: relative; }
.site-header nav a.btn-nav::after { content: ""; position: absolute; inset: -8px -4px; border-radius: 99px; }
.site-footer nav a { display: inline-block; padding: 10px 4px; margin: -10px -4px; }
.breadcrumbs a { display: inline-block; padding: 10px 2px; margin: -10px -2px; }
.faq summary { padding: 8px 0; margin: -8px 0; }

/* Contrast: dim gold fails WCAG AA for small text (~3:1 on the felt).
   Keep --gold-dim for hairlines/borders; brighten it where it is text. */
.kicker { color: rgba(var(--gold-rgb), .75); }
.site-footer nav.legal a { color: rgba(var(--gold-rgb), .82); }
.breadcrumbs a { color: rgba(var(--gold-rgb), .82); }

/* Store-badge caption was 10px — below comfortable mobile legibility. */
.badge .badge-copy small { font-size: 11px; }
