/* MaternaSave: A2 clinical design, with rabit-style stacked section transitions */
:root{
  --blue:#0072C6; --blue-600:#005EA3; --blue-700:#004A80; --blue-50:#EAF4FC;
  --ink:#0E2235; --ink-2:#4A6075; --line:#E3ECF4; --wash:#F5F9FD;
  --hh:76px;                                  /* sticky header height */
  --screen:calc(100svh - var(--hh));          /* one stacked panel */
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;-webkit-font-smoothing:antialiased}
a{color:var(--blue)}a:hover{color:var(--blue-700)}
img{max-width:100%}
:focus-visible{outline:3px solid #F2A65A;outline-offset:3px;border-radius:4px}
.g2,.g3,.g4{display:grid;gap:24px}
.g2{grid-template-columns:repeat(2,minmax(0,1fr))}.g3{grid-template-columns:repeat(3,minmax(0,1fr))}.g4{grid-template-columns:repeat(4,minmax(0,1fr))}

/* header */
.top{position:sticky;top:0;z-index:40;background:#fff}
.top-in{height:var(--hh)}
.top a[href="#contact"]{white-space:nowrap}

/* section anchors land below the sticky header */
section[id]{scroll-margin-top:var(--hh)}

/* ---------- stacked transitions (same mechanics as the rabit site) ----------
   1. Sections are full-screen panels that stick under the header; each next panel
      slides up over the one before, at every screen width (as on rabit).
   2. "How it works" steps stack: each step sticks a little lower than the one before,
      so earlier step titles stay visible as a growing stack.
   3. Headings rise into place as they scroll in.
   Works at every screen size: app.js makes a panel taller than the screen stick by its
   bottom edge, so its whole content scrolls past before the next panel covers it. */
.panel{position:sticky;top:var(--hh);min-height:var(--screen);display:flex;flex-direction:column;justify-content:center;background:#fff}
.panel.sec{padding-top:64px!important;padding-bottom:64px!important}
.panel ~ .panel{box-shadow:0 -24px 48px rgba(14,34,53,.16)}
.how{position:relative;z-index:1;box-shadow:0 -24px 48px rgba(14,34,53,.16)}

.steps{--peek:80px;margin-top:8px}
.step{position:sticky;top:calc(var(--hh) + var(--i) * var(--peek));background:#F5F9FD;border-top:1.5px solid #C5D3E0;
  padding:22px 0 0;display:grid;grid-template-columns:72px minmax(0,1fr);gap:16px 32px;align-items:start;align-content:start;
  min-height:calc(var(--screen) - var(--i) * var(--peek))}
.step-n{font:800 18px/1 Manrope,sans-serif;color:#0072C6;padding-top:14px;font-variant-numeric:tabular-nums}
.step-t{margin:0;font:800 clamp(28px,3vw,42px)/1.08 Manrope,sans-serif;letter-spacing:-.03em;color:#0E2235}
@media (min-width:861px){.step-t{white-space:nowrap}}
.step:last-child .step-t{color:#0072C6}
.step p{grid-column:2;margin:0;color:#4A6075;font-size:20px;line-height:1.5;max-width:44ch}
.steps-hold{height:30svh}
@media (max-width:860px){
  .steps{--peek:80px}
  .step{grid-template-columns:minmax(0,1fr);gap:8px;padding-top:16px}
  .step-n{padding-top:0}
  .step-t{font-size:22px;white-space:nowrap}
  .step p{grid-column:1;font-size:17px;padding-top:8px}
}
@media (max-height:560px){.steps{--peek:46px}.step{padding-top:12px;gap:8px 24px}.step-t{font-size:24px}.step-n{padding-top:6px;font-size:15px}.step p{font-size:16px}}

/* scroll-linked entrance where supported; resting state is fully visible */
@supports (animation-timeline: view()){
  @media (prefers-reduced-motion:no-preference){
    .rise{animation:rise linear both;animation-timeline:view();animation-range:entry 0% entry 80%}
    @keyframes rise{from{transform:translateY(18%)}to{transform:none}}
  }
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
}

/* form */
.form-status{margin:0;font-size:15px;color:var(--ink-2);min-height:1.2em}

@media (max-width:860px){
  .g2,.g3,.g4{grid-template-columns:minmax(0,1fr)!important}
  .nav-links{display:none!important}
  .h1{font-size:40px!important}.h2{font-size:30px!important}
  .sec{padding:64px 0!important}
  .facts{flex-direction:column!important}
  .facts p{border-left:0!important;border-top:1px solid var(--line)}
  .top a[href="#contact"]{padding:0 14px!important;font-size:14px!important}
}

footer{position:relative;z-index:1;background:#fff}
