/* ==========================================================
   Qash Rummy — shared stylesheet (mobile-first)
   Look: dark green card-table felt, soft gold, ruby glow, cream type
   ========================================================== */
:root {
  --bg: #03110e;          /* deep felt black-green */
  --table: #061f1a;       /* felt */
  --table-2: #0b3a2e;     /* lit felt */
  --ruby: #4f111c;        /* ruby glow */
  --gold: #d8a94c;        /* soft gold */
  --gold-2: #9f7122;      /* antique gold */
  --gold-hi: #f3d58f;     /* gold highlight */
  --cream: #fff4e0;       /* main text */
  --muted: #d8c7a1;
  --dim: #9f9278;
  --mint: #35d0a2;        /* small accents */
  --rose: #e2566a;        /* red suits */
  --line: rgba(245, 185, 66, .18);
  --surface: rgba(255, 244, 224, .055);
  --radius: 22px;
  --shadow: 0 24px 60px rgba(0, 0, 0, .45);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bar-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--cream);
  background:
    radial-gradient(circle at 12% 4%, rgba(216, 169, 76, .10), transparent 28rem),
    radial-gradient(circle at 92% 0%, rgba(79, 17, 28, .45), transparent 34rem),
    linear-gradient(160deg, #020b09 0%, #061a16 55%, #120508 100%) fixed;
  background-color: var(--bg);
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px)); /* room for sticky bar */
  overflow-x: hidden;
  position: relative;
}
/* faint table grid */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .32;
  background-image:
    linear-gradient(rgba(255, 244, 224, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 244, 224, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(circle at top, #000, transparent 76%);
  mask-image: radial-gradient(circle at top, #000, transparent 76%);
}
main, .site-footer { position: relative; z-index: 1; }

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-hi); }
a:hover { color: var(--gold); }
h1, h2, h3 { line-height: 1.08; margin: 0 0 .55em; color: var(--cream); }
h1 { font-size: clamp(2.1rem, 9vw, 4.2rem); font-weight: 800; letter-spacing: -.045em; }
h2 { font-size: clamp(1.8rem, 7.4vw, 3.3rem); font-weight: 800; letter-spacing: -.04em; }
h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
p { margin: 0 0 1em; }
.gold { color: var(--gold); }
.gold-text {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.muted { color: var(--muted); }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--gold); color: #1b0e03; padding: 8px 14px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 3px; }

.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 16px; }
.section { padding-block: 64px; }
.section-head { max-width: 660px; margin: 0 0 32px; }
.section-head p { color: var(--muted); }
.section-head.center { text-align: center; margin-inline: auto; }
.eyebrow {
  display: inline-block; font-weight: 800; font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 52px; padding: 12px 28px; border-radius: 999px;
  font-family: var(--font); font-weight: 800; font-size: 1rem; text-decoration: none; letter-spacing: -.01em;
  cursor: pointer; border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn-download {
  color: #1b0e03;
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 50%, var(--gold-2) 100%);
  box-shadow: 0 10px 30px rgba(216, 169, 76, .28), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.btn-download:hover { color: #1b0e03; filter: brightness(1.07); transform: translateY(-1px); }
.btn-download:active { transform: translateY(1px); }
.btn-ghost { color: var(--cream); background: rgba(3, 17, 14, .6); border-color: rgba(245, 185, 66, .3); }
.btn-ghost:hover { color: var(--gold-hi); border-color: var(--gold); }
.btn-sm { min-height: 44px; padding: 8px 18px; font-size: .92rem; }
.btn-block { width: 100%; }
.btn-row { display: grid; gap: 12px; }
.dl-meta { margin: 14px 0 0; font-size: .82rem; color: var(--dim); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(3, 17, 14, .86);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream); }
.brand img { width: 42px; height: 42px; border-radius: 11px; box-shadow: 0 0 0 1px var(--line); }
.brand-text { display: grid; line-height: 1.15; }
.brand-text b { font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em; }
.brand-text small { font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); color: var(--cream); cursor: pointer;
}
.nav-toggle svg { width: 24px; height: 24px; }
.site-nav { display: none; }
.site-nav.is-open {
  display: block; position: absolute; left: 0; right: 0; top: 100%;
  background: #04140f; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  max-height: calc(100vh - 66px); overflow-y: auto;
}
.site-nav ul { list-style: none; margin: 0; padding: 8px 16px 18px; }
.site-nav a {
  display: block; padding: 13px 4px; text-decoration: none; color: var(--cream);
  font-weight: 700; font-size: .98rem; border-bottom: 1px solid var(--line);
}
.site-nav a[aria-current="page"] { color: var(--gold); }
.header-cta { display: none; }

/* ---------- Hero ---------- */
.hero { padding-block: 32px 64px; }
.hero-grid { display: grid; gap: 28px; }
.hero-visual { order: -1; }
.hero-card {
  margin-top: 22px; padding: 24px 20px; border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 244, 224, .06), rgba(255, 244, 224, .02));
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.hero-card .lead { color: var(--muted); font-size: 1.04rem; margin-bottom: 18px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.pills li {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 700; padding: 7px 12px; border-radius: 999px;
  color: #bff6df; background: rgba(53, 208, 162, .07); border: 1px solid rgba(53, 208, 162, .24);
}
.pills li.gold-pill { color: var(--gold-hi); background: rgba(216, 169, 76, .12); border-color: rgba(245, 185, 66, .3); }

/* Felt table illustration (pure CSS, no images to download) */
.felt {
  position: relative; aspect-ratio: 4 / 4.4; border-radius: 26px; overflow: hidden;
  background:
    radial-gradient(60% 45% at 50% 8%, rgba(255, 196, 120, .28), transparent 70%),
    radial-gradient(90% 70% at 50% 60%, #0f5a44 0%, #0a3d2f 45%, #04160f 100%);
  border: 1px solid rgba(245, 185, 66, .35);
  box-shadow: var(--shadow), inset 0 0 80px rgba(0, 0, 0, .6);
}
.felt::before { /* table rail */
  content: ""; position: absolute; inset: 12px; border-radius: 18px;
  border: 1px solid rgba(245, 185, 66, .22); pointer-events: none;
}
.felt::after { /* ruby corner glow */
  content: ""; position: absolute; width: 60%; height: 40%; right: -20%; bottom: -14%;
  background: radial-gradient(circle, rgba(226, 86, 106, .35), transparent 70%); pointer-events: none;
}
.pcard {
  position: absolute; width: 28%; aspect-ratio: 5 / 7; border-radius: 10px;
  background: linear-gradient(160deg, #fffefb, #f3e8d2);
  box-shadow: 0 18px 30px rgba(0, 0, 0, .5); color: #15110c;
  display: grid; place-items: center; font-size: clamp(2.2rem, 11vw, 3.6rem); line-height: 1;
}
.pcard::before, .pcard::after {
  content: attr(data-rank); position: absolute; font-weight: 800; font-size: clamp(.9rem, 4vw, 1.2rem); line-height: 1;
}
.pcard::before { top: 8%; left: 10%; }
.pcard::after { bottom: 8%; right: 10%; transform: rotate(180deg); }
.pcard.red { color: #c21b32; }
.pcard.c1 { left: 18%; top: 22%; transform: rotate(-14deg); }
.pcard.c2 { left: 38%; top: 13%; transform: rotate(4deg); z-index: 2; }
.pcard.c3 { left: 55%; top: 30%; transform: rotate(18deg); }
.coin {
  position: absolute; width: 15%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, #0f5a44 42%, var(--gold) 44%, var(--gold-hi) 60%, var(--gold-2) 72%);
  box-shadow: 0 10px 18px rgba(0, 0, 0, .5), inset 0 0 0 3px rgba(255, 255, 255, .15);
}
.coin.k1 { left: 9%; top: 58%; transform: rotate(20deg); }
.coin.k2 { right: 10%; top: 12%; width: 12%; }
.coin.k3 { left: 46%; bottom: 9%; width: 11%; }
.felt-badge {
  position: absolute; left: 18px; bottom: 18px; z-index: 3;
  display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 16px;
  background: rgba(3, 17, 14, .78); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.felt-badge img { width: 44px; height: 44px; border-radius: 10px; }
.felt-badge b { display: block; font-size: .92rem; color: var(--gold-hi); }
.felt-badge small { font-size: .62rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }

/* Inner-page hero */
.page-hero { padding-block: 40px 8px; }
.page-hero p { color: var(--muted); max-width: 640px; font-size: 1.05rem; }
.breadcrumb { font-size: .82rem; color: var(--dim); margin-bottom: 18px; }
.breadcrumb a { color: var(--dim); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 14px; }
.card {
  background: linear-gradient(180deg, rgba(255, 244, 224, .055), rgba(255, 244, 224, .02));
  border: 1px solid rgba(255, 255, 255, .08); border-radius: var(--radius); padding: 24px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .3);
}
.card h3 { margin-top: 18px; }
.card p { color: var(--muted); font-size: .95rem; }
.card p:last-child { margin-bottom: 0; }
.chip, .card .suit {
  display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px;
  border-radius: 12px; font-size: .78rem; font-weight: 800; letter-spacing: .04em;
  color: var(--gold); background: rgba(216, 169, 76, .12); border: 1px solid rgba(245, 185, 66, .3);
}
.card .suit { font-size: 1.25rem; }
.card .suit.red { color: var(--rose); background: rgba(226, 86, 106, .1); border-color: rgba(226, 86, 106, .35); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card .tag { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }

.feature-panel {
  border-radius: 26px; padding: 28px 22px;
  background: radial-gradient(120% 90% at 0% 0%, rgba(53, 208, 162, .14), transparent 60%), linear-gradient(180deg, #08291f, #051711);
  border: 1px solid rgba(53, 208, 162, .2); box-shadow: var(--shadow);
}
.split { display: grid; gap: 28px; align-items: center; }

.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.feature-list li { position: relative; padding-left: 36px; color: var(--muted); }
.feature-list li strong { color: var(--cream); }
.feature-list li::before {
  content: "\2660"; position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center; font-size: .75rem;
  background: rgba(216, 169, 76, .14); border: 1px solid rgba(245, 185, 66, .35); color: var(--gold);
}

/* Steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li {
  counter-increment: step; position: relative; padding: 22px 22px 22px 78px;
  background: linear-gradient(180deg, rgba(255, 244, 224, .055), rgba(255, 244, 224, .02));
  border: 1px solid rgba(255, 255, 255, .08); border-radius: var(--radius);
}
.steps li::before {
  content: "0" counter(step); position: absolute; left: 20px; top: 20px; width: 42px; height: 42px;
  border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: .85rem;
  color: var(--gold); background: rgba(216, 169, 76, .12); border: 1px solid rgba(245, 185, 66, .3);
}
.steps h3 { margin-bottom: .3em; }
.steps p { margin: 0; color: var(--muted); font-size: .95rem; }

/* CTA band */
.cta-band {
  position: relative; overflow: hidden; text-align: center; border-radius: 28px; padding: 44px 22px;
  background:
    radial-gradient(70% 80% at 100% 100%, rgba(79, 17, 28, .7), transparent 70%),
    radial-gradient(60% 60% at 50% 0%, rgba(255, 196, 120, .16), transparent 70%),
    linear-gradient(180deg, #0b3a2e, #05170f);
  border: 1px solid rgba(245, 185, 66, .3); box-shadow: var(--shadow);
}
.cta-band p { color: var(--muted); max-width: 560px; margin-inline: auto; }
.cta-band h2 { font-size: clamp(1.7rem, 6.5vw, 2.8rem); }

/* Gallery */
.gallery {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px 4px 16px; margin: 0; list-style: none; -webkit-overflow-scrolling: touch;
}
.gallery li { flex: 0 0 62%; scroll-snap-align: center; }
.gallery figure { margin: 0; }
.gallery img {
  width: 100%; aspect-ratio: 360 / 780; object-fit: cover; border-radius: 26px;
  border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--table);
}
.gallery figcaption { text-align: center; font-size: .88rem; color: var(--dim); margin-top: 10px; font-weight: 600; }

/* FAQ / accordion */
.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details {
  background: linear-gradient(180deg, rgba(255, 244, 224, .055), rgba(255, 244, 224, .02));
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 18px;
}
.faq details[open] { border-color: rgba(245, 185, 66, .3); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 54px 18px 20px; position: relative; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center;
  font-size: 1.2rem; line-height: 1; color: var(--gold); border: 1px solid rgba(245, 185, 66, .3);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 20px 18px; color: var(--muted); }
.faq details > div p:last-child { margin-bottom: 0; }
.faq-group { margin-bottom: 40px; }
.faq-group > h2 { font-size: 1.4rem; letter-spacing: -.02em; }

/* Prose (legal + long-form pages) */
.prose { max-width: 800px; }
.prose p, .prose li { color: #eadfc6; }
.prose h2 { font-size: clamp(1.35rem, 5vw, 1.8rem); letter-spacing: -.025em; margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; color: var(--gold-hi); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--gold); }
.prose .updated { color: var(--dim); font-size: .9rem; }
.note {
  border: 1px solid rgba(53, 208, 162, .24); background: rgba(53, 208, 162, .07);
  padding: 16px 18px; border-radius: 16px; margin: 0 0 1.6em; color: #d6f5e8;
}
.ph { background: rgba(226, 86, 106, .2); border-radius: 4px; padding: 0 4px; } /* placeholder highlight */

.table-wrap { overflow-x: auto; margin: 0 0 1.4em; border-radius: 16px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 420px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { background: rgba(216, 169, 76, .1); color: var(--gold-hi); font-size: .85rem; letter-spacing: .02em; }
td { color: #eadfc6; }
tr:last-child td { border-bottom: 0; }

/* Contact form */
.form { display: grid; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 700; font-size: .92rem; }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; color: var(--cream); background: rgba(3, 17, 14, .7);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-height: 48px;
}
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.contact-list li { padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid rgba(255, 255, 255, .08); }
.contact-list strong { display: block; color: var(--gold); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 2px; }

/* ---------- Footer ---------- */
.pre-footer { padding-block: 40px 64px; }
.site-footer { background: rgba(2, 10, 8, .9); border-top: 1px solid var(--line); padding-block: 48px 28px; font-size: .95rem; }
.footer-grid { display: grid; gap: 30px; }
.footer-brand p { color: var(--muted); margin-top: 14px; max-width: 360px; }
.site-footer h2 { font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 1em; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; }
.footer-links a { display: inline-block; padding: 7px 0; color: var(--cream); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--gold); }
.disclaimer { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--dim); font-size: .84rem; }
.disclaimer p { margin-bottom: .6em; }
.disclaimer strong { color: var(--muted); }

/* ---------- Sticky mobile download bar ---------- */
.dl-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(3, 17, 14, .95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-top: 1px solid rgba(245, 185, 66, .35); box-shadow: 0 -10px 30px rgba(0, 0, 0, .5);
}
.dl-bar img { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.dl-bar .dl-bar-text { flex: 1; min-width: 0; line-height: 1.25; }
.dl-bar strong { display: block; font-size: .95rem; white-space: nowrap; }
.dl-bar small { color: var(--dim); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.dl-bar .btn { min-height: 44px; padding: 8px 16px; font-size: .9rem; flex: none; }

/* ==========================================================
   Larger screens
   ========================================================== */
@media (min-width: 480px) {
  .btn-row { grid-auto-flow: column; justify-content: start; }
}

@media (min-width: 600px) {
  .gallery li { flex-basis: 40%; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .container { padding-inline: 28px; }
  .section { padding-block: 88px; }
  .hero { padding-block: 56px 88px; }
  .hero-card { padding: 30px; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr 1fr; gap: 48px; }
  .gallery { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; }
  .cta-band { padding: 64px 48px; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .felt { max-width: 520px; margin-inline: auto; width: 100%; }
}

@media (min-width: 1024px) {
  body { padding-bottom: 0; }
  .dl-bar { display: none; }
  .nav-toggle { display: none; }
  .site-nav, .site-nav.is-open {
    display: block; position: static; background: rgba(255, 244, 224, .04); border: 1px solid var(--line);
    border-radius: 999px; box-shadow: none; max-height: none; overflow: visible;
  }
  .site-nav ul { display: flex; gap: 2px; padding: 4px; }
  .site-nav a { border: 0; padding: 8px 14px; border-radius: 999px; font-size: .86rem; }
  .site-nav a:hover { background: rgba(255, 244, 224, .07); color: var(--gold-hi); }
  .site-nav a[aria-current="page"] { background: rgba(216, 169, 76, .14); }
  .site-nav .nav-legal { display: none; }
  .header-cta { display: inline-flex; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 56px; }
  .hero-visual { order: 2; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

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

/* Landscape in-app screenshots */
.gallery--landscape li { flex: 0 0 88%; }
.gallery--landscape img { aspect-ratio: 526 / 231; border-radius: 18px; }
@media (min-width: 600px) { .gallery--landscape li { flex-basis: 70%; } }
@media (min-width: 768px) { .gallery--landscape { grid-template-columns: repeat(2, 1fr); } }
