/* ═══════════════════════════════════════════════════════════════
   WEAVIAN — WEBSITE STYLESHEET
   Design System: Dark premium, electric cyan accent, Inter font
   ═══════════════════════════════════════════════════════════════ */

/* ─── RESET & VARIABLES ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* Colors */
  --bg-deep:       #0b0f1a;
  --bg-primary:    #0f1320;
  --bg-secondary:  #141929;
  --bg-card:       #161c2e;
  --bg-card-hover: #1c2438;
  --border:        rgba(255, 255, 255, 0.05);
  --border-hover:  rgba(100, 200, 220, 0.18);

  --text-primary:   #dce4ec;
  --text-secondary: #8896a8;
  --text-muted:     #5a6878;

  --accent:         #5eb8cc;
  --accent-dim:     #4a9bb0;
  --accent-glow:    rgba(94, 184, 204, 0.1);
  --purple:         #9b8cd8;
  --amber:          #d4a043;
  --green:          #4daa8a;
  --red:            #d46060;

  /* Gradients */
  --grad-accent: linear-gradient(135deg, #5eb8cc, #9b8cd8);
  --grad-hero:   radial-gradient(ellipse at 50% 0%, rgba(94, 184, 204, 0.05) 0%, transparent 60%);
  --grad-card:   linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --section-pad: clamp(80px, 10vh, 140px);
  --container-max: 1200px;
  --container-pad: clamp(20px, 4vw, 40px);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  width: 100%;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; border: none; background: none; cursor: pointer; color: inherit; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  box-sizing: border-box;
}

/* ─── GRADIENT TEXT ─── */
.gradient-text {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── SECTION HEADERS ─── */
.section-header {
  text-align: center;
  margin-bottom: clamp(48px, 6vw, 80px);
}

.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 16px;
  padding: 6px 16px;
  border: 1px solid rgba(94, 184, 204, 0.2);
  border-radius: 100px;
  background: rgba(94, 184, 204, 0.05);
}

.section-title {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.section-sub {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s var(--ease-out);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-deep);
  box-shadow: 0 0 12px rgba(94, 184, 204, 0.15), 0 4px 10px rgba(0, 0, 0, 0.2);
}
.btn-primary:hover {
  background: #7cc9d9;
  box-shadow: 0 0 18px rgba(94, 184, 204, 0.22), 0 6px 16px rgba(0, 0, 0, 0.25);
  transform: translateY(-2px);
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}
.btn-ghost:hover {
  border-color: var(--border-hover);
  background: rgba(94, 184, 204, 0.05);
  transform: translateY(-2px);
}

.btn-lg { padding: 18px 36px; font-size: 1.05rem; border-radius: 14px; }

/* ─── SCROLL ANIMATIONS ─── */
.anim-fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.anim-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════ NAVIGATION ═══════════════════════ */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all 0.4s var(--ease-out);
}
#navbar.scrolled {
  background: rgba(5, 8, 16, 0.85);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}
.logo-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.25s;
  position: relative;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-btn {
  padding: 10px 22px;
  background: var(--accent);
  color: var(--bg-deep) !important;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.3s var(--ease-out);
}
.nav-btn:hover {
  background: #7cc9d9;
  box-shadow: 0 0 14px rgba(94, 184, 204, 0.18);
}

/* Mobile nav */
.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s;
  border-radius: 2px;
}
.nav-mobile-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-mobile-toggle.open span:nth-child(2) { opacity: 0; }
.nav-mobile-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 16px var(--container-pad) 24px;
  gap: 4px;
}
.mobile-menu.open { display: flex; }

.mobile-link {
  padding: 12px 16px;
  font-size: 1rem;
  color: var(--text-secondary);
  border-radius: 10px;
  transition: all 0.2s;
}
.mobile-link:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; }
}

/* ═══════════════════════ HERO ═══════════════════════ */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px var(--container-pad) 48px;
  background: transparent;
  overflow: hidden;
}

.hero-split {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  max-width: 1280px;
  width: 100%;
}

.hero-video-wrap {
  flex: 1 1 48%;
  min-width: 0;
  max-width: 600px;
}

.hero-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 80px rgba(94, 184, 204, 0.08);
}
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    var(--grad-hero),
    radial-gradient(ellipse at 20% 80%, rgba(155, 140, 216, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(94, 184, 204, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

#hero-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
}

.hero-content {
  position: relative;
  text-align: left;
  flex: 1 1 48%;
  min-width: 280px;
}

/* Hero logo */
.hero-logo-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 20px;
}
.hero-logo {
  width: clamp(120px, 18vw, 200px);
  height: auto;
  display: block;
  filter: drop-shadow(0 0 40px rgba(94, 184, 204, 0.25)) drop-shadow(0 0 80px rgba(155, 140, 216, 0.15));
  animation: hero-logo-float 6s ease-in-out infinite;
}
.hero-logo-glow {
  position: absolute;
  inset: -30%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 184, 204, 0.12) 0%, rgba(155, 140, 216, 0.06) 40%, transparent 70%);
  pointer-events: none;
  animation: hero-glow-pulse 4s ease-in-out infinite;
}
@keyframes hero-logo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes hero-glow-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.hero-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  padding: 8px 20px;
  border: 1px solid rgba(94, 184, 204, 0.25);
  border-radius: 100px;
  background: rgba(94, 184, 204, 0.06);
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 580px;
  margin: 0 0 24px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

/* Hero stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  flex-wrap: wrap;
}
.stat {
  padding: 0 clamp(16px, 3vw, 40px);
  text-align: center;
}
.stat-num, .stat-num-static {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.stat-unit {
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 700;
  color: var(--accent);
}
.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
  font-weight: 500;
}
.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0.4;
  animation: scroll-pulse 2.5s ease-in-out infinite;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
}
.hero-scroll-indicator span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}
@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.7; transform: translateX(-50%) translateY(6px); }
}

@media (max-width: 860px) {
  .hero-split {
    flex-direction: column;
    text-align: center;
  }
  .hero-content {
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-stats {
    justify-content: center;
  }
  .hero-sub {
    margin: 0 auto 24px;
  }
  .hero-video-wrap {
    max-width: 560px;
    width: 100%;
  }
}

/* ═══════════════════════ STORIES ═══════════════════════ */
#stories {
  padding: var(--section-pad) 0;
  background: rgba(15, 19, 32, 0.65);
  position: relative;
}
#stories::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.story-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--ease-out);
}
.story-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-accent);
  opacity: 0;
  transition: opacity 0.4s;
}
.story-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  background: var(--bg-card-hover);
}
.story-card:hover::before { opacity: 1; }

.story-icon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  margin-bottom: 20px;
  opacity: 0.7;
}
.story-icon svg { width: 100%; height: 100%; }

.story-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.story-role {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.story-card blockquote {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  font-style: italic;
  position: relative;
  padding-left: 16px;
  border-left: 2px solid rgba(94, 184, 204, 0.2);
}

.story-tag {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: rgba(94, 184, 204, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
}

.stories-footer {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}
.stories-footer strong { color: var(--text-primary); }
.stories-footer em { color: var(--accent); font-style: normal; font-weight: 600; }

/* ═══════════════════════ PROBLEM (HOUSE OF CARDS) ═══════════════════════ */
#problem {
  padding: var(--section-pad) 0;
  background: rgba(11, 15, 26, 0.6);
  position: relative;
  overflow: hidden;
}

.problem-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}

@media (max-width: 860px) {
  .problem-layout {
    grid-template-columns: 1fr;
  }
}

.problem-text .section-tag { display: inline-block; margin-bottom: 16px; }
.problem-text .section-title { text-align: left; }

.problem-details p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1.02rem;
}
.problem-details strong { color: var(--text-primary); }

.problem-callout {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: 12px;
  margin-top: 24px;
  color: #fca5a5;
  font-size: 0.92rem;
  font-weight: 500;
}
.problem-callout svg { flex-shrink: 0; color: var(--red); }
.problem-callout strong { color: #fecaca; }

/* ─── House of Cards (Physics-based diagonal) ─── */
.problem-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  overflow: visible;
}

.hoc-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
}

#hoc-scene {
  position: relative;
  width: min(100%, 740px);
  height: 500px;
}

@media (max-width: 640px) {
  #hoc-scene {
    width: min(100%, 440px);
    height: 360px;
  }
}

.hoc-ground {
  position: absolute;
  bottom: 24px;
  left: 40px;
  right: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.06) 20%, rgba(255,255,255,.06) 80%, transparent);
}
.hoc-ground-glow {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 24px;
  background: radial-gradient(ellipse 50% 100% at 50% 100%, rgba(59,130,246,.025), transparent);
}

/* Individual physics cards */
.hoc-c {
  position: absolute;
  border-radius: 5px;
  border: 1.5px solid rgba(255,255,255,.07);
  background: linear-gradient(155deg, #1c2035, #14161f);
  box-shadow: 0 2px 8px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.04);
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
  touch-action: none;
  z-index: 1;
  transition: filter .1s;
  -webkit-user-select: none;
  user-select: none;
}
.hoc-c::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 50%);
  pointer-events: none;
}
.hoc-c:hover:not(.fallen) { filter: brightness(1.2); z-index: 5; }
.hoc-c.dragging { cursor: grabbing; filter: brightness(1.3); z-index: 100; transition: none; }
.hoc-c.fallen { cursor: default; transition: none; }

.hoc-c .hoc-st {
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 3px;
  border-radius: 4px 4px 0 0;
}
.hoc-c .hoc-lb {
  font-size: 8.75px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  text-align: center;
  line-height: 1.3;
  color: rgba(255,255,255,.6);
  pointer-events: none;
}

.hoc-c.lean { width: 72px; height: 106px; }
.hoc-c.bridge { width: 108px; height: 26px; border-radius: 3px; }
.hoc-c.bridge .hoc-lb { font-size: 6.8px; }
.hoc-c.bridge .hoc-st { height: 2px; }

/* Card color stripe variants */
.hoc-ct .hoc-st { background: #14b8a6; } .hoc-ct { border-color: rgba(20,184,166,.18); }
.hoc-cp .hoc-st { background: #8b5cf6; } .hoc-cp { border-color: rgba(139,92,246,.18); }
.hoc-cbl .hoc-st { background: #60a5fa; } .hoc-cbl { border-color: rgba(96,165,250,.18); }
.hoc-cy .hoc-st { background: #eab308; } .hoc-cy { border-color: rgba(234,179,8,.18); }
.hoc-co .hoc-st { background: #f97316; } .hoc-co { border-color: rgba(249,115,22,.18); }
.hoc-cod .hoc-st { background: #ea580c; } .hoc-cod { border-color: rgba(234,88,12,.18); }
.hoc-cb .hoc-st { background: #3b82f6; } .hoc-cb { border-color: rgba(59,130,246,.18); }

/* Reset button */
#hoc-resetBtn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .4s, background .2s, transform .3s;
  pointer-events: none;
  z-index: 200;
}
#hoc-resetBtn.on { opacity: 1; pointer-events: all; }
#hoc-resetBtn:hover { background: rgba(255,255,255,.1); color: #fff; transform: rotate(-90deg); }

/* Legend */
.hoc-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}
.hoc-legend-i {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
}
.hoc-legend-d {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
}

/* Label below */
.hoc-cards-label {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  transition: all 0.5s;
}

/* Debris particles */
.hoc-debris {
  position: absolute;
  border-radius: 1px;
  pointer-events: none;
  z-index: 0;
}

/* ═══════════════════════ SOLUTION ═══════════════════════ */
#solution {
  padding: var(--section-pad) 0;
  background: rgba(15, 19, 32, 0.65);
  position: relative;
  overflow: hidden;
}

.solution-visual {
  margin-bottom: clamp(48px, 6vw, 80px);
}

/* ─── Architecture Diagram ─── */
.arch-diagram {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  padding: 32px 0;
  margin-bottom: clamp(48px, 6vw, 80px);
  overflow-x: auto;
  max-width: 100%;
  box-sizing: border-box;
}

.arch-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.arch-col-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-left: 4px;
}

/* Connection / App items */
.arch-conn-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  min-width: 170px;
  transition: all 0.3s var(--ease-out);
}
.arch-conn-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateX(2px);
}

.arch-conn-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.arch-conn-item span {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Dashed flow columns */
.arch-flow-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 22px;
  padding: 16px 6px;
  position: relative;
  min-width: 48px;
}

.arch-dash-line {
  width: 100%;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    rgba(94, 184, 204, 0.4) 0,
    rgba(94, 184, 204, 0.4) 8px,
    transparent 8px,
    transparent 14px
  );
  animation: dashFlow 1.5s linear infinite;
}

@keyframes dashFlow {
  from { background-position: 0 0; }
  to { background-position: 28px 0; }
}

.arch-flow-arrow {
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: arrowPulse 2s ease-in-out infinite;
}

@keyframes arrowPulse {
  0%, 100% { opacity: 0.6; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(4px); }
}

/* Edge Agent box */
.arch-edge-box {
  background: var(--bg-card);
  border: 2px solid rgba(94, 184, 204, 0.2);
  border-radius: 20px;
  padding: 28px 24px;
  gap: 0;
  min-width: 260px;
  position: relative;
  box-shadow: 0 0 40px rgba(94, 184, 204, 0.04);
}

.arch-edge-header {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.arch-edge-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.arch-edge-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.arch-edge-feat {
  display: flex;
  align-items: center;
  gap: 10px;
}

.arch-feat-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.arch-edge-feat span {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Cloud Anchor */
.arch-cloud-anchor {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  min-width: 80px;
}

.arch-cloud-icon {
  color: var(--accent);
  opacity: 0.7;
}

.arch-cloud-label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.3;
}

.arch-cloud-regions {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Responsive: stack on mobile */
@media (max-width: 900px) {
  .arch-diagram {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  .arch-flow-col {
    flex-direction: row;
    width: 200px;
    min-width: auto;
    padding: 6px 16px;
  }
  .arch-dash-line {
    width: 2px;
    height: 24px;
    background: repeating-linear-gradient(
      180deg,
      rgba(94, 184, 204, 0.4) 0,
      rgba(94, 184, 204, 0.4) 8px,
      transparent 8px,
      transparent 14px
    );
  }
  .arch-flow-arrow {
    transform: rotate(90deg);
  }
  .arch-cloud-anchor {
    flex-direction: row;
    gap: 12px;
  }
}

/* Solution cards */
.solution-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 20px;
}

.sol-card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.sol-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-card);
  pointer-events: none;
}
.sol-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.sol-icon-pill {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(94, 184, 204, 0.08);
  border: 1px solid rgba(94, 184, 204, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 18px;
}

.sol-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.sol-card p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ═══════════════════════ HOW IT WORKS ═══════════════════════ */
#how-it-works {
  padding: var(--section-pad) 0;
  background: rgba(11, 15, 26, 0.6);
}

.architecture-flow {
  max-width: 640px;
  margin: 0 auto 60px;
}

.arch-step {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.arch-step-num {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(94, 184, 204, 0.1);
  border: 1px solid rgba(94, 184, 204, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
  font-family: var(--font-mono);
}

.arch-step-content {
  flex: 1;
}

.arch-icon-wrap {
  width: 56px;
  height: 56px;
  color: var(--accent);
  opacity: 0.6;
  margin-bottom: 12px;
}
.arch-icon-wrap svg { width: 100%; height: 100%; }

.arch-step-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.arch-step-content p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.arch-connector {
  width: 2px;
  height: 48px;
  margin: 0 0 0 19px;
  background: linear-gradient(to bottom, rgba(94, 184, 204, 0.2), rgba(94, 184, 204, 0.05));
}

/* Terminal demo */
.terminal-demo {
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  max-width: 800px;
  margin: 0 auto;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}
.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.terminal-dots span:nth-child(1) { background: #ff5f56; }
.terminal-dots span:nth-child(2) { background: #ffbd2e; }
.terminal-dots span:nth-child(3) { background: #27c93f; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.9;
  overflow-x: auto;
  max-width: 100%;
}

.term-line {
  white-space: nowrap;
  opacity: 0;
  transform: translateY(8px);
  animation: termLine 0.3s ease forwards;
}
.term-line:nth-child(1)  { animation-delay: 0.2s; }
.term-line:nth-child(2)  { animation-delay: 0.4s; }
.term-line:nth-child(3)  { animation-delay: 0.6s; }
.term-line:nth-child(4)  { animation-delay: 1.2s; }
.term-line:nth-child(5)  { animation-delay: 1.8s; }
.term-line:nth-child(6)  { animation-delay: 2.6s; }
.term-line:nth-child(7)  { animation-delay: 3.0s; }
.term-line:nth-child(8)  { animation-delay: 3.4s; }
.term-line:nth-child(9)  { animation-delay: 3.8s; }
.term-line:nth-child(10) { animation-delay: 4.4s; }
.term-line:nth-child(11) { animation-delay: 4.8s; }
.term-line:nth-child(12) { animation-delay: 5.2s; }

.terminal-body.animate .term-line {
  animation-play-state: running;
}
.terminal-body:not(.animate) .term-line {
  animation-play-state: paused;
  opacity: 0;
}

@keyframes termLine {
  to { opacity: 1; transform: translateY(0); }
}

.term-time { color: var(--text-muted); }
.term-ok   { color: var(--green); }
.term-warn { color: var(--amber); }
.term-info { color: var(--accent); }
.term-val  { color: var(--accent); font-weight: 500; }
.term-err  { color: var(--red); font-weight: 600; }
.term-class { 
  color: var(--purple); 
  font-weight: 600;
  background: rgba(155, 140, 216, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.term-cursor::after {
  content: '█';
  color: var(--accent);
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  50% { opacity: 0; }
}

/* ═══════════════════════ FEATURES ═══════════════════════ */
#features {
  padding: var(--section-pad) 0;
  background: rgba(15, 19, 32, 0.65);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 20px;
}

.feature-card {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all 0.4s var(--ease-out);
  position: relative;
}
.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  color: var(--accent);
  opacity: 0.7;
}
.feature-icon svg { width: 100%; height: 100%; }

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ═══════════════════════ USE CASES ═══════════════════════ */
#use-cases {
  padding: var(--section-pad) 0;
  background: rgba(11, 15, 26, 0.6);
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 20px;
}

.uc-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.4s var(--ease-out);
}
.uc-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.uc-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: var(--uc-color);
  opacity: 0;
  transition: opacity 0.4s;
}
.uc-card:hover .uc-bg { opacity: 1; }

.uc-content {
  padding: 32px;
}

.uc-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.uc-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.uc-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ═══════════════════════ TECHNOLOGY BANNER ═══════════════════════ */
#technology {
  padding: var(--section-pad) 0;
  background: rgba(15, 19, 32, 0.65);
}

.tech-banner {
  padding: clamp(40px, 5vw, 60px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  text-align: center;
}

.tech-banner h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.tech-banner p {
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 32px;
  font-size: 1rem;
  line-height: 1.8;
}

.tech-stack-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.pill {
  padding: 8px 18px;
  background: rgba(94, 184, 204, 0.06);
  border: 1px solid rgba(94, 184, 204, 0.15);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  font-family: var(--font-mono);
  transition: all 0.3s;
}
.pill:hover {
  background: rgba(94, 184, 204, 0.12);
  border-color: rgba(94, 184, 204, 0.3);
  transform: translateY(-2px);
}

/* ═══════════════════════ CTA / CONTACT ═══════════════════════ */
#contact {
  padding: var(--section-pad) 0;
  background: rgba(11, 15, 26, 0.6);
  position: relative;
  overflow: hidden;
}
#contact::before {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(94, 184, 204, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section {
  text-align: center;
  position: relative;
}

.cta-title {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.cta-sub {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.8;
}

.cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.cta-meta {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ─── CONTACT FORM ─── */
.contact-form {
  max-width: 640px;
  margin: 0 auto 32px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group-full {
  width: 100%;
}

.contact-form label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.form-optional {
  font-weight: 400;
  color: var(--text-muted);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background 0.25s;
  -webkit-appearance: none;
  appearance: none;
}

.contact-form select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238896a8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
.contact-form select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.contact-form textarea {
  resize: vertical;
  min-height: 100px;
}

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

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(94, 184, 204, 0.1);
  background: rgba(255, 255, 255, 0.06);
}

/* Validation error state */
.contact-form input.error,
.contact-form select.error,
.contact-form textarea.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(212, 96, 96, 0.1);
}

.contact-submit {
  align-self: center;
  min-width: 200px;
  justify-content: center;
  margin-top: 4px;
}
.contact-submit .submit-arrow { transition: transform 0.3s var(--ease-out); }
.contact-submit:hover .submit-arrow { transform: translateX(4px); }
.contact-submit.sending { pointer-events: none; opacity: 0.8; }

@keyframes spin {
  to { transform: rotate(360deg); }
}
.spinner {
  animation: spin 0.8s linear infinite;
}

/* Success state */
.contact-success {
  max-width: 480px;
  margin: 0 auto 32px;
  text-align: center;
  padding: 40px 24px;
  animation: successFade 0.5s var(--ease-out);
}
@keyframes successFade {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.success-icon {
  color: var(--green);
  margin-bottom: 16px;
}
.contact-success h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.contact-success p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.7;
}

/* ═══════════════════════ FOOTER ═══════════════════════ */
#footer {
  padding: 60px 0 40px;
  background: rgba(15, 19, 32, 0.7);
  border-top: 1px solid var(--border);
}

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

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}
@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand .nav-logo {
  margin-bottom: 16px;
}
.footer-tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}
.footer-col a:hover {
  color: var(--text-primary);
}

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

.footer-legal {
  display: flex;
  gap: 24px;
}
.footer-legal a {
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-legal a:hover { color: var(--text-secondary); }

/* ═══════════════════════ UTILITIES ═══════════════════════ */
::selection {
  background: rgba(94, 184, 204, 0.3);
  color: white;
}

::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-deep);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Smooth page load */
body {
  animation: pageLoad 0.6s ease;
}
@keyframes pageLoad {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ═══════════════════════ ADDITIONAL RESPONSIVE ═══════════════════════ */
@media (max-width: 480px) {
  .hero-stats {
    flex-direction: column;
    gap: 20px;
  }
  .stat-divider {
    width: 40px;
    height: 1px;
  }
  .stories-grid {
    grid-template-columns: 1fr;
  }
  .house-of-cards {
    transform: scale(0.8);
  }
  .hoc-scene {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .hoc-pulled-wrapper {
    flex-direction: row;
    margin-bottom: 0;
    transform: rotate(-4deg);
    animation: none;
  }
  .hoc-legend {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 0;
  }
  .features-grid,
  .use-cases-grid {
    grid-template-columns: 1fr;
  }
  .solution-cards {
    grid-template-columns: 1fr 1fr;
  }
  .terminal-demo {
    border-radius: 12px;
  }
  .terminal-body {
    font-size: 0.65rem;
  }
}

@media (max-width: 360px) {
  .hero-title {
    font-size: 1.8rem;
  }
}
