/* ==========================================================================
   Broke & Buzzed — website styles
   On-brand with the iOS app's "arcade neon" look.
   Single dark theme (deliberate brand commitment). Self-contained: no CDN,
   no external fonts, no trackers.
   ========================================================================== */

:root {
  /* Brand palette (mirrors the app's BBArcade tokens) */
  --crt-black:  #120B24;   /* page background */
  --panel:      #1D1440;   /* cards / panels */
  --panel-deep: #170F33;   /* inset panels */
  --magenta:    #FF3DA6;   /* primary accent: CTAs, savings, structure */
  --cyan:       #2BE4F2;   /* links, eyebrows, secondary accent */
  --score:      #FFD62E;   /* PRICES ONLY */
  --text:       #F4F0FF;   /* CRT white */
  --text-dim:   #9D95C4;   /* muted lavender */
  --hairline:   rgba(244, 240, 255, 0.14);

  --maxw: 1100px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-glow-magenta: 0 0 24px rgba(255, 61, 166, 0.35);
  --shadow-glow-cyan: 0 0 24px rgba(43, 228, 242, 0.28);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Reset -------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
/* NOTE: never use overflow-x: hidden here — it makes <body> a scroll container
   and breaks position: sticky on .site-header in Safari. `clip` doesn't. */
body { overflow-x: clip; max-width: 100%; }
/* Anchor targets clear the 64px sticky header. */
section[id], [id]:target { scroll-margin-top: 84px; }
h1, h2, h3 { overflow-wrap: break-word; }
/* `anywhere` (not `break-word`) so a long email address also shrinks the
   min-content width — otherwise it blows out its grid column at 320px. */
p, a, li { overflow-wrap: anywhere; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--crt-black);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  /* subtle CRT scanline texture */
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.015) 0px,
    rgba(255,255,255,0.015) 1px,
    transparent 1px,
    transparent 3px
  );
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
ul { margin: 0 0 1em; padding-left: 1.2em; }
li { margin-bottom: .4em; }

/* Accessibility ------------------------------------------------------------ */
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
.skip-link {
  position: absolute; left: 0; top: 0; z-index: 200; transform: translateY(-200%);
  background: var(--magenta); color: #12081c; padding: .6rem 1rem; border-radius: 0 0 8px 0; font-weight: 700;
}
.skip-link:focus { transform: translateY(0); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: 0;
  overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); border: 0; white-space: nowrap;
}

/* Layout ------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.eyebrow {
  color: var(--cyan); font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  font-size: .8rem; margin: 0 0 .6em;
}
.lead { color: var(--text-dim); font-size: 1.15rem; max-width: 60ch; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* Header / nav ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  /* Opaque enough to read over: the header is genuinely sticky now, so page
     content scrolls underneath it. -webkit- prefix for iOS 15 and older. */
  background: rgba(18, 11, 36, 0.94);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 900; letter-spacing: -0.02em; color: var(--text); font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.brand .cap { color: var(--magenta); }
.nav-links { display: flex; align-items: center; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--text-dim); font-weight: 600; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); text-decoration: none; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--hairline); color: var(--text);
  /* Pill, not an 8px rounded square — it sits beside pill buttons and was the
     only hard-cornered control on the site. */
  border-radius: 999px; padding: .4rem .6rem; font-size: 1.2rem; cursor: pointer;
  min-width: 44px; min-height: 44px; align-items: center; justify-content: center;
}
/* Header CTA pill — sized here rather than with an inline style so the
   mobile menu can restyle it. */
.nav-cta { padding: .5rem 1rem; font-size: .95rem; }

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 800; font-size: 1rem; padding: .85rem 1.4rem; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; transition: transform .08s ease, box-shadow .2s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--magenta); color: #16091f; box-shadow: var(--shadow-glow-magenta); }
.btn--ghost { background: transparent; color: var(--cyan); border-color: var(--cyan); }
.btn--ghost:hover { box-shadow: var(--shadow-glow-cyan); }
.btn--lg { padding: 1rem 1.8rem; font-size: 1.05rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.center .btn-row { justify-content: center; }

/* Hero --------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 72px; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto -10%; height: 60%;
  background: radial-gradient(60% 100% at 30% 0%, rgba(255,61,166,0.22), transparent 70%),
              radial-gradient(50% 100% at 90% 10%, rgba(43,228,242,0.16), transparent 70%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 span { color: var(--magenta); }
.hero .lead { font-size: 1.25rem; }
.hero-phone {
  display: block; margin-inline: auto; width: min(320px, 100%);
  aspect-ratio: 313 / 680; border-radius: 36px;
  border: 1px solid var(--hairline); box-shadow: var(--shadow-glow-magenta);
  background: var(--panel-deep);
}
.hero-note { color: var(--text-dim); font-size: .9rem; margin-top: 1rem; }

/* Cards / grids ------------------------------------------------------------ */
.grid { display: grid; gap: 20px; }
.grid > *, .split > *, .hero-grid > * { min-width: 0; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 24px;
}
.card h3 { color: var(--text); }
.card p { color: var(--text-dim); margin-bottom: 0; }
.card .ico { font-size: 1.6rem; margin-bottom: .5rem; display: block; }

/* Steps -------------------------------------------------------------------- */
.steps { counter-reset: step; display: grid; gap: 18px; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start;
  background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 20px 22px; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  background: var(--magenta); color: #16091f; font-weight: 900;
}
.step h3 { margin: .1em 0 .3em; }
.step p { color: var(--text-dim); margin: 0; }

/* Deal card demo ----------------------------------------------------------- */
.deal-demo { background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 22px; }
.deal-demo .eyebrow { color: var(--cyan); }
.deal-demo .price { font-size: 2.6rem; font-weight: 900; color: var(--score); font-variant-numeric: tabular-nums; }
.deal-demo .was { color: var(--text-dim); text-decoration: line-through; margin-left: .5rem; font-weight: 600; }
.deal-demo .savings { display: inline-block; background: var(--magenta); color: #16091f; font-weight: 800;
  padding: .2rem .6rem; border-radius: 999px; font-size: .85rem; }
.deal-demo .store { color: var(--text-dim); margin-top: .4rem; }

/* Screenshot gallery ------------------------------------------------------- */
.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 28px; }
.shots figure { margin: 0; text-align: center; }
.shots img {
  width: 100%; aspect-ratio: 313 / 680; border-radius: 22px; border: 1px solid var(--hairline);
  box-shadow: var(--shadow-glow-cyan); background: var(--panel-deep);
}
.shots figcaption { color: var(--text-dim); font-size: .9rem; margin-top: .6rem; }
@media (max-width: 860px) { .shots { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .shots { grid-template-columns: 1fr 1fr; gap: 12px; } }

/* Panels / callouts -------------------------------------------------------- */
.panel { background: linear-gradient(180deg, var(--panel), var(--panel-deep)); border: 1px solid var(--hairline);
  border-radius: 20px; padding: 40px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }

/* FAQ ---------------------------------------------------------------------- */
.faq details { background: var(--panel); border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 4px 20px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.faq summary::-webkit-details-marker { display: none; }
/* Not float:right — on a question that wraps, the float lands beside the last
   line instead of staying pinned to the top-right. */
.faq summary::after { content: "+"; flex: none; color: var(--cyan); font-size: 1.4rem; line-height: 1.2; }
.faq details[open] summary::after { content: "–"; }
.faq details > p { color: var(--text-dim); padding-bottom: 16px; margin: 0; }

/* Legal / long-form -------------------------------------------------------- */
.doc { max-width: 760px; }
.doc h2 { margin-top: 1.6em; }
.doc h3 { margin-top: 1.2em; color: var(--cyan); }
.doc p, .doc li { color: var(--text-dim); }
.note {
  border-left: 3px solid var(--magenta); background: var(--panel-deep);
  padding: 14px 18px; border-radius: 0 8px 8px 0; color: var(--text-dim); font-size: .95rem;
}

/* Footer ------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--hairline); padding: 48px 0 40px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h3 { color: var(--text); font-size: .95rem; margin: 0 0 .8em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5em; }
.site-footer a { color: var(--text-dim); font-size: .95rem; }
.site-footer a:hover { color: var(--text); }
.site-footer li a { display: inline-block; padding: 5px 0; }
.footer-legal { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--hairline);
  color: var(--text-dim); font-size: .85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-legal:only-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* Age gate ----------------------------------------------------------------- */
.agegate {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  background: rgba(10, 6, 20, 0.96); backdrop-filter: blur(6px); padding: 20px;
}
.agegate[hidden] { display: none; }
.agegate-card { background: var(--panel); border: 1px solid var(--hairline); border-radius: 22px;
  padding: 40px; max-width: 460px; text-align: center; box-shadow: var(--shadow-glow-magenta); }
.agegate-card h2 { margin-bottom: .4em; }
.agegate-card p { color: var(--text-dim); }
.agegate .btn-row { justify-content: center; margin-top: 1.4rem; }
.agegate-deny { display: none; }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 860px) {
  .hero-grid, .split { grid-template-columns: 1fr; gap: 32px; }
  .hero-phone { margin-top: 4px; }
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--panel-deep); border-bottom: 1px solid var(--hairline); padding: 8px 20px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 0; width: 100%; }
  .nav-links .btn { display: flex; justify-content: center; width: 100%; padding: .8rem 1rem; margin: 10px 0 4px; }
  .nav-toggle { display: inline-flex; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .panel { padding: 26px; }
  /* Vertical rhythm: 72px section padding stacks to 144px between sections,
     which reads as a hole on a phone. */
  .hero { padding: 44px 0 52px; }
  .section { padding: 52px 0; }
  .section--tight { padding: 36px 0; }
  .site-footer { padding: 36px 0 32px; margin-top: 28px; }
  /* Stacked CTAs match widths instead of raggedly hugging their labels. */
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row .btn { width: 100%; }
  .agegate-card { padding: 28px 22px; }
  .shots { gap: 12px; }
}

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