/* ===================================================================
   SYNTHGRID DESIGN SYSTEM - styles.css
   Shared across all pages. Light theme for institutional credibility.
   =================================================================== */

:root {
  /* Core palette - Light (professional certification) */
  --bg-primary: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --bg-surface: #EEF2F7;
  --bg-elevated: #EDF2F7;

  /* Borders & lines */
  --border-subtle: #E2E8F0;
  --border-medium: #CBD5E1;
  --border-active: rgba(67, 56, 202, 0.25);

  /* Text */
  --text-primary: #0F172A;
  --text-secondary: #334155;
  --text-tertiary: #64748B;

  /* Accents - indigo + gold + teal (split-complementary) */
  --accent-blue: #4338CA;
  --accent-blue-dim: rgba(67, 56, 202, 0.08);
  --accent-blue-glow: rgba(67, 56, 202, 0.06);
  --accent-amber: #A16207;
  --accent-amber-dim: rgba(161, 98, 7, 0.08);
  --accent-green: #0F766E;
  --accent-green-dim: rgba(15, 118, 110, 0.08);
  --accent-red: #B91C1C;

  /* Status */
  --status-active: #4338CA;
  --status-settled: #4338CA;
  --status-positive: #0F766E;

  /* Surfaces */
  --nav-bg: rgba(248, 250, 252, 0.92);

  /* Typography */
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 120px;

  /* Borders */
  --radius-sm: 2px;
  --radius-md: 6px;
}

/* ===================================================================
   RESET & BASE
   =================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ===================================================================
   LAYOUT
   =================================================================== */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

section {
  padding: var(--space-3xl) 0;
}

/* ===================================================================
   NAVIGATION
   =================================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  height: 64px;
  display: flex;
  align-items: center;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav-name {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 2.5px;
}

.nav-name .brand-accent {
  color: var(--accent-blue);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.nav-links a {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

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

.nav-cta {
  font-family: var(--font-sans) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  padding: 8px 18px;
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue) !important;
  border-radius: var(--radius-md);
  transition: background 0.2s, color 0.2s;
}

.nav-cta:hover {
  background: var(--accent-blue);
  color: #FFFFFF !important;
}

/* ===================================================================
   HERO SECTION
   =================================================================== */

.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 120px;
  position: relative;
}

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

.hero-label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-blue);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding-left: var(--space-md);
  border-left: 2px solid var(--accent-blue);
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
  max-width: 800px;
  margin-bottom: var(--space-lg);
  letter-spacing: -1px;
}

.hero h1 span {
  color: var(--accent-blue);
}

.hero-subtitle {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: var(--space-xl);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  flex-wrap: wrap;
}

/* ===================================================================
   BUTTONS
   =================================================================== */

.btn-primary {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 14px 28px;
  border: 1px solid var(--accent-blue);
  background: var(--accent-blue);
  color: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
  border-radius: var(--radius-md);
}

.btn-primary:hover {
  background: #3730A3;
  border-color: #3730A3;
}

.btn-secondary {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 14px 28px;
  border: 1px solid var(--border-medium);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
  border-radius: var(--radius-md);
}

.btn-secondary:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

/* ===================================================================
   PIPELINE VISUALIZATION
   =================================================================== */

.hero-pipeline {
  margin-top: var(--space-2xl);
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.pipeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-subtle);
}

.pipeline-title {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.pipeline-status {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--status-positive);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.pipeline-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0;
}

.pipeline-node {
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  padding: var(--space-md) var(--space-lg);
  text-align: center;
  position: relative;
  transition: border-color 0.3s;
  border-radius: var(--radius-md);
}

.pipeline-node.active {
  border-color: var(--accent-blue);
}

.pipeline-node.settled {
  border-color: var(--accent-blue);
}

.pipeline-node-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.pipeline-node-value {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.pipeline-node-value.blue {
  color: var(--accent-blue);
}

.pipeline-node-value.amber {
  color: var(--accent-blue);
}

.pipeline-connector {
  width: 40px;
  height: 2px;
  background: var(--border-medium);
  position: relative;
}

/* ===================================================================
   SECTIONS
   =================================================================== */

.section-header {
  margin-bottom: var(--space-2xl);
}

.section-label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-blue);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  padding-left: var(--space-md);
  border-left: 2px solid var(--accent-blue);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  font-weight: 400;
}

/* ===================================================================
   NARRATIVE / PROBLEM SECTION
   =================================================================== */

.narrative-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.narrative-body {
  max-width: 600px;
}

.narrative-body p {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
  font-weight: 400;
}

.narrative-body p strong {
  color: var(--text-primary);
  font-weight: 500;
}

.narrative-body .highlight {
  color: var(--accent-blue);
  font-weight: 500;
}

.narrative-body .highlight-amber {
  color: var(--accent-blue);
  font-weight: 500;
}

/* Stat stack */
.stat-stack {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.stat-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  background: var(--bg-secondary);
  transition: background 0.3s;
}

.stat-row:hover {
  background: var(--bg-surface);
}

.stat-number {
  padding: var(--space-lg);
  border-right: 1px solid var(--border-subtle);
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 600;
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-row.amber .stat-number {
  color: var(--accent-blue);
}

.stat-content {
  padding: var(--space-md) var(--space-lg);
}

.stat-content-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.stat-content-desc {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* ===================================================================
   PROCESS FLOW DIAGRAM
   =================================================================== */

.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: var(--space-2xl) 0;
  margin-top: var(--space-xl);
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: 0 var(--space-lg);
  min-width: 100px;
}

.flow-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-icon svg {
  width: 100%;
  height: 100%;
}

.flow-label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.flow-label-final {
  color: var(--accent-blue);
}

.flow-sublabel {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-tertiary);
}

.flow-connector {
  width: 48px;
  height: 8px;
  flex-shrink: 0;
  margin-bottom: 28px;
}

.flow-connector svg {
  width: 100%;
  height: 100%;
}

/* ===================================================================
   VISION & LAYER CARDS
   =================================================================== */

.layer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  margin-top: var(--space-xl);
  border-radius: var(--radius-md);
}

.vision-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  margin-top: var(--space-xl);
  border-radius: var(--radius-md);
}

.vision-cell {
  background: var(--bg-secondary);
  padding: var(--space-xl);
  transition: background 0.3s;
}

.vision-cell:hover {
  background: var(--bg-surface);
}

.vision-cell-era {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.vision-cell-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.vision-cell-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.vision-cell.future {
  border-left: 2px solid var(--accent-blue);
}

.vision-cell.future .vision-cell-era {
  color: var(--accent-blue);
}

/* ===================================================================
   CTA BANNER
   =================================================================== */

.cta-banner {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-2xl) 0;
  text-align: center;
}

/* ===================================================================
   FOOTER
   =================================================================== */

.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-2xl) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-2xl);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.footer-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 300px;
  line-height: 1.6;
}

.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-col a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--accent-blue);
}

.footer-bottom {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 12px;
  color: var(--text-tertiary);
}

.footer-build {
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ===================================================================
   FORMS
   =================================================================== */

.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px var(--accent-blue-dim);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-submit {
  width: 100%;
  padding: 14px;
  margin-top: var(--space-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  background: var(--accent-blue);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.2s;
}

.form-submit:hover {
  background: #3730A3;
}

.form-note {
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: var(--space-md);
}

/* ===================================================================
   HAMBURGER BUTTON
   =================================================================== */

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
  width: 32px;
  height: 32px;
  position: relative;
}

.nav-hamburger span {
  display: block;
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transform: translateX(-50%);
  transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
}

.nav-hamburger span:nth-child(1) {
  top: 9px;
}

.nav-hamburger span:nth-child(2) {
  top: 15px;
}

.nav-hamburger span:nth-child(3) {
  top: 21px;
}

.nav-hamburger.active span:nth-child(1) {
  top: 15px;
  transform: translateX(-50%) rotate(45deg);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
  top: 15px;
  transform: translateX(-50%) rotate(-45deg);
}

/* MOBILE MENU OVERLAY */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(248, 250, 252, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  opacity: 0;
  transition: opacity 0.3s;
}

.mobile-menu.active {
  opacity: 1;
}

.mobile-menu a {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--space-sm) var(--space-lg);
  transition: color 0.2s;
  letter-spacing: 0.5px;
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--accent-blue);
}

.mobile-menu .nav-cta {
  margin-top: var(--space-md);
  font-size: 16px;
  padding: 12px 28px;
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue);
  border-radius: var(--radius-md);
}

body.menu-open {
  overflow: hidden;
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */

@media (max-width: 900px) {
  .pipeline-flow {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .pipeline-connector {
    width: 2px;
    height: 20px;
    margin: 0 auto;
  }

  .narrative-split {
    grid-template-columns: 1fr;
  }

  .flow-diagram {
    flex-wrap: wrap;
    gap: var(--space-md);
    padding: var(--space-xl) var(--space-md);
  }

  .flow-connector {
    display: none;
  }

  .flow-step {
    min-width: 80px;
    padding: 0 var(--space-sm);
  }

  .layer-grid {
    grid-template-columns: 1fr;
  }

  .vision-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: block;
  }

  .mobile-menu {
    display: flex;
  }

  .mobile-menu:not(.active) {
    pointer-events: none;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 28px;
  }

  .vision-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================================================================
   ANIMATIONS
   =================================================================== */

.decode-text {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.decode-text.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.stagger.visible > *:nth-child(1) { transition-delay: 0.0s; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.08s; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.16s; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.24s; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.32s; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.40s; }
.stagger.visible > *:nth-child(7) { transition-delay: 0.48s; }

.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}
