/* MythicTracks site styles: mobile first. Tokens live in tokens.css. */
:root {
  /* scene states, sampled from the app */
  --st-combat: #d93e35;
  --st-explore: #68b25b;
  --st-sneak: #593f7c;
  --st-sneak-text: #8f72b7;
}
/* Mobile first: base styles are the phone layout; min-width queries add room. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: 'Cormorant Garamond', serif; font-size: 1.125rem; line-height: 1.6; background: var(--dark); color: var(--text); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.label { font-family: 'Cinzel', serif; font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-muted); }
h1, h2, h3 { font-family: 'Cinzel', serif; color: var(--gold-light); font-weight: 600; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 6vw, 2.5rem); line-height: 1.15; letter-spacing: 0.02em; }
.lede { font-size: 1.2rem; line-height: 1.55; max-width: 36ch; }

.st-combat { color: var(--st-combat); }
.st-explore { color: var(--st-explore); }
.st-sneak { color: var(--st-sneak-text); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; font-family: 'Cinzel', serif; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; border-radius: 2px; transition: background-color 0.2s, border-color 0.2s, transform 0.2s; -webkit-tap-highlight-color: transparent; }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-gold { background: var(--gold); color: var(--button-ink); }
.btn-gold:active { background: var(--gold-light); }
.btn-line { border: 1px solid var(--border-hover); color: var(--gold-light); }
.ctas { display: flex; flex-direction: column; gap: 10px; }
.ctas .btn { width: 100%; }
.also { display: none; margin-top: 4px; }
.also a { display: inline-flex; align-items: center; min-height: 44px; font-size: 1rem; color: var(--text); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--border-hover); }

/* platform-aware store buttons (data-platform set in <head>) */
.store-any { display: none; }
[data-platform="ios"] .store-gp, [data-platform="android"] .store-ap { display: none; }
[data-platform="ios"] .also, [data-platform="android"] .also { display: block; }
[data-platform="ios"] .also-ap, [data-platform="android"] .also-gp { display: none; }

/* nav */
.nav { position: absolute; top: 0; left: 0; right: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; max-width: 1120px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.brand img { width: 28px; height: 28px; }
.brand span { font-family: 'Cinzel', serif; font-weight: 600; font-size: 0.9rem; letter-spacing: 0.12em; color: var(--gold-light); }
.nav ul { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav ul li:not(:last-child) { display: none; }
.nav ul a:not(.btn) { font-family: 'Cinzel', serif; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; color: var(--text); }
.nav .btn { min-height: 44px; padding: 0 16px; font-size: 0.75rem; }

/* hero */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 30%; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6,5,12,0.7) 0%, rgba(6,5,12,0.86) 45%, var(--dark) 100%); }
.hero-grid { display: grid; gap: 44px; padding-top: 96px; padding-bottom: 56px; }
/* one line at every width: the tagline is ~10.8em wide, so size it to the text column */
.hero h1 { font-size: calc((100vw - 40px) / 11.2); white-space: nowrap; line-height: 1.04; letter-spacing: 0.01em; margin-bottom: 18px; }
.hero .lede { margin-bottom: 28px; }
.hero-note { margin-top: 12px; font-size: 1rem; font-style: italic; color: var(--text-muted); }

/* the real app, framed as a phone */
.hero-phone { width: 100%; max-width: 280px; justify-self: center; }
.phone { aspect-ratio: 540 / 1171; width: 100%; max-width: 100%; padding: 9px; border-radius: 40px; background: #0b0a12; border: 1px solid var(--border-hover); box-shadow: 0 24px 60px rgba(0,0,0,0.55); }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 31px; }

/* real photos of the app on a table */
.photo { margin: 0; display: grid; gap: 10px; width: 100%; max-width: 400px; }
.photo img { width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--border-hover); }
.photo figcaption { font-size: 1rem; font-style: italic; color: var(--text-muted); }
.photo figcaption span { font-style: normal; font-family: 'Cinzel', serif; font-weight: 600; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; }

/* sections */
section { padding: 72px 0; }
.rule { border: 0; height: 1px; background: var(--border); }
.split { display: grid; gap: 18px; }

/* cue sheet: stacked on phones, a real table from 640px */
.sheet-cap { margin-top: 36px; padding-bottom: 10px; color: var(--text-muted); font-style: italic; font-size: 1rem; }
.samples { list-style: none; border-top: 1px solid var(--border-hover); }
.samples li { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--border); }
.samples .phone { padding: 4px; border-radius: 16px; box-shadow: none; }
.samples .phone img { border-radius: 12px; }
.sample-text { min-width: 0; }
.samples .time { display: block; font-variant-numeric: lining-nums tabular-nums; color: var(--text-muted); font-size: 0.95rem; margin-bottom: 2px; }
.said-line { font-style: italic; font-size: 1.2rem; line-height: 1.4; color: var(--gold-light); margin-bottom: 8px; }
.state { font-family: 'Cinzel', serif; font-size: 0.9rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-right: 8px; }
.place { color: var(--text); font-size: 1.05rem; }
.systems { margin-top: 24px; font-size: 1.1rem; max-width: 62ch; }

/* in the app */
.app { display: grid; gap: 36px; }
.app-photo { max-width: 340px; }
.facts { list-style: none; margin-top: 24px; border-top: 1px solid var(--border); }
.facts li { padding: 16px 0; border-bottom: 1px solid var(--border); }
.facts b { display: block; font-family: 'Cinzel', serif; font-weight: 600; font-size: 0.9rem; letter-spacing: 0.06em; color: var(--gold-light); margin-bottom: 2px; }

/* instead of */
.instead { margin-top: 28px; }
.instead p { display: grid; gap: 2px; padding: 16px 0; border-top: 1px solid var(--border); font-size: 1.15rem; }
.instead p:last-child { border-bottom: 1px solid var(--border); }
.instead b { font-family: 'Cinzel', serif; font-weight: 600; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.instead p.us b { color: var(--gold); }
.instead p.us span { color: var(--gold-light); }

/* privacy */
.privacy { background: var(--dark-mid); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.privacy h2 { font-size: clamp(1.9rem, 8vw, 3.3rem); margin-bottom: 14px; }
.privacy p { font-size: 1.2rem; max-width: 46ch; margin-bottom: 12px; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-family: 'Cinzel', serif; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* pricing */
.ledger { list-style: none; margin-top: 28px; }
.ledger li { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.ledger li:first-child { border-top: 1px solid var(--border); }
.ledger h3, .ledger .h3 { font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; }
.ledger .detail { grid-column: 1 / -1; grid-row: 2; font-size: 1.05rem; margin-top: -4px; }
.ledger .dots { border-bottom: 1px dotted var(--border-hover); transform: translateY(-6px); }
.ledger .price { font-family: 'Cinzel', serif; font-size: 1.3rem; color: var(--gold-light); font-variant-numeric: lining-nums; white-space: nowrap; }
.ledger .price small { font-family: 'Cormorant Garamond', serif; font-size: 0.95rem; color: var(--text); margin-left: 3px; }
.fine { margin-top: 18px; font-style: italic; color: var(--text-muted); }

/* faq */
.faq { border-top: 1px solid var(--border); margin-top: 18px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 60px; padding: 12px 0; font-family: 'Cinzel', serif; font-size: 0.95rem; font-weight: 600; letter-spacing: 0.03em; color: var(--gold-light); -webkit-tap-highlight-color: transparent; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--gold); transition: transform 0.25s ease; }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { padding-bottom: 20px; max-width: 62ch; }

/* closing */
.closing { text-align: center; padding: 88px 0 96px; border-top: 1px solid var(--border); }
.closing .closing-logo { width: 72px; height: 72px; margin: 0 auto 22px; }
.closing h2 { font-size: clamp(1.9rem, 8vw, 3.2rem); margin-bottom: 12px; }
.closing p { margin: 0 auto 26px; max-width: 40ch; font-size: 1.2rem; }
.closing .ctas { max-width: 420px; margin: 0 auto; }

footer { border-top: 1px solid var(--border); }
.foot { display: flex; flex-direction: column; gap: 8px; padding: 24px 20px; max-width: 1120px; margin: 0 auto; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 22px; }
.foot nav a { display: inline-flex; align-items: center; min-height: 44px; font-family: 'Cinzel', serif; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); text-decoration: none; }
.foot small { font-size: 0.9rem; color: var(--text-dim); }

/* phone: thumb-reach download bar after the hero buttons scroll away */
.getbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(6,5,12,0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--border-hover); transform: translateY(110%); transition: transform 0.3s ease; }
.getbar.show { transform: none; }
.getbar p { font-size: 1rem; line-height: 1.3; color: var(--text); }
.getbar p b { display: block; font-family: 'Cinzel', serif; font-weight: 600; font-size: 0.85rem; letter-spacing: 0.08em; color: var(--gold-light); }
.getbar .btn { min-height: 48px; padding: 0 18px; flex-shrink: 0; }
[data-platform="other"] .getbar .store-gp, [data-platform="other"] .getbar .store-ap { display: none; }
[data-platform="other"] .getbar .store-any { display: inline-flex; }

.closing .badges { justify-content: center; }

/* official store badges (artwork unmodified) */
.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.badge { display: inline-flex; border-radius: 9px; transition: transform 0.2s; -webkit-tap-highlight-color: transparent; }
.badge img { display: block; height: 52px; width: auto; }
.badge:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.getbar .badge img { height: 44px; }

/* warm stage light behind the hero phone */
.hero-phone { position: relative; isolation: isolate; }
.hero-phone::before { content: ''; position: absolute; inset: -14% -45%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--gold) 55%, transparent), color-mix(in srgb, var(--st-combat) 22%, transparent) 48%, transparent 80%);
  filter: blur(14px); }
.hero-phone .phone { box-shadow: 0 0 70px 6px color-mix(in srgb, var(--gold) 30%, transparent), 0 30px 70px rgba(0,0,0,0.6); }

/* inner pages (pricing, privacy): nav sits in the flow, content in one column */
.nav.static { position: relative; padding-left: 0; padding-right: 0; }
.page h2.sub + .faq { margin-top: 20px; }
.page { padding: 24px 0 72px; }
.page h1 { font-size: clamp(2rem, 8vw, 3.4rem); line-height: 1.1; letter-spacing: 0.01em; margin-bottom: 16px; }
.page .lede { margin-bottom: 8px; }
.page h2.sub { font-size: clamp(1.4rem, 5vw, 2rem); margin-top: 64px; }
.page .narrow { max-width: 760px; }
.page-cta { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border); display: grid; gap: 14px; }
.page-cta p { font-size: 1.15rem; }

@media (hover: hover) {
  .badge:hover { transform: translateY(-1px); }
  .btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); }
  .btn-line:hover { border-color: var(--gold); }
  .nav ul a:not(.btn):hover, .text-link:hover, .faq summary:hover { color: var(--gold-light); }
  .foot nav a:hover { color: var(--gold); }
}

@media (min-width: 640px) {
  .hero h1 { font-size: min(4.3rem, calc((100vw - 64px) / 11.2)); }
  .wrap { padding: 0 32px; }
  .nav { padding: 22px 32px; }
  .ctas { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; }
  .ctas .btn { width: auto; }
  .closing .ctas { max-width: none; justify-content: center; }
  .samples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 36px; border-top: 0; }
  .samples li { grid-template-columns: 1fr; align-items: start; gap: 18px; padding: 0; border: 0; }
  .samples .phone { max-width: 230px; padding: 7px; border-radius: 30px; }
  .samples .phone img { border-radius: 23px; }
  .said-line { font-size: 1.3rem; }
  .instead p { grid-template-columns: 200px 1fr; gap: 28px; padding: 20px 0; font-size: 1.2rem; }
  .instead b { padding-top: 4px; }
  .ledger .price { font-size: 1.6rem; }
  .ledger h3, .ledger .h3 { font-size: 1.05rem; }
  .foot { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; padding: 28px 32px; }
}

@media (min-width: 960px) {
  .hero h1 { font-size: min(4.3rem, calc((min(100vw, 1120px) - 456px) / 11.2)); }
  .nav ul li:not(:last-child) { display: list-item; }
  .nav .btn { min-height: 40px; padding: 0 18px; }
  .hero::before { background: linear-gradient(90deg, rgba(6,5,12,0.95) 0%, rgba(6,5,12,0.8) 50%, rgba(6,5,12,0.55) 100%), linear-gradient(180deg, rgba(6,5,12,0) 55%, var(--dark) 100%); }
  .hero-bg img { object-position: center 35%; }
  .hero-grid { grid-template-columns: 1fr 440px; gap: 72px; align-items: center; padding-top: 128px; padding-bottom: 96px; }
  .hero .lede { font-size: 1.3rem; margin-bottom: 34px; }
  .hero-grid { grid-template-columns: 1fr 320px; }
  .hero-phone { max-width: none; }
  section { padding: 104px 0; }
  .page { padding: 40px 0 104px; }
  .split { grid-template-columns: 0.9fr 1.1fr; gap: 72px; align-items: start; }
  .lede { font-size: 1.3rem; }
  .app { grid-template-columns: 360px 1fr; gap: 80px; align-items: center; }
  .app-photo { max-width: none; }
  .faq { margin-top: 0; }
  .closing { padding: 120px 0; }
  .getbar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .badge, .faq summary svg, .getbar { transition: none; }
}
