/* ============================================================
   ROOT & PALETTE (matches Nexus Workshops)
   ============================================================ */
:root {
  --nw-blue:        #1d4ed8;
  --nw-blue-light:  #2563eb;
  --nw-blue-bright: #3b82f6;
  --nw-blue-dark:   #1e40af;
  --nw-teal:        #0891b2;
  --nw-teal-bright: #06b6d4;

  --term-bg:        #0c1222;
  --term-surface:   #131b2e;
  --term-green:     #10b981;
  --term-green-br:  #34d399;
  --term-cyan:      #22d3ee;
  --term-amber:     #fbbf24;
  --term-red:       #f87171;

  --silver-50:  #fafbfc;
  --silver-100: #f4f6f8;
  --silver-200: #e8ecf0;
  --silver-300: #d1d9e0;
  --silver-400: #b4bfc9;

  --neutral-600: #4b5563;
  --neutral-700: #374151;
  --neutral-800: #1f2937;
  --neutral-900: #0f172a;

  --grad-primary: linear-gradient(135deg, #1d4ed8 0%, #0891b2 100%);
  --grad-hero:    linear-gradient(135deg, #1e40af 0%, #1d4ed8 50%, #0891b2 100%);
  --grad-term:    linear-gradient(135deg, #10b981 0%, #22d3ee 100%);
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--silver-100);
  color: var(--neutral-700);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ============================================================
   GRAIN OVERLAY
   ============================================================ */
.grain {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 9999;
  opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: fixed; top: 0; width: 100%;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(209,217,224,.5);
  z-index: 1000;
  transition: box-shadow .3s;
}
.header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  border-bottom-color: transparent;
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
}
.logo-wrap { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-mark {
  width: 40px; height: 40px;
  background: var(--grad-primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.logo-mark svg { width: 22px; height: 22px; color: white; }
.logo-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem; font-weight: 700;
  color: var(--nw-blue); line-height: 1.1;
}
.logo-sub { font-size: .72rem; color: var(--neutral-600); font-weight: 500; }

nav { display: flex; gap: 28px; align-items: center; }
nav a {
  color: var(--neutral-700); text-decoration: none;
  font-weight: 600; font-size: .95rem;
  position: relative; transition: color .2s;
}
nav a::after {
  content: ''; position: absolute; bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: var(--grad-primary);
  border-radius: 2px; transition: width .3s;
}
nav a:hover { color: var(--nw-blue); }
nav a:hover::after { width: 100%; }
.nav-cta {
  background: var(--grad-primary);
  color: white !important; padding: 9px 20px;
  border-radius: 8px; font-weight: 700;
  box-shadow: 0 4px 12px rgba(29,78,216,.3);
  transition: transform .2s, box-shadow .2s !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(29,78,216,.4) !important; }

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--neutral-700); border-radius: 2px; transition: all .3s; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  background: var(--term-bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 130px 24px 80px;
  position: relative; overflow: hidden;
  text-align: center;
}

/* dot grid */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(16,185,129,.07) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

/* ambient glows */
.hero-glow {
  position: absolute; border-radius: 50%;
  pointer-events: none; filter: blur(90px);
}
.hero-glow-1 { width: 500px; height: 500px; top: -80px; right: -80px; background: rgba(29,78,216,.18); animation: glow-breathe 9s ease-in-out infinite; }
.hero-glow-2 { width: 400px; height: 400px; bottom: -60px; left: -60px; background: rgba(16,185,129,.12); animation: glow-breathe 12s ease-in-out infinite reverse; }
.hero-glow-3 { width: 300px; height: 300px; top: 50%; right: 15%; background: rgba(6,182,212,.1); animation: glow-breathe 7s ease-in-out infinite 2s; }
@keyframes glow-breathe {
  0%,100% { opacity:.5; transform: scale(1); }
  50% { opacity:1; transform: scale(1.15); }
}

/* live feed strip */
.hero-feed {
  position: absolute; inset: 0;
  overflow: hidden; pointer-events: none;
  opacity: .4;
}
.feed-col {
  position: absolute; top: -20px;
  display: flex; flex-direction: column; gap: 8px;
  animation: feed-fall linear infinite;
}
.feed-row {
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem; white-space: nowrap;
  padding: 2px 8px; border-radius: 4px;
}
.feed-row.g { color: var(--term-green); }
.feed-row.c { color: var(--term-cyan); }
.feed-row.a { color: var(--term-amber); }
.feed-row.r { color: var(--term-red); opacity:.7; }
@keyframes feed-fall {
  from { transform: translateY(0); }
  to   { transform: translateY(calc(100vh + 200px)); }
}

.hero-content { position: relative; z-index: 1; max-width: 860px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(16,185,129,.12);
  border: 1px solid rgba(16,185,129,.35);
  color: var(--term-green-br);
  padding: 9px 22px; border-radius: 50px;
  font-size: .85rem; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 28px;
}
.pulse-dot {
  width: 8px; height: 8px; background: var(--term-green);
  border-radius: 50%; animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity:1; box-shadow: 0 0 0 0 rgba(16,185,129,.4); }
  50% { opacity:.6; box-shadow: 0 0 0 5px rgba(16,185,129,0); }
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700; line-height: 1.15;
  color: white; margin-bottom: 24px;
}
.hero-title .accent {
  background: var(--grad-term);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.2rem; color: rgba(255,255,255,.72);
  line-height: 1.75; max-width: 680px;
  margin: 0 auto 40px;
}

.hero-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 14px 28px; border-radius: 10px;
  font-weight: 700; font-size: 1rem;
  text-decoration: none; transition: all .3s; cursor: pointer;
}
.btn svg { width: 18px; height: 18px; }
.btn-green {
  background: linear-gradient(135deg, var(--term-green) 0%, #059669 100%);
  color: white;
  box-shadow: 0 6px 24px rgba(16,185,129,.35);
}
.btn-green:hover { transform: translateY(-3px); box-shadow: 0 10px 32px rgba(16,185,129,.5); }
.btn-ghost {
  background: transparent; color: white;
  border: 2px solid rgba(255,255,255,.25);
}
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5); }

/* hero stat row */
.hero-stats {
  display: flex; gap: 40px; justify-content: center;
  margin-top: 56px; flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem; font-weight: 700;
  background: var(--grad-term);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-stat-label { font-size: .8rem; color: rgba(255,255,255,.45); font-weight: 500; margin-top: 2px; }

/* ============================================================
   SECTION COMMONS
   ============================================================ */
.section-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(29,78,216,.08), rgba(8,145,178,.12));
  color: var(--nw-blue);
  font-weight: 700; font-size: .8rem;
  text-transform: uppercase; letter-spacing: 2px;
  padding: 7px 18px; border-radius: 50px;
  border: 1.5px solid rgba(29,78,216,.22);
  margin-bottom: 16px;
  position: relative; overflow: hidden;
}
.section-badge::after {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  animation: shimmer 6s ease-in-out infinite;
}
@keyframes shimmer { 0%,75%,100% { left: -60%; } 35% { left: 110%; } }

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700; color: var(--neutral-800);
  margin-bottom: 16px;
}
.section-lead {
  font-size: 1.15rem; color: var(--neutral-600);
  line-height: 1.8; max-width: 680px; margin: 0 auto;
}
.section-head { text-align: center; margin-bottom: 60px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* scroll reveal */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.22,1,.36,1), transform .7s cubic-bezier(.22,1,.36,1);
}
.reveal.vis { opacity: 1; transform: translateY(0); }
.stagger .reveal:nth-child(1) { transition-delay: 0s; }
.stagger .reveal:nth-child(2) { transition-delay: .1s; }
.stagger .reveal:nth-child(3) { transition-delay: .2s; }
.stagger .reveal:nth-child(4) { transition-delay: .3s; }
.stagger .reveal:nth-child(5) { transition-delay: .4s; }
.stagger .reveal:nth-child(6) { transition-delay: .5s; }

/* ============================================================
   WHY IT MATTERS — industry cards
   ============================================================ */
.why-section {
  padding: 120px 24px;
  background: linear-gradient(to bottom, white, var(--silver-50));
}
.industry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}
.industry-card {
  background: white; border: 1px solid var(--silver-200);
  border-radius: 18px; padding: 36px 30px;
  transition: all .4s ease;
  position: relative; overflow: hidden;
}
.industry-card::after {
  content: ''; position: absolute; top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--grad-primary);
  transform: scaleX(0); transform-origin: left;
  transition: transform .4s cubic-bezier(.22,1,.36,1);
}
.industry-card:hover { transform: translateY(-6px); box-shadow: 0 20px 48px rgba(29,78,216,.1); border-color: var(--silver-300); }
.industry-card:hover::after { transform: scaleX(1); }
.ic-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
  box-shadow: 0 6px 18px rgba(29,78,216,.22);
  transition: transform .3s;
}
.industry-card:hover .ic-icon { transform: translateY(-3px) scale(1.06); }
.ic-icon svg { width: 26px; height: 26px; color: white; }
.industry-card h3 { font-size: 1.2rem; font-weight: 700; color: var(--neutral-800); margin-bottom: 10px; }
.industry-card p { font-size: .97rem; line-height: 1.7; color: var(--neutral-600); }

/* ============================================================
   ARCHITECTURE FLOW
   ============================================================ */
.arch-section {
  padding: 120px 24px;
  background: var(--term-bg); position: relative; overflow: hidden;
}
.arch-section::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(16,185,129,.035) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(16,185,129,.035) 1px, transparent 1px);
  background-size: 50px 50px; pointer-events: none;
}
.arch-section .section-badge { background: rgba(16,185,129,.1); color: var(--term-green-br); border-color: rgba(16,185,129,.3); }
.arch-section .section-title { color: white; }
.arch-section .section-lead { color: rgba(255,255,255,.6); }

.arch-diagram { max-width: 900px; margin: 0 auto; }

/* flow nodes */
.arch-flow {
  display: flex; align-items: center; justify-content: center;
  gap: 0; flex-wrap: wrap; margin-bottom: 50px;
}
.arch-node {
  background: var(--term-surface);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px; padding: 28px 22px;
  text-align: center; min-width: 140px;
  transition: all .3s; position: relative;
}
.arch-node:hover {
  border-color: rgba(16,185,129,.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.4);
}
.arch-node-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, var(--term-green), var(--term-cyan));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 4px 14px rgba(16,185,129,.3);
}
.arch-node-icon svg { width: 24px; height: 24px; color: white; }
.arch-node-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem; font-weight: 700;
  color: var(--term-green-br); text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 4px;
}
.arch-node-desc { font-size: .82rem; color: rgba(255,255,255,.45); line-height: 1.4; }

.arch-arrow {
  display: flex; align-items: center; padding: 0 4px;
}
.arch-arrow svg { width: 28px; height: 28px; color: rgba(16,185,129,.5); }

/* arch detail cards */
.arch-details {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.arch-detail {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px; padding: 24px 20px;
}
.arch-detail-head {
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem; color: var(--term-cyan); font-weight: 700;
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.arch-detail-head svg { width: 14px; height: 14px; }
.arch-detail p { font-size: .9rem; color: rgba(255,255,255,.5); line-height: 1.6; }

/* ============================================================
   PROBLEM CARDS
   ============================================================ */
.problems-section {
  padding: 120px 24px;
  background: linear-gradient(to bottom, var(--silver-50), white);
}
.problems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.problem-card {
  border-radius: 18px; overflow: hidden;
  border: 1px solid var(--silver-200);
  background: white;
  transition: all .4s;
}
.problem-card:hover { transform: translateY(-6px); box-shadow: 0 20px 48px rgba(29,78,216,.1); }
.problem-header {
  padding: 28px 28px 20px;
  display: flex; align-items: flex-start; gap: 16px;
}
.problem-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem; font-weight: 700;
  color: var(--nw-blue); background: rgba(29,78,216,.08);
  padding: 4px 10px; border-radius: 6px; white-space: nowrap;
  margin-top: 2px; border: 1px solid rgba(29,78,216,.15);
}
.problem-header h3 { font-size: 1.15rem; font-weight: 700; color: var(--neutral-800); line-height: 1.3; }
.problem-body { padding: 0 28px 24px; }
.problem-body p { font-size: .95rem; color: var(--neutral-600); line-height: 1.7; margin-bottom: 16px; }
.problem-insight {
  background: linear-gradient(135deg, rgba(16,185,129,.06), rgba(6,182,212,.06));
  border: 1px solid rgba(16,185,129,.2); border-radius: 10px;
  padding: 14px 16px;
  font-size: .88rem; color: #065f46; font-weight: 500; line-height: 1.5;
}
.problem-insight::before { content: '>> '; font-family: 'JetBrains Mono', monospace; color: var(--term-green); }

/* ============================================================
   SVG CHARTS SECTION
   ============================================================ */
.charts-section {
  padding: 120px 24px;
  background: var(--term-bg); position: relative; overflow: hidden;
}
.charts-section::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(29,78,216,.06) 1px, transparent 1px);
  background-size: 28px 28px; pointer-events: none;
}
.charts-section .section-badge { background: rgba(29,78,216,.12); color: var(--nw-blue-bright); border-color: rgba(59,130,246,.3); }
.charts-section .section-title { color: white; }
.charts-section .section-lead { color: rgba(255,255,255,.6); }

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 24px;
}
.chart-card {
  background: var(--term-surface);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px; overflow: hidden;
  transition: all .3s;
}
.chart-card:hover { border-color: rgba(59,130,246,.3); box-shadow: 0 12px 40px rgba(0,0,0,.4); transform: translateY(-4px); }
.chart-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.chart-dots { display: flex; gap: 5px; }
.chart-dots span { width: 9px; height: 9px; border-radius: 50%; }
.d-red { background: #ff5f57; } .d-yel { background: #febc2e; } .d-grn { background: #28c840; }
.chart-name { font-family: 'JetBrains Mono', monospace; font-size: .72rem; color: rgba(255,255,255,.3); }
.chart-body { padding: 20px; }
.chart-title { font-size: .9rem; font-weight: 700; color: rgba(255,255,255,.8); margin-bottom: 4px; }
.chart-desc { font-size: .78rem; color: rgba(255,255,255,.4); margin-bottom: 16px; }
.chart-svg-wrap svg { width: 100%; }

/* ============================================================
   SQL SHOWCASE
   ============================================================ */
.sql-section {
  padding: 120px 24px;
  background: linear-gradient(to bottom, white, var(--silver-50));
}
.sql-showcase {
  max-width: 900px; margin: 0 auto;
  display: grid; gap: 24px;
}
.sql-card {
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--silver-200);
  background: white; box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.sql-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: var(--term-bg);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sql-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem; font-weight: 700;
  padding: 4px 10px; border-radius: 6px;
}
.sql-badge.find { background: rgba(16,185,129,.15); color: var(--term-green-br); border: 1px solid rgba(16,185,129,.3); }
.sql-badge.compare { background: rgba(34,211,238,.12); color: var(--term-cyan); border: 1px solid rgba(34,211,238,.25); }
.sql-badge.detect { background: rgba(251,191,36,.12); color: var(--term-amber); border: 1px solid rgba(251,191,36,.25); }
.sql-purpose { font-size: .82rem; color: rgba(255,255,255,.4); }
.sql-block {
  background: #0d1117; padding: 20px 24px;
  font-family: 'JetBrains Mono', monospace; font-size: .85rem;
  line-height: 1.8; overflow-x: auto;
}
.sk { color: #ff7b72; }  /* keyword */
.sf { color: var(--term-cyan); } /* function */
.sc { color: rgba(255,255,255,.4); font-style: italic; } /* comment */
.ss { color: #a5d6ff; }  /* string */
.sn { color: var(--term-amber); } /* name/alias */
.so { color: rgba(255,255,255,.75); } /* operator/other */
.sql-result {
  padding: 18px 24px;
  background: linear-gradient(135deg, rgba(16,185,129,.03), rgba(6,182,212,.03));
  border-top: 1px solid var(--silver-100);
}
.sql-result-label { font-size: .72rem; color: var(--neutral-600); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.result-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.result-table th { background: var(--silver-100); color: var(--neutral-700); font-weight: 700; padding: 6px 12px; text-align: left; border: 1px solid var(--silver-200); }
.result-table td { padding: 6px 12px; border: 1px solid var(--silver-200); color: var(--neutral-700); }
.result-table tr:nth-child(even) td { background: var(--silver-50); }
.val-spike { color: #dc2626; font-weight: 700; }
.val-ok { color: #16a34a; }

.sql-insight {
  padding: 14px 24px;
  background: var(--silver-50); border-top: 1px solid var(--silver-100);
  font-size: .88rem; color: var(--neutral-600); line-height: 1.6;
}
.sql-insight strong { color: var(--nw-blue); }

/* ============================================================
   GETTING STARTED
   ============================================================ */
.start-section {
  padding: 120px 24px;
  background: var(--grad-primary); color: white;
  position: relative; overflow: hidden;
}
.start-section::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 32px 32px; pointer-events: none;
}
.start-section .section-badge { background: rgba(255,255,255,.15); color: white; border-color: rgba(255,255,255,.3); }
.start-section .section-title { color: white; }
.start-section .section-lead { color: rgba(255,255,255,.85); }

.start-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: start; max-width: 1000px; margin: 0 auto;
}
.start-steps { display: flex; flex-direction: column; gap: 20px; }
.start-step {
  display: flex; gap: 18px; align-items: flex-start;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 14px; padding: 22px 20px;
  transition: all .3s;
}
.start-step:hover { background: rgba(255,255,255,.16); transform: translateX(4px); }
.step-num {
  width: 36px; height: 36px; flex-shrink: 0;
  background: white; color: var(--nw-blue);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.start-step h4 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.start-step p { font-size: .9rem; opacity: .85; line-height: 1.5; }

.start-terminal {
  background: var(--term-bg);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.term-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.term-bar .dots { display: flex; gap: 5px; }
.term-bar .dots span { width: 9px; height: 9px; border-radius: 50%; }
.term-bar .title-t { font-family: 'JetBrains Mono', monospace; font-size: .72rem; color: rgba(255,255,255,.3); margin-left: 4px; }
.term-body {
  padding: 22px 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .82rem; line-height: 2;
}
.t-prompt { color: var(--term-green-br); font-weight: 700; margin-right: 8px; }
.t-cmd { color: rgba(255,255,255,.9); }
.t-out { color: rgba(255,255,255,.45); padding-left: 18px; display: block; }
.t-out.g { color: var(--term-green); }
.t-out.c { color: var(--term-cyan); }
.t-out.a { color: var(--term-amber); }
.t-blank { display: block; height: 6px; }
.t-cursor { display: inline-block; width: 8px; height: 14px; background: var(--term-green); border-radius: 2px; margin-left: 2px; animation: cursor-blink 1.1s step-start infinite; }
@keyframes cursor-blink { 0%,49% { opacity:1; } 50%,100% { opacity:0; } }

.repo-link {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px; padding: 16px 20px;
  margin-top: 20px; text-decoration: none;
  color: white; font-family: 'JetBrains Mono', monospace;
  font-size: .82rem; transition: all .3s;
}
.repo-link:hover { background: rgba(255,255,255,.18); transform: translateY(-2px); }
.repo-link svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--term-green-br); }
.repo-link span { opacity: .7; word-break: break-all; }

/* ============================================================
   ABOUT NEXUS
   ============================================================ */
.nexus-section {
  padding: 100px 24px;
  background: white; text-align: center;
}
.nexus-inner {
  max-width: 720px; margin: 0 auto;
}
.nexus-inner p { font-size: 1.1rem; color: var(--neutral-600); line-height: 1.8; margin-bottom: 20px; }
.nexus-inner p strong { color: var(--nw-blue); }
.nexus-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--nw-blue); text-decoration: none; font-weight: 700;
  font-size: 1rem; transition: gap .2s;
}
.nexus-link svg { width: 16px; height: 16px; }
.nexus-link:hover { gap: 14px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--neutral-900);
  color: rgba(255,255,255,.5);
  padding: 48px 24px 30px;
  position: relative;
}
.footer::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--nw-blue-bright), var(--nw-teal-bright), transparent);
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--grad-primary);
  display: flex; align-items: center; justify-content: center;
}
.footer-mark svg { width: 16px; height: 16px; color: white; }
.footer-name { font-size: .95rem; font-weight: 700; color: rgba(255,255,255,.8); }
.footer-sub { font-size: .78rem; color: rgba(255,255,255,.35); }
.footer-copy { font-size: .82rem; text-align: right; line-height: 1.6; }
.footer-copy a { color: var(--nw-teal-bright); text-decoration: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  nav { display: none; }
  nav.open { display: flex; flex-direction: column; position: fixed; inset: 0; background: white; z-index: 999; padding: 100px 24px 40px; gap: 20px; }
  nav.open a { font-size: 1.5rem; }
  .hamburger { display: flex; z-index: 1001; position: relative; }
  .start-grid { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
  .arch-flow { gap: 4px; }
  .arch-node { min-width: 110px; padding: 20px 14px; }
  .hero-stats { gap: 24px; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-copy { text-align: center; }
}

/* ============================================================
   BOOK / GUIDE DOWNLOAD SECTION
   ============================================================ */
.book-section {
  padding: 120px 24px;
  background: linear-gradient(to bottom, var(--silver-50), #fdf8f5);
  border-top: 3px solid rgba(211,84,0,.12);
  border-bottom: 3px solid rgba(211,84,0,.12);
  position: relative;
  overflow: hidden;
}
.book-section::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 15% 50%, rgba(211,84,0,.04) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 50%, rgba(234,88,12,.04) 0%, transparent 55%);
}

.book-card {
  max-width: 960px; margin: 0 auto;
  display: flex; gap: 56px; align-items: flex-start;
  background: white;
  border: 1px solid var(--silver-200);
  border-radius: 24px;
  padding: 48px;
  box-shadow: 0 8px 40px rgba(0,0,0,.07), 0 2px 8px rgba(0,0,0,.04);
  position: relative;
}
.book-card::before {
  content: '';
  position: absolute; top: 0; left: 0;
  width: 5px; height: 100%;
  background: linear-gradient(to bottom, #d35400, #e67e22);
  border-radius: 24px 0 0 24px;
}

/* 3-D book illustration */
.book-cover {
  flex-shrink: 0;
  display: flex; position: relative;
  filter: drop-shadow(8px 12px 24px rgba(0,0,0,.25));
  transition: transform .4s cubic-bezier(.22,1,.36,1);
}
.book-card:hover .book-cover { transform: translateY(-6px) rotate(-1deg); }

.book-spine {
  width: 22px; height: 220px;
  background: linear-gradient(to right, #8b3200, #c04000);
  border-radius: 4px 0 0 4px;
  align-self: flex-end;
}
.book-face {
  width: 155px; height: 220px;
  background: linear-gradient(145deg, #1e40af 0%, #1d4ed8 40%, #0891b2 100%);
  border-radius: 0 6px 6px 0;
  display: flex; flex-direction: column;
  padding: 18px 16px; overflow: hidden;
  position: relative;
}
.book-face::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 14px 14px;
  pointer-events: none;
}
.book-face::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, rgba(255,255,255,.15), rgba(255,255,255,.4), rgba(255,255,255,.15));
}
.book-face-top, .book-face-bot { position: relative; z-index: 1; }
.book-face-mid { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.book-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: .62rem; font-weight: 700; color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  padding: 3px 8px; border-radius: 4px; display: inline-block;
  margin-bottom: 8px; letter-spacing: .5px;
}
.book-title-sm {
  font-family: 'Playfair Display', serif;
  font-size: 1rem; font-weight: 700; color: white;
  line-height: 1.2; margin-bottom: 4px;
}
.book-subtitle-sm {
  font-size: .68rem; color: rgba(255,255,255,.65); line-height: 1.4;
}
.book-pub {
  font-size: .62rem; color: rgba(255,255,255,.5);
  font-family: 'JetBrains Mono', monospace;
}

/* book info */
.book-info { flex: 1; }
.book-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem; font-weight: 700;
  color: var(--neutral-800); margin-bottom: 6px; line-height: 1.2;
}
.book-byline {
  font-size: .85rem; color: var(--neutral-600);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 16px;
}
.book-desc {
  font-size: 1rem; color: var(--neutral-600);
  line-height: 1.75; margin-bottom: 24px;
}
.book-contents {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-bottom: 28px;
}
.book-toc-item {
  display: flex; align-items: center; gap: 10px;
  font-size: .88rem; color: var(--neutral-600);
  background: var(--silver-50); border: 1px solid var(--silver-200);
  border-radius: 8px; padding: 8px 12px;
}
.toc-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem; font-weight: 700;
  color: #c04000; background: rgba(211,84,0,.08);
  padding: 2px 7px; border-radius: 5px;
  white-space: nowrap;
}

.book-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.btn-book-dl {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; border-radius: 10px;
  font-weight: 700; font-size: .95rem;
  text-decoration: none; transition: all .3s;
  background: linear-gradient(135deg, #d35400, #e67e22);
  color: white;
  box-shadow: 0 5px 18px rgba(211,84,0,.3);
}
.btn-book-dl svg { width: 17px; height: 17px; }
.btn-book-dl:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(211,84,0,.45); }

.btn-book-repo {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; border-radius: 10px;
  font-weight: 700; font-size: .95rem;
  text-decoration: none; transition: all .3s;
  background: transparent; color: var(--neutral-700);
  border: 2px solid var(--silver-300);
}
.btn-book-repo svg { width: 17px; height: 17px; }
.btn-book-repo:hover { border-color: var(--nw-blue); color: var(--nw-blue); transform: translateY(-2px); }

.book-note {
  display: flex; align-items: center; gap: 7px;
  font-size: .82rem; color: var(--neutral-600);
}
.book-note svg { flex-shrink: 0; color: var(--nw-blue); }

@media (max-width: 768px) {
  .book-card { flex-direction: column; align-items: center; padding: 32px 24px; gap: 32px; }
  .book-contents { grid-template-columns: 1fr; }
  .book-actions { flex-direction: column; }
  .btn-book-dl, .btn-book-repo { justify-content: center; }
}