/* BetterMiles marketing site — faithful recreation of the live Squarespace site.
   Exact palette + type from the live site:
   navy #171D3A, lavender #E5E9FD, gold #FBBE04, green #03F849, orange CTA #FC9407,
   Manrope (display) + Nunito Sans (body). */

:root {
  --navy: #171D3A;
  --lavender: #E5E9FD;
  --gold: #FBBE04;
  --green: #03F849;
  --peach: #FFC49A;
  --orange: #FC9407;
  --ink: #171D3A;
  --muted: rgba(23, 29, 58, 0.72);
  --radius: 20px;
  --pill: 999px;
  --maxw: 2200px;
  --shadow: 0 18px 44px rgba(23, 29, 58, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Sticky footer: short pages (Get your Tee, Contact) used to end early and leave
   a band of bare body background under the footer. The navy body colour also
   makes any overscroll blend into the footer instead of flashing lavender. */
body {
  margin: 0;
  font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--navy);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* Stretch the LAST section rather than `main` itself, so the leftover space
   keeps that section's own colour instead of exposing the body underneath. */
main { flex: 1 0 auto; display: flex; flex-direction: column; }
main > section:last-child { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }

h1, h2, h3, h4 {
  font-family: "Manrope", system-ui, sans-serif;
  line-height: 1.05;
  margin: 0 0 0.4em;
  letter-spacing: -0.02em;
}
p { margin: 0 0 1rem; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 56px; }
/* The min has to be phone-sized (22px), not 56px: clamp() takes the MIN when the
   preferred value is small, so a 56px floor indented every paragraph on a 390px
   screen and made the copy read as a narrow column. */
.section-light > .container, .section-navy > .container { padding-left: clamp(22px, 8vw, 150px); padding-right: clamp(22px, 8vw, 150px); }

/* ---------- Header (transparent, over the navy hero) ---------- */
.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 50;
  padding: 22px 0;
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.brand {
  font-family: "Manrope", sans-serif; font-weight: 800; font-size: 1.6rem;
  color: var(--gold); text-decoration: none; letter-spacing: -0.02em; white-space: nowrap;
}
.nav-links { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.nav-links a {
  text-decoration: none; color: #fff; font-weight: 400; font-size: 1rem;
  font-family: "Nunito Sans", sans-serif; opacity: 0.92;
}
.nav-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
.nav-links a.active { text-decoration: underline; text-underline-offset: 5px; }

/* Header over a LIGHT page (the peach FAQ): navy brand + navy links. */
.site-header.on-light .brand { color: var(--navy); font-weight: 500; }
.site-header.on-light .nav-links a { color: var(--navy); }
.site-header.on-light .nav-toggle span { background: var(--navy); }

/* ---------- Mobile menu (hamburger + full-screen overlay) ----------
   Two-line burger, matching the live site. Hidden on desktop; below 900px it
   replaces the inline links and the links become a navy overlay of gold items. */
.nav-toggle {
  display: none; position: relative; z-index: 120;
  width: 40px; height: 34px; padding: 0; border: 0; background: none; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; width: 32px; margin: 0 auto; border-radius: 2px;
  background: var(--gold); transition: transform 0.22s ease, opacity 0.18s ease;
}
.nav-toggle span + span { margin-top: 9px; }
body.menu-open .nav-toggle span { background: var(--gold); }
body.menu-open .nav-toggle span:first-child { transform: translateY(5.5px) rotate(45deg); }
body.menu-open .nav-toggle span:last-child { transform: translateY(-5.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  /* Toggle with `display`, never with a transitioned `visibility`: transitioning
     visibility latched the overlay at hidden, so the menu locked scroll and
     swapped the burger to an X while showing nothing. Fade in with a keyframe
     instead, which cannot get stuck. */
  .nav-links {
    position: fixed; inset: 0; z-index: 110;
    display: none; flex-direction: column; align-items: center; justify-content: center;
    gap: 26px; background: var(--navy);
  }
  .nav-links a {
    color: var(--gold); font-family: "Manrope", sans-serif; font-weight: 500;
    font-size: clamp(1.7rem, 7vw, 2.4rem); opacity: 1; padding: 4px 10px;
  }
  .site-header.on-light .nav-links a { color: var(--gold); }
  .nav-links a.active { text-decoration: none; }
  body.menu-open { overflow: hidden; }
  body.menu-open .nav-links { display: flex; animation: menuIn 0.18s ease-out; }
  @keyframes menuIn { from { opacity: 0; } to { opacity: 1; } }
  /* Keep the brand readable above the overlay while it is open. */
  body.menu-open .brand { position: relative; z-index: 120; color: var(--gold); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font-family: "Manrope", sans-serif; font-weight: 700; font-size: 1rem; letter-spacing: 0.02em;
  padding: 18px 44px; border-radius: var(--pill); border: 2px solid transparent;
  white-space: nowrap;
  transition: transform 0.12s ease, background 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 12px 26px rgba(252,148,7,0.35); }
.btn-primary:hover { background: #e88600; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.55); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); }

/* ---------- Hero (navy, big two-tone display text, left-aligned) ---------- */
/* The header is position:absolute, so every first-in-page section must reserve
   room for it. On a phone the header is ~82px tall, hence the 120px floor —
   anything smaller and the nav sits on top of the first line of copy. */
.page-top { padding-top: clamp(120px, 11vw, 150px) !important; }
.hero { background: var(--navy); color: #fff; padding: 136px 0 88px; overflow: hidden; }
.hero h1 { font-weight: 800; letter-spacing: -0.03em; line-height: 1.0; font-size: clamp(2.4rem, 5vw, 4rem); margin: 0; }
.hero-inner { width: min(1320px, calc(100% - clamp(44px, 6vw, 112px))); margin: 0 auto; }
.fit { white-space: nowrap; font-family: "Manrope", sans-serif; font-weight: 500; line-height: 1.0; letter-spacing: -0.02em; font-size: 8vw; }
.fit.gold { color: var(--gold); }
.fit.green { color: var(--green); }
.hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); max-width: 640px; margin: 20px 0 28px; color: rgba(255,255,255,0.82); }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-navy { background: var(--navy); color: #fff; }
.section-navy h1, .section-navy h2, .section-navy h3 { color: #fff; }
.section-navy p { color: rgba(255,255,255,0.8); }
.section-light { background: var(--lavender); }
.eyebrow { font-family: "Manrope", sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; color: var(--orange); margin-bottom: 14px; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 800; }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 700; }

/* ---------- Home intro + app showcase ---------- */
.intro-lead {
  font-family: "Nunito Sans", sans-serif; font-weight: 600;
  font-size: clamp(1.2rem, 1.9vw, 1.7rem); line-height: 1.34; color: var(--ink);
  max-width: none; margin: 0 0 70px;
}
.intro-lead strong { font-weight: 800; }
.app-row { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
/* min-width:0 + max-width:100% keep the 380px basis from forcing the page wider
   than a 320px phone (it overflowed on iPhone SE before). */
.app-col { flex: 0 1 380px; min-width: 0; max-width: 100%; }
.app-copy { font-size: 1.25rem; color: var(--ink); max-width: 430px; }
.app-copy strong { font-weight: 800; }
.app-cta-q { font-family: "Manrope", sans-serif; font-weight: 800; font-size: 1.2rem; color: var(--ink); margin: 26px 0 22px; max-width: 380px; }
/* The wide pill matches the live site on desktop, but a fixed 96px side padding
   pushed the button past a 320px phone — clamp it instead. */
.app-col .btn-primary { padding: 23px clamp(30px, 13vw, 96px); font-size: 1.05rem; max-width: 100%; }
.phones { display: flex; align-items: flex-end; gap: 14px; flex: 0 1 auto; }
.phones img { width: 100%; max-width: 165px; border-radius: 26px; box-shadow: var(--shadow); }
.store-col { display: flex; flex-direction: column; gap: 22px; flex: 0 0 auto; }
.store-col img { width: 250px; height: auto; border-radius: 12px; }

/* ---------- Our Story (navy field, copy left, round portrait right) ---------- */
.story { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 70px; align-items: center; }
.story p {
  font-family: "Nunito Sans", sans-serif; font-size: clamp(1.05rem, 1.1vw, 1.3rem);
  line-height: 1.55; color: #fff; margin: 0 0 1.15em; max-width: 62ch;
}
.story p.opening { font-weight: 700; }
.story p.byline { margin-top: 1.6em; margin-bottom: 0; }
.story a { color: #fff; text-underline-offset: 4px; }
.story-portrait {
  width: clamp(200px, 22vw, 360px); aspect-ratio: 1; border-radius: 50%;
  object-fit: cover; justify-self: end;
}

@media (max-width: 900px) {
  .story { grid-template-columns: 1fr; gap: 36px; justify-items: center; }
  .story-portrait { justify-self: center; order: -1; }
}

/* ---------- Content / prose ---------- */
.center { text-align: center; }
.center .lead, .center .eyebrow { margin-left: auto; margin-right: auto; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); max-width: 660px; }
.prose { max-width: 760px; margin: 0 auto; }
.prose h3 { margin-top: 1.5em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.card { background: #fff; border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow); }

/* ---------- Charities ---------- */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; margin-top: 40px; }
.logo-card { background: #fff; border-radius: var(--radius); padding: 26px; display: flex; align-items: center; justify-content: center; min-height: 130px; box-shadow: var(--shadow); }
.logo-card img { max-height: 78px; width: auto; object-fit: contain; }

/* ---------- FAQ (peach page: title left, accordion right) ----------
   Matches the live site: peach #FFC49A field, navy type, hairline rules
   between rows, thin "+" toggle on the right. No cards, no shadows. */
.section-peach { background: var(--peach); color: var(--navy); padding: 237px 0 130px; }
.section-peach > .container { padding-left: clamp(24px, 4vw, 77px); padding-right: clamp(24px, 4vw, 106px); }
.faq-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 60px; align-items: start;
}
.faq-title {
  font-family: "Manrope", sans-serif; font-weight: 500; color: var(--navy);
  font-size: clamp(1.9rem, 2.3vw, 2.75rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0;
}
.faq-title .sub { display: block; font-size: 0.42em; font-weight: 500; opacity: 0.62; margin-top: 0.9em; }
.faq details { border-top: 1px solid rgba(23, 29, 58, 0.55); }
.faq details:last-child { border-bottom: 1px solid rgba(23, 29, 58, 0.55); }
.faq summary {
  font-family: "Manrope", sans-serif; font-weight: 500; color: var(--navy);
  font-size: clamp(1.05rem, 1.55vw, 1.9rem); line-height: 1.25; letter-spacing: -0.01em;
  cursor: pointer; padding: 26px 44px 26px 0; list-style: none; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; font-weight: 400; color: var(--navy); line-height: 1;
}
.faq details[open] summary::after { content: "\2013"; }
.faq details > p {
  margin: 0; padding: 0 44px 30px 0; color: var(--navy);
  font-family: "Nunito Sans", sans-serif; font-size: 1.02rem; line-height: 1.6;
}
.faq details > p a { color: var(--navy); text-underline-offset: 3px; }

@media (max-width: 820px) {
  .section-peach { padding: 120px 0 80px; }
  .faq-layout { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- Media hero (playlist / user guide) ---------- */
.media-hero { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-top: 30px; }
.media-hero img { width: 100%; object-fit: cover; }

/* ---------- Footer (minimal) ---------- */
.site-footer { background: var(--navy); color: #fff; padding: 40px 0; }
.site-footer > .container { padding-left: clamp(56px, 8vw, 150px); padding-right: clamp(56px, 8vw, 150px); }
.footer-inner { display: flex; justify-content: flex-end; gap: 56px; flex-wrap: wrap; }
.footer-inner a { color: #fff; text-decoration: underline; text-underline-offset: 5px; font-size: 1rem; opacity: 0.92; }
.footer-inner a:hover { opacity: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .app-row { flex-direction: column; align-items: flex-start; }
  .app-col { flex: 1 1 auto; width: 100%; }
  .phones { flex: 1 1 auto; width: 100%; }
  .store-col { flex-direction: row; margin-left: 0; flex-wrap: wrap; }
}
@media (max-width: 640px) {
  .container { padding: 0 22px; }
  section { padding: 52px 0; }
  .hero { padding: 128px 0 64px; }
  /* auto-fill + a 160px min could not fit two columns once the 18px gap was
     counted, so all 13 charity logos stacked one per row. Pin two per row. */
  .logo-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .logo-card { min-height: 108px; padding: 18px; }
  .logo-card img { max-height: 62px; }
  /* NOTE: do not shrink .nav-links here — below 900px those links ARE the
     full-screen menu overlay, and a small size would break it. */
  /* Three equal columns that can never exceed the row: `max-width:none` on a
     flex row let each screenshot claim 100% and blew the page wide. */
  .phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
  .phones img { width: 100%; max-width: 100%; }
  .store-col img { width: 150px; }
}
