/* Game Night marketing site — vanilla CSS, no framework.
 * Tokens mirror lib/core/theme/game_night_tokens.dart (GnTokens v2 palette)
 * so the site reads as the same product as the app. */

:root {
  --paper:        #F4ECF1;
  --paper-2:      #EDE3EC;
  --ink:          #14122A;
  --ink-2:        #2E2A48;
  --muted:        #6F6885;
  --purple:       #6B3FE0;
  --purple-hi:    #8156FF;
  --purple-lo:    #3B1F8E;
  --purple-soft:  rgba(107, 63, 224, 0.10);
  --indigo:       #2F2470;
  --indigo-lo:    #1B1450;
  --red:          #EF4254;
  --red-deep:     #C8233A;
  --teal:         #2EA8B0;
  --green:        #22A47A;
  --orange:       #F5993C;
  --blue:         #4FA6F2;
  --surface:      #FFFFFF;
  --border:       rgba(20, 18, 42, 0.10);
  --shadow-sm:    0 2px 6px rgba(20, 18, 42, 0.06);
  --shadow-md:    0 6px 18px rgba(20, 18, 42, 0.10);
  --shadow-lg:    0 18px 42px rgba(20, 18, 42, 0.16);
  --radius-sm:    10px;
  --radius:       16px;
  --radius-lg:    22px;
  --radius-xl:    32px;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --content-max:  1140px;
  --reading-max:  720px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.028em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); letter-spacing: -0.038em; font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.1vw, 2.15rem); margin-top: 1.6em; }
h3 { font-size: 1.22rem; margin-top: 1.4em; font-weight: 700; }
h4 { font-size: 1.02rem; font-weight: 700; }
p  { margin: 0 0 1em; }

.muted { color: var(--muted); }
.center { text-align: center; }

/* Layout */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 24px; }
.reading   { max-width: var(--reading-max); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(244, 236, 241, 0.92);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.22rem;
  color: var(--ink);
  letter-spacing: -0.03em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-block;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  background: var(--ink);
}
.nav-links { display: flex; gap: 18px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-2); font-weight: 500; font-size: 0.96rem; }
.nav-links a:hover { color: var(--purple); text-decoration: none; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--purple);
  color: #fff !important;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: 0 6px 18px rgba(107, 63, 224, 0.32);
}
.nav-cta:hover { background: var(--purple-hi); text-decoration: none; }

/* Hero */
.hero { padding: 64px 0 32px; position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  top: -180px; right: -160px;
  width: 520px; height: 520px;
  background: radial-gradient(circle at center, rgba(107,63,224,0.22), transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.hero > .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 36px; align-items: center; }
@media (min-width: 880px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 56px; } }
.eyebrow {
  display: inline-block;
  background: var(--purple-soft);
  color: var(--purple);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero h1 { color: var(--ink); }
.hero h1 .accent { color: var(--purple); }
.hero p.lede { font-size: 1.18rem; color: var(--ink-2); max-width: 56ch; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.06s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--purple); color: #fff; box-shadow: 0 10px 28px rgba(107, 63, 224, 0.35); }
.btn-primary:hover { background: var(--purple-hi); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-store {
  background: var(--ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  box-shadow: var(--shadow-md);
}
.btn-store small { font-size: 0.72rem; font-weight: 500; opacity: 0.75; display: block; letter-spacing: 0.05em; }
.btn-store strong { font-size: 1.05rem; }
.btn-store:hover { background: var(--purple); }

/* Hero phone shell wrapping real screenshot */
.phone-shell {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 270px;
  padding: 12px 10px 10px;
  background: linear-gradient(155deg, #14122A, #2E2A48);
  border-radius: 36px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.04) inset;
}
.phone-shell2::before {
  content: "";
  position: absolute;
  top: 20px; left: 50%; transform: translateX(-50%);
  width: 86px; height: 20px;
  background: #06061a;
  border-radius: 999px;
  z-index: 2;
}
.phone-shell img {
  width: 100%; height: auto; display: block;
  border-radius: 26px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.4) inset;
}

/* Section blocks */
section { padding: 60px 0; position: relative; }
section.tight { padding: 32px 0; }
section.alt { background: rgba(255,255,255,0.55); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
section.ink { background: var(--ink); color: var(--paper); }
section.ink h2, section.ink h3 { color: #fff; }
section.ink p { color: rgba(244,236,241,0.86); }
section.indigo { background: linear-gradient(135deg, var(--indigo), var(--indigo-lo)); color: var(--paper); }
section.indigo h2 { color: #fff; }
section.indigo p { color: rgba(255,255,255,0.86); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.section-head p { color: var(--muted); }

/* Screenshots */
.shots { display: grid; gap: 20px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 640px)  { .shots { grid-template-columns: repeat(2, 1fr); gap: 22px; } }
@media (min-width: 980px)  { .shots { grid-template-columns: repeat(4, 1fr); gap: 22px; } }
.shot {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px 14px 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-align: center;
  min-width: 0;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.shot:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.shot img {
  width: 100%;
  max-width: 200px;
  height: auto;
  margin: 0 auto 12px;
  display: block;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(20,18,42,0.10), 0 0 0 1px var(--border);
}
.shot h3 { margin: 4px 0; font-size: 1rem; }
.shot p  { color: var(--ink-2); font-size: 0.9rem; margin: 4px 0 0; line-height: 1.45; }

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}
.feature {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feature-emoji {
  font-size: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px; height: 54px;
  border-radius: 16px;
  background: var(--purple-soft);
  margin-bottom: 14px;
}
.feature h3 { margin-top: 0; font-size: 1.18rem; }
.feature p  { color: var(--ink-2); margin: 0; }

/* Promo video section — sits between hero and social proof */
.video-band {
  background: linear-gradient(160deg, rgba(107,63,224,0.08), rgba(129,86,255,0.04));
  padding: 56px 0 64px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.video-band .section-head { margin-bottom: 28px; }
.video-wrap {
  max-width: 380px;
  margin: 0 auto;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--ink);
  position: relative;
  aspect-ratio: 9 / 16;
}
.video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
@media (min-width: 720px) {
  .video-wrap { max-width: 420px; }
}

/* Modules / quick-play chips */
.modules { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.module-chip {
  background: var(--surface);
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.module-chip .em { font-size: 1.3rem; }

/* Comparison table */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.compare-table th, .compare-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.compare-table th { background: var(--purple-soft); font-weight: 700; letter-spacing: -0.02em; color: var(--purple-lo); }
.compare-table td.win  { color: var(--green); font-weight: 700; }
.compare-table td.mid  { color: var(--muted); }
.compare-table td.miss { color: var(--red); }

/* FAQ */
.faq details {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1.05rem;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; font-size: 1.2rem; color: var(--purple); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--ink-2); }

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  max-width: 880px;
  margin: 0 auto;
}
.plan {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 30px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.plan.featured {
  border-color: var(--purple);
  box-shadow: var(--shadow-md), 0 0 0 3px var(--purple-soft);
  position: relative;
}
.plan.featured::before {
  content: "Most installed";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--purple);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 4px 14px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}
.plan-price { font-size: 2.4rem; font-weight: 800; font-family: var(--font-display); letter-spacing: -0.035em; color: var(--ink); }
.plan ul { padding-left: 18px; }
.plan li { margin: 6px 0; }

/* Testimonials */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.quote {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--border);
}
.quote-text { font-size: 1.04rem; color: var(--ink-2); }
.quote-meta { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }

/* Blog cards */
.posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; }
.post-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.post-card .post-cat {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--purple);
  font-weight: 700;
}
.post-card h3 { font-size: 1.18rem; margin: 8px 0 10px; flex-grow: 0; }
.post-card p { color: var(--ink-2); margin: 0 0 14px; flex-grow: 1; }
.post-meta { color: var(--muted); font-size: 0.85rem; }

/* Feature hero image at top of a blog post — sits above the eyebrow */
.post-hero {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin: 0 0 28px;
  box-shadow: var(--shadow-md);
  object-fit: cover;
  aspect-ratio: 1200 / 630;
}

/* Article (single blog post) */
.article {
  background: var(--surface);
  margin: 32px auto;
  padding: 44px 38px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  max-width: var(--reading-max);
}
.article h1 { font-size: clamp(1.85rem, 4vw, 2.6rem); }
.article .post-meta { margin-bottom: 24px; }
.article h2 { border-top: 1px solid var(--border); padding-top: 1em; }
.article ul, .article ol { padding-left: 22px; }
.article li { margin: 6px 0; }
.article blockquote {
  border-left: 4px solid var(--purple);
  margin: 1.2em 0;
  padding: 8px 18px;
  background: var(--purple-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-2);
}
.article cite { color: var(--muted); font-size: 0.9rem; }

/* Callout */
.callout {
  background: var(--purple-soft);
  border-left: 4px solid var(--purple);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.4em 0;
}

/* Footer */
.site-footer { background: var(--ink); color: var(--paper); padding: 48px 0 32px; margin-top: 64px; }
.site-footer a { color: var(--paper); }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1.4fr 1fr 1fr 1fr; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h4 {
  color: var(--purple-hi);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 6px 0; font-size: 0.95rem; }
.footer-bottom {
  border-top: 1px solid rgba(244,236,241,0.18);
  padding-top: 22px;
  margin-top: 36px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.86rem;
  color: rgba(244,236,241,0.7);
}

/* Policy tables */
.table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.table th, .table td { padding: 10px 12px; border: 1px solid var(--border); text-align: left; }
.table th { background: var(--purple-soft); color: var(--purple-lo); }

/* Mobile menu — hide secondary links */
@media (max-width: 720px) { .nav-links a:not(.nav-cta) { display: none; } }

/* Print */
@media print {
  .site-header, .site-footer, .nav-cta, .cta-row { display: none; }
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, a, .post-card, .feature, .shot { transition: none; }
}
