:root {
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #475569;
  --border: #e5e7eb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --shadow: 0 1px 2px rgba(2, 6, 23, 0.06), 0 1px 1px rgba(2, 6, 23, 0.04);
  --primary: #2563eb;
  --primary-2: #1d4ed8;
}

html,
body {
  height: 100%;
}

body {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica,
    Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--primary-2);
}

.glass-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

table {
  border-collapse: collapse;
}

thead th {
  color: #64748b;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

tbody tr:hover {
  background: var(--surface-2);
}

.analysis-svg {
  height: 360px;
}

@media (max-width: 768px) {
  .analysis-svg {
    height: 260px;
  }
}

.site-bg {
  background: radial-gradient(circle at 18% 18%, rgba(37, 99, 235, 0.16), transparent 44%),
    radial-gradient(circle at 82% 24%, rgba(16, 185, 129, 0.14), transparent 46%),
    radial-gradient(circle at 58% 88%, rgba(14, 165, 233, 0.12), transparent 44%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 55%, #f8fafc 100%);
  background-attachment: fixed;
}

.site-science {
  background: radial-gradient(circle at 16% 14%, rgba(37, 99, 235, 0.12), transparent 42%),
    radial-gradient(circle at 86% 18%, rgba(14, 165, 233, 0.1), transparent 44%),
    radial-gradient(circle at 60% 92%, rgba(16, 185, 129, 0.08), transparent 46%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 60%, #f8fafc 100%);
  background-attachment: fixed;
  color: #0f172a;
}

body.site-science .home-nav {
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

body.site-science .home-nav a {
  color: rgba(15, 23, 42, 0.86);
}

body.site-science .home-nav a:hover {
  color: rgba(15, 23, 42, 1);
}

body.site-science .home-nav-pill:hover {
  background: rgba(15, 23, 42, 0.06);
}

body.site-science .home-nav-pill-active {
  color: rgba(15, 23, 42, 1);
  background: rgba(15, 23, 42, 0.06);
}

.home-brand {
  letter-spacing: -0.02em;
  transform: translateY(0.5px);
  font-size: 0.95rem;
}

body.site-science details > summary {
  list-style: none;
}

body.site-science details > summary::-webkit-details-marker {
  display: none;
}

.nav-menu > summary::-webkit-details-marker {
  display: none;
}

body.home-cinematic details > summary {
  list-style: none;
}

body.home-cinematic details > summary::-webkit-details-marker {
  display: none;
}

.brand-mark {
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.12);
}

body.site-science .brand-mark {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.1);
}

body.home-cinematic .brand-mark {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 55%, #06b6d4 100%);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}

.hero-surface {
  position: relative;
  overflow: hidden;
}

.hero-surface::before {
  content: "";
  position: absolute;
  inset: -1px;
  background-image: radial-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: radial-gradient(circle at 50% 40%, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
}

.hero-surface::after {
  content: "";
  position: absolute;
  inset: -120px -140px auto -140px;
  height: 380px;
  background: radial-gradient(circle at 40% 60%, rgba(37, 99, 235, 0.26), transparent 60%),
    radial-gradient(circle at 70% 40%, rgba(16, 185, 129, 0.18), transparent 58%),
    radial-gradient(circle at 55% 55%, rgba(14, 165, 233, 0.18), transparent 58%);
  filter: blur(22px);
  opacity: 0.9;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 40%, #0ea5e9 100%);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}

.btn-primary:hover {
  filter: brightness(1.03);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
}

.nav-pill {
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.nav-pill:hover {
  transform: translateY(-1px);
}

.hero-cta {
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.hero-cta:hover {
  transform: translateY(-1px);
}

.hero-cta:active {
  transform: translateY(0px);
}

@keyframes heroFloat {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -6px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes heroDash {
  0% {
    stroke-dashoffset: 0;
    opacity: 0.75;
  }
  100% {
    stroke-dashoffset: -520;
    opacity: 0.75;
  }
}

.hero-orbit {
  animation: heroFloat 6.5s ease-in-out infinite;
  will-change: transform;
}

.hero-path-anim {
  stroke-dasharray: 18 14;
  animation: heroDash 9s linear infinite;
}

.hero-parallax {
  transform: translate3d(calc(var(--hx, 0) * 1px), calc(var(--hy, 0) * 1px), 0);
  transition: transform 160ms ease;
  will-change: transform;
}

.home-cinematic {
  background: radial-gradient(circle at 18% 18%, rgba(59, 130, 246, 0.22), transparent 46%),
    radial-gradient(circle at 82% 24%, rgba(99, 102, 241, 0.18), transparent 48%),
    radial-gradient(circle at 58% 88%, rgba(14, 165, 233, 0.16), transparent 46%),
    radial-gradient(circle at 50% 40%, rgba(16, 185, 129, 0.12), transparent 60%),
    linear-gradient(180deg, #0b1224 0%, #070b17 45%, #050a14 100%);
  background-attachment: fixed;
  color: #e5e7eb;
}

.home-nav {
  background: rgba(2, 6, 23, 0.45);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(12px);
}

.home-nav a {
  color: rgba(226, 232, 240, 0.9);
}

.home-nav a:hover {
  color: #ffffff;
}

.home-nav-pill {
  background: transparent;
  border: 0;
  padding: 6px 10px;
  border-radius: 999px;
  transition: color 180ms ease, background-color 180ms ease;
}

.home-nav-pill:hover {
  background: rgba(148, 163, 184, 0.14);
}

.home-nav-pill-active {
  color: #ffffff;
  background: rgba(148, 163, 184, 0.14);
}

.home-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: -1px;
  background-image: radial-gradient(rgba(226, 232, 240, 0.1) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.22;
  mask-image: radial-gradient(circle at 50% 30%, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 68%);
  pointer-events: none;
}

.home-hero::after {
  content: "";
  position: absolute;
  inset: -120px -180px auto -180px;
  height: 520px;
  background: radial-gradient(circle at 30% 60%, rgba(59, 130, 246, 0.42), transparent 60%),
    radial-gradient(circle at 68% 40%, rgba(99, 102, 241, 0.28), transparent 58%),
    radial-gradient(circle at 60% 55%, rgba(14, 165, 233, 0.22), transparent 58%);
  filter: blur(26px);
  opacity: 0.55;
  pointer-events: none;
}

.home-hero-card {
  border: 0;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.home-title {
  letter-spacing: -0.03em;
}

.home-subtitle {
  color: rgba(226, 232, 240, 0.78);
}

.home-accent {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 40%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-poster-title {
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.home-poster-kicker {
  letter-spacing: 0.14em;
}

.home-poster-sub {
  letter-spacing: 0.01em;
}

.home-cta-primary {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 55%, #06b6d4 100%);
  box-shadow: 0 18px 48px rgba(37, 99, 235, 0.28);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.home-cta-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 20px 56px rgba(37, 99, 235, 0.34);
}

.home-cta-secondary {
  background: rgba(15, 23, 42, 0.22);
  border: 1px solid rgba(148, 163, 184, 0.16);
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.home-cta-secondary:hover {
  transform: translateY(-1px);
  background: rgba(15, 23, 42, 0.38);
  border-color: rgba(148, 163, 184, 0.22);
}


.home-badge {
  background: rgba(2, 6, 23, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: rgba(226, 232, 240, 0.8);
}

@keyframes homeGlow {
  0% {
    opacity: 0.3;
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    opacity: 0.52;
    transform: translate3d(0, -8px, 0) scale(1.02);
  }
  100% {
    opacity: 0.3;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.home-orbit {
  animation: homeGlow 7s ease-in-out infinite;
  will-change: transform, opacity;
}

.home-hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.95;
  mix-blend-mode: screen;
  pointer-events: none;
}

.home-section {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.home-lab-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.32);
  backdrop-filter: blur(16px);
}

.home-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0.6;
  filter: saturate(1.05) contrast(1.05);
  pointer-events: none;
  z-index: 0;
}

.home-snap {
  position: relative;
  z-index: 1;
  height: 100vh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.home-snap-page {
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 24px 64px;
}

.home-page-inner {
  width: 100%;
  max-width: 980px;
  text-align: center;
  transform: translate3d(0, 14px, 0);
  opacity: 0.35;
  transition: opacity 420ms ease, transform 420ms ease;
  will-change: opacity, transform;
}

.home-page-active .home-page-inner {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

.home-cta-row {
  justify-content: center;
}

.home-faq-q {
  cursor: pointer;
  list-style: none;
  color: rgba(241, 245, 249, 0.94);
  font-weight: 600;
}

.home-faq-q::-webkit-details-marker {
  display: none;
}

.home-faq-q::before {
  content: "›";
  display: inline-block;
  width: 18px;
  color: rgba(148, 163, 184, 0.9);
  transform: translateY(-1px);
}

details[open] > .home-faq-q::before {
  transform: rotate(90deg) translateY(-1px);
}

.home-faq-list {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.home-faq-row {
  padding: 16px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

body.home-cinematic .glass-panel {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.62) 0%, rgba(2, 6, 23, 0.38) 100%);
  border: 1px solid rgba(148, 163, 184, 0.2);
  backdrop-filter: blur(18px);
  box-shadow: 0 26px 80px rgba(2, 6, 23, 0.38);
}

body.home-cinematic .hero-surface {
  background: rgba(2, 6, 23, 0.45);
  border-bottom-color: rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(12px);
}

body.home-cinematic .text-slate-900,
body.home-cinematic .text-slate-800,
body.home-cinematic .text-slate-700 {
  color: rgba(241, 245, 249, 0.92) !important;
}

body.home-cinematic .text-slate-600,
body.home-cinematic .text-slate-500,
body.home-cinematic .text-slate-400 {
  color: rgba(148, 163, 184, 0.86) !important;
}

body.home-cinematic .border-slate-200,
body.home-cinematic .border-slate-200\/70,
body.home-cinematic .border-emerald-200,
body.home-cinematic .border-blue-100,
body.home-cinematic .border-blue-200 {
  border-color: rgba(148, 163, 184, 0.18) !important;
}

body.home-cinematic .bg-white,
body.home-cinematic .bg-white\/70,
body.home-cinematic .bg-slate-50,
body.home-cinematic .bg-emerald-50,
body.home-cinematic .bg-blue-50 {
  background-color: rgba(15, 23, 42, 0.42) !important;
}

body.home-cinematic .hover\:bg-white:hover,
body.home-cinematic .hover\:bg-slate-50:hover,
body.home-cinematic .hover\:bg-blue-100:hover,
body.home-cinematic .hover\:bg-blue-50:hover {
  background-color: rgba(15, 23, 42, 0.6) !important;
}

body.home-cinematic .bg-gradient-to-br {
  background-image: none !important;
  background-color: rgba(15, 23, 42, 0.42) !important;
}

body.home-cinematic .divide-slate-200 > :not([hidden]) ~ :not([hidden]) {
  border-color: rgba(148, 163, 184, 0.16) !important;
}

body.home-cinematic thead.border-b {
  border-color: rgba(148, 163, 184, 0.18) !important;
}

body.home-cinematic thead th {
  background: rgba(15, 23, 42, 0.62);
  border-bottom-color: rgba(148, 163, 184, 0.18);
  color: rgba(148, 163, 184, 0.92);
}

body.home-cinematic tbody tr:hover {
  background: rgba(148, 163, 184, 0.08);
}

body.home-cinematic svg.analysis-svg text {
  fill: rgba(226, 232, 240, 0.84) !important;
}

body.home-cinematic ::placeholder {
  color: rgba(148, 163, 184, 0.62);
}

body.home-cinematic input[type="file"]::file-selector-button {
  background: rgba(15, 23, 42, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: rgba(226, 232, 240, 0.9);
}

body.home-cinematic input[type="file"]::file-selector-button:hover {
  background: rgba(15, 23, 42, 0.62);
}
