/* ============================================================
   EvalDoc landing — ThreeUI-inspired enhancement layer
   Additive, scoped under body.landing-v2 so it cannot affect
   other pages that share styles.css (e.g. find-doctor.html).
   Aesthetic: light-first glassmorphism, soft animated gradient
   mesh, layered depth + glow. Theme-aware. Motion is fully
   gated behind prefers-reduced-motion.
   ============================================================ */

body.landing-v2 {
  --glass-bg: rgba(255, 255, 255, 0.62);
  --glass-brd: rgba(255, 255, 255, 0.75);
  --glass-brd-strong: rgba(41, 123, 86, 0.22);
  --glow-a: rgba(58, 157, 111, 0.30);   /* mint green */
  --glow-b: rgba(41, 123, 86, 0.24);    /* deep green */
  --glow-c: rgba(79, 179, 164, 0.28);   /* teal */
  --mesh-1: rgba(79, 179, 164, 0.34);
  --mesh-2: rgba(58, 157, 111, 0.30);
  --mesh-3: rgba(148, 209, 178, 0.30);
  --ink: #10221a;
  --ink-soft: #45564d;
  --card-shadow: 0 18px 44px -22px rgba(16, 44, 30, 0.42), 0 6px 16px -12px rgba(16, 44, 30, 0.28);
  --card-shadow-hover: 0 30px 66px -26px rgba(16, 44, 30, 0.5), 0 10px 24px -12px rgba(41, 123, 86, 0.3);
  background: #f4f7f4;
}

/* Note: the base styles.css is light-only (dark text baked in), so this
   enhancement is intentionally light-first in both color schemes to avoid
   low-contrast text. A true dark mode would require theming styles.css too. */

/* ---------- HERO: immersive gradient-mesh ---------- */
body.landing-v2 .hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 6.5rem 0 7rem;
  background: radial-gradient(120% 90% at 50% -10%, #ffffff 0%, #eef4f0 55%, #e6efe9 100%);
}

/* drifting colored blobs */
body.landing-v2 .hero::before {
  content: "";
  position: absolute;
  inset: -25% -10% -10%;
  z-index: -2;
  background:
    radial-gradient(38% 40% at 18% 28%, var(--mesh-1) 0%, transparent 60%),
    radial-gradient(34% 38% at 82% 22%, var(--mesh-2) 0%, transparent 62%),
    radial-gradient(46% 44% at 62% 88%, var(--mesh-3) 0%, transparent 60%);
  filter: blur(28px) saturate(1.05);
  animation: ev-mesh 26s ease-in-out infinite alternate;
  will-change: transform;
}
/* fine grain + soft grid for texture */
body.landing-v2 .hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(41, 123, 86, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(41, 123, 86, 0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000 0%, transparent 78%);
          mask-image: radial-gradient(70% 60% at 50% 40%, #000 0%, transparent 78%);
  opacity: 0.7;
  pointer-events: none;
}
@keyframes ev-mesh {
  0%   { transform: translate3d(-2%, -1%, 0) rotate(0deg) scale(1.02); }
  50%  { transform: translate3d(2%, 2%, 0) rotate(4deg) scale(1.08); }
  100% { transform: translate3d(1%, -2%, 0) rotate(-3deg) scale(1.04); }
}

/* hero typography polish */
body.landing-v2 .hero h1 {
  letter-spacing: -0.035em;
  line-height: 1.04;
}
body.landing-v2 .hero h1 br + *,
body.landing-v2 .hero-content h1 {
  color: var(--ink);
}
/* gradient-glow accent on the middle line via background-clip trick:
   applied to whole H1 second line is hard w/o markup, so accent the badge + trust line instead */

body.landing-v2 .hero-badge {
  display: inline-block;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
  border: 1px solid var(--glass-brd-strong);
  border-radius: 999px;
  padding: 0.6rem 1.15rem;
  color: var(--ink-soft);
  box-shadow: 0 0 0 4px rgba(41, 123, 86, 0.06), 0 10px 24px -14px rgba(41, 123, 86, 0.5);
  position: relative;
}
body.landing-v2 .hero-badge::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #3a9d6f;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 0 3px rgba(58, 157, 111, 0.22), 0 0 10px 1px rgba(58, 157, 111, 0.7);
  animation: ev-pulse 2.4s ease-in-out infinite;
}
@keyframes ev-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }

body.landing-v2 .hero-subtitle { color: var(--ink-soft); }

/* glass search box */
body.landing-v2 .search-box-hero {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
          backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid var(--glass-brd);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
}
body.landing-v2 .hero-trust-line {
  color: var(--ink-soft);
  font-weight: 600;
}

/* ---------- Floating glass visual card ---------- */
body.landing-v2 .hero-visual { perspective: 1200px; }
body.landing-v2 .visual-card {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
          backdrop-filter: blur(22px) saturate(1.25);
  border: 1px solid var(--glass-brd);
  border-radius: 22px;
  box-shadow: var(--card-shadow), inset 0 1px 0 rgba(255,255,255,0.5);
  animation: ev-float 7s ease-in-out infinite;
  will-change: transform;
}
@keyframes ev-float {
  0%,100% { transform: translateY(0) rotateX(0) rotateY(0); }
  50%     { transform: translateY(-12px) rotateX(1.5deg) rotateY(-1.5deg); }
}
body.landing-v2 .status-indicator {
  text-shadow: 0 0 10px rgba(58, 157, 111, 0.7);
}

/* ---------- Shared glass-card treatment ---------- */
body.landing-v2 .feature-card,
body.landing-v2 .who-card,
body.landing-v2 .model-card,
body.landing-v2 .platform-feature,
body.landing-v2 .problem-col {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
          backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid var(--glass-brd);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1), box-shadow 0.35s ease, border-color 0.35s ease;
}
body.landing-v2 .feature-card:hover,
body.landing-v2 .who-card:hover,
body.landing-v2 .model-card:hover,
body.landing-v2 .platform-feature:hover {
  transform: translateY(-6px);
  box-shadow: var(--card-shadow-hover);
  border-color: var(--glass-brd-strong);
}
/* glow ring behind the emoji tiles */
body.landing-v2 .feature-icon-large,
body.landing-v2 .platform-icon,
body.landing-v2 .model-icon {
  filter: drop-shadow(0 6px 16px rgba(41, 123, 86, 0.35));
}

/* ---------- Section rhythm + heading accent ---------- */
body.landing-v2 .section h2,
body.landing-v2 .final-cta h2 {
  letter-spacing: -0.025em;
}
body.landing-v2 .section > h2::after {
  content: "";
  display: block;
  width: 54px; height: 3px;
  margin: 0.85rem auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, #4fb3a4, #297B56);
  box-shadow: 0 0 14px rgba(79, 179, 164, 0.6);
}

/* platform cards live on the dark section — use dark glass so their
   light text stays readable (override the light-glass default above). */
body.landing-v2 .platform-feature {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 40px -22px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.12);
}
body.landing-v2 .platform-feature:hover {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(120, 210, 180, 0.4);
  box-shadow: 0 26px 56px -22px rgba(0,0,0,0.68), 0 0 0 1px rgba(120,210,180,0.25);
}

/* dark sections keep their identity but gain glow depth */
body.landing-v2 .section-dark {
  position: relative;
  overflow: hidden;
}
body.landing-v2 .section-dark::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(40% 60% at 12% 20%, rgba(79,179,164,0.18) 0%, transparent 60%),
    radial-gradient(46% 66% at 88% 90%, rgba(58,157,111,0.16) 0%, transparent 62%);
  pointer-events: none;
}
body.landing-v2 .section-dark > * { position: relative; z-index: 1; }

/* ---------- Flow diagram: glowing nodes ---------- */
body.landing-v2 .flow-number {
  background: linear-gradient(150deg, #3a9d6f, #1e5c40);
  box-shadow: 0 8px 22px -8px rgba(41, 123, 86, 0.7), 0 0 0 5px rgba(58, 157, 111, 0.1);
}
body.landing-v2 .flow-arrow { color: #4fb3a4; opacity: 0.8; }

/* ---------- Buttons: gradient + glow ---------- */
body.landing-v2 .btn-large-primary,
body.landing-v2 .nav-cta,
body.landing-v2 .search-form button {
  background: linear-gradient(135deg, #3a9d6f 0%, #297B56 60%, #1e5c40 100%);
  border: none;
  box-shadow: 0 12px 28px -12px rgba(41, 123, 86, 0.8), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
body.landing-v2 .btn-large-primary:hover,
body.landing-v2 .nav-cta:hover,
body.landing-v2 .search-form button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 18px 38px -12px rgba(41, 123, 86, 0.9), 0 0 0 4px rgba(58,157,111,0.14);
}
body.landing-v2 .btn-large-secondary,
body.landing-v2 .btn-secondary {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  border: 1px solid var(--glass-brd-strong);
}

/* ---------- Context strip + feyti + final CTA depth ---------- */
body.landing-v2 .final-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
body.landing-v2 .final-cta::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(50% 80% at 20% 10%, var(--glow-c) 0%, transparent 60%),
    radial-gradient(50% 80% at 85% 100%, var(--glow-a) 0%, transparent 62%);
  filter: blur(10px);
}
body.landing-v2 .waitlist-launch-badge {
  box-shadow: 0 0 0 4px rgba(58,157,111,0.12), 0 8px 20px -10px rgba(41,123,86,0.6);
}

/* model "Pro" featured card lift */
body.landing-v2 .model-card[style*="border"] {
  box-shadow: 0 24px 54px -22px rgba(41, 123, 86, 0.55), 0 0 0 1px rgba(79,179,164,0.3) !important;
}

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  body.landing-v2 .hero::before,
  body.landing-v2 .visual-card,
  body.landing-v2 .hero-badge::before {
    animation: none !important;
  }
  body.landing-v2 .feature-card,
  body.landing-v2 .who-card,
  body.landing-v2 .model-card,
  body.landing-v2 .platform-feature,
  body.landing-v2 .btn-large-primary,
  body.landing-v2 .nav-cta { transition: none !important; }
}

/* ---------- Graceful fallback where backdrop-filter is unsupported ---------- */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  body.landing-v2 .feature-card,
  body.landing-v2 .who-card,
  body.landing-v2 .model-card,
  body.landing-v2 .problem-col,
  body.landing-v2 .visual-card,
  body.landing-v2 .search-box-hero { background: rgba(255,255,255,0.94); }
  body.landing-v2 .platform-feature { background: rgba(255,255,255,0.09); }
}
