/* ============================================================
   Yoa — Health & Workout Tracker · landing page
   Vanilla CSS. Layout modelled on bitepal.app: a flat illustrated
   hero banner, rating pills, a pinned-phone feature scroll in flat
   pastel panels, testimonials, a Help Center and a footer panel.
   Apple SF Pro Rounded (Nunito fallback).
   ============================================================ */

:root {
  /* —— true Yoa app colours (from the app's asset catalog) —— */
  --ink:        #352F4F;   /* Title */
  --ink-soft:   #9591A2;   /* SecondaryText */
  --ink-faint:  rgba(53, 47, 79, 0.09);
  --paper:      #FFFFFF;   /* Background / WidgetBackground */
  --cream:      #FFFFFF;   /* page background */
  --alt:        #F1F1F4;   /* SecondaryBackground */

  --orange:     #EF9A60;   /* CustomOrange */
  --orange-deep:#DD7F3F;
  --orange-soft:#FCEBDD;

  /* feature accent colours = the app's Custom* palette */
  --c-sleep:    #2E76EC;   /* CustomBlue */
  --c-recovery: #3E9B86;   /* CustomGreen */
  --c-strain:   #EF9A60;   /* CustomOrange */
  --c-bordo:    #D81F2B;   /* CustomRed */
  --c-purple:   #5856E6;   /* CustomPurple */

  --pad: clamp(1.1rem, 3.5vw, 3.5rem);
  --maxw: 80rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --r-lg: 1.6rem;
  --r-md: 1.15rem;
  --shadow: 0 1rem 2.4rem rgba(31, 29, 51, 0.07);
  --shadow-sm: 0 0.4rem 1rem rgba(31, 29, 51, 0.05);
  --bw: 2.5px;            /* card / pill border width */
  --border: rgba(53, 47, 79, 0.12);
  --font: ui-rounded, "SF Pro Rounded", "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink);
  font-size: 1.06rem;
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
em { font-style: normal; color: var(--orange-deep); }

.skip-link {
  position: absolute; left: 0.75rem; top: -3.5rem; z-index: 400;
  padding: 0.6rem 1rem; background: var(--ink); color: #fff;
  font-weight: 700; font-size: 0.85rem; border-radius: 0.7rem;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0.75rem; outline: none; }

/* ---------- Shared headings + reveals ---------- */
.big-head {
  font-weight: 700; font-size: clamp(1.8rem, 4.2vw, 3.2rem);
  line-height: 1.1; letter-spacing: -0.02em;
}
.word { display: inline-block; }
.word > span { display: inline-block; transform: translateY(0.5em); opacity: 0; transition: transform 0.8s var(--ease), opacity 0.8s var(--ease); }
.word > span.in { transform: none; opacity: 1; }
.reveal { opacity: 0; transform: translateY(1.4rem); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.62rem 1.2rem; border-radius: 8rem;
  font-family: var(--font); font-size: 0.95rem; font-weight: 700;
  cursor: pointer; border: none; white-space: nowrap;
  transition: transform 0.3s var(--ease), background 0.25s, opacity 0.2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); opacity: 0.9; }
.btn--lg { padding: 0.85rem 1.6rem; font-size: 1.02rem; }
.btn--block { display: flex; width: 100%; }
.btn--app { background: var(--ink); color: #fff; }
.btn--app:hover { background: #000; }
.btn--app svg { width: 1.25em; height: 1.25em; fill: currentColor; flex-shrink: 0; }
.apple-logo { height: 1.2em; width: auto; flex-shrink: 0; filter: brightness(0) invert(1); }  /* black logo -> white on dark button */
.btn--app__txt { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; text-align: left; }
.btn--app__txt small { font-size: 0.62em; font-weight: 500; opacity: 0.8; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.8rem var(--pad);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), padding 0.3s var(--ease);
}
.nav.scrolled {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 1px 0 rgba(30,29,51,0.06);
  padding-top: 0.55rem; padding-bottom: 0.55rem;
}
.nav__logo { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.nav__logo img { width: 1.9rem; height: 1.9rem; border-radius: 0.55rem; }
.nav__right { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.5rem); }
.nav__press { font-size: 0.95rem; font-weight: 600; color: var(--ink-soft); transition: color 0.2s; }
.nav__press:hover { color: var(--ink); }
.nav__cta { padding: 0.55rem 1.05rem; }
.nav__cta svg { width: 1.15em; height: 1.15em; }
.nav__cta .btn--app__txt small { font-size: 0.58em; }

/* ---------- Desktop QR (scan to download) ---------- */
.qr-float {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 150;
  display: flex; align-items: center; gap: 0.85rem;
  background: var(--ink); border: none;
  border-radius: 1.1rem; padding: 0.7rem 0.85rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.qr-float:hover { transform: translateY(-2px); box-shadow: 0 1.4rem 3rem rgba(53,47,79,0.28); }
.qr-float__txt { display: flex; flex-direction: column; gap: 0.1rem; text-align: left; max-width: 7rem; }
.qr-float__txt strong { font-weight: 700; font-size: 0.95rem; color: #fff; letter-spacing: -0.01em; }
.qr-float__txt small { font-weight: 600; font-size: 0.74rem; color: rgba(255, 255, 255, 0.5); }
.qr-float__code { position: relative; width: 4.25rem; height: 4.25rem; flex-shrink: 0; }
.qr-float__img { width: 100%; height: 100%; border-radius: 0.5rem; display: block; }
/* app icon knocked into the centre of the QR (high-ECC code tolerates it) */
.qr-float__logo {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 1.3rem; height: 1.3rem; border-radius: 0.32rem;
  border: 3px solid var(--ink);   /* gap matching the card so modules are cleared */
  background: #fff; object-fit: cover;
}
/* desktop only — a QR is for scanning with a separate phone */
@media (max-width: 920px), (pointer: coarse) { .qr-float { display: none; } }

/* ---------- Hero ---------- */
/* hero fills exactly one viewport so the banner + both stat badges show without scrolling */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(4.5rem, 8svh, 6rem) var(--pad) clamp(1rem, 2.5svh, 1.5rem);
  gap: clamp(0.9rem, 2.2svh, 1.6rem);
}
.hero-banner {
  position: relative; flex: 0 0 auto;
  height: min(70svh, 45rem);          /* capped so the phone stays well-proportioned + centred */
  width: 100%; max-width: var(--maxw);
  border-radius: 2rem; overflow: hidden;
  background: #E7F0FB;   /* fallback until hero-bg.png is added */
}
.hero-banner__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-banner__head { position: absolute; top: clamp(1.6rem, 4vw, 3rem); left: 0; right: 0; z-index: 3; text-align: center; padding: 0 1rem; }
.hero-banner__title { font-weight: 800; font-size: clamp(1.7rem, 4.4vw, 3.2rem); line-height: 1.06; letter-spacing: -0.025em; color: var(--ink); }
.hero-banner__title .accent { display: block; color: inherit; }
/* phone fills from just under the title down past the banner edge (bleeds) */
.hero-phone { position: absolute; left: 50%; top: clamp(7rem, 13vw, 11rem); bottom: -3rem; transform: translateX(-50%); z-index: 2; display: flex; }
.hero-phone .phone { height: 100%; }

.ratings { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 5vw, 3.5rem); justify-content: center; align-items: center; width: 100%; }
.stat { height: clamp(3.25rem, 5.5vh, 5rem); width: auto; }

/* ---------- Phone (shared) ---------- */
.phone { position: relative; aspect-ratio: 1308 / 2710; }
.phone__screen { position: absolute; top: 1.62%; left: 3.9%; right: 3.9%; bottom: 1.62%; overflow: hidden; border-radius: calc(16% - 2px) / calc(7.4% - 2px); background: #000; }
.phone__device { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; filter: drop-shadow(0 1.6rem 2.6rem rgba(31,29,51,0.22)); }
.hero-phone .phone__screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Features: pinned-phone scroll, FLAT panels ---------- */
.work { padding: clamp(4rem, 8vw, 7rem) var(--pad) clamp(2rem, 5vw, 4rem); }
.work__head { max-width: var(--maxw); margin: 0 auto clamp(2.5rem, 5vw, 4rem); text-align: center; }
.work__head .big-head { margin: 0 auto; max-width: 18ch; }
.work__intro { margin: 1rem auto 0; max-width: 38rem; font-size: clamp(1.02rem, 0.7vw + 0.85rem, 1.2rem); font-weight: 500; color: var(--ink-soft); }

.showcase { position: relative; max-width: var(--maxw); margin: 0 auto; }
.showcase__rects { display: flex; flex-direction: column; gap: clamp(1.25rem, 2.5vw, 2rem); }

/* flat solid pastel panel per feature — no gradients */
.rect {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding: clamp(2rem, 5vw, 5rem); border-radius: 2rem; overflow: hidden;
  background: color-mix(in srgb, var(--rc) 15%, #fff);
}
.rect__body { position: relative; z-index: 1; max-width: 29rem; display: flex; flex-direction: column; gap: 1rem; opacity: 0.45; transform: translateY(0.4rem); transition: opacity 0.55s var(--ease), transform 0.55s var(--ease); }
.rect.active .rect__body { opacity: 1; transform: none; }
.rect__num { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.92rem; font-weight: 600; color: color-mix(in srgb, var(--rc) 60%, var(--ink)); }
.rect__num i { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--rc); }
.rect__name { font-weight: 700; font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.1; letter-spacing: -0.025em; }
.rect__desc { font-size: clamp(1.02rem, 0.7vw + 0.85rem, 1.18rem); font-weight: 500; color: var(--ink-soft); }
.rect__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin-top: 0.4rem; }
.rect__chips li { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.84rem; font-weight: 600; padding: 0.4rem 0.85rem; background: rgba(255,255,255,0.75); border-radius: 8rem; color: var(--ink-soft); }
.rect__chips i { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--rc); }
.rect__phone { display: none; }

/* one phone, pinned while panels scroll past */
.showcase__phone { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.phone-pin { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; justify-content: flex-end; padding-right: clamp(2rem, 8vw, 8rem); }
.phone-stage { position: relative; display: grid; place-items: center; height: 100%; }
.phone-stage .phone { position: relative; z-index: 1; height: min(40rem, 80svh); }
.frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: clip-path; }
.phone-stage .phone__device { filter: drop-shadow(0 2rem 3rem rgba(31,29,51,0.22)); }

.phone-dots { position: absolute; right: clamp(0.5rem, 2vw, 1.4rem); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 0.6rem; z-index: 3; }
.phone-dots b { display: block; width: 0.5rem; height: 0.5rem; border-radius: 8rem; background: var(--ink-faint); transition: height 0.35s var(--ease), background-color 0.35s var(--ease); }
.phone-dots b.on { height: 1.6rem; background: var(--dot, var(--orange)); }
@media (max-width: 1040px) { .phone-dots { display: none; } }

@media (max-width: 820px) {
  .showcase__phone { display: none; }
  .rect {
    min-height: auto; flex-direction: column; align-items: center; text-align: center;
    padding: clamp(1.75rem, 6vw, 2.75rem) clamp(1.5rem, 5vw, 2.5rem) 0;
  }
  .rect__body { max-width: 100%; align-items: center; opacity: 1; transform: none; gap: 1rem; }
  .rect__chips { justify-content: center; }
  .rect__phone {
    --ph: min(24rem, 60svh);
    display: flex; align-items: flex-start; justify-content: center; width: 100%;
    margin-top: 1.6rem; height: calc(var(--ph) * 0.82); overflow: hidden;
  }
  .rect__phone .phone { height: var(--ph); }
  .rect__phone .phone__screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .rect__phone .phone__device { filter: none; }
}

/* ---------- Testimonials ---------- */
.voices { max-width: var(--maxw); margin: 0 auto; padding: clamp(3rem, 7vw, 6rem) var(--pad); text-align: center; }
.voices__head { margin: 0 auto; max-width: 16ch; }
.voices__sub { margin: 0.9rem auto 0; max-width: 38rem; font-weight: 500; color: var(--ink-soft); }
.voices__grid { margin-top: clamp(2rem, 4vw, 3rem); display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.5rem); }
.voice { text-align: left; background: var(--vc); border-radius: var(--r-lg); padding: clamp(1.5rem, 2.5vw, 2rem); display: flex; flex-direction: column; gap: 0.85rem; }
.voice__by { display: flex; align-items: center; gap: 0.4rem; font-weight: 700; font-size: 1rem; }
.voice blockquote { font-size: 1.02rem; font-weight: 500; line-height: 1.5; color: var(--ink); }
@media (max-width: 820px) { .voices__grid { grid-template-columns: 1fr; max-width: 32rem; margin-inline: auto; } }

/* ---------- Help Center ---------- */
.help { max-width: var(--maxw); margin: 0 auto; padding: clamp(2rem, 4vw, 3rem) var(--pad) clamp(3.5rem, 7vw, 6rem); text-align: center; }
.help__head { margin: 0 auto; }
.help__sub { margin: 0.9rem auto 0; max-width: 40rem; font-weight: 500; color: var(--ink-soft); }
.help__grid { margin-top: clamp(2rem, 4vw, 3rem); display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.5rem); }
.help-card { background: #fff; border: var(--bw) solid var(--border); border-radius: var(--r-lg); padding: clamp(1.75rem, 3vw, 2.5rem); display: flex; flex-direction: column; align-items: center; gap: 0.7rem; transition: transform 0.35s var(--ease), box-shadow 0.3s; }
.help-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.help-card__icon { width: 3.4rem; height: 3.4rem; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--hc); margin-bottom: 0.2rem; }
.help-card__icon svg { width: 1.55rem; height: 1.55rem; }
.help-card__icon img { width: auto; height: auto; max-width: 1.65rem; max-height: 1.55rem; filter: brightness(0) invert(1); }  /* black icon -> white on the colour circle */
.help-card h3 { font-size: 1.15rem; font-weight: 700; }
.help-card p { font-size: 0.95rem; font-weight: 500; color: var(--ink-soft); }
@media (max-width: 820px) { .help__grid { grid-template-columns: 1fr; max-width: 28rem; margin-inline: auto; } }

/* ---------- Footer ---------- */
.footer { padding: 0 var(--pad) clamp(1.5rem, 3vw, 2.5rem); }
.footer__panel { max-width: var(--maxw); margin: 0 auto; background: var(--alt); border-radius: 2rem; padding: clamp(2.5rem, 5vw, 4rem) var(--pad); display: flex; flex-direction: column; align-items: center; gap: 1.2rem; text-align: center; }
.footer__logo { color: var(--ink); }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(0.9rem, 2vw, 1.6rem); }
.footer__links a { color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; transition: color 0.2s; }
.footer__links a:hover { color: var(--ink); }
.footer__copy { color: var(--ink-soft); font-size: 0.85rem; font-weight: 500; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .word > span { opacity: 1; transform: none; }
}
