/* ============================================================
   Spertavo Landing — styles.css
   Light theme = default. Dark theme = class "dark" on <html>.
   Dark is navy/slate, not pure black.
   ============================================================ */

/* ---------- Design tokens (LIGHT) ---------- */
:root {
  --bg: #ffffff;
  --bg-alt: #f1f5f9;
  --bg-card: #f8fafc;
  --bg-header: rgba(255, 255, 255, 0.92);
  --text: #0f172a;
  --text-muted: #64748b;
  --text-soft: #334155;
  --border: #e2e8f0;
  --navy: #0a1628;
  --navy-mid: #132337;
  --blue: #1a56db;
  --blue-hover: #1e40af;
  --blue-soft: #dbeafe;
  --accent: #0ea5e9;
  --metric-bg: #0a1628;
  --metric-text: #ffffff;
  --cta-bg: linear-gradient(135deg, #0a1628 0%, #1e3a5f 100%);
  --cta-btn-bg: #ffffff;
  --cta-btn-text: #0a1628;
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 10px 30px -10px rgba(26, 86, 219, 0.12);
  --icon-sun-display: none;
  --icon-moon-display: inline;
}

/* ---------- Design tokens (DARK) — not pure black ---------- */
html.dark {
  --bg: #0f172a;
  --bg-alt: #1e293b;
  --bg-card: #1e293b;
  --bg-header: rgba(15, 23, 42, 0.92);
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-soft: #cbd5e1;
  --border: #334155;
  --navy: #f1f5f9;
  --navy-mid: #e2e8f0;
  --blue: #3b82f6;
  --blue-hover: #60a5fa;
  --blue-soft: #1e3a5f;
  --accent: #38bdf8;
  --metric-bg: #1e293b;
  --metric-text: #f1f5f9;
  --cta-bg: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  --cta-btn-bg: #3b82f6;
  --cta-btn-text: #ffffff;
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 10px 30px -10px rgba(59, 130, 246, 0.2);
  --icon-sun-display: inline;
  --icon-moon-display: none;
}

/* ---------- Base ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

h1, h2, h3, h4, .logo, .btn, .metric-value, .hero-eyebrow, .footer-slogan {
  font-family: 'DM Sans', 'Source Sans 3', system-ui, sans-serif;
}

body {
  font-family: 'Source Sans 3', 'DM Sans', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  transition: background 0.25s ease, color 0.25s ease;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-center {
  text-align: center;
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.logo span {
  color: var(--blue);
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-soft);
}

.nav-links a:hover {
  color: var(--blue);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--text-soft);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.theme-toggle:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.theme-toggle .icon-sun {
  display: var(--icon-sun-display);
}

.theme-toggle .icon-moon {
  display: var(--icon-moon-display);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--blue);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--blue-hover);
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
}

.btn-cta {
  background: var(--cta-btn-bg);
  color: var(--cta-btn-text);
  padding: 16px 32px;
  font-size: 1rem;
  border-radius: 6px;
  font-weight: 600;
}

.btn-cta:hover {
  opacity: 0.9;
}

/* ---------- Hero ---------- */
.hero {
  padding: 100px 0 80px;
  background: var(--bg);
  transition: background 0.25s ease;
}

html:not(.dark) .hero {
  background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
}

html.dark .hero {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 40%, #0f172a 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-eyebrow {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 14px;
}

.hero h1 {
  font-size: 3.25rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--navy);
  margin-bottom: 24px;
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 520px;
}

.hero-tagline {
  font-size: 1.05rem !important;
  font-weight: 500;
  color: var(--navy) !important;
  margin-bottom: 32px !important;
  max-width: 520px;
  font-style: italic;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: transparent;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual canvas {
  width: 100%;
  height: 420px;
  display: block;
  border-radius: 16px;
}

/* ---------- Trust ---------- */
.trust {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.trust p {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

.trust-logos {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  opacity: 0.7;
}

.trust-logos span {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-soft);
}

/* ---------- Sections ---------- */
section {
  padding: 96px 0;
}

.section-alt {
  background: var(--bg-alt);
  transition: background 0.25s ease;
}

.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin-bottom: 16px;
  max-width: 640px;
}

.section-title-sm {
  font-size: 2rem;
}

.section-title-center {
  margin-left: auto;
  margin-right: auto;
}

.section-desc {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 48px;
}

.section-desc-center {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Features ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 36px 28px;
  border: 1px solid var(--border);
  transition: all 0.25s;
}

.feature-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-card);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--blue-soft);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.4rem;
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--navy);
}

.feature-card p {
  font-size: 0.975rem;
  color: var(--text-muted);
}

/* ---------- Split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.split.reverse {
  direction: rtl;
}

.split.reverse > * {
  direction: ltr;
}

.split img {
  border-radius: 12px;
  box-shadow: var(--shadow);
  height: 380px;
  width: 100%;
  object-fit: cover;
}

.split-text {
  color: var(--text-muted);
  margin-bottom: 8px;
}

.check-list {
  list-style: none;
  margin-top: 24px;
}

.check-list li {
  padding: 10px 0;
  padding-left: 28px;
  position: relative;
  color: var(--text-soft);
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--blue);
  font-weight: 700;
}

/* ---------- Metrics ---------- */
.metrics {
  background: var(--metric-bg);
  color: var(--metric-text);
  padding: 80px 0;
  transition: background 0.25s ease;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.metric-value {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.metric-label {
  font-size: 0.95rem;
  opacity: 0.75;
}

/* ---------- Integrations ---------- */
.integrations-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.integration-tag {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-soft);
  transition: border-color 0.2s;
}

.integration-tag:hover {
  border-color: var(--blue);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--cta-bg);
  color: #ffffff;
  text-align: center;
  padding: 96px 0;
}

.cta-band h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.cta-band p {
  font-size: 1.15rem;
  opacity: 0.85;
  margin-bottom: 36px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Footer ---------- */
footer {
  background: var(--navy-mid);
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 0 32px;
  font-size: 0.9rem;
}

html.dark footer {
  background: #0b1220;
}

footer .logo {
  color: #ffffff;
  margin-bottom: 16px;
}

footer .logo span {
  color: var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  max-width: 280px;
  line-height: 1.7;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-col a {
  display: block;
  margin-bottom: 12px;
  opacity: 0.75;
}

.footer-col a:hover {
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- Privacy modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal[hidden] {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
}

html.dark .modal-backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  max-height: min(85vh, 640px);
  overflow-y: auto;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 32px 28px 28px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
}

.modal-close:hover {
  color: var(--text);
  background: var(--bg-alt);
}

.modal-panel h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  padding-right: 36px;
}

.modal-body p {
  font-size: 0.95rem;
  color: var(--text-soft);
  margin-bottom: 14px;
  line-height: 1.65;
}

.modal-body a {
  color: var(--blue);
  text-decoration: underline;
}

.modal-note {
  font-size: 0.85rem !important;
  color: var(--text-muted) !important;
  margin-bottom: 0 !important;
  margin-top: 8px;
}

body.modal-open {
  overflow: hidden;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid,
  .split,
  .features-grid,
  .metrics-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2.4rem;
  }

  .nav-links {
    display: none;
  }

  .split.reverse {
    direction: ltr;
  }

  .hero-visual canvas,
  .split img {
    height: 280px;
  }
}


/* ---------- Footer slogan ---------- */
.footer-slogan {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  font-style: normal;
  color: var(--accent);
  letter-spacing: 0.01em;
  margin: 4px 0 0;
  max-width: 320px;
  line-height: 1.45;
}


/* ---------- Hero entrance — pure CSS (works with file://) ---------- */

@keyframes heroRise {
  from {
    opacity: 0;
    transform: translate3d(0, 48px, 0);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@keyframes heroImageIn {
  from {
    opacity: 0;
    transform: translate3d(0, 56px, 0) scale(0.96);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
  }
}

.hero-eyebrow,
.hero-copy h1,
.hero-copy > p:not(.hero-eyebrow),
.hero-ctas {
  animation: heroRise 1.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-eyebrow { animation-delay: 0.2s; }
.hero-copy h1 { animation-delay: 0.45s; }
.hero-copy > p:not(.hero-eyebrow) { animation-delay: 0.75s; }
.hero-ctas { animation-delay: 1.0s; }

.hero-visual {
  animation: heroImageIn 1.8s cubic-bezier(0.16, 1, 0.3, 1) 0.55s both;
}

.hero-visual canvas {
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}



@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow,
  .hero-copy h1,
  .hero-copy > p:not(.hero-eyebrow),
  .hero-ctas,
  .hero-visual {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
