/* PhysioPilot Startup Website — Core CSS */
*, *::before, *::after {
  box-sizing: border-box;
}

/* ── Typography & Smooth Scroll ── */
html {
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Dark Mode (Cosmos Theme) ── */
.dark body {
  background-color: #070B14;
  color: #F1F5F9;
}

.dark .cosmos-card {
  background: rgba(13, 21, 39, 0.85);
  border: 1px solid rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(12px);
}

.dark .cosmos-card:hover {
  border-color: rgba(0, 210, 255, 0.35);
  box-shadow: 0 0 30px rgba(0, 210, 255, 0.08), 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ── Light Mode (Clinical Theme) ── */
html:not(.dark) body {
  background-color: #F8FAFC;
  color: #0F172A;
}

html:not(.dark) .cosmos-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), 0 4px 16px rgba(15, 23, 42, 0.04);
}

html:not(.dark) .cosmos-card:hover {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08), 0 8px 24px rgba(37, 99, 235, 0.1);
}

/* ── Gradients & Glows ── */
.dark .hero-glow {
  background:
    radial-gradient(ellipse 65% 55% at 50% -5%, rgba(0, 210, 255, 0.14) 0%, transparent 70%),
    radial-gradient(ellipse 45% 35% at 80% 60%, rgba(37, 99, 235, 0.1) 0%, transparent 60%);
}

html:not(.dark) .hero-glow {
  background:
    radial-gradient(ellipse 65% 55% at 50% -5%, rgba(2, 132, 199, 0.09) 0%, transparent 70%),
    radial-gradient(ellipse 45% 35% at 80% 60%, rgba(37, 99, 235, 0.06) 0%, transparent 60%);
}

.dark .neon-glow {
  text-shadow: 0 0 20px rgba(0, 210, 255, 0.4), 0 0 60px rgba(0, 210, 255, 0.15);
}

.dark .grid-bg {
  background-image:
    linear-gradient(rgba(30, 41, 59, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 41, 59, 0.35) 1px, transparent 1px);
  background-size: 40px 40px;
}

html:not(.dark) .grid-bg {
  background-image:
    linear-gradient(rgba(226, 232, 240, 0.8) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 232, 240, 0.8) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ── Scroll Reveal Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Accessibility: Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Focus Rings ── */
:focus-visible {
  outline: 2px solid #00D2FF;
  outline-offset: 3px;
  border-radius: 6px;
}

html:not(.dark) :focus-visible {
  outline-color: #2563EB;
}

/* ── Navigation Drawer ── */
#mobile-nav {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  transform: translateX(100%);
  opacity: 0;
}

#mobile-nav.open {
  transform: translateX(0);
  opacity: 1;
}

/* ── Tag Chips ── */
.tag-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}

/* ── Section Dividers ── */
.dark .section-rule {
  border-color: rgba(30, 41, 59, 0.8);
}

html:not(.dark) .section-rule {
  border-color: #E2E8F0;
}

/* ── Scrollbars ── */
.dark ::-webkit-scrollbar { width: 6px; }
.dark ::-webkit-scrollbar-track { background: #070B14; }
.dark ::-webkit-scrollbar-thumb { background: #1E293B; border-radius: 3px; }
.dark ::-webkit-scrollbar-thumb:hover { background: #334155; }

/* ── Dynamic Screenshot Theme Adaptors ── */
.dark .theme-screenshot-light {
  display: none !important;
}
.dark .theme-screenshot-dark {
  display: block !important;
}

html:not(.dark) .theme-screenshot-dark {
  display: none !important;
}
html:not(.dark) .theme-screenshot-light {
  display: block !important;
}
