/* ============================================================
   Hydrivity — marketing site styles
   Friendly, rounded, water-themed. Palette pulled from the app.
   ============================================================ */

:root {
  --blue-900: #0B2545;   /* deep navy ink */
  --blue-700: #0059D9;   /* app primary */
  --blue-500: #1E8FFF;   /* app sky blue */
  --blue-300: #5FB8FF;
  --blue-100: #E8F3FF;
  --blue-50:  #F2F8FF;
  --gold:     #FFD700;   /* goal / accent */
  --gold-dk:  #E0A800;
  --green:    #1FAE6A;
  --purple:   #7C3AED;
  --pink:     #FF8FB0;

  --ink:      #0B2545;
  --ink-soft: #45617E;
  --white:    #ffffff;

  --shadow-sm: 0 2px 8px rgba(11,37,69,.08);
  --shadow-md: 0 12px 30px rgba(11,37,69,.12);
  --shadow-lg: 0 30px 70px rgba(11,37,69,.18);

  --radius:    22px;
  --radius-lg: 34px;

  --font-display: "Baloo 2", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, sans-serif;

  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, .display { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.01em; }

a { color: var(--blue-700); text-decoration: none; }

img { max-width: 100%; display: block; }

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-weight: 800;
  font-size: .78rem;
  color: var(--blue-500);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  border: 0; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--primary {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: #fff;
  box-shadow: 0 10px 24px rgba(0,89,217,.35);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(0,89,217,.42); }
.btn--ghost {
  background: var(--white);
  color: var(--blue-700);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.appstore {
  display: inline-flex; align-items: center; gap: .7rem;
  background: var(--ink);
  color: #fff;
  padding: .7rem 1.3rem .7rem 1.1rem;
  border-radius: 16px;
  font-family: var(--font-display);
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 10px 24px rgba(11,37,69,.28);
}
.appstore:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(11,37,69,.34); }
.appstore svg { width: 26px; height: 26px; fill: #fff; }
.appstore small { display: block; font-size: .62rem; font-weight: 600; opacity: .8; letter-spacing: .04em; text-transform: uppercase; line-height: 1; }
.appstore strong { display: block; font-size: 1.18rem; font-weight: 700; line-height: 1.15; }
.appstore.is-soon { background: #1b3a5e; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(11,37,69,.06);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.nav__logo { display: flex; align-items: center; gap: .55rem; font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; color: var(--ink); }
.nav__logo img { width: 34px; height: 34px; }
.nav__links { display: flex; align-items: center; gap: 1.8rem; list-style: none; margin: 0; padding: 0; }
.nav__links a { color: var(--ink-soft); font-weight: 700; }
.nav__links a:hover { color: var(--blue-700); }
.nav__cta { padding: .55rem 1.2rem; font-size: .98rem; }
.nav__burger { display: none; background: none; border: 0; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(95,184,255,.35), transparent 60%),
    linear-gradient(180deg, var(--blue-50), #fff 70%);
  padding: 70px 0 40px;
  overflow: hidden;
}
.hero__grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center;
}
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin: .4rem 0 1rem; color: var(--blue-900); }
.hero h1 .wave { color: var(--blue-700); }
.hero p.lede { font-size: 1.22rem; color: var(--ink-soft); max-width: 30ch; margin: 0 0 1.6rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero__note { margin-top: 1rem; font-size: .92rem; color: var(--ink-soft); display: flex; align-items: center; gap: .4rem; }

.hero__stats { display: flex; gap: 28px; margin-top: 2.2rem; }
.hero__stats .stat { text-align: center; }
.hero__stats .stat strong { font-family: var(--font-display); font-size: 1.7rem; color: var(--blue-700); display: block; }
.hero__stats .stat span { font-size: .85rem; color: var(--ink-soft); }

/* floating droplets */
.bubble { position: absolute; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.8), rgba(95,184,255,.5)); opacity: .5; animation: float 7s ease-in-out infinite; }
.bubble.b1 { width: 90px; height: 90px; left: 6%; top: 30%; animation-delay: 0s; }
.bubble.b2 { width: 46px; height: 46px; left: 46%; top: 12%; animation-delay: 1.2s; }
.bubble.b3 { width: 64px; height: 64px; right: 8%; bottom: 14%; animation-delay: 2.1s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-22px); } }

/* ---------- Phone mockup ---------- */
.phone {
  width: 300px; max-width: 78vw;
  margin: 0 auto;
  background: #0c1424;
  border-radius: 46px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: bob 6s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-12px) rotate(-.4deg); } }
.phone__screen {
  background: #fff; border-radius: 36px; overflow: hidden;
  aspect-ratio: 9 / 19.3; display: flex; flex-direction: column;
  position: relative;
}
/* Drop-in hero video: hidden until media/hero.mp4 loads, then replaces the CSS mockup */
.phone__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; background: #fff; z-index: 2; }
.phone__notch { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 92px; height: 22px; background: #0c1424; border-radius: 0 0 14px 14px; z-index: 3; }
/* In-app mockup mirrors the real app: system font (SF Pro), droplet above wordmark */
.scr { padding: 34px 18px 16px; flex: 1; display: flex; flex-direction: column; align-items: center;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif; }
.scr * { font-family: inherit; }
.scr__brand { display: flex; flex-direction: column; align-items: center; gap: .1rem; font-weight: 800; font-size: 1.5rem; letter-spacing: -.01em; color: #0a0a0a; }
.scr__drop { width: 26px; height: 30px; margin-bottom: 3px; }
.scr__sub { font-size: .82rem; color: var(--blue-500); font-weight: 600; margin-bottom: 16px; }
.scr__addlabel { font-weight: 700; font-size: .92rem; color: #0a0a0a; margin: 6px 0 8px; }

/* progress ring */
.ring { position: relative; width: 170px; height: 170px; margin: 6px 0 14px; }
.ring svg { transform: rotate(-90deg); }
.ring__track { fill: none; stroke: var(--blue-100); stroke-width: 14; }
.ring__bar { fill: none; stroke: url(#ringgrad); stroke-width: 14; stroke-linecap: round; stroke-dasharray: 471; stroke-dashoffset: 132; }
.ring__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring__center b { font-weight: 800; font-size: 2.1rem; color: #0a0a0a; letter-spacing: -.01em; }
.ring__center .pct { color: var(--blue-500); font-weight: 700; font-size: .95rem; }
.ring__center small { color: #8a8a8e; font-size: .72rem; }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin-top: 4px; }
.quick button { font-weight: 600; font-size: .86rem; color: #0a0a0a; background: var(--blue-100); border: 0; border-radius: 13px; padding: .7rem; display: flex; align-items: center; justify-content: center; gap: .35rem; }
.quick button::before { content: "💧"; font-size: .8rem; }

.log { width: 100%; margin-top: 12px; }
.log__row { display: flex; justify-content: space-between; font-size: .72rem; color: var(--ink-soft); padding: .35rem .1rem; border-top: 1px solid var(--blue-50); }
.log__row b { color: var(--ink); }

/* ---------- Section base ---------- */
section { position: relative; }
.section { padding: 84px 0; }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 54px; }
.section__head h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); color: var(--blue-900); margin: .5rem 0 .6rem; }
.section__head p { font-size: 1.1rem; color: var(--ink-soft); margin: 0; }

/* wave divider */
.wavesep { display: block; width: 100%; height: 60px; }

/* ---------- Trust strip ---------- */
.trust { background: var(--blue-700); color: #fff; padding: 26px 0; }
.trust__inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 46px; text-align: center; }
.trust__inner .t b { font-family: var(--font-display); font-size: 1.5rem; display: block; }
.trust__inner .t span { opacity: .85; font-size: .9rem; }

/* ---------- Features (alternating) ---------- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 56px 0; }
.feature:nth-child(even) .feature__media { order: 2; }
.feature__tag { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; padding: .35rem .8rem; border-radius: 999px; }
.feature h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--blue-900); margin: 1rem 0 .7rem; }
.feature p { color: var(--ink-soft); font-size: 1.08rem; margin: 0 0 1.2rem; }
.feature ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.feature li { display: flex; align-items: flex-start; gap: .6rem; color: var(--ink); font-weight: 600; }
.feature li::before { content: ""; flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; background: var(--accent, var(--blue-500)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/13px no-repeat; }

.feature__media { display: flex; justify-content: center; }
.mediacard {
  width: 100%; max-width: 420px; aspect-ratio: 4/3;
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  position: relative; overflow: hidden;
  background: var(--mediabg, linear-gradient(135deg, var(--blue-500), var(--blue-700)));
}

/* accent themes per feature */
.accent-blue   { --accent: var(--blue-700); }
.accent-gold   { --accent: var(--gold-dk); }
.accent-night  { --accent: #2c3e66; }
.accent-green  { --accent: var(--green); }
.accent-sky    { --accent: var(--blue-500); }
.accent-purple { --accent: var(--purple); }
.tag-blue   { background: var(--blue-100); color: var(--blue-700); }
.tag-gold   { background: #FFF4CC; color: var(--gold-dk); }
.tag-night  { background: #e4e9f5; color: #2c3e66; }
.tag-green  { background: #d6f6e6; color: var(--green); }
.tag-sky    { background: var(--blue-100); color: var(--blue-500); }
.tag-purple { background: #efe4ff; color: var(--purple); }

/* mini illustrations inside media cards */
.illus { color: #fff; text-align: center; padding: 24px; }
.illus .big { font-family: var(--font-display); font-weight: 800; font-size: 3.2rem; line-height: 1; }
.illus .lbl { opacity: .9; font-weight: 700; margin-top: .4rem; }
.illus .emoji { font-size: 3rem; }
.badgegrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.badgegrid .b { width: 60px; height: 60px; border-radius: 18px; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.confetti span { position: absolute; width: 10px; height: 14px; border-radius: 3px; opacity: .9; animation: fall 3.5s linear infinite; }
@keyframes fall { 0% { transform: translateY(-40px) rotate(0); } 100% { transform: translateY(260px) rotate(360deg); } }

/* ---------- Benefits ---------- */
.benefits { background: var(--blue-50); }
.benefitgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.benefit { background: #fff; border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow-sm); transition: transform .15s ease, box-shadow .15s ease; }
.benefit:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.benefit .ic { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; background: var(--blue-100); margin-bottom: 14px; }
.benefit h4 { font-family: var(--font-display); margin: 0 0 .4rem; font-size: 1.2rem; color: var(--blue-900); }
.benefit p { margin: 0; color: var(--ink-soft); font-size: .96rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--blue-100); border-radius: 16px; padding: 0 22px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; list-style: none; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--blue-900); padding: 18px 0; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--blue-500); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { color: var(--ink-soft); margin: 0 0 18px; }

/* ---------- Final CTA ---------- */
.cta {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  color: #fff; text-align: center; padding: 80px 0; position: relative; overflow: hidden;
}
.cta h2 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 .6rem; }
.cta p { font-size: 1.15rem; opacity: .92; margin: 0 0 1.8rem; }
.cta .appstore { background: #fff; color: var(--ink); box-shadow: 0 14px 40px rgba(0,0,0,.25); }
.cta .appstore svg { fill: var(--ink); }
.cta__drop { position: absolute; font-size: 3rem; opacity: .18; }

/* ---------- Footer ---------- */
.footer { background: var(--blue-900); color: #cdddf0; padding: 56px 0 32px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer__brand { display: flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: #fff; margin-bottom: .8rem; }
.footer__brand img { width: 30px; height: 30px; }
.footer p { color: #9fb6d2; font-size: .95rem; max-width: 34ch; }
.footer h5 { font-family: var(--font-display); color: #fff; font-size: 1rem; margin: 0 0 .8rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer a { color: #9fb6d2; }
.footer a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; font-size: .85rem; color: #7e98b8; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero p.lede { margin-left: auto; margin-right: auto; }
  .hero__cta, .hero__stats { justify-content: center; }
  .hero__media { order: -1; margin-bottom: 12px; }
  .feature { grid-template-columns: 1fr; gap: 28px; text-align: center; }
  .feature:nth-child(even) .feature__media { order: 0; }
  .feature ul { display: inline-grid; text-align: left; }
  .feature__media { order: -1; }
  .benefitgrid { grid-template-columns: 1fr 1fr; }
  .nav__links { display: none; }
  .footer__grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .benefitgrid { grid-template-columns: 1fr; }
  .trust__inner { gap: 14px 28px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Drop-in screenshot slots (feature cards) ----------
   Each feature card shows its CSS illustration until a real screenshot
   loads from /screens/. Then JS reveals .shotwrap and hides the illustration. */
.shotwrap { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 20px; z-index: 2; }
.shotwrap:not([hidden]) { display: flex; } /* the hidden attr must actually hide it */
.shotframe { height: 90%; aspect-ratio: 9 / 19.3; max-width: 62%; background: #0c1424; border-radius: 26px; padding: 7px; box-shadow: var(--shadow-md); }
.shotframe__screen { width: 100%; height: 100%; border-radius: 20px; overflow: hidden; background: #fff; }
.shotframe__screen .shot { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Apple Watch image (05-watch-framed.png) — frame is baked into the PNG, shown as-is */
.shot--free { max-height: 96%; max-width: 90%; width: auto; height: auto; object-fit: contain; }
