/* ============================================================================
   MyBoddie — Marketing landing page styles
   1:1 port of myboddie-apple.html. Tokens come from tokens.css (DESIGN.md §2).
   Light theme. Every animation has a prefers-reduced-motion freeze-to-end
   fallback (bottom of file). White text only on dark / saturated bands.
   ========================================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sf);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.374px;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.08; font-weight: 600; }
a { color: inherit; text-decoration: none; }

.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--ink-2); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.chip {
  font-size: 13px; font-weight: 600; padding: 5px 11px; border-radius: 980px;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip-amber { background: rgba(232, 145, 58, 0.14); color: var(--amber-ink); }
.chip-green { background: rgba(48, 164, 108, 0.14); color: var(--green-ink); }

.card { background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); }

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 980px; font-weight: 400; cursor: pointer; border: none;
  transition: filter .2s, transform .12s;
  font-family: var(--sf);
}
.pill-blue { background: var(--blue); color: #fff; padding: 7px 16px; font-size: 14px; }
.pill-blue:hover { filter: brightness(1.06); }
.pill-blue:active { transform: scale(.98); }
.pill-lg { padding: 12px 22px; font-size: 17px; }
.pill-white { background: #fff; color: var(--ink); padding: 12px 22px; font-size: 17px; }

.link-cta { color: var(--blue-link); font-size: 17px; display: inline-flex; align-items: center; gap: 4px; }
.link-cta:hover { text-decoration: underline; }

/* Visible keyboard focus on every interactive element (DESIGN.md §8) */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 6px;
}
.pill:focus-visible { outline-offset: 3px; border-radius: 980px; }

/* Skip link for keyboard / screen-reader users */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--ink);
  padding: 10px 16px; border-radius: 12px; box-shadow: var(--shadow);
  font-size: 14px; font-weight: 600;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

/* ---------------------------------------------------------------- nav */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 52px;
  background: rgba(245, 245, 247, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--hair);
}
.nav-in {
  max-width: var(--maxw); margin: 0 auto; height: 100%; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 19px; letter-spacing: -0.02em; }
.brand .mark {
  width: 20px; height: 20px; border-radius: 6px;
  background: var(--grad-brand); display: grid; place-items: center;
}
.brand .mark svg { width: 13px; height: 13px; stroke: #fff; fill: none; stroke-width: 2.2; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { font-size: 14px; color: var(--ink-2); font-weight: 400; }
.nav-links a:hover { color: var(--ink); }
.nav-links .pill-blue { padding: 6px 15px; font-size: 14px; }
@media (max-width: 680px) { .nav-links a:not(.pill) { display: none; } }

/* ---------------------------------------- HERO: colour aurora + 2-col */
header { position: relative; overflow: hidden; padding: 118px 0 76px; }
.aurora { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.b1 { width: 560px; height: 560px; background: radial-gradient(circle, #FF6F91, transparent 68%); top: -200px; left: -140px; animation: float1 26s ease-in-out infinite; }
.b2 { width: 520px; height: 520px; background: radial-gradient(circle, #34C759, transparent 70%); top: -120px; right: -120px; animation: float2 30s ease-in-out infinite; }
.b3 { width: 480px; height: 480px; background: radial-gradient(circle, #32ADE6, transparent 70%); bottom: -200px; left: 18%; animation: float3 24s ease-in-out infinite; }
.b4 { width: 440px; height: 440px; background: radial-gradient(circle, #A78BFA, transparent 70%); bottom: -160px; right: 6%; animation: float1 28s ease-in-out infinite reverse; }
@keyframes float1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(50px, 40px) scale(1.12); } }
@keyframes float2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-40px, 50px) scale(1.08); } }
@keyframes float3 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, -40px) scale(1.1); } }

.hero-grid {
  position: relative; z-index: 1; display: grid;
  grid-template-columns: 0.92fr 1.08fr; gap: 44px; align-items: center;
}
.hero-copy h1 { font-size: clamp(38px, 5.2vw, 62px); max-width: 13ch; margin: 14px 0 0; }
.hero-copy .sub {
  font-size: clamp(18px, 2vw, 22px); color: var(--ink-2); max-width: 30ch;
  margin: 18px 0 0; font-weight: 400; line-height: 1.34; letter-spacing: -0.01em;
}
.cta-row { display: flex; gap: 14px; align-items: center; margin: 28px 0 0; flex-wrap: wrap; }
.icon-row { display: flex; gap: 10px; margin-bottom: 18px; }
.icon-row span { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; box-shadow: var(--shadow); }
.icon-row span svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 1.9; }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-copy h1, .hero-copy .sub { max-width: none; }
}

/* ------------------------------------------------- live vitals panel */
.live { padding: 22px 24px 22px; text-align: left; }
.live-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.live-head .label { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; }
.live-top { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; }
.rings-wrap { display: flex; align-items: center; gap: 14px; }
.rings { width: 112px; height: 112px; flex: none; }
.ring-bg { fill: none; stroke-width: 11; }
.ring-arc { fill: none; stroke-width: 11; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 59px 59px; }
.r1 { stroke-dasharray: 289; stroke-dashoffset: 64; animation: r1 1.3s cubic-bezier(.3, .8, .3, 1) .15s both; }
.r2 { stroke-dasharray: 226; stroke-dashoffset: 81; animation: r2 1.3s cubic-bezier(.3, .8, .3, 1) .25s both; }
.r3 { stroke-dasharray: 163; stroke-dashoffset: 16; animation: r3 1.3s cubic-bezier(.3, .8, .3, 1) .35s both; }
@keyframes r1 { from { stroke-dashoffset: 289; } }
@keyframes r2 { from { stroke-dashoffset: 226; } }
@keyframes r3 { from { stroke-dashoffset: 163; } }
.rings-legend { display: flex; flex-direction: column; gap: 7px; }
.rings-legend div { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }

.ecg {
  position: relative; height: 112px; overflow: hidden; border-radius: 14px;
  background: rgba(255, 55, 95, 0.05);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ecg-track { position: absolute; inset: 0; width: 200%; animation: ecg 9s linear infinite; }
.ecg-track svg { width: 100%; height: 100%; display: block; }
@keyframes ecg { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.tile { border-radius: 16px; padding: 14px 15px; display: flex; flex-direction: column; gap: 8px; }
.tile.heart { background: rgba(255, 55, 95, 0.08); }
.tile.rec { background: rgba(48, 164, 108, 0.09); }
.tile.sleep { background: rgba(123, 97, 255, 0.08); }
.t-label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; display: flex; align-items: center; gap: 7px; }
.t-val { font-size: 27px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.t-val small { font-size: 13px; font-weight: 600; letter-spacing: 0; opacity: .6; }
.tile.heart .t-val { color: var(--heart); }
.tile.rec .t-val { color: #258A52; }
.tile.sleep .t-val { color: var(--sleep); }

.spark { width: 100%; height: 24px; display: block; }
.spark polyline { stroke-dasharray: 260; stroke-dashoffset: 0; }
.figure.in .spark polyline { animation: draw 1.2s ease-out .3s both; }
@keyframes draw { from { stroke-dashoffset: 260; } to { stroke-dashoffset: 0; } }
.bar { transform-origin: bottom; }
.figure.in .bar { animation: bar .7s cubic-bezier(.3, .8, .3, 1) both; }
@keyframes bar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (max-width: 620px) {
  .live-top { grid-template-columns: 1fr; gap: 16px; }
  .tiles { grid-template-columns: 1fr; }
  .ecg { height: 90px; }
}

/* ------------------------------------------------------------ sections */
section { padding: 84px 0; }
.sec-white { background: var(--surface); }
.sec-head { max-width: 38ch; }
.sec-head h2 { font-size: clamp(30px, 4.4vw, 48px); }
.sec-head p { color: var(--ink-2); margin-top: 14px; font-size: 19px; line-height: 1.45; max-width: 46ch; }

.sources { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 44px; }
.src { border-radius: 18px; padding: 22px; box-shadow: var(--shadow); transition: transform .2s; }
.src:hover { transform: translateY(-3px); }
.src.s-heart { background: rgba(255, 55, 95, 0.07); }
.src.s-sleep { background: rgba(123, 97, 255, 0.07); }
.src.s-lab { background: rgba(14, 165, 164, 0.07); }
.src.s-nutri { background: rgba(48, 164, 108, 0.08); }
.src .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 14px; }
.src .ic svg { width: 19px; height: 19px; fill: none; stroke-width: 1.8; stroke: #fff; }
.src h3 { font-size: 17px; font-weight: 600; margin-bottom: 5px; }
.src p { font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.src .tag { font-size: 11px; font-weight: 600; color: var(--ink-3); margin-top: 10px; display: block; }
@media (max-width: 860px) { .sources { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .sources { grid-template-columns: 1fr; } }

/* --------------------------------- full-bleed colour bands (animated) */
.band { position: relative; overflow: hidden; color: #fff; padding: 92px 0; }
.band-normal { background: var(--grad-band-normal); background-size: 220% 220%; animation: shift 22s ease infinite; }
.band-privacy { background: var(--grad-band-privacy); background-size: 220% 220%; animation: shift 28s ease infinite; }
@keyframes shift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.band .wrap { position: relative; z-index: 1; }
.band-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.band-grid.flip .visual { order: 2; }
.band h2 { font-size: clamp(30px, 4.4vw, 48px); color: #fff; }
.band .eyebrow { color: rgba(255, 255, 255, 0.75); }

/* Text scrim — white copy on the saturated "normaal" band only reaches ~2.6:1
   on its lightest (teal) stop, so the TEXT COLUMN sits on a subtle dark scrim
   to reach WCAG AA (DESIGN.md §4 / §5). The signature gradient is untouched;
   this backs the text block, not the band. The scrim is inset and rounded so
   it reads as an on-brand soft panel rather than a hard box. */
.band-text { position: relative; }
.band-text::before {
  content: ""; position: absolute; z-index: -1;
  inset: -22px -26px;
  background: var(--band-text-scrim);
  border-radius: 22px;
}
@media (max-width: 820px) {
  .band-text::before { inset: -18px -20px; }
}
.band p.lead { color: rgba(255, 255, 255, 0.86); font-size: 19px; line-height: 1.45; margin-top: 14px; max-width: 42ch; }
.band .states { margin-top: 24px; display: flex; flex-direction: column; gap: 13px; }
.band .state { display: flex; align-items: flex-start; gap: 12px; }
.band .state .sdot { width: 12px; height: 12px; border-radius: 50%; flex: none; margin-top: 5px; }
.band .state b { font-weight: 600; font-size: 15px; color: #fff; }
.band .state span { display: block; color: rgba(255, 255, 255, 0.8); font-size: 14px; margin-top: 1px; line-height: 1.4; }
@media (max-width: 820px) {
  .band-grid { grid-template-columns: 1fr; gap: 30px; }
  .band-grid.flip .visual { order: 0; }
}

.chart-card { padding: 24px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.chart-head .label { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15px; color: var(--ink); }
.chart-svg { width: 100%; height: 188px; display: block; margin-top: 6px; }
.chart-foot { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; color: var(--ink-3); }

/* --------------------------------------------- privacy band content */
.priv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.priv .p { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 18px; padding: 24px; }
.priv .p .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 14px; }
.priv .p .ic svg { width: 19px; height: 19px; fill: none; stroke: #fff; stroke-width: 1.8; }
.priv .p:nth-child(1) .ic { background: var(--blue); }
.priv .p:nth-child(2) .ic { background: var(--green); }
.priv .p:nth-child(3) .ic { background: var(--sleep); }
.priv .p b { font-weight: 600; font-size: 16px; display: block; margin-bottom: 5px; color: #fff; }
.priv .p p { font-size: 14px; color: rgba(255, 255, 255, 0.78); line-height: 1.45; }
@media (max-width: 760px) { .priv { grid-template-columns: 1fr; } }

/* --------------------------------------------------------- CTA block */
.cta-block { text-align: center; }
.cta-block h2 { font-size: clamp(30px, 4.4vw, 48px); max-width: 18ch; margin: 0 auto; }
.cta-block p { color: var(--ink-2); font-size: 19px; margin: 16px auto 0; max-width: 40ch; }
.signup { display: flex; gap: 10px; max-width: 420px; margin: 30px auto 0; }
.signup input {
  flex: 1; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--hair);
  background: var(--surface); font-family: var(--sf); font-size: 16px; color: var(--ink); letter-spacing: -0.2px;
}
.signup input::placeholder { color: var(--ink-3); }
.signup input:focus { outline: 2px solid var(--blue); outline-offset: 1px; border-color: transparent; }
.fine { font-size: 12px; color: var(--ink-3); margin-top: 14px; }
@media (max-width: 480px) { .signup { flex-direction: column; } .signup .pill { width: 100%; } }

/* ------------------------------------------------------------- footer */
footer { background: var(--canvas); border-top: 1px solid var(--hair); padding: 34px 0; color: var(--ink-3); font-size: 13px; }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }

/* ----------------------------------------------------- reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ====================================================================
   prefers-reduced-motion: freeze EVERY animation to its END state.
   (DESIGN.md §2.4 / §8 — non-negotiable)
   ==================================================================== */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .spark polyline { stroke-dashoffset: 0; }

  /* Rings: end-state fill (the offsets the animations resolve to). */
  .r1 { stroke-dashoffset: 64; }
  .r2 { stroke-dashoffset: 81; }
  .r3 { stroke-dashoffset: 16; }

  /* Sleep bars: end-state height. */
  .bar { transform: scaleY(1); }

  /* Aurora blobs settle in their base (0,0) position; gradient bands hold
     their start position. No motion, full visual still present. */
}
