/* Backgammon Lounge — marketing & support site
   "Cinematic Bosphorus Lounge" design system, mirrored from the app:
   midnight navy, ivory glass panels, antique gold ornaments, walnut warmth.
   Headlines use the same serif family as the app (New York / SF Serif). */

:root {
  --bg: #0a1424;
  --bg-deep: #071020;
  --bg-panel: #0f1d33;
  --bg-panel-2: #122240;

  --ivory: #efe7d4;
  --ivory-bright: #f8f1e0;
  --muted: #a2adc0;

  --cream: #f2ecdc;
  --cream-2: #e9e1cd;
  --navy-ink: #24457f;
  --navy-ink-strong: #1d3768;
  --slate-on-cream: #47536b;

  --gold: #c9a45c;
  --gold-bright: #e5c88f;
  --gold-dim: rgba(201, 164, 92, 0.34);
  --line: rgba(201, 164, 92, 0.22);
  --line-soft: rgba(201, 164, 92, 0.14);

  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino", "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--gold-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Ornament divider (line — diamond — line) ---------- */

.ornament {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(320px, 60%);
  margin: 22px auto;
}

.ornament::before,
.ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 45%, var(--gold));
}
.ornament::after {
  background: linear-gradient(90deg, var(--gold), var(--gold) 55%, transparent);
}

.ornament span {
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  flex: none;
}

.ornament.left {
  margin-left: 0;
  width: min(260px, 70%);
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(7, 16, 32, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ivory-bright);
  font-family: var(--serif);
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }

.brand img {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
}

.site-nav a { color: var(--muted); letter-spacing: 0.02em; }
.site-nav a:hover { color: var(--gold-bright); text-decoration: none; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  text-align: center;
  padding: 84px 0 0;
  background:
    radial-gradient(ellipse 75% 55% at 50% -12%, rgba(201, 164, 92, 0.14), transparent 70%),
    radial-gradient(ellipse 90% 70% at 50% 120%, rgba(18, 34, 64, 0.9), transparent 70%),
    var(--bg);
}

.hero .medallion {
  width: 118px;
  height: 118px;
  margin: 0 auto 26px;
  filter: drop-shadow(0 14px 34px rgba(0, 0, 0, 0.6));
}

.kicker {
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6.5vw, 4rem);
  font-weight: 500;
  color: var(--ivory-bright);
  letter-spacing: 0.01em;
  line-height: 1.12;
}

.hero .tagline {
  max-width: 640px;
  margin: 0 auto 34px;
  color: var(--muted);
  font-size: 1.15rem;
}

.hero .fine-print {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.85rem;
}

.hero-shot {
  margin: 56px auto 0;
  max-width: 1160px;
  padding: 0 24px 96px;
}

/* ---------- Store badge ----------
   Ivory panel + navy ink, echoing the app's glass windows. */

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 13px 28px;
  border: 1px solid var(--gold-dim);
  border-radius: 15px;
  background: linear-gradient(180deg, var(--ivory-bright), var(--cream-2));
  color: var(--navy-ink-strong);
  font-size: 1rem;
  line-height: 1.3;
  text-align: left;
  box-shadow:
    0 0 0 3px rgba(201, 164, 92, 0.1),
    0 14px 34px rgba(0, 0, 0, 0.45);
}
a.store-badge:hover {
  text-decoration: none;
  border-color: var(--gold);
  box-shadow:
    0 0 0 3px rgba(201, 164, 92, 0.2),
    0 16px 40px rgba(0, 0, 0, 0.55);
}
.store-badge .apple-mark { display: inline-flex; line-height: 1; color: var(--navy-ink-strong); }
.store-badge small {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #8a6f3c;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- Cinematic frames ---------- */

.frame {
  border-radius: 20px;
  box-shadow:
    0 0 0 1px var(--line),
    0 8px 24px rgba(0, 0, 0, 0.45),
    0 36px 90px rgba(0, 0, 0, 0.6),
    0 0 110px rgba(201, 164, 92, 0.07);
}

/* ---------- Sections ---------- */

section { padding: 84px 0; }

.section-title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  font-weight: 500;
  color: var(--ivory-bright);
  text-align: center;
  line-height: 1.2;
}

.section-sub {
  text-align: center;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 52px;
  font-size: 1.05rem;
}

/* ---------- Feature cards (the app's ivory glass panels) ---------- */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
}

.feature {
  background: linear-gradient(180deg, var(--cream), var(--cream-2));
  border: 1px solid rgba(201, 164, 92, 0.3);
  border-radius: 18px;
  padding: 28px 28px 26px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 14px 34px rgba(0, 0, 0, 0.35);
}

.feature .glyph {
  color: var(--navy-ink);
  margin-bottom: 14px;
}
.feature .glyph svg { display: block; }

.feature-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.feature-head h3 {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 600;
  color: var(--navy-ink);
  white-space: nowrap;
}

.feature-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
  transform: translateY(1px);
}

.feature p { color: var(--slate-on-cream); font-size: 0.96rem; }

/* ---------- Gallery of cinematic frames ---------- */

.gallery {
  display: grid;
  gap: 64px;
}

.gallery figure { margin: 0; }

.gallery figcaption {
  margin-top: 18px;
  text-align: center;
}

.gallery figcaption strong {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--ivory);
  letter-spacing: 0.01em;
}

.gallery figcaption span {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- Marketplace: sets & themes ---------- */

.market {
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(201, 164, 92, 0.07), transparent 70%),
    var(--bg-deep);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.market-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 22px;
}

.market-col {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 30px;
}

.market-col h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--gold-bright);
  margin-bottom: 16px;
}

.market-col ul { list-style: none; }

.market-col li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(201, 164, 92, 0.1);
  color: var(--ivory);
}
.market-col li:last-child { border-bottom: none; }

.market-col li::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
  flex: none;
  position: relative;
  top: -2px;
}

.market-col li small {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.market-col li small.included { color: var(--gold-bright); }

.bundle {
  background: linear-gradient(180deg, var(--cream), var(--cream-2));
  border: 1px solid rgba(201, 164, 92, 0.4);
  border-radius: 18px;
  padding: 30px 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 40px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 14px 34px rgba(0, 0, 0, 0.35);
}

.bundle h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--navy-ink);
  flex-basis: 100%;
}

.bundle p { color: var(--slate-on-cream); font-size: 0.98rem; max-width: 620px; }

.bundle .price-note {
  margin-left: auto;
  font-family: var(--serif);
  color: var(--navy-ink);
  font-size: 1.05rem;
  white-space: nowrap;
}

/* ---------- Download band ---------- */

.download-band {
  text-align: center;
  background:
    radial-gradient(ellipse 60% 80% at 50% 110%, rgba(201, 164, 92, 0.1), transparent 70%),
    var(--bg-panel);
  border-top: 1px solid var(--line-soft);
  padding: 92px 0;
}

.download-band .section-sub { margin-bottom: 36px; }

.download-band .fine-print {
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Prose pages (terms / privacy / support) ---------- */

.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}

.page h1 {
  font-family: var(--serif);
  font-size: 2.3rem;
  font-weight: 500;
  color: var(--ivory-bright);
  margin-bottom: 10px;
}

.page .meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 40px;
}

.page h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--gold-bright);
  margin: 42px 0 14px;
}

.page h3 {
  font-size: 1.05rem;
  color: var(--ivory-bright);
  margin: 26px 0 10px;
}

.page p, .page li { color: var(--ivory); margin-bottom: 12px; }
.page ul, .page ol { padding-left: 24px; margin-bottom: 16px; }
.page li { margin-bottom: 8px; }

.page .note {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  color: var(--muted);
  font-size: 0.95rem;
  margin: 24px 0;
}

/* Support page */

.contact-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 40px;
}

.contact-card h2 { margin-top: 0; }

.contact-card .email {
  display: inline-block;
  margin: 8px 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.faq details {
  border-bottom: 1px solid rgba(201, 164, 92, 0.14);
  padding: 6px 0;
}

.faq summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
  color: var(--ivory-bright);
  list-style-position: outside;
}

.faq summary:hover { color: var(--gold-bright); }

.faq details > p, .faq details > ul,
.faq details li { padding-bottom: 0; color: var(--muted); }
.faq details > p, .faq details > ul { padding-bottom: 14px; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 36px 0 48px;
  background: var(--bg-deep);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-left: auto;
}

.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--gold-bright); }

/* ---------- 404 ---------- */

.error-page {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}

.error-page h1 {
  font-family: var(--serif);
  font-size: 4rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.error-page p { color: var(--muted); margin-bottom: 24px; }

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  .site-nav { gap: 14px; font-size: 0.88rem; }
  .brand span { display: none; }
  .hero { padding-top: 56px; }
  .hero .medallion { width: 96px; height: 96px; }
  .hero-shot { margin-top: 40px; padding-bottom: 64px; }
  section { padding: 60px 0; }
  .gallery { gap: 44px; }
  .market-grid { grid-template-columns: 1fr; }
  .bundle { padding: 24px; }
  .bundle .price-note { margin-left: 0; }
  .site-footer nav { margin-left: 0; }
}
