/* Day (light) theme — loaded after styles.css. Default remains dark via :root in styles.css. */

html {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
  /* Warm day palette — less flat white/gray */
  --bg: #faf6f0;
  --bg-soft: #f1e9e0;
  --bg-elev: #fffdf8;
  --text: #14121a;
  --muted: #534e5c;
  --line: rgba(72, 62, 110, 0.14);
  --royal: #4d48e0;
  --cobalt: #2d4ad4;
  --violet: #5f3adb;
  /* Flat surfaces in day mode — no floating card shadows */
  --shadow: none;
}

/* --- Global surface --- */
html[data-theme="light"] body {
  background:
    radial-gradient(circle at 10% 0%, rgba(105, 98, 220, 0.1), transparent 46%),
    radial-gradient(circle at 94% 12%, rgba(255, 145, 110, 0.05), transparent 44%),
    linear-gradient(180deg, #fffaf5 0%, #f6efe6 45%, #efe6db 100%);
  color: var(--text);
}

html[data-theme="light"] .site-header {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: linear-gradient(to bottom, rgba(255, 253, 248, 0.98), rgba(250, 245, 238, 0.96));
  border-bottom-color: var(--line);
  box-shadow: none;
}

html[data-theme="light"] .site-nav a {
  color: #3a4158;
}

html[data-theme="light"] .site-nav a:hover,
html[data-theme="light"] .site-nav a:focus-visible {
  color: #0a0c14;
}

html[data-theme="light"] .nav-toggle span {
  background: #1a1f33;
}

html[data-theme="light"] .btn-secondary {
  border-color: rgba(70, 80, 130, 0.28);
  color: #1e2438;
  background: rgba(255, 255, 255, 0.75);
}

html[data-theme="light"] .btn-secondary:hover,
html[data-theme="light"] .btn-secondary:focus-visible {
  border-color: rgba(70, 80, 130, 0.45);
  background: #fff;
}

html[data-theme="light"] .btn-primary {
  box-shadow: none;
}

html[data-theme="light"] .theme-toggle {
  border: 1px solid rgba(18, 21, 36, 0.25);
  background: #121524;
  color: #fff;
}

html[data-theme="light"] .theme-toggle:hover,
html[data-theme="light"] .theme-toggle:focus-visible {
  background: #2a3150;
  border-color: #2a3150;
}

/* --- Hero / sequence --- */
/* Day mode: collapse hero — no scroll sequence, just text */
html[data-theme="light"] .hero {
  min-height: auto !important;
  height: auto !important;
}

/* Force GSAP pin-spacer to collapse completely in light mode */
html[data-theme="light"] .pin-spacer {
  padding-bottom: 0 !important;
  min-height: auto !important;
  height: auto !important;
}

html[data-theme="light"] .hero-sequence-wrap {
  position: absolute !important;
  inset: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  border-bottom-color: rgba(90, 100, 150, 0.2);
  transform: none !important;
}

html[data-theme="light"] .hero-grid {
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(80, 90, 140, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 90, 140, 0.1) 1px, transparent 1px);
}

html[data-theme="light"] .hero-overlay {
  background:
    radial-gradient(circle at 78% 28%, rgba(105, 98, 220, 0.08), transparent 44%),
    radial-gradient(circle at 24% 20%, rgba(255, 150, 110, 0.04), transparent 50%),
    linear-gradient(180deg, rgba(255, 252, 248, 0.6) 0%, rgba(250, 244, 236, 0.95) 88%);
}

/* Day mode: hide canvas + scroll rail entirely */
html[data-theme="light"] #hero-sequence-canvas {
  display: none !important;
}

html[data-theme="light"] .hero-rail {
  display: none !important;
}

/* Make hero content flow normally (not absolute) */
html[data-theme="light"] .hero-content {
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  width: min(680px, 88vw);
  margin: 0 auto;
  padding: 14vh 4vw 10vh; /* Added slightly more top padding so it sits well */
  transform: none !important; /* Prevent GSAP from moving it */
}

html[data-theme="light"] .rail-label,
html[data-theme="light"] .eyebrow {
  color: #5a6488;
}

html[data-theme="light"] .hero-rail ol {
  border-left-color: rgba(80, 90, 140, 0.25);
}

html[data-theme="light"] .hero-rail li {
  color: #6a7394;
}

html[data-theme="light"] .hero-rail li.is-active {
  color: #121524;
}

html[data-theme="light"] h1 span:last-child {
  color: #2a3150;
}

html[data-theme="light"] .hero-copy,
html[data-theme="light"] p {
  color: #4a5268;
}

html[data-theme="light"] .hero-note {
  color: #5c6688;
}

/* --- Sections & cards --- */
html[data-theme="light"] .model-shell {
  border-color: rgba(90, 80, 130, 0.18);
  background:
    radial-gradient(circle at 86% 12%, rgba(105, 98, 220, 0.08), transparent 40%),
    linear-gradient(170deg, rgba(255, 253, 248, 0.99), rgba(246, 240, 232, 0.96));
  box-shadow: none;
}

html[data-theme="light"] .model-shell::before {
  border-color: rgba(90, 100, 140, 0.12);
}

html[data-theme="light"] .model-badges span {
  color: #2a3150;
  border-color: rgba(90, 100, 150, 0.25);
  background: rgba(95, 98, 220, 0.08);
}

html[data-theme="light"] .stat {
  border-color: rgba(90, 80, 120, 0.14);
  background: linear-gradient(180deg, rgba(105, 98, 220, 0.05), rgba(255, 253, 248, 0.75));
  box-shadow: none;
}

html[data-theme="light"] .stat-value {
  color: #121524;
}

html[data-theme="light"] .stat-label {
  color: #5a6178;
}

html[data-theme="light"] .editorial-list {
  border-left-color: rgba(90, 100, 150, 0.22);
}

html[data-theme="light"] .editorial-list li {
  color: #3a4158;
  border-bottom-color: rgba(90, 100, 130, 0.15);
}

html[data-theme="light"] .dataset-card {
  border-color: rgba(90, 80, 120, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(246, 239, 232, 0.98)),
    repeating-linear-gradient(
      0deg,
      rgba(80, 90, 130, 0.04) 0,
      rgba(80, 90, 130, 0.04) 1px,
      transparent 1px,
      transparent 24px
    );
}

html[data-theme="light"] .dataset-meta {
  color: #5a6488;
}

html[data-theme="light"] .dataset-card h3 {
  color: #121524;
}

html[data-theme="light"] .dataset-card p {
  color: #4a5268;
}

html[data-theme="light"] .dataset-card .ext {
  color: #2d3350;
}

html[data-theme="light"] .translator-panel,
html[data-theme="light"] .milestone-shell,
html[data-theme="light"] .cta-shell {
  border-color: rgba(90, 80, 120, 0.16);
  background: linear-gradient(165deg, rgba(255, 253, 248, 0.98), rgba(245, 238, 230, 0.95));
  box-shadow: none;
}

html[data-theme="light"] .timeline::before {
  background: linear-gradient(to bottom, rgba(95, 98, 220, 0.45), rgba(90, 100, 130, 0.08));
}

html[data-theme="light"] .timeline-item {
  border-color: rgba(90, 80, 120, 0.14);
  background: rgba(255, 253, 248, 0.85);
  box-shadow: none;
}

html[data-theme="light"] .timeline-item::before {
  box-shadow: none;
  outline: 2px solid rgba(255, 253, 248, 0.95);
  outline-offset: 0;
}

html[data-theme="light"] .date {
  color: #5a6488;
}

html[data-theme="light"] .ecosystem-photo {
  border-color: rgba(90, 80, 120, 0.14);
  background: #ebe4dc;
  box-shadow: none;
}

html[data-theme="light"] .logo-caption-wrap {
  border-color: rgba(90, 100, 130, 0.18);
  background: rgba(255, 255, 255, 0.75);
}

html[data-theme="light"] .logo-caption {
  color: #5a6178;
}

html[data-theme="light"] .ecosystem-points {
  border-top-color: rgba(90, 100, 130, 0.18);
}

html[data-theme="light"] .ecosystem-points li {
  color: #4a5268;
  border-bottom-color: rgba(90, 100, 130, 0.12);
}

html[data-theme="light"] .partner-logos img {
  border-color: rgba(90, 80, 120, 0.14);
  background: rgba(255, 253, 248, 0.9);
  filter: none;
  box-shadow: none;
}

html[data-theme="light"] .partner-logos img:hover,
html[data-theme="light"] .partner-logos img:focus-visible {
  filter: none;
  box-shadow: none;
}

html[data-theme="light"] .site-footer {
  background: rgba(252, 247, 240, 0.98);
  border-top-color: var(--line);
  box-shadow: none;
}

html[data-theme="light"] .site-footer p {
  color: #5a6178;
}

html[data-theme="light"] .footer-bottom {
  border-top-color: rgba(90, 100, 130, 0.12);
}

html[data-theme="light"] .footer-links a {
  color: #4a5580;
}

html[data-theme="light"] .footer-links a:hover,
html[data-theme="light"] .footer-links a:focus-visible {
  color: #121524;
}

/* --- Languages page --- */
html[data-theme="light"] .lang-page {
  background:
    radial-gradient(circle at 8% -6%, rgba(105, 98, 210, 0.09), transparent 42%),
    linear-gradient(180deg, #fffaf5 0%, #f4ebe3 52%, #ebe2d8 100%);
}

html[data-theme="light"] .lang-hero-lead {
  color: #4a5268;
}

html[data-theme="light"] .lang-search label,
html[data-theme="light"] .lang-select label {
  color: #5a6488;
}

html[data-theme="light"] .lang-search input,
html[data-theme="light"] .lang-select select {
  border-color: rgba(90, 100, 130, 0.22);
  background: #fff;
  color: #121524;
}

html[data-theme="light"] .lang-reset .btn-ghost {
  border-color: rgba(90, 100, 130, 0.28);
  background: #fff;
  color: #1e2438;
}

html[data-theme="light"] .map-stage {
  border-color: rgba(90, 80, 120, 0.16);
  background: linear-gradient(165deg, rgba(255, 253, 248, 0.98), rgba(245, 238, 230, 0.98));
  box-shadow: none;
}

html[data-theme="light"] .map-stage::after {
  opacity: 0.25;
  background: radial-gradient(circle at 50% 35%, rgba(105, 98, 220, 0.06), transparent 55%);
}

html[data-theme="light"] .lang-card:hover,
html[data-theme="light"] .lang-card:focus-visible {
  box-shadow: none;
}

html[data-theme="light"] .lang-card.is-selected {
  box-shadow: none;
}

html[data-theme="light"] .lang-search input:focus,
html[data-theme="light"] .lang-select select:focus {
  box-shadow: 0 0 0 2px rgba(77, 72, 224, 0.22);
}

html[data-theme="light"] .map-note {
  color: #5a6178;
}

html[data-theme="light"] .panel-shell {
  border-color: rgba(90, 80, 120, 0.16);
  background: linear-gradient(170deg, rgba(255, 253, 248, 0.99), rgba(246, 239, 232, 0.96));
  box-shadow: none;
}

html[data-theme="light"] .panel-shell::before {
  border-color: rgba(90, 100, 130, 0.1);
}

html[data-theme="light"] .panel-eyebrow {
  color: #5a6488;
}

html[data-theme="light"] .panel-title {
  color: #121524;
}

html[data-theme="light"] .panel-lead {
  color: #3a4158;
}

html[data-theme="light"] .panel-meta,
html[data-theme="light"] .panel-quiet {
  color: #5a6178;
}

html[data-theme="light"] .panel-strong {
  color: #121524;
}

html[data-theme="light"] .status-pill--planned {
  background: rgba(90, 100, 130, 0.08);
  color: #2a3150;
}

html[data-theme="light"] .panel-module,
html[data-theme="light"] .panel-roadmap {
  border-color: rgba(90, 80, 120, 0.14);
  background: rgba(255, 253, 248, 0.88);
  box-shadow: none;
}

html[data-theme="light"] .module-label {
  color: #5a6488;
}

html[data-theme="light"] .module-value {
  color: #1e2438;
}

html[data-theme="light"] .panel-links a {
  color: #1e3a8a;
  border-bottom-color: rgba(45, 82, 217, 0.25);
}

html[data-theme="light"] .lang-card {
  border-color: rgba(90, 80, 120, 0.16);
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.97), rgba(242, 235, 228, 0.98));
  box-shadow: none;
}

html[data-theme="light"] .lang-card-flagship {
  border-color: rgba(120, 100, 200, 0.26);
  background:
    radial-gradient(circle at 80% 10%, rgba(120, 110, 255, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.99), rgba(242, 235, 228, 0.98));
  box-shadow: none;
}

html[data-theme="light"] .card-kicker {
  color: #5a6488;
}

html[data-theme="light"] .card-title {
  color: #121524;
}

html[data-theme="light"] .card-meta {
  color: #4a5268;
}

html[data-theme="light"] .lang-expansion {
  border-color: rgba(90, 100, 130, 0.28);
  background: rgba(255, 255, 255, 0.75);
}

html[data-theme="light"] .expansion-copy {
  color: #4a5268;
}

/* Map SVG: keep silhouette readable */
html[data-theme="light"] #language-map-svg rect:first-of-type {
  fill: #eef1f8;
}

html[data-theme="light"] #india-silhouette {
  fill: #d4daf0;
  stroke: rgba(90, 100, 130, 0.28);
}

html[data-theme="light"] .hotspot-core {
  fill: rgba(95, 98, 220, 0.2);
  stroke: rgba(70, 80, 130, 0.35);
}

html[data-theme="light"] .region-hit.is-active .hotspot-core {
  fill: rgba(120, 90, 220, 0.35);
  stroke: rgba(50, 60, 120, 0.55);
}

/* Language detail pages */
html[data-theme="light"] .detail-lead,
html[data-theme="light"] .detail-muted {
  color: #4a5268;
}

html[data-theme="light"] .detail-callout {
  border-color: rgba(90, 80, 120, 0.16);
  background: linear-gradient(165deg, rgba(255, 253, 248, 0.98), rgba(245, 238, 230, 0.95));
  box-shadow: none;
}

html[data-theme="light"] .detail-section {
  border-top-color: rgba(90, 100, 130, 0.14);
}

/* Contact page */
html[data-theme="light"] .contact-lead {
  color: #4a5268;
}

html[data-theme="light"] .contact-strip {
  border-color: rgba(90, 100, 130, 0.2);
  background: rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] .contact-strip span {
  color: #5a6178;
}

html[data-theme="light"] .contact-strip a {
  color: #1e3a8a;
}

html[data-theme="light"] .team-block-a img,
html[data-theme="light"] .b-visual .b-back,
html[data-theme="light"] .b-visual .b-front,
html[data-theme="light"] .c-strip img {
  border-color: rgba(90, 100, 130, 0.2);
  background: #e8ebf4;
}

html[data-theme="light"] .team-block-a figcaption,
html[data-theme="light"] .b-caption {
  color: #6a7394;
}

html[data-theme="light"] .team-block-a p,
html[data-theme="light"] .team-block-b .b-head p,
html[data-theme="light"] .c-inset p {
  color: #4a5268;
}

html[data-theme="light"] .c-inset {
  border-color: rgba(90, 100, 130, 0.2);
  background: rgba(255, 255, 255, 0.92);
}

html[data-theme="light"] .join-card {
  border-color: rgba(90, 100, 130, 0.2);
  background: rgba(255, 255, 255, 0.92);
}

html[data-theme="light"] .join-card .sub {
  color: #5a6178;
}

html[data-theme="light"] .form-field label {
  color: #5a6488;
}

html[data-theme="light"] .form-field input,
html[data-theme="light"] .form-field textarea,
html[data-theme="light"] .form-field select {
  border-color: rgba(90, 100, 130, 0.22);
  background: #fff;
  color: #121524;
}

html[data-theme="light"] .form-note {
  color: #6a7394;
}

html[data-theme="light"] .b-visual .b-front {
  box-shadow: none;
}

html[data-theme="light"] .form-field input:focus,
html[data-theme="light"] .form-field textarea:focus,
html[data-theme="light"] .form-field select:focus {
  box-shadow: 0 0 0 2px rgba(77, 72, 224, 0.2);
}

html[data-theme="light"] .btn-primary:hover,
html[data-theme="light"] .btn-primary:focus-visible {
  box-shadow: none;
}

/* Terms page */
html[data-theme="light"] .terms-page {
  background:
    radial-gradient(circle at 8% -6%, rgba(105, 98, 210, 0.07), transparent 42%),
    linear-gradient(180deg, #fffaf5 0%, #f2e9e0 55%, #e8dfd4 100%);
}

html[data-theme="light"] .terms-hero {
  border-bottom-color: rgba(90, 100, 130, 0.16);
}

html[data-theme="light"] .terms-subtitle {
  color: #4a5268;
}

html[data-theme="light"] .terms-meta {
  color: #6a7394;
}

html[data-theme="light"] .terms-toc {
  border-color: rgba(90, 100, 130, 0.2);
  background: rgba(255, 255, 255, 0.92);
}

html[data-theme="light"] .terms-toc a {
  color: #3a4158;
}

html[data-theme="light"] .terms-section {
  border-bottom-color: rgba(90, 100, 130, 0.12);
}

html[data-theme="light"] .terms-section h2 {
  color: #121524;
}

html[data-theme="light"] .terms-section p,
html[data-theme="light"] .terms-section li {
  color: #3a4158;
}

html[data-theme="light"] .terms-callout {
  border-color: rgba(90, 80, 120, 0.16);
  background: rgba(247, 240, 232, 0.96);
  box-shadow: none;
}

html[data-theme="light"] .terms-callout p {
  color: #3a4158;
}

html[data-theme="light"] .terms-doc a {
  color: #1e4a9e;
}

html[data-theme="light"] .terms-strong {
  color: #0f1224;
}

@media (max-width: 860px) {
  html[data-theme="light"] .site-nav {
    background: rgba(255, 255, 255, 0.98);
    border-color: var(--line);
  }
}

/* Toggle base (dark default) */
.theme-toggle {
  justify-self: center;
  border-radius: 999px;
  border: 1px solid rgba(174, 185, 244, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: #e8ecff;
  padding: 0.45rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: rgba(200, 208, 255, 0.55);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  outline: none;
}

