/* HealthHaven.ai - Homepage Styles (Prototype C Production) */

/* ── CSS Custom Properties ── */
:root {
  --hh-primary: #0891b2;
  --hh-primary-rgb: 8, 145, 178;
  --hh-secondary: #7c3aed;
  --hh-secondary-rgb: 124, 58, 237;
  --hh-accent: #10b981;
  --hh-accent-rgb: 16, 185, 129;
  /* Generic site brand vars consumed by mega-nav */
  --site-primary: var(--hh-primary);
  --site-primary-rgb: var(--hh-primary-rgb);
  --site-secondary: var(--hh-secondary);
  --site-accent: var(--hh-accent);
  --hh-coral: #f97316;
  --hh-dark: #0a0f1a;
  --hh-card: #111827;
  --hh-border: #1e293b;
  --hh-text: #e2e8f0;
  --hh-text-muted: #94a3b8;
}

/* ── Smooth scroll & global resets ── */
html { scroll-behavior: smooth; }
*, *::before, *::after { box-sizing: border-box; }
body {
  background-color: var(--hh-dark);
  color: var(--hh-text);
  font-family: Inter, system-ui, sans-serif;
  overflow-x: hidden;
}

/* ── Light mode body overrides ── */
html:not(.dark) body {
  background-color: #f8fafc;
  color: #0f172a;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar { width: 0.375rem; }
::-webkit-scrollbar-track { background: var(--hh-dark); }
::-webkit-scrollbar-thumb { background: rgba(var(--hh-primary-rgb), 0.4); border-radius: 0.1875rem; }
::-webkit-scrollbar-thumb:hover { background: rgba(var(--hh-primary-rgb), 0.7); }

/* ── Gradient text ── */
.gradient-text {
  background: linear-gradient(to right, #0891b2, #7c3aed, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glow orbs ── */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(4.5rem);
  opacity: 1;
}
.glow-orb-1 {
  width: 28rem; height: 28rem;
  background: radial-gradient(circle, rgba(8,145,178,0.18) 0%, transparent 70%);
  top: -7rem; left: -7rem;
  animation: float-1 35s ease-in-out infinite;
}
.glow-orb-2 {
  width: 22rem; height: 22rem;
  background: radial-gradient(circle, rgba(124,58,237,0.14) 0%, transparent 70%);
  top: 5rem; right: -4rem;
  animation: float-2 40s ease-in-out infinite;
}
.glow-orb-3 {
  width: 18rem; height: 18rem;
  background: radial-gradient(circle, rgba(16,185,129,0.12) 0%, transparent 70%);
  bottom: -4rem; left: 32%;
  animation: float-3 30s ease-in-out infinite;
}

@keyframes float-1 { 0%, 100% { transform: translate(0,0); } 50% { transform: translate(1.25rem,-1rem); } }
@keyframes float-2 { 0%, 100% { transform: translate(0,0); } 50% { transform: translate(-1rem,1.25rem); } }
@keyframes float-3 { 0%, 100% { transform: translate(0,0); } 50% { transform: translate(0.75rem,0.75rem); } }

/* ── Glass card ── */
.glass-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(1.5rem);
  -webkit-backdrop-filter: blur(1.5rem);
  border: 0.0625rem solid rgba(255,255,255,0.08);
  border-radius: 1rem;
  transition: all 0.3s ease-out;
}
.glass-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-0.25rem);
  box-shadow: 0 1.5rem 3rem rgba(0,0,0,0.3), 0 0 2rem rgba(8,145,178,0.08);
}
html:not(.dark) .glass-card {
  background: rgba(255,255,255,0.85);
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 0.0625rem 0.1875rem rgba(0,0,0,0.08);
}
html:not(.dark) .glass-card:hover {
  background: rgba(255,255,255,1);
  border-color: rgba(8,145,178,0.25);
  box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,0.1), 0 0 1rem rgba(8,145,178,0.08);
}

/* ── Gradient border (Final CTA) ── */
.gradient-border {
  position: relative;
  background: var(--hh-card);
  border-radius: 1rem;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: -0.125rem;
  border-radius: 1.125rem;
  background: linear-gradient(135deg, var(--hh-primary), var(--hh-secondary), var(--hh-accent));
  z-index: -1;
}
html:not(.dark) .gradient-border {
  background: #fff;
}

/* ── Score bar animation ── */
.score-bar-fill {
  height: 0.625rem;
  border-radius: 0.3125rem;
  animation: grow-bar 1.5s ease-out forwards;
}
@keyframes grow-bar {
  from { width: 0; }
  to { width: var(--bar-width); }
}

/* ── Floating card ── */
.float-card {
  animation: float-card 6s ease-in-out infinite;
}
@keyframes float-card {
  0%, 100% { transform: rotate(1deg) translateY(0); }
  50% { transform: rotate(0deg) translateY(-0.5rem); }
}

/* ── Timeline vertical line ── */
.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 0.1875rem;
  transform: translateX(-50%);
  background: linear-gradient(to bottom, var(--hh-primary), var(--hh-secondary), var(--hh-accent));
}

/* ── Timeline dot ── */
.timeline-dot {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 0.1875rem solid var(--hh-dark);
  z-index: 10;
}
html:not(.dark) .timeline-dot {
  border-color: #f8fafc;
}

/* ── Tab button active state ── */
.tab-btn {
  color: #94a3b8;
  background: transparent;
}
.tab-btn.tab-active {
  color: var(--hh-primary);
  border-color: var(--hh-primary) !important;
  background: rgba(var(--hh-primary-rgb), 0.08);
}

/* ── Photo placeholder ── */
.photo-placeholder {
  background: linear-gradient(135deg, rgba(var(--hh-primary-rgb),0.2), rgba(var(--hh-secondary-rgb),0.15));
}

/* ── Trust score bar base ── */
.trust-score-bar {
  height: 0.5rem;
  border-radius: 0.25rem;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
}
html:not(.dark) .trust-score-bar {
  background: rgba(0,0,0,0.07);
}
.trust-score-fill {
  height: 100%;
  border-radius: 0.25rem;
  transition: width 1.2s ease-out;
}

/* ── Nav blur ── */
.nav-blur {
  backdrop-filter: blur(1rem);
  -webkit-backdrop-filter: blur(1rem);
}

/* ── Theme toggle icon transitions ── */
#icon-sun, #icon-moon {
  transition: opacity 0.5s ease, transform 0.5s ease;
  position: absolute;
}
html.dark #icon-sun { opacity: 1; transform: rotate(0deg); }
html.dark #icon-moon { opacity: 0; transform: rotate(90deg); }
html:not(.dark) #icon-sun { opacity: 0; transform: rotate(-90deg); }
html:not(.dark) #icon-moon { opacity: 1; transform: rotate(0deg); }

/* ── Hamburger lines ── */
.hamburger-line {
  display: block;
  width: 1.25rem;
  height: 0.125rem;
  background: #94a3b8;
  border-radius: 0.0625rem;
  transition: all 0.3s;
}

/* ── Feature icon box ── */
.feature-icon-box {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.625rem;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ── Avatar circle ── */
.avatar-circle {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* ── HH Card (dark panel) ── */
.hh-card {
  background: var(--hh-card);
  border: 0.0625rem solid var(--hh-border);
  border-radius: 1rem;
  padding: 1.5rem;
}
html:not(.dark) .hh-card {
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 0.0625rem 0.1875rem rgba(0,0,0,0.06);
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--hh-primary), var(--hh-secondary));
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  min-height: 2.75rem;
  text-decoration: none;
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-0.0625rem);
  box-shadow: 0 0.5rem 1.25rem rgba(8,145,178,0.3);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--hh-text);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  border: 0.0625rem solid var(--hh-border);
  cursor: pointer;
  transition: all 0.3s;
  min-height: 2.75rem;
  text-decoration: none;
}
.btn-ghost:hover {
  border-color: var(--hh-primary);
  color: var(--hh-primary);
  background: rgba(var(--hh-primary-rgb), 0.06);
}
html:not(.dark) .btn-ghost {
  color: #0f172a;
  border-color: #cbd5e1;
}

/* ── Badge ── */
.hh-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 9999rem;
  font-size: 0.6875rem;
  font-weight: 500;
  background: rgba(255,255,255,0.07);
  color: #94a3b8;
  border: 0.0625rem solid rgba(255,255,255,0.1);
}
html:not(.dark) .hh-badge {
  background: rgba(0,0,0,0.04);
  color: #475569;
  border-color: rgba(0,0,0,0.08);
}

/* ── Pillar icon (AI section) ── */
.pillar-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
}

/* ── Compliance badge strip ── */
.compliance-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
}

/* ══════════════════════════════════════════════════════
   LIGHT MODE OVERRIDES
   ══════════════════════════════════════════════════════ */

/* ── Text helpers ── */
html:not(.dark) .text-slate-100 { color: #0f172a; }
html:not(.dark) .text-slate-300 { color: #334155; }
html:not(.dark) .text-slate-400 { color: #475569; }
html:not(.dark) .text-slate-500 { color: #64748b; }
html:not(.dark) .text-white { color: #0f172a; }
html:not(.dark) .border-white\/5 { border-color: #e2e8f0; }
html:not(.dark) .border-white\/10 { border-color: #e2e8f0; }

/* ── Section backgrounds ── */
html:not(.dark) main > section[style] {
  background: #ffffff !important;
}
html:not(.dark) main > section:first-child {
  background: linear-gradient(135deg, #f0f9ff 0%, #faf5ff 50%, #ecfdf5 100%) !important;
}
html:not(.dark) main > section:nth-child(even) {
  background-color: #f8fafc !important;
}

/* ── Hero background photo (medical-tourism / recovery-friendly lodging) ──
   Full-bleed photographic hero (healthhaven-hero.jpg) under a gradient scrim.
   Mobile-first: a strong, even scrim keeps every stacked element legible over
   the bright window in the photo's center. Desktop (>=1024px, where the hero
   becomes a 2-col grid): the scrim stays dark under the left editorial column
   and eases on the right so the skyline/clinician shows beside the (opaque)
   floating card. Light mode needs an #id-scoped override — the
   `main > section:first-child` rule above forces a light gradient with
   !important, and an id selector outranks it. Scrim alphas were verified for
   WCAG AA over the text columns (white >=13:1, muted slate-400 >=5:1). */
#hero {
  background-image:
    linear-gradient(135deg, rgba(10,15,26,0.92) 0%, rgba(13,21,37,0.84) 50%, rgba(10,15,26,0.92) 100%),
    url('/images/healthhaven-hero.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* Fit within the viewport (was min-h-screen = 100vh, which overflowed). */
  min-height: 85vh;
}
html:not(.dark) #hero {
  background-image:
    linear-gradient(135deg, rgba(248,250,252,0.93) 0%, rgba(250,245,255,0.86) 50%, rgba(236,253,245,0.93) 100%),
    url('/images/healthhaven-hero.jpg') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
@media (min-width: 1024px) {
  #hero {
    background-image:
      linear-gradient(90deg, rgba(10,15,26,0.94) 0%, rgba(10,15,26,0.90) 55%, rgba(10,15,26,0.58) 72%, rgba(10,15,26,0.40) 100%),
      url('/images/healthhaven-hero.jpg');
  }
  html:not(.dark) #hero {
    background-image:
      linear-gradient(90deg, rgba(248,250,252,0.95) 0%, rgba(248,250,252,0.90) 55%, rgba(248,250,252,0.60) 72%, rgba(248,250,252,0.42) 100%),
      url('/images/healthhaven-hero.jpg') !important;
  }
}

/* ── Footer ── */
html:not(.dark) footer {
  background: #f1f5f9 !important;
}
html:not(.dark) footer > .border-t {
  border-color: #e2e8f0;
}

/* ── Glow orbs muted ── */
html:not(.dark) .glow-orb { opacity: 0.15; }

/* ── Hero search box ── */
html:not(.dark) .hh-card[style*="rgba(17,24,39"] {
  background: #ffffff !important;
  border: 0.0625rem solid #e2e8f0;
  box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.06);
}

/* ── Hero inputs ── */
html:not(.dark) input[class*="bg-white/5"] {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
html:not(.dark) input[class*="bg-white/5"]::placeholder {
  color: #94a3b8 !important;
}

/* ── Trust ribbon ── */
html:not(.dark) .border-y[style] {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}
html:not(.dark) .divide-white\/10 > * + * {
  border-color: #e2e8f0 !important;
}

/* ── Inline icon/badge backgrounds ── */
html:not(.dark) [style*="background: rgba(255,255,255,0.07)"],
html:not(.dark) [style*="background: rgba(255,255,255,0.05)"] {
  background: rgba(0,0,0,0.05) !important;
}

/* ── Timeline ── */
html:not(.dark) .timeline-line {
  opacity: 0.7;
}
html:not(.dark) .border-t.border-white\/5 {
  border-color: #e2e8f0;
}

/* ── Photo placeholder ── */
html:not(.dark) .photo-placeholder {
  background: linear-gradient(135deg, rgba(8,145,178,0.08), rgba(124,58,237,0.06));
}

/* ── Gradient-border CTA ── */
html:not(.dark) .gradient-border {
  background: #ffffff;
}

/* ── Score bar base ── */
html:not(.dark) .trust-score-bar {
  background: rgba(0,0,0,0.07);
}

/* ── Scrollbar ── */
html:not(.dark) ::-webkit-scrollbar-track { background: #f8fafc; }

/* ── Body & section backgrounds ── */
html:not(.dark) body {
  background: #ffffff;
  color: #0f172a;
}

html:not(.dark) main > section[style*="rgba(17"] {
  background: #f8fafc !important;
}
html:not(.dark) main > section[style*="rgba(13"] {
  background: #f1f5f9 !important;
}

html:not(.dark) main > section {
  color: #0f172a;
}

/* ── Additional text color overrides ── */
html:not(.dark) .text-white\/20 {
  color: rgba(15, 23, 42, 0.2) !important;
}

/* ── Placeholder colors ── */
html:not(.dark) input::placeholder,
html:not(.dark) textarea::placeholder {
  color: #94a3b8 !important;
}

/* ── Card backgrounds in light mode ── */
html:not(.dark) [class*="bg-white/5"],
html:not(.dark) [class*="bg-white/10"] {
  background: rgba(0, 0, 0, 0.03) !important;
}

/* ── Border overrides ── */
html:not(.dark) [class*="border-white/"] {
  border-color: rgba(0, 0, 0, 0.1) !important;
}

/* ── Timeline step number circles ── */
html:not(.dark) .bg-cyan-500\/10,
html:not(.dark) .bg-violet-500\/10,
html:not(.dark) .bg-emerald-500\/10 {
  background: rgba(0, 0, 0, 0.05) !important;
}

/* ── Footer text & links ── */
html:not(.dark) footer {
  color: #334155;
}

html:not(.dark) footer a {
  color: #475569;
}

html:not(.dark) footer a:hover {
  color: #0891b2;
}
