/* ============================================================
   Halva Group LLC — Premium Dark Consulting Theme
   Brand: #6abdea (sky) / #1b75c7 (royal blue) / white H
   ============================================================ */

:root {
  /* Backgrounds */
  --bg:        #06101f;
  --bg-2:      #0b1929;
  --bg-3:      #0f2240;
  --bg-card:   rgba(11, 25, 45, 0.88);
  --bg-alt:    #080f1d;

  /* Brand blues — anchored to favicon gradient */
  --blue-sky:  #6abdea;
  --blue-mid:  #3499d6;
  --blue:      #1b75c7;
  --blue-dark: #0d4f8a;

  /* Gold accent — premium consulting feel */
  --gold:      #f4a259;
  --gold-light:#ffd166;

  /* Text */
  --text:      #e4f1ff;
  --text-muted:#6e90b2;
  --text-dim:  #3a5470;

  /* Borders */
  --border:    rgba(107,189,234,0.09);
  --border-mid:rgba(107,189,234,0.18);
  --border-hi: rgba(107,189,234,0.32);

  /* Status */
  --success-bg:  rgba(16,185,129,0.12);
  --success-text:#34d399;
  --error-bg:    rgba(239,68,68,0.12);
  --error-text:  #f87171;

  --radius-sm: 0.75rem;
  --radius-md: 1rem;
  --radius-lg: 1.375rem;

  --shadow-card: 0 2px 24px rgba(0,0,0,0.5), 0 0 0 1px var(--border);
  --shadow-hover:0 8px 40px rgba(27,117,199,0.2), 0 0 0 1px var(--border-mid);
  --shadow-glow: 0 0 48px rgba(106,189,234,0.1);

  --container: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* Ambient background glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -15%, rgba(27,117,199,0.16), transparent),
    radial-gradient(ellipse 55% 40% at 90% 85%, rgba(106,189,234,0.07), transparent);
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.14;
  letter-spacing: -0.025em;
  font-weight: 700;
}

p { margin: 0; }
a { color: var(--blue-sky); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: min(var(--container), calc(100% - 2.4rem));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* ── HEADER ───────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(6,16,31,0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none !important;
}

.logo-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 7px;
  overflow: hidden;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border-mid);
  background: var(--bg-card);
  color: var(--text);
  border-radius: 0.6rem;
  padding: 0.42rem 0.75rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: var(--radius-sm);
  padding: 0.72rem 1.3rem;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none !important;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.button {
  border: 1px solid rgba(27,117,199,0.55);
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%);
  color: #fff;
  box-shadow: 0 2px 16px rgba(27,117,199,0.28);
}

.button:hover {
  background: linear-gradient(135deg, var(--blue-mid) 0%, var(--blue-sky) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(27,117,199,0.42);
}

.button-secondary {
  border: 1px solid var(--border-mid);
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.button-secondary:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--border-hi);
  transform: translateY(-2px);
}

.button:focus-visible,
.button-secondary:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid var(--blue-sky);
  outline-offset: 2px;
}

/* ── SECTIONS ────────────────────────────────────────────── */
.section {
  position: relative;
  padding: 5rem 0;
  z-index: 1;
}

.section-tight-top { padding-top: 0; }

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.hero {
  padding-top: 5.5rem;
  padding-bottom: 4.5rem;
}

/* ── LABELS ──────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(106,189,234,0.25);
  background: rgba(27,117,199,0.1);
  color: var(--blue-sky);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
}

/* ── TYPOGRAPHY ──────────────────────────────────────────── */
.section-title {
  margin-top: 1rem;
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  max-width: 20ch;
  color: var(--text);
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, var(--blue-sky) 55%, var(--blue-mid) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-intro {
  margin-top: 1.2rem;
  max-width: 68ch;
  color: var(--text-muted);
  font-size: 1.01rem;
  line-height: 1.72;
}

.section-title-sm {
  margin-top: 0;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  color: var(--text);
}

/* ── HERO GRID ───────────────────────────────────────────── */
.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

/* ── HERO VISUAL ─────────────────────────────────────────── */
.hero-visual {
  position: relative;
  border: 1px solid var(--border-mid);
  background: linear-gradient(130deg, #0d2040 0%, #0a1932 46%, #071524 100%);
  border-radius: var(--radius-lg);
  min-height: 420px;
  padding: 1.2rem;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  overflow: hidden;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(106,189,234,0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(106,189,234,0.055) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

.hero-canvas-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-net-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-wave-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(65% 60% at 0% 100%, rgba(27,117,199,0.2), transparent 66%),
    linear-gradient(120deg, rgba(14,101,158,0.1), transparent 60%);
  mix-blend-mode: screen;
}

.hero-orb {
  position: absolute;
  z-index: 1;
  right: 2rem;
  top: 2rem;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  border: 1px solid rgba(106,189,234,0.18);
  background:
    radial-gradient(circle at 30% 30%, rgba(106,189,234,0.12), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(27,117,199,0.14), transparent 60%);
  box-shadow: inset 0 0 0 1px rgba(106,189,234,0.07);
}

.hero-orb::before,
.hero-orb::after {
  content: "";
  position: absolute;
  inset: 15% 10%;
  border: 1px solid rgba(106,189,234,0.14);
  border-radius: 999px;
}

.hero-orb::after {
  inset: 8% 26%;
  border-color: rgba(106,189,234,0.09);
}

.signal-chip {
  position: absolute;
  z-index: 2;
  border: 1px solid rgba(106,189,234,0.25);
  background: rgba(6,16,30,0.72);
  color: var(--blue-sky);
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  backdrop-filter: blur(6px);
}

.signal-chip.one   { top: 14px;  right: 16px; }
.signal-chip.two   { top: 52px;  right: 16px; }
.signal-chip.three { top: 90px;  right: 16px; }

.hero-points {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.hero-points li {
  border: 1px solid var(--border-mid);
  border-radius: 0.8rem;
  background: rgba(6,16,30,0.6);
  color: var(--text);
  padding: 0.52rem 0.72rem;
  font-size: 0.82rem;
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-points li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--blue-sky);
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--blue-sky);
}

/* ── METRIC STRIP ────────────────────────────────────────── */
.metric-strip {
  margin-top: 2rem;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-card);
  display: grid;
  overflow: hidden;
}

.metric-item {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.metric-item:last-child { border-bottom: none; }

.metric-item strong {
  display: block;
  font-size: 0.8rem;
  color: var(--blue-sky);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 700;
}

.metric-item p {
  margin-top: 0.32rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* ── SPLIT HERO ──────────────────────────────────────────── */
.split-hero {
  display: grid;
  gap: 2rem;
  align-items: start;
}

/* ── VISUAL PANEL ────────────────────────────────────────── */
.visual-panel {
  position: relative;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card);
  padding: 1.4rem;
  overflow: hidden;
}

.visual-panel::before {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  right: -60px;
  top: -60px;
  background: radial-gradient(circle, rgba(27,117,199,0.14), transparent 60%);
  pointer-events: none;
}

.visual-panel-spaced { margin-top: 1.5rem; }

.panel-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-sky);
}

.panel-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.panel-list li {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  border-radius: 0.7rem;
  padding: 0.52rem 0.72rem;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: border-color 160ms ease, background 160ms ease;
}

.panel-list li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue-sky), var(--blue));
  flex-shrink: 0;
}

/* ── CARDS ───────────────────────────────────────────────── */
.card-grid {
  margin-top: 2rem;
  display: grid;
  gap: 1.1rem;
}

.card {
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  box-shadow: var(--shadow-card);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
  backdrop-filter: blur(6px);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(106,189,234,0.35), transparent);
  opacity: 0;
  transition: opacity 200ms ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-mid);
}

.card:hover::after { opacity: 1; }

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 0.8rem;
  background: rgba(27,117,199,0.1);
  border: 1px solid rgba(27,117,199,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}

.card-icon svg {
  width: 22px;
  height: 22px;
  color: var(--blue-sky);
  stroke: var(--blue-sky);
}

.card h3 {
  font-size: 1.06rem;
  color: var(--text);
}

.card p {
  margin-top: 0.6rem;
  color: var(--text-muted);
  font-size: 0.91rem;
  line-height: 1.65;
}

/* ── STEP NUMBER ─────────────────────────────────────────── */
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--blue-mid));
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 0.85rem;
  box-shadow: 0 2px 12px rgba(27,117,199,0.32);
}

/* ── TAGS ────────────────────────────────────────────────── */
.tag-wrap {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.tag {
  border: 1px solid var(--border-mid);
  background: rgba(27,117,199,0.07);
  border-radius: 999px;
  padding: 0.38rem 0.9rem;
  font-size: 0.82rem;
  color: var(--text);
  font-weight: 600;
  transition: background 160ms ease, border-color 160ms ease;
}

.tag:hover {
  background: rgba(27,117,199,0.16);
  border-color: var(--border-hi);
}

/* ── CTA BOX ─────────────────────────────────────────────── */
.cta-box {
  border: 1px solid var(--border-mid);
  background: linear-gradient(135deg, rgba(27,117,199,0.1) 0%, rgba(10,24,44,0.95) 50%, rgba(13,79,138,0.07) 100%);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.cta-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(106,189,234,0.07), transparent);
  pointer-events: none;
}

.cta-box h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.5rem);
  max-width: 32ch;
  margin-inline: auto;
  position: relative;
}

.cta-box p {
  margin-top: 1rem;
  max-width: 60ch;
  color: var(--text-muted);
  margin-inline: auto;
  position: relative;
  font-size: 1.01rem;
}

.cta-box .button {
  margin-top: 1.8rem;
  padding: 0.85rem 2rem;
  font-size: 0.95rem;
}

/* ── FORM ────────────────────────────────────────────────── */
.form-layout {
  display: grid;
  gap: 1.5rem;
}

.form-card,
.info-card {
  border: 1px solid var(--border-mid);
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  box-shadow: var(--shadow-card);
}

.form-status {
  display: none;
  margin-bottom: 1rem;
  border-radius: 0.65rem;
  border: 1px solid transparent;
  padding: 0.72rem 0.9rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.form-status.show { display: block; }

.form-status.success {
  background: var(--success-bg);
  border-color: rgba(52,211,153,0.2);
  color: var(--success-text);
}

.form-status.error {
  background: var(--error-bg);
  border-color: rgba(248,113,113,0.2);
  color: var(--error-text);
}

.form-field { margin-top: 1rem; }

.form-field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.42rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--border-mid);
  background: rgba(6,16,30,0.55);
  border-radius: 0.65rem;
  padding: 0.74rem 0.9rem;
  font: inherit;
  font-size: 0.92rem;
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease;
  -webkit-appearance: none;
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M1 4l5 5 5-5' stroke='%236e90b2' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.2rem;
  cursor: pointer;
}

.form-field select option { background: #0b1829; color: var(--text); }

.form-field textarea {
  min-height: 200px;
  resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--text-dim); }

.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
  outline: none;
  border-color: var(--blue-mid);
  box-shadow: 0 0 0 3px rgba(27,117,199,0.15);
}

.form-field.error input,
.form-field.error select,
.form-field.error textarea {
  border-color: rgba(248,113,113,0.5);
}

.field-error {
  display: none;
  margin-top: 0.3rem;
  color: var(--error-text);
  font-size: 0.78rem;
}

.form-field.error .field-error { display: block; }

.required-note {
  margin-top: 1rem;
  color: var(--text-dim);
  font-size: 0.82rem;
}

.honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-extra {
  margin-top: 0.9rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ── DIVIDER LINE ─────────────────────────────────────────── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-mid), transparent);
  margin: 0;
}

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 2rem 0 0;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text);
}

.footer-brand .logo-mark {
  width: 28px;
  height: 28px;
}

.footer-tagline {
  color: var(--text-dim);
  font-size: 0.84rem;
  margin-top: 0.2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  padding: 0 0 2.5rem;
}

.footer-grid h3 {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--blue-sky);
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.footer-grid p,
.footer-grid li {
  margin-top: 0.45rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.footer-grid a {
  color: var(--text-muted);
  transition: color 160ms ease;
}

.footer-grid a:hover {
  color: var(--text);
  text-decoration: none;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  color: var(--text-dim);
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ── SCROLL REVEAL ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 600ms ease, transform 600ms ease;
}

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

.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (min-width: 780px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .metric-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-item {
    border-bottom: none;
    border-right: 1px solid var(--border);
  }

  .metric-item:last-child { border-right: none; }

  .card-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .card-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-layout {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }

  .split-hero {
    grid-template-columns: 1.02fr 0.98fr;
  }

  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: calc(100% + 1px);
    border: 1px solid var(--border-mid);
    background: rgba(6,16,31,0.96);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 0.75rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
  }

  .site-nav.open { display: flex; }
  .site-nav .button { margin-top: 0.2rem; }
}

@media (max-width: 640px) {
  .section { padding: 3.5rem 0; }
  .hero { padding-top: 3.2rem; padding-bottom: 3rem; }
  .hero-visual { min-height: 340px; }
  .hero-orb { width: 130px; height: 130px; right: 1rem; top: 1rem; }
  .cta-box { padding: 2rem 1.3rem; }
  .form-card, .info-card { padding: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
  html { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   NATIVE COLOR-SCHEME (scrollbars, inputs, select rendering)
   ============================================================ */
:root { color-scheme: dark; }
[data-theme="light"] { color-scheme: light; }

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border-mid);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition:
    transform 260ms cubic-bezier(0.34, 1.56, 0.64, 1),
    background 200ms ease,
    border-color 200ms ease,
    color 200ms ease;
}

.theme-toggle:hover {
  background: rgba(27, 117, 199, 0.12);
  border-color: var(--border-hi);
  color: var(--blue-sky);
  transform: rotate(22deg) scale(1.08);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--blue-sky);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
  flex-shrink: 0;
}

/* Dark mode default: show ☀️ (click → go light) */
.icon-sun  { display: block; }
.icon-moon { display: none; }

/* Light mode: show 🌙 (click → go dark) */
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* No-JS fallback */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .icon-sun  { display: none; }
  :root:not([data-theme="dark"]) .icon-moon { display: block; }
}

/* Smooth transition when manually switching (class added by JS) */
html.theme-switching,
html.theme-switching *,
html.theme-switching *::before,
html.theme-switching *::after {
  transition:
    background-color 350ms ease,
    border-color 350ms ease,
    color 250ms ease,
    box-shadow 350ms ease !important;
}

/* ============================================================
   LIGHT THEME — CSS CUSTOM PROPERTY OVERRIDES
   ============================================================ */

:root[data-theme="light"] {
  --bg:        #eff6ff;
  --bg-2:      #e0eefa;
  --bg-3:      #c8e0f5;
  --bg-card:   rgba(255, 255, 255, 0.97);
  --bg-alt:    #f6faff;

  --text:      #0b1829;
  --text-muted:#3f5c78;
  --text-dim:  #7ea8cb;

  --border:    rgba(27, 117, 199, 0.12);
  --border-mid:rgba(27, 117, 199, 0.22);
  --border-hi: rgba(27, 117, 199, 0.44);

  --shadow-card: 0 2px 20px rgba(14, 47, 90, 0.09), 0 0 0 1px var(--border);
  --shadow-hover:0 8px 36px rgba(27, 117, 199, 0.16), 0 0 0 1px var(--border-mid);
  --shadow-glow: 0 0 40px rgba(27, 117, 199, 0.08);
}

/* No-JS fallback for light system preference */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:        #eff6ff;
    --bg-2:      #e0eefa;
    --bg-3:      #c8e0f5;
    --bg-card:   rgba(255, 255, 255, 0.97);
    --bg-alt:    #f6faff;

    --text:      #0b1829;
    --text-muted:#3f5c78;
    --text-dim:  #7ea8cb;

    --border:    rgba(27, 117, 199, 0.12);
    --border-mid:rgba(27, 117, 199, 0.22);
    --border-hi: rgba(27, 117, 199, 0.44);

    --shadow-card: 0 2px 20px rgba(14, 47, 90, 0.09), 0 0 0 1px var(--border);
    --shadow-hover:0 8px 36px rgba(27, 117, 199, 0.16), 0 0 0 1px var(--border-mid);
    --shadow-glow: 0 0 40px rgba(27, 117, 199, 0.08);
    color-scheme: light;
  }
}

/* ============================================================
   LIGHT THEME — COMPONENT OVERRIDES
   (elements with hardcoded dark rgba values)
   ============================================================ */

/* Links — #6abdea too low-contrast on light bg */
[data-theme="light"] a,
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) a {
  color: var(--blue);
} }

/* Body ambient glow */
[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 80% 50% at 50% -15%, rgba(27, 117, 199, 0.1), transparent),
    radial-gradient(ellipse 55% 40% at 90% 85%, rgba(106, 189, 234, 0.06), transparent);
}

/* Header */
[data-theme="light"] .site-header {
  background: rgba(239, 246, 255, 0.9);
  border-bottom-color: rgba(27, 117, 199, 0.14);
}

/* Mobile nav dropdown */
[data-theme="light"] .site-nav {
  background: rgba(245, 250, 255, 0.98);
  border-color: rgba(27, 117, 199, 0.18);
}

[data-theme="light"] .site-nav a {
  color: var(--text-muted);
}

[data-theme="light"] .site-nav a:hover,
[data-theme="light"] .site-nav a[aria-current="page"] {
  color: var(--text);
}

/* Gradient headline text — white start invisible on light bg */
[data-theme="light"] .gradient-text {
  background: linear-gradient(135deg, #0b1829 0%, #1b75c7 50%, #3499d6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Eyebrow badges */
[data-theme="light"] .eyebrow {
  color: var(--blue);
  background: rgba(27, 117, 199, 0.08);
  border-color: rgba(27, 117, 199, 0.22);
}

/* Panel & metric labels */
[data-theme="light"] .panel-title,
[data-theme="light"] .metric-item strong,
[data-theme="light"] .footer-grid h3 {
  color: var(--blue);
}

/* Secondary button */
[data-theme="light"] .button-secondary {
  background: rgba(27, 117, 199, 0.06);
}

[data-theme="light"] .button-secondary:hover {
  background: rgba(27, 117, 199, 0.12);
}

/* Hero visual panel */
[data-theme="light"] .hero-visual {
  background: linear-gradient(130deg, #beddfa 0%, #a9d3f7 46%, #8ec5f2 100%);
  border-color: rgba(27, 117, 199, 0.3);
}

[data-theme="light"] .hero-visual::before {
  background-image:
    linear-gradient(to right, rgba(27, 117, 199, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(27, 117, 199, 0.07) 1px, transparent 1px);
}

[data-theme="light"] .hero-wave-overlay {
  background:
    radial-gradient(65% 60% at 0% 100%, rgba(27, 117, 199, 0.14), transparent 66%),
    linear-gradient(120deg, rgba(14, 101, 158, 0.08), transparent 60%);
}

[data-theme="light"] .hero-orb {
  border-color: rgba(27, 117, 199, 0.22);
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.5), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(27, 117, 199, 0.1), transparent 60%);
}

[data-theme="light"] .hero-orb::before,
[data-theme="light"] .hero-orb::after {
  border-color: rgba(27, 117, 199, 0.16);
}

/* Signal chips */
[data-theme="light"] .signal-chip {
  background: rgba(255, 255, 255, 0.88);
  color: var(--blue);
  border-color: rgba(27, 117, 199, 0.3);
}

/* Hero bullet points */
[data-theme="light"] .hero-points li {
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  border-color: rgba(27, 117, 199, 0.2);
}

[data-theme="light"] .hero-points li::before {
  background: var(--blue);
  box-shadow: 0 0 4px rgba(27, 117, 199, 0.5);
}

/* Cards — top shimmer on hover */
[data-theme="light"] .card::after {
  background: linear-gradient(90deg, transparent, rgba(27, 117, 199, 0.28), transparent);
}

/* Panel list dots */
[data-theme="light"] .panel-list li::before {
  background: linear-gradient(135deg, var(--blue), var(--blue-mid));
}

/* CTA box */
[data-theme="light"] .cta-box {
  background: linear-gradient(135deg,
    rgba(27, 117, 199, 0.07) 0%,
    rgba(255, 255, 255, 0.98) 50%,
    rgba(27, 117, 199, 0.05) 100%);
}

[data-theme="light"] .cta-box::before {
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(27, 117, 199, 0.07), transparent);
}

/* Form inputs */
[data-theme="light"] .form-field input,
[data-theme="light"] .form-field select,
[data-theme="light"] .form-field textarea {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(27, 117, 199, 0.2);
  color: var(--text);
}

[data-theme="light"] .form-field input::placeholder,
[data-theme="light"] .form-field textarea::placeholder {
  color: var(--text-dim);
}

[data-theme="light"] .form-field select option {
  background: #ffffff;
  color: #0b1829;
}

/* Footer brand row */
[data-theme="light"] .footer-brand {
  color: var(--text);
}

[data-theme="light"] .footer-grid a {
  color: var(--text-muted);
}

[data-theme="light"] .footer-grid a:hover {
  color: var(--text);
}

/* Footer bottom bar */
[data-theme="light"] .footer-bottom {
  color: var(--text-dim);
}
