/* =====================================================
   LIFE by Dr. Pat — Modern Medical Editorial v4
   Adds motion, scroll reveals, gradient orbs, animated
   stats, and richer visual sections on top of v3.
   ===================================================== */

/* ---------- Global smoothing & typography ---------- */
* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(224,17,95,.06), transparent 60%),
    radial-gradient(900px 500px at 105% 8%, rgba(15,82,186,.06), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(0,148,115,.05), transparent 60%),
    var(--brand-bg, #ffffff);
  background-attachment: fixed;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- Sticky nav with backdrop blur ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(21,22,103,.08);
  transition: box-shadow .3s ease, background .3s ease;
}
.site-header.scrolled {
  background: rgba(255,255,255,.94);
  box-shadow: 0 8px 30px -20px rgba(21,22,103,.25);
}

/* ---------- Gradient orbs animation (behind hero) ---------- */
.hero, .page-strip { position: relative; overflow: hidden; }
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .35;
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 18s ease-in-out infinite;
}
.hero::before {
  width: 520px; height: 520px;
  background: radial-gradient(circle, #e0115f, transparent 65%);
  top: -160px; left: -120px;
}
.hero::after {
  width: 460px; height: 460px;
  background: radial-gradient(circle, #0F52BA, transparent 65%);
  bottom: -140px; right: -140px;
  animation-delay: -9s;
}
.hero > * { position: relative; z-index: 1; }
@keyframes orbFloat {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(30px,20px) scale(1.08); }
}

/* ---------- Hero enhancements ---------- */
.hero__title {
  background: linear-gradient(135deg, var(--brand-primary,#151667) 30%, var(--brand-accent,#e0115f) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeUp .9s cubic-bezier(.2,.7,.2,1) both;
}
.hero__lead   { animation: fadeUp .9s cubic-bezier(.2,.7,.2,1) .15s both; }
.hero .cta-row{ animation: fadeUp .9s cubic-bezier(.2,.7,.2,1) .3s both; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Video/logo subtle float */
.hero__logo-anim { animation: floaty 6s ease-in-out infinite; }
@keyframes floaty {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-14px); }
}

/* ---------- Scroll-reveal system ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); will-change: transform, opacity; }
.reveal.in { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ---------- Buttons: modern polish ---------- */
.btn {
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease, filter .25s ease;
  position: relative;
  overflow: hidden;
}
.btn:hover  { transform: translateY(-2px); box-shadow: 0 14px 28px -14px rgba(21,22,103,.35); }
.btn:active { transform: translateY(0); }
.btn::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(255,255,255,.4), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
.btn:hover::after { opacity: 1; }

/* ---------- Cards: hover lift + border glow ---------- */
.card {
  position: relative;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, border-color .35s ease;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
  background: linear-gradient(135deg, transparent, rgba(224,17,95,.5), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;   mask-composite: exclude;
  opacity: 0; transition: opacity .35s ease;
  pointer-events: none;
}
.card:hover { transform: translateY(-6px) scale(1.01); box-shadow: 0 24px 60px -30px rgba(21,22,103,.35); }
.card:hover::before { opacity: 1; }

/* ---------- Chips: shimmer on hover ---------- */
.chip {
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease, color .25s ease;
  cursor: default;
}
.chip:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--brand-primary,#151667), var(--brand-accent,#e0115f));
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(224,17,95,.5);
}

/* ---------- Stats section ---------- */
.stat-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 2em 0;
}
.stat-showcase__item {
  background: linear-gradient(180deg, #fff, #f9fafd);
  border: 1px solid var(--brand-line,#e6e9f2);
  border-radius: 20px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 8px 24px -18px rgba(21,22,103,.2);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease;
}
.stat-showcase__item:hover { transform: translateY(-5px); box-shadow: 0 20px 40px -20px rgba(21,22,103,.3); }
.stat-showcase__num {
  font-family: var(--font-sans, "Cloud", sans-serif);
  font-weight: 800;
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 1;
  background: linear-gradient(135deg, var(--brand-accent,#e0115f), var(--brand-primary,#151667));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  letter-spacing: -.02em;
}
.stat-showcase__label {
  color: var(--brand-muted,#5c637a);
  font-size: .95rem;
}

/* ---------- Section: soft background with divider ---------- */
.section--tinted {
  background: linear-gradient(180deg, transparent, rgba(15,82,186,.03) 40%, transparent);
  padding-block: 5rem;
}

/* ---------- Wave divider ---------- */
.wave-divider { position: relative; height: 60px; margin-top: -60px; pointer-events: none; }
.wave-divider svg { display: block; width: 100%; height: 100%; }

/* ---------- Journey timeline (IVF cycle visual) ---------- */
.journey {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 2em 0;
  position: relative;
}
.journey::before {
  content: "";
  position: absolute; top: 32px; left: 6%; right: 6%; height: 3px;
  background: linear-gradient(90deg, var(--brand-accent,#e0115f), var(--brand-primary,#151667));
  border-radius: 2px;
  z-index: 0;
}
.journey__step {
  position: relative;
  z-index: 1;
  background: #fff;
  border: 1px solid var(--brand-line,#e6e9f2);
  border-radius: 18px;
  padding: 22px 18px 20px;
  text-align: center;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease;
}
.journey__step:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -28px rgba(21,22,103,.35); }
.journey__num {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-accent,#e0115f), #b30b4c);
  color: #fff; font-family: var(--font-sans, "Cloud", sans-serif); font-weight: 800;
  display: grid; place-items: center;
  margin: 0 auto 12px; font-size: 1.15rem;
  box-shadow: 0 10px 22px -10px rgba(224,17,95,.5);
}
.journey__title { margin: 0 0 6px; color: var(--brand-primary,#151667); font-size: 1.05rem; }
.journey__text  { margin: 0; font-size: .9rem; color: var(--brand-muted,#5c637a); }
@media(max-width:720px) {
  .journey { grid-template-columns: 1fr 1fr; }
  .journey::before { display: none; }
}

/* ---------- Feature icons (SVG-friendly grid) ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin: 2em 0;
}
.feature {
  background: #fff;
  border: 1px solid var(--brand-line,#e6e9f2);
  border-radius: 20px;
  padding: 28px 24px;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, border-color .35s ease;
  box-shadow: 0 8px 24px -18px rgba(21,22,103,.15);
}
.feature:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px -28px rgba(21,22,103,.35);
  border-color: rgba(224,17,95,.35);
}
.feature__icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-tint,#eef1fb), #fff);
  display: grid; place-items: center;
  margin-bottom: 16px;
  box-shadow: inset 0 0 0 1px var(--brand-line,#e6e9f2);
}
.feature__icon svg { width: 30px; height: 30px; stroke: var(--brand-accent,#e0115f); }
.feature__title { margin: 0 0 8px; color: var(--brand-primary,#151667); font-size: 1.1rem; }
.feature__text  { margin: 0; color: var(--brand-body,#3a3f52); font-size: .94rem; line-height: 1.55; }

/* ---------- Marquee (partner/press strip) ---------- */
.marquee {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--brand-line,#e6e9f2);
  background: linear-gradient(180deg, #fff, #f7f9fd);
  padding: 18px 0;
  margin: 2em 0;
}
.marquee__track {
  display: flex; gap: 60px;
  width: max-content;
  animation: marquee 35s linear infinite;
  color: var(--brand-muted,#5c637a);
  font-weight: 600;
  white-space: nowrap;
  padding: 0 30px;
}
.marquee__track span { display: inline-flex; align-items: center; gap: 8px; }
.marquee__track em { color: var(--brand-accent,#e0115f); font-style: normal; font-weight: 700; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Section head: eyebrow badge ---------- */
.section__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(224,17,95,.1), rgba(15,82,186,.08));
  color: var(--brand-accent,#e0115f);
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 14px;
}
.section__eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: .5; transform: scale(1.3); }
}

/* ---------- Portrait: elegant frame ---------- */
.portrait {
  border-radius: 24px;
  box-shadow: 0 30px 60px -30px rgba(21,22,103,.4);
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.portrait:hover { transform: scale(1.02) rotate(-.5deg); }

/* ---------- Nav dropdown micro-animation ---------- */
.nav__dropdown {
  transform-origin: top center;
  transition: opacity .2s ease, transform .2s cubic-bezier(.2,.7,.2,1), visibility .2s;
}
.nav__links li:hover > .nav__dropdown {
  transform: translateY(0) scaleY(1);
}

/* ---------- FAB stack: subtle bob ---------- */
.fab-stack .fab { transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease; }
.fab-stack .fab:hover { transform: scale(1.08) translateY(-3px); }

/* ---------- Focus visible ---------- */
:focus-visible {
  outline: 3px solid var(--brand-accent,#e0115f);
  outline-offset: 3px;
  border-radius: 4px;
}


/* ---------- Journey steps: pronounced 1-2-3-4 sequential reveal ---------- */
.journey .reveal { transform: translateY(36px); }
.journey .reveal-delay-1 { transition-delay: .05s; }
.journey .reveal-delay-2 { transition-delay: .45s; }
.journey .reveal-delay-3 { transition-delay: .85s; }
.journey .reveal-delay-4 { transition-delay: 1.25s; }
.journey .reveal .journey__num { opacity: 0; transform: scale(.4); transition: opacity .45s ease, transform .55s cubic-bezier(.34,1.56,.64,1); transition-delay: inherit; }
.journey .reveal.in .journey__num { opacity: 1; transform: scale(1); }
/* Reduced-motion users still get a gentle staggered fade (opacity only, no movement) */
@media (prefers-reduced-motion: reduce) {
  .journey .reveal { transform: none !important; transition: opacity .5s ease !important; }
  .journey .reveal-delay-1 { transition-delay: .05s !important; }
  .journey .reveal-delay-2 { transition-delay: .45s !important; }
  .journey .reveal-delay-3 { transition-delay: .85s !important; }
  .journey .reveal-delay-4 { transition-delay: 1.25s !important; }
  .journey .reveal .journey__num { transform: none !important; transition: opacity .4s ease !important; transition-delay: inherit !important; }
}
