/* Public site styles: landing page now, region and notice pages later.
   Plain CSS on purpose (no build step): the admin panel's Tailwind pipeline
   stays separate. Breakpoints: 720px — below it the page uses the phone layout
   (no top nav, swipeable feature cards, sticky download bar, no QR panel);
   1100px — below it the feature cards go from four across to two by two. */

:root {
  --ink: #152051;
  --ink-2: #3b4566;
  --ink-3: #4a5578;
  --sky: #78C3EA;
  --paper: #FEFEFE;
  --mist: #F3F8FC;
  --slate: #2a3a75;
  --line: #c9d6e4;
  --on-ink: #cfd8f0;
  --live-bg: #E3F2E8;
  --live: #1d6b3a;
  --star: #E8A317;
  --gutter: clamp(16px, 5vw, 80px);
  --display: 'Fredoka', sans-serif;
  --text: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font-family: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; }
a { color: var(--ink); }
a:hover { color: #0b1233; }
/* Fredoka (the app's brand face) only for the key text: the hero title, section
   headings and hero numbers. Everything else is Inter, like the app's UI. */
h1, h2 { font-family: var(--display); font-weight: 600; margin: 0; }
h3 { font-family: var(--text); font-weight: 700; margin: 0; }
p { margin: 0; }
.wrap { max-width: 1280px; margin: 0 auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* ---------- Hero ---------- */
/* Text sits straight on the sky (navy on it is about 8:1), over faint chart
   lines only. */
.hero { position: relative; padding: 24px var(--gutter) 48px; overflow: hidden; }
.hero-chart { position: absolute; inset: 0; width: 100%; height: 100%; }
.site-header {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; max-width: 1280px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; min-height: 44px; text-decoration: none; }
.brand img { width: 44px; height: 44px; border-radius: 12px; }
.brand span { font-family: var(--display); font-weight: 600; font-size: 26px; }
.site-nav { display: flex; align-items: center; gap: 8px 24px; flex-wrap: wrap; font-weight: 500; font-size: 15px; }
.site-nav a { text-decoration: none; padding: 12px 0; }
.site-nav .pill {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700;
}
.hero-grid {
  position: relative; display: flex; flex-wrap: wrap; align-items: center;
  gap: clamp(24px, 4vw, 56px); max-width: 1280px; margin: 40px auto 0;
}
.hero-text { flex: 1 1 380px; min-width: 0; }
.hero-title { font-size: clamp(34px, 5vw, 68px); line-height: 1.04; letter-spacing: -.02em; }
/* One unbroken highlight: it moves to its own line rather than splitting. The
   top margin keeps it clear of the descenders on the line above. */
.hero-title span {
  display: inline-block; white-space: nowrap; color: var(--paper); background: var(--ink);
  margin-top: .14em; padding: 0 10px; border-radius: 10px; line-height: 1.25;
}
.hero-copy { margin-top: 24px; font-size: 19px; line-height: 1.55; max-width: 34em; }
.hero-facts { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px 40px; }
.hero-facts li { display: flex; flex-direction: column; gap: 4px; font-size: 15px; font-weight: 500; }
.hero-facts strong {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--display); font-weight: 600; font-size: 26px; line-height: 1.1;
}
.hero-phone { --screen-h: 600px; flex: 0 0 auto; display: flex; justify-content: center; margin: 0 auto; }
/* The hero's phone is one finished image; a little taller than a bare screen
   of --screen-h would be, since it includes the body. */
.hero-device { flex: none; width: auto; height: calc(var(--screen-h) * 1.06); }

/* Desktop and tablet: the hero plus the "Where it works" strip under it fit
   one screen, but it stops growing at 90vw / 900px so a portrait tablet or a
   tall monitor isn't mostly empty sky. The phone's size follows the viewport
   height, capped by its width (52vw) so it stays beside the text down to 721px
   instead of wrapping under it. */
@media (min-width: 721px) {
  .hero {
    min-height: min(calc(100vh - 62px), 90vw, 900px); min-height: min(calc(100svh - 62px), 90vw, 900px);
    display: flex; flex-direction: column; padding-bottom: clamp(24px, 4vh, 48px);
  }
  .hero .site-header { width: 100%; }
  .hero-grid { flex: 1; width: 100%; margin-top: clamp(16px, 4vh, 56px); }
  .hero-title { font-size: clamp(34px, min(5vw, 7vh), 68px); }
  .hero-copy { margin-top: clamp(12px, 2.5vh, 24px); }
  .hero .stores, .hero-facts { margin-top: clamp(16px, 3.5vh, 32px); }
  .hero-phone { --screen-h: clamp(320px, min(calc(100vh - 270px), 52vw), 620px); --screen-h: clamp(320px, min(calc(100svh - 270px), 52vw), 620px); }
  /* drop-shadow follows the phone's outline, not the image's box */
  .hero-device { filter: drop-shadow(0 28px 36px rgba(21,32,81,.38)); }
}
@media (max-width: 1100px) {
  .fact-long { display: none; }
}

/* ---------- Phone ---------- */
/* A drawn handset around an app screenshot: black bezel, dark metal band,
   Dynamic Island and side buttons, so it stays sharp at any size and matches
   the black phone in the hero. Everything is sized from --screen-h (the
   screenshot's height, set by whatever holds the phone); --u is 1% of it. */
.phone {
  --u: calc(var(--screen-h, 600px) / 100);
  --band: calc(var(--u) * .55);
  --metal: #2e3447;
  position: relative; flex: none; padding: calc(var(--u) * 1.5);
  background: #05070f; border: var(--band) solid var(--metal);
  border-radius: calc(var(--u) * 9.25);
  box-shadow: inset 0 0 0 1px rgba(254,254,254,.14), 0 0 0 1px #0d1124;
}
.phone img { width: auto; height: var(--screen-h, 600px); border-radius: calc(var(--u) * 7.2); }
/* Sits in the gap the screenshot's status bar leaves between clock and icons */
.phone-island {
  position: absolute; z-index: 1; left: 50%; top: calc(var(--u) * 3);
  width: calc(var(--u) * 13.5); height: calc(var(--u) * 3.6); margin-left: calc(var(--u) * -6.75);
  background: #05070f; border-radius: 999px;
}
/* Left edge: action button and the two volume keys, drawn as one strip.
   Right edge: the power key. */
.phone::before, .phone::after {
  content: ''; position: absolute; width: calc(var(--u) * .5); background: var(--metal);
}
.phone::before {
  left: calc(var(--band) * -1 - var(--u) * .5); top: 17%; height: 25%; border-radius: 2px 0 0 2px;
  background: linear-gradient(to bottom, var(--metal) 0 16%, transparent 16% 32%, var(--metal) 32% 60%, transparent 60% 72%, var(--metal) 72%);
}
.phone::after { right: calc(var(--band) * -1 - var(--u) * .5); top: 28%; height: 13%; border-radius: 0 2px 2px 0; }

/* ---------- Store badges ---------- */
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.store-badge { display: inline-block; line-height: 0; border-radius: 10px; }
.store-badge img { height: 56px; width: auto; }
.store-alt { display: none; font-size: 15px; flex-basis: 100%; margin-top: -8px; }
.store-alt a { font-weight: 700; display: inline-flex; align-items: center; min-height: 44px; }
/* On a phone we know, lead with its own store and offer the other as a link */
html[data-platform="ios"] .stores .is-play,
html[data-platform="android"] .stores .is-apple { display: none; }
html[data-platform="ios"] .stores .alt-play,
html[data-platform="android"] .stores .alt-apple { display: block; }

/* ---------- Where it works ---------- */
/* Plain text with status tags, not cards: nothing here is tappable. */
.coverage { background: var(--paper); padding: 18px var(--gutter); }
.coverage .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 36px; }
.coverage-label { font-family: var(--text); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.regions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 36px;
  list-style: none; margin: 0; padding: 0; font-size: 17px; font-weight: 700;
}
.region { display: inline-flex; align-items: center; gap: 10px; }
.region.is-soon { color: var(--ink-2); }
.tag { font-size: 12px; font-weight: 700; letter-spacing: .08em; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.tag-live { background: var(--live-bg); color: var(--live); }
.tag-new { background: var(--ink); color: var(--paper); }
.tag-soon { padding: 0; }

.star-line { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Features (one card per feature) ---------- */
.features { background: var(--ink); color: var(--paper); padding: clamp(56px, 6vw, 80px) var(--gutter); }
.features h2 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.15; letter-spacing: -.01em; }
.features-hint { display: none; margin-top: 10px; font-size: 15px; color: var(--on-ink); }
.tour-list {
  max-width: 1280px; margin: 40px auto 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 20px;
}
.tour-item { scroll-margin-top: 24px; }
/* A tile holding the top of a phone, cropped by the tile. The phone's screen is
   80% of the tile's width (container units; a fixed size where unsupported).
   2622 / 1206 is the screenshots' shape. */
.tour-shot {
  container-type: inline-size; aspect-ratio: 3 / 4; max-height: 480px; padding-top: 28px;
  display: flex; justify-content: center; align-items: flex-start;
  background: var(--slate); border-radius: 32px; overflow: hidden;
}
.tour-shot .phone { --screen-h: 440px; }
@supports (width: 1cqw) {
  .tour-shot .phone { --screen-h: calc(80cqw * 2622 / 1206); }
}
.tour-eyebrow { margin-top: 18px; font-weight: 700; font-size: 13px; color: var(--sky); }
.tour-item h3 { margin-top: 6px; font-size: 21px; line-height: 1.25; }
.tour-item .body { margin-top: 8px; line-height: 1.55; color: var(--on-ink); }
/* Four across, then two by two: never three and one */
@media (max-width: 1100px) {
  .tour-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- FAQ ---------- */
.faq { background: var(--paper); padding: clamp(56px, 7vw, 96px) var(--gutter); }
.faq .inner { max-width: 860px; margin: 0 auto; }
.faq h2 { font-size: clamp(28px, 3.4vw, 44px); margin-bottom: 24px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
/* The padding is on the summary so the whole row is the tap target */
.faq summary {
  cursor: pointer; padding: 20px 0; font-size: 19px; font-weight: 700;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 24px; line-height: 1; font-weight: 500; }
.faq details[open] summary::after { content: '–'; }
.faq details p { padding-bottom: 22px; font-size: 17px; line-height: 1.6; }

/* ---------- Download card ---------- */
.get { padding: clamp(56px, 7vw, 96px) var(--gutter) clamp(48px, 5vw, 72px); }
.get-card {
  max-width: 1120px; margin: 0 auto; background: var(--ink); color: var(--paper);
  border-radius: 32px; overflow: hidden; display: flex; flex-wrap: wrap; align-items: stretch;
  box-shadow: 0 24px 60px rgba(21,32,81,.25);
}
.get-text { flex: 4 1 400px; min-width: 0; padding: clamp(28px, 5vw, 64px); }
.get-text h2 { font-size: clamp(30px, 4.2vw, 56px); line-height: 1.04; letter-spacing: -.02em; }
.get-text > p { margin-top: 16px; font-size: 19px; line-height: 1.55; color: var(--on-ink); }
.get-text .stores { margin-top: 32px; }
/* The black badges need an edge on navy */
.get-badges .store-badge img { box-shadow: 0 0 0 1px rgba(254,254,254,.5); border-radius: 10px; }
.get-text .store-alt { color: var(--on-ink); }
.get-text .store-alt a { color: var(--paper); }
.get-proof {
  margin: 32px 0 0; padding: 24px 0 0; border-top: 1px solid rgba(254,254,254,.18); list-style: none;
  display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 15px; color: var(--on-ink);
}
.get-proof strong { color: var(--paper); }
/* Grows to the full row if it ever wraps under the text, so it never sits in
   a corner beside empty navy */
.get-qr {
  flex: 1 1 240px; padding: 32px; background: var(--sky); color: var(--ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center;
}
/* 33 modules at 5px each, plus a white quiet zone */
.get-qr img { width: 197px; height: 197px; padding: 16px; background: var(--paper); border-radius: 20px; }
.get-qr p { font-weight: 700; font-size: 17px; line-height: 1.35; max-width: 14em; }

/* ---------- Footer ---------- */
.site-footer { padding: 0 var(--gutter) 40px; }
.site-footer .wrap {
  padding-top: 24px; border-top: 1px solid rgba(21,32,81,.25);
  display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center;
  font-size: 14px; line-height: 1.5;
}
.footer-links { display: flex; gap: 24px; margin: 0; padding: 0; list-style: none; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Sticky download bar (phones only) ---------- */
.sticky-get { display: none; }

/* ======================= Phone layout ======================= */
@media (max-width: 720px) {
  .hero { padding: 16px 16px 0; }
  .brand img { width: 36px; height: 36px; border-radius: 10px; }
  .brand span { font-size: 22px; }
  .site-nav { display: none; }
  .hero-grid { margin-top: 28px; gap: 28px; }
  .hero-text { flex-basis: 100%; }
  /* 9vw keeps the unbroken "with confidence" inside a 320px screen */
  .hero-title { font-size: clamp(28px, 9vw, 34px); line-height: 1.08; }
  .hero-title span { padding: 0 8px; border-radius: 8px; line-height: 1.3; }
  .hero-copy { margin-top: 16px; font-size: 17px; line-height: 1.5; }
  .stores { margin-top: 22px; }
  .hero-facts { margin-top: 12px; padding-top: 16px; border-top: 1px solid rgba(21,32,81,.25); gap: 12px 22px; }
  .hero-facts li { gap: 2px; font-size: 13px; }
  .hero-facts strong { gap: 5px; font-size: 22px; }
  .hero-facts svg { width: 18px; height: 18px; }
  /* Crop the hero phone so the download button stays above the fold. No
     shadow: the crop would cut it into a visible box. */
  .hero-phone { --screen-h: 459px; width: 100%; height: 300px; overflow: hidden; align-items: flex-start; }

  .coverage { padding: 18px 16px 20px; }
  .coverage .wrap { gap: 10px 20px; }
  .coverage-label { flex-basis: 100%; font-size: 12px; }
  .regions { gap: 8px 20px; font-size: 16px; }
  .region { gap: 8px; }
  .tag { font-size: 11px; padding: 3px 8px; }
  .tag-soon { padding: 0; }

  /* The cards become a swipeable row, bleeding off the right edge */
  .features { padding: 40px 0 36px; }
  .features .wrap { padding: 0 16px; }
  .features h2 { font-size: 28px; }
  .features-hint { display: block; }
  .tour-list {
    display: flex; align-items: flex-start; gap: 12px; margin-top: 0; padding: 24px 16px 8px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 16px;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .tour-list::-webkit-scrollbar { display: none; }
  .tour-item { flex: 0 0 250px; scroll-snap-align: start; }
  .tour-shot { aspect-ratio: auto; max-height: none; height: 400px; padding-top: 24px; }
  .tour-eyebrow { margin-top: 14px; }
  .tour-item h3 { font-size: 19px; line-height: 1.3; }
  .tour-item .body { margin-top: 6px; font-size: 15px; line-height: 1.45; }

  .faq { background: var(--mist); padding: 40px 16px; }
  .faq h2 { font-size: 24px; margin-bottom: 16px; }
  .faq summary { padding: 16px 0; font-size: 17px; line-height: 1.3; }
  .faq details p { padding-bottom: 18px; font-size: 16px; line-height: 1.55; }

  .get { padding: 40px 16px 32px; }
  .get-card { border-radius: 28px; text-align: center; }
  .get-text { padding: 28px 20px; }
  .get-text h2 { font-size: 26px; line-height: 1.15; }
  .get-text > p { margin-top: 10px; font-size: 15px; }
  .get-text .stores { justify-content: center; margin-top: 22px; }
  .get-text .store-alt a { justify-content: center; }
  .get-proof { justify-content: center; margin-top: 14px; padding-top: 18px; gap: 6px 16px; font-size: 14px; }
  .get-qr { display: none; }

  .site-footer { padding: 0 16px 32px; }
  .site-footer .wrap { flex-direction: column-reverse; align-items: center; text-align: center; border-top: 0; padding-top: 0; gap: 16px; }
  .footer-links { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid rgba(21,32,81,.2); border-bottom: 1px solid rgba(21,32,81,.2); }
  .footer-links a { display: flex; align-items: center; justify-content: center; min-height: 48px; font-weight: 700; text-decoration: none; }
  .footer-links li + li a { border-left: 1px solid rgba(21,32,81,.2); }

  .sticky-get {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(254,254,254,.96); box-shadow: 0 -6px 20px rgba(21,32,81,.12);
    transition: transform .25s ease;
  }
  .sticky-get.is-hidden { transform: translateY(110%); }
  .sticky-get img { width: 40px; height: 40px; border-radius: 10px; }
  .sticky-get .label { flex: 1; min-width: 0; line-height: 1.25; }
  .sticky-get strong { display: block; font-size: 15px; }
  .sticky-get .sub { font-size: 13px; color: var(--ink-2); }
  .sticky-get .store-link {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; line-height: 1;
    border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 700; font-size: 15px;
  }
}

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