/* =========================================================================
   Joyride marketing site — single stylesheet
   Brand tokens live in :root. No build step; edit values here, not inline.
   ========================================================================= */

:root {
  /* Brand (from the app icon) */
  --gold: #e6b422;        /* icon background */
  --gold-deep: #b38500;   /* darker gold for borders / hover / focus on light */
  --ink: #2a2118;         /* icon linework — primary text */
  --ink-soft: #5b5044;    /* secondary text */

  /* Surfaces (light) */
  --bg: #fffdf6;          /* warm off-white page background */
  --surface: #ffffff;
  --surface-alt: #fbf4e2; /* faint gold-tinted band */
  --line: #ece3cf;        /* hairline borders */

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
          "Apple Color Emoji", sans-serif;

  /* Layout */
  --maxw: 1120px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 16px;
  --radius-lg: 28px;
  --shadow: 0 10px 30px rgba(42, 33, 24, 0.12);
  --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --gold: #f0c33a;          /* lift the gold slightly so it reads on dark */
    --gold-deep: #e6b422;
    --ink: #f4ecd8;           /* cream text */
    --ink-soft: #c2b6a0;
    --bg: #17140f;
    --surface: #211c15;
    --surface-alt: #1d1812;
    --line: #352d22;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  }
}

/* ----------------------------- base ----------------------------- */
* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0 0 0.5em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 0.4em; }
h3 { font-size: clamp(1.2rem, 2.6vw, 1.5rem); margin: 0 0 0.3em; }
p  { margin: 0 0 1em; color: var(--ink-soft); }

a { color: var(--gold-deep); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

img, picture, video, svg { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: 3px solid var(--gold-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* shared section rhythm */
main > section {
  padding: clamp(3rem, 8vw, 6rem) var(--gutter);
  max-width: var(--maxw);
  margin-inline: auto;
}
.section-head { max-width: 46ch; margin: 0 auto clamp(2rem, 5vw, 3rem); text-align: center; }
.section-head__lede { font-size: 1.1rem; }

/* ----------------------------- buttons ----------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  background: var(--gold);
  color: var(--ink);
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:hover { color: var(--ink); background: var(--gold-deep); }
.btn:active { transform: translateY(1px); }
.btn--small { padding: 0.45rem 1rem; min-height: 38px; font-size: 0.95rem; }

/* Apple App Store badge styling — dark pill, light text (matches Apple's badge) */
.btn--app-store {
  background: var(--ink);
  color: #fff;
  padding: 0.55rem 1.25rem;
  box-shadow: var(--shadow);
}
.btn--app-store:hover { background: #000; color: #fff; }
.btn__apple { flex: none; }
.btn__app-store-text { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.btn__app-store-text small { font-size: 0.7rem; font-weight: 500; opacity: 0.85; }
.btn__app-store-text strong { font-size: 1.15rem; font-weight: 600; }

/* ----------------------------- header / nav ----------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: var(--maxw);
  margin-inline: auto;
  min-height: var(--header-h);
  padding: 0 var(--gutter);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}
.brand__mark { border-radius: 8px; }
.brand__name { font-size: 1.15rem; }

.nav__toggle {
  margin-left: auto;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav__toggle-bar { height: 2px; background: var(--ink); border-radius: 2px; }

.nav__menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Mobile: collapsible menu */
@media (max-width: 720px) {
  .nav__menu {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem var(--gutter) 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav__menu--open { display: flex; }
  .nav__menu a:not(.btn) {
    display: block;
    padding: 0.75rem 0.25rem;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
  }
  .nav__menu .btn { margin-top: 0.5rem; align-self: flex-start; }
}

/* Desktop: inline menu, no toggle */
@media (min-width: 721px) {
  .nav__toggle { display: none; }
  .nav__menu {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
  }
  .nav__menu a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
  .nav__menu a:not(.btn):hover { color: var(--gold-deep); }
}

/* ----------------------------- hero ----------------------------- */
.hero {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  text-align: center;
}
.hero__subtitle { font-size: 1.2rem; max-width: 48ch; margin-inline: auto; }
.hero .btn--app-store { margin-top: 0.5rem; }
.hero__media { display: flex; justify-content: center; }

.device-shot {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background: var(--surface-alt);
}
.hero__media .device-shot { max-height: 70vh; width: auto; }

@media (min-width: 880px) {
  .hero { grid-template-columns: 1.05fr 0.95fr; text-align: left; }
  .hero__subtitle { margin-inline: 0; }
  .hero__media { justify-content: flex-end; }
}

/* ----------------------------- features ----------------------------- */
.feature-row {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem) 0;
}
.feature-row__media { display: flex; justify-content: center; }
.feature-row .device-shot { max-height: 60vh; width: auto; }
.feature-row__text { max-width: 50ch; }

@media (min-width: 760px) {
  .feature-row { grid-template-columns: 1fr 1fr; }
  /* alternate the image side on even rows */
  .feature-row:nth-child(even) .feature-row__media { order: 2; }
}

/* ----------------------------- gallery ----------------------------- */
.gallery { background: var(--surface-alt); border-radius: var(--radius-lg); }
.gallery__strip {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0 1rem;
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.gallery__strip > li { flex: 0 0 auto; scroll-snap-align: center; }
.gallery__strip .device-shot { height: clamp(420px, 60vh, 620px); width: auto; }

/* ----------------------------- video ----------------------------- */
.video__frame {
  max-width: 960px;
  margin-inline: auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.video__frame video { width: 100%; height: auto; display: block; background: #000; }

/* ----------------------------- release notes ----------------------------- */
.release-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; max-width: 60ch; margin-inline: auto; }
.release {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.release__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.release__version { margin: 0; }
.release__date { color: var(--ink-soft); font-size: 0.9rem; white-space: nowrap; }
.release__changes { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.release__changes li { margin: 0.25rem 0; }

/* ----------------------------- final CTA ----------------------------- */
.cta-band {
  text-align: center;
  background: var(--gold);
  color: var(--ink);
  border-radius: var(--radius-lg);
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
.cta-band__title { color: var(--ink); }
.cta-band__lede { color: color-mix(in srgb, var(--ink) 80%, transparent); }

/* ----------------------------- footer ----------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-alt);
}
.site-footer__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 2.5rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer__nav a { color: var(--ink-soft); text-decoration: none; }
.site-footer__nav a:hover { color: var(--ink); }
.site-footer__legal { margin: 0; color: var(--ink-soft); font-size: 0.9rem; flex-basis: 100%; }

@media (min-width: 721px) {
  .site-footer__legal { flex-basis: auto; margin-left: auto; }
}

/* ----------------------------- motion ----------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ----------------------------- privacy / prose ----------------------------- */
.prose {
  max-width: 70ch;
  margin-inline: auto;
}
.prose h1 { margin-bottom: 0.2em; }
.prose .updated { color: var(--ink-soft); font-size: 0.95rem; margin-top: 0; }
.prose h2 { margin-top: 2em; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: 0.35rem 0; }
.notice {
  border: 1px dashed var(--gold-deep);
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
