/* ══════════════════════════════════════════════════════════════════════════════
   PCS — Port Community System  |  Documentation Portal
   Design System  v2.0  ·  Aesthetic: Maritime Command · Deep Obsidian · Amber Gold
   ══════════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-void:    #050408;
  --bg-deep:    #07060A;
  --bg-panel:   #0C0A12;
  --bg-card:    #110F1A;
  --bg-raised:  #161320;
  --bg-glass:   rgba(17,15,26,0.80);

  /* Borders */
  --border-dim:    #1C1928;
  --border-mid:    #28243A;
  --border-glow:   #3D3660;
  --border-active: #5A4F8A;

  /* Amber — primary accent */
  --amber:        #F59E0B;
  --amber-dim:    #B45309;
  --amber-bright: #FCD34D;
  --amber-soft:   rgba(245,158,11,0.10);
  --amber-glow:   rgba(245,158,11,0.20);

  /* Teal — maritime secondary */
  --teal:         #06B6D4;
  --teal-dim:     #0891B2;
  --teal-bright:  #38BDF8;
  --teal-soft:    rgba(6,182,212,0.10);
  --teal-glow:    rgba(6,182,212,0.18);

  /* Emerald — success */
  --emerald:      #10B981;
  --emerald-dim:  #059669;
  --emerald-soft: rgba(16,185,129,0.10);
  --emerald-glow: rgba(16,185,129,0.18);

  /* Red — danger */
  --red:          #F87171;
  --red-dim:      #DC2626;
  --red-soft:     rgba(248,113,113,0.10);

  /* Indigo — auth/security */
  --indigo:       #818CF8;
  --indigo-bright:#A5B4FC;
  --indigo-soft:  rgba(129,140,248,0.10);

  /* Text */
  --text-bright:    #FFF8EC;
  --text-primary:   #C4A96A;
  --text-secondary: #7A6645;
  --text-muted:     #3D3020;

  /* Fonts */
  --font-display: 'Syne', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Radii */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* Layout */
  --nav-h:    62px;
  --max-w:    1280px;
  --sec-py:   96px;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  background: var(--bg-void);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
img, svg { display: block; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.1; color: var(--text-bright); }
code, kbd { font-family: var(--font-mono); font-size: 0.85em; }
strong { color: var(--text-bright); font-weight: 600; }
p { color: var(--text-secondary); line-height: 1.75; }
::selection { background: var(--amber-soft); color: var(--amber-bright); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-void); }
::-webkit-scrollbar-thumb { background: var(--border-glow); border-radius: 3px; }

/* ── Progress bar ──────────────────────────────────────────────────────────── */
.reading-progress {
  position: fixed; top: 0; left: 0; z-index: 9999;
  height: 2px; width: 0;
  background: linear-gradient(90deg, var(--amber-dim), var(--amber), var(--amber-bright));
  transition: width 0.1s linear;
  box-shadow: 0 0 8px var(--amber-glow);
}

/* ── Skip link ─────────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -50px; left: 16px;
  background: var(--amber); color: var(--bg-void);
  padding: 8px 14px; border-radius: var(--r-sm);
  font-weight: 700; font-size: 13px; z-index: 9999; transition: top .15s;
}
.skip-link:focus { top: 8px; }

/* ══════════════════════════════════════════════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════════════════════════════════════════════ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h);
  background: rgba(5,4,8,0.88);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border-dim);
  z-index: 900;
  transition: border-color .3s, background .3s;
}
.navbar.scrolled {
  background: rgba(5,4,8,0.97);
  border-bottom-color: var(--border-mid);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; padding: 0 clamp(1rem, 3vw, 2rem); gap: 12px;
}

/* Logo */
.nav-logo {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 800; font-size: 16px;
  letter-spacing: .02em; color: var(--text-bright); flex-shrink: 0;
}
.logo-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--amber), var(--amber-dim));
  display: flex; align-items: center; justify-content: center;
  color: var(--bg-void);
  box-shadow: 0 0 20px rgba(245,158,11,0.3);
  transition: box-shadow .2s;
}
.nav-logo:hover .logo-icon { box-shadow: 0 0 30px rgba(245,158,11,0.5); }
.logo-text span { color: var(--amber); }

/* Nav links */
.nav-links {
  display: flex; align-items: center; gap: 2px;
}
.nav-links li { list-style: none; }
.nav-links a {
  display: block; padding: 5px 10px;
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  border-radius: var(--r-sm); border: 1px solid transparent;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text-bright); background: var(--amber-soft); }
.nav-links a.active { color: var(--amber); }

/* Right side */
.nav-cta {
  display: flex; align-items: center; gap: 10px; flex-shrink: 0;
}
.nav-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 10px; border: 1px solid var(--border-mid);
  border-radius: 20px; font-size: 11px; font-weight: 600;
  color: var(--emerald); letter-spacing: .04em;
}
.nav-badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--emerald); animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:.4} }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--r-md);
  font-size: 13px; font-weight: 600; font-family: var(--font-body);
  transition: all .2s; cursor: pointer; border: 1px solid;
  text-decoration: none; white-space: nowrap;
}
.btn-primary {
  background: var(--amber); color: var(--bg-void);
  border-color: var(--amber);
}
.btn-primary:hover {
  background: var(--amber-bright); color: var(--bg-void);
  transform: translateY(-2px); box-shadow: 0 8px 24px var(--amber-glow);
}
.btn-secondary {
  background: transparent; color: var(--text-primary);
  border-color: var(--border-mid);
}
.btn-secondary:hover {
  border-color: var(--border-glow); color: var(--text-bright);
  transform: translateY(-2px);
}

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; padding: 6px; border-radius: var(--r-sm); cursor: pointer;
}
.hamburger span {
  display: block; width: 20px; height: 1.5px;
  background: var(--text-secondary); border-radius: 2px;
  transition: all .25s;
}

/* Mobile nav */
.mobile-menu {
  display: none; position: fixed; inset: 0; top: var(--nav-h);
  background: rgba(5,4,8,0.98);
  backdrop-filter: blur(20px);
  flex-direction: column; padding: 1.5rem; gap: 6px;
  z-index: 800; overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 1rem; font-weight: 500; color: var(--text-secondary);
  padding: .75rem 1rem; border-radius: var(--r-md);
  border: 1px solid var(--border-dim);
  transition: color .2s, background .2s, border-color .2s;
}
.mobile-menu a:hover { color: var(--amber); background: var(--amber-soft); border-color: rgba(245,158,11,.2); }

/* ══════════════════════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════════════════════ */
#hero {
  min-height: 100vh; display: flex; align-items: center;
  padding-top: var(--nav-h); position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(245,158,11,0.07) 0%, transparent 65%),
    radial-gradient(ellipse 55% 70% at 90% 55%, rgba(6,182,212,0.05) 0%, transparent 55%),
    radial-gradient(ellipse 45% 50% at 5% 85%, rgba(129,140,248,0.04) 0%, transparent 55%);
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 85% 80% at 50% 50%, black 20%, transparent 100%);
}
.hero-content {
  position: relative; z-index: 1;
  max-width: var(--max-w); margin: 0 auto; width: 100%;
  padding: clamp(3rem,8vw,6rem) clamp(1rem,4vw,2.5rem);
  display: grid; grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem,5vw,5rem); align-items: center;
}
.hero-text {}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--amber); background: var(--amber-soft);
  border: 1px solid rgba(245,158,11,.22); border-radius: 20px;
  padding: 4px 14px; margin-bottom: 1.5rem;
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--amber);
  animation: pulse-dot 2s infinite;
}
#hero h1 {
  font-size: clamp(2.6rem,6vw,4.2rem); font-weight: 900;
  letter-spacing: -.04em; line-height: 1.05;
  color: var(--text-bright); margin-bottom: 1.5rem;
}
#hero h1 .accent { color: var(--amber); }
.hero-desc {
  font-size: 1.05rem; max-width: 520px; margin-bottom: 2rem;
  color: var(--text-secondary); line-height: 1.75;
}
.hero-badges {
  display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 2rem;
}
.badge {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 4px; border: 1px solid;
  letter-spacing: .04em;
}
.badge.python  { background: rgba(59,130,246,.12); color: #93c5fd; border-color: rgba(59,130,246,.25); }
.badge.fastapi { background: var(--teal-soft); color: var(--teal-bright); border-color: rgba(6,182,212,.25); }
.badge.react   { background: rgba(96,165,250,.10); color: #93c5fd; border-color: rgba(96,165,250,.2); }
.badge.postgres{ background: rgba(99,102,241,.10); color: var(--indigo-bright); border-color: rgba(99,102,241,.2); }
.badge.kafka   { background: rgba(245,158,11,.08); color: var(--amber); border-color: rgba(245,158,11,.2); }
.badge.redis   { background: var(--red-soft); color: var(--red); border-color: rgba(248,113,113,.2); }
.badge.k8s     { background: rgba(6,182,212,.08); color: var(--teal-bright); border-color: rgba(6,182,212,.2); }
.badge.terraform{background: var(--indigo-soft); color: var(--indigo-bright); border-color: rgba(129,140,248,.2); }
.badge.aws     { background: var(--amber-soft); color: var(--amber-bright); border-color: rgba(245,158,11,.2); }

.hero-actions {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 2rem;
}

/* Hero card (architecture preview) */
.hero-visual { perspective: 1000px; }
.arch-preview {
  background: var(--bg-card); border: 1px solid var(--border-mid);
  border-radius: var(--r-xl); padding: 1.5rem;
  box-shadow: 0 16px 64px rgba(0,0,0,.55), 0 0 60px rgba(245,158,11,.08);
  position: relative; overflow: hidden;
  animation: floatCard 7s ease-in-out infinite;
}
@keyframes floatCard { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }
.arch-preview::before {
  content: ''; position: absolute; top: 0; left: 15%; right: 15%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
}
.arch-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 1.25rem;
}
.arch-title .live {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; color: var(--emerald); letter-spacing: .08em;
}
.arch-title .live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--emerald); animation: pulse-dot 1.5s infinite;
}
.arch-layer {
  display: flex; gap: 6px; margin-bottom: 8px; justify-content: center;
}
.arch-node {
  flex: 1; background: var(--bg-panel); border: 1px solid var(--border-dim);
  border-radius: var(--r-md); padding: .6rem .4rem;
  text-align: center; cursor: pointer;
  transition: all .2s; position: relative;
}
.arch-node:hover { border-color: var(--amber); background: var(--bg-raised); transform: translateY(-2px); }
.arch-node .icon { font-size: 1.1rem; display: block; margin-bottom: 2px; line-height: 1; }
.arch-node .label { font-size: 10px; font-weight: 700; color: var(--text-secondary); display: block; }
.arch-node .sub   { font-size: 9px; color: var(--text-muted); display: block; }
.arch-node.highlight-gold { border-color: rgba(245,158,11,.35); }
.arch-node.highlight-teal { border-color: rgba(6,182,212,.3); }
.arch-node.highlight-green{ border-color: rgba(16,185,129,.3); }
.arch-connector { display: flex; justify-content: center; margin: 4px 0; opacity: .35; }
.arch-metrics {
  display: flex; justify-content: space-around;
  padding-top: .75rem; border-top: 1px solid var(--border-dim); margin-top: .5rem;
}
.arch-metric .val {
  font-family: var(--font-mono); font-size: 15px; font-weight: 700;
  color: var(--amber-bright); display: block; text-align: center;
}
.arch-metric .lbl {
  font-size: 9px; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .08em; display: block; text-align: center;
}

/* ══════════════════════════════════════════════════════════════════════════════
   STATS BAND
   ══════════════════════════════════════════════════════════════════════════════ */
#stats {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-dim);
  border-bottom: 1px solid var(--border-dim);
}
.stats-grid {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 clamp(1rem,4vw,2.5rem);
  display: grid; grid-template-columns: repeat(4,1fr); gap: 2rem;
}
.stat-card { text-align: center; }
.stat-number {
  font-family: var(--font-mono); font-size: clamp(2rem,4vw,3rem);
  font-weight: 900; line-height: 1;
  background: linear-gradient(135deg, var(--amber-bright), var(--amber));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 6px; font-weight: 500; }

/* ══════════════════════════════════════════════════════════════════════════════
   SECTIONS (base)
   ══════════════════════════════════════════════════════════════════════════════ */
.section { padding: var(--sec-py) 0; }
.section:nth-child(even) { background: var(--bg-panel); }
.container {
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 clamp(1rem,4vw,2.5rem);
}
.section-header {
  text-align: center; margin-bottom: clamp(2.5rem,5vw,4rem);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--amber); background: var(--amber-soft);
  border: 1px solid rgba(245,158,11,.2); border-radius: 20px;
  padding: 3px 12px; margin-bottom: 1rem;
}
.section-header h2 { font-size: clamp(1.75rem,3.5vw,2.6rem); margin-bottom: 1rem; letter-spacing: -.025em; }
.section-header p  { max-width: 560px; margin: 0 auto; font-size: 1rem; }

/* Alerts */
.alert {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: .8rem 1rem; border-radius: var(--r-md);
  font-size: .82rem; border: 1px solid; margin: .75rem 0;
}
.alert-icon { flex-shrink: 0; font-size: 1rem; margin-top: 1px; line-height: 1; }
.alert-body  { line-height: 1.6; }
.alert.info    { background: var(--teal-soft); border-color: rgba(6,182,212,.2); color: var(--teal-bright); }
.alert.success { background: var(--emerald-soft); border-color: rgba(16,185,129,.2); color: var(--emerald); }
.alert.warning { background: var(--amber-soft); border-color: rgba(245,158,11,.2); color: var(--amber-bright); }
.alert.danger  { background: var(--red-soft); border-color: rgba(248,113,113,.2); color: var(--red); }

/* ══════════════════════════════════════════════════════════════════════════════
   OVERVIEW
   ══════════════════════════════════════════════════════════════════════════════ */
.overview-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2rem; align-items: start;
}
.overview-grid h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.progress-row { margin-bottom: 1rem; }
.progress-label {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 5px;
}
.progress-label span { font-size: 12px; color: var(--text-muted); }
.progress-label code { font-family: var(--font-mono); font-size: 13px; font-weight: 700; }
.progress-label code.bad  { color: var(--red); }
.progress-label code.good { color: var(--emerald); }
.progress-track {
  background: var(--bg-panel); border-radius: 4px; height: 6px; overflow: hidden;
}
.progress-fill { height: 100%; border-radius: 4px; }
.progress-fill.bad  { background: var(--red); }
.progress-fill.good { background: var(--emerald); }
.check-list { display: flex; flex-direction: column; gap: 8px; margin-top: 1.5rem; }
.check-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-secondary);
}
.check-item::before { content: '✓'; color: var(--emerald); font-size: 1rem; }

/* ══════════════════════════════════════════════════════════════════════════════
   ARCHITECTURE DIAGRAM
   ══════════════════════════════════════════════════════════════════════════════ */
.arch-diagram {
  background: var(--bg-card); border: 1px solid var(--border-mid);
  border-radius: var(--r-xl); padding: 1.75rem;
  box-shadow: 0 8px 40px rgba(0,0,0,.4); overflow: hidden; position: relative;
}
.arch-diagram::before {
  content: ''; position: absolute; top: 0; left: 15%; right: 15%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
}
.flow-section-title {
  font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 1.25rem;
}
.flow-diagram { display: flex; flex-direction: column; gap: 6px; }
.flow-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  align-items: center; justify-content: center;
}
.flow-node {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg-panel); border: 1px solid var(--border-dim);
  border-radius: var(--r-md); padding: .7rem .6rem;
  min-width: 90px; text-align: center; cursor: pointer;
  transition: all .2s;
}
.flow-node:hover { transform: translateY(-2px); border-color: var(--amber); }
.flow-node.gold   { border-color: rgba(245,158,11,.35); }
.flow-node.teal   { border-color: rgba(6,182,212,.3); }
.flow-node.green  { border-color: rgba(16,185,129,.3); }
.flow-node.purple { border-color: rgba(129,140,248,.3); }
.fn-icon { font-size: 1.3rem; margin-bottom: 3px; line-height: 1; }
.fn-label { font-size: 11px; font-weight: 700; color: var(--text-secondary); }
.fn-sub   { font-size: 10px; color: var(--text-muted); margin-top: 1px; font-family: var(--font-mono); }
.flow-arrow { font-size: 1.2rem; color: var(--border-glow); align-self: center; flex-shrink: 0; }

/* Flow cards */
.flow-cards {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-top: 2rem;
}
.flow-card {
  background: var(--bg-card); border: 1px solid var(--border-dim);
  border-radius: var(--r-lg); padding: 1.25rem;
  transition: all .2s;
}
.flow-card:hover { border-color: var(--border-mid); transform: translateY(-2px); }
.flow-card-icon { font-size: 2rem; margin-bottom: .75rem; line-height: 1; }
.flow-card h3 { font-size: .95rem; margin-bottom: .5rem; }
.flow-card p  { font-size: .78rem; line-height: 1.6; }
.flow-card code { font-family: var(--font-mono); font-size: .75em; color: var(--amber); }

/* ══════════════════════════════════════════════════════════════════════════════
   FEATURES GRID
   ══════════════════════════════════════════════════════════════════════════════ */
.features-grid {
  display: grid; grid-template-columns: repeat(auto-fill,minmax(310px,1fr));
  gap: 1.25rem;
}
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border-dim);
  border-radius: var(--r-lg); padding: 1.5rem;
  transition: all .25s; position: relative; overflow: hidden;
}
.feature-card::after {
  content: ''; position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(circle at 30% 0%, var(--amber-soft), transparent 60%);
  transition: opacity .3s;
}
.feature-card:hover { border-color: var(--border-mid); transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,.4); }
.feature-card:hover::after { opacity: 1; }
.feature-icon {
  width: 42px; height: 42px; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; margin-bottom: 1rem;
  position: relative; z-index: 1;
}
.feature-icon.gold   { background: var(--amber-soft); border: 1px solid rgba(245,158,11,.2); }
.feature-icon.teal   { background: var(--teal-soft); border: 1px solid rgba(6,182,212,.2); }
.feature-icon.green  { background: var(--emerald-soft); border: 1px solid rgba(16,185,129,.2); }
.feature-icon svg { width: 20px; height: 20px; }
.feature-icon.gold svg   { color: var(--amber); }
.feature-icon.teal svg   { color: var(--teal); }
.feature-icon.green svg  { color: var(--emerald); }
.feature-card h3 { font-size: .95rem; margin-bottom: .5rem; position: relative; z-index: 1; }
.feature-card p  { font-size: .8rem; line-height: 1.65; position: relative; z-index: 1; }
.feature-tag { display: inline-block; font-size: .65rem; color: var(--text-muted); margin-top: .75rem; font-family: var(--font-mono); position: relative; z-index: 1; }

/* ══════════════════════════════════════════════════════════════════════════════
   TECH STACK
   ══════════════════════════════════════════════════════════════════════════════ */
.stack-grid {
  display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 1rem;
}
.stack-card {
  background: var(--bg-card); border: 1px solid var(--border-dim);
  border-radius: var(--r-lg); padding: 1.25rem;
  display: flex; gap: 1rem; align-items: flex-start;
  transition: all .2s;
}
.stack-card:hover { border-color: var(--border-mid); transform: translateY(-2px); }
.stack-logo { font-size: 2rem; width: 44px; flex-shrink: 0; text-align: center; line-height: 1; }
.stack-info h4 { font-size: .88rem; margin-bottom: 2px; }
.version { font-family: var(--font-mono); font-size: .68rem; color: var(--amber); margin-bottom: .4rem; display: block; }
.stack-info p { font-size: .76rem; color: var(--text-muted); line-height: 1.55; }

/* ══════════════════════════════════════════════════════════════════════════════
   QUICK START / TERMINAL
   ══════════════════════════════════════════════════════════════════════════════ */
.quickstart-inner {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem; align-items: start;
}
.steps-list { display: flex; flex-direction: column; gap: 0; }
.step {
  display: flex; gap: 1rem; padding: 1rem 0;
  border-bottom: 1px solid var(--border-dim);
}
.step:last-child { border-bottom: none; }
.step-num {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%;
  background: var(--amber-soft); border: 1px solid rgba(245,158,11,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: var(--amber);
  font-family: var(--font-mono); counter-increment: steps;
}
.steps-list { counter-reset: steps; }
.step-num::after { content: counter(steps); }
.step-body h4 { font-size: .88rem; color: var(--text-bright); margin-bottom: 2px; }
.step-body p  { font-size: .78rem; color: var(--text-muted); }

/* Terminal */
.terminal {
  background: var(--bg-deep); border: 1px solid var(--border-mid);
  border-radius: var(--r-xl); overflow: hidden;
  box-shadow: 0 16px 64px rgba(0,0,0,.5);
}
.terminal-header {
  background: var(--bg-card); padding: .65rem 1rem;
  display: flex; align-items: center; gap: .75rem;
  border-bottom: 1px solid var(--border-dim);
}
.terminal-dots { display: flex; gap: 6px; }
.terminal-dots span { width: 11px; height: 11px; border-radius: 50%; }
.terminal-dots span:nth-child(1) { background: #ff5f57; }
.terminal-dots span:nth-child(2) { background: #febc2e; }
.terminal-dots span:nth-child(3) { background: #28c840; }
.terminal-title { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); margin: 0 auto; }
.terminal-copy {
  background: none; border: 1px solid var(--border-mid); border-radius: var(--r-sm);
  color: var(--text-muted); font-family: var(--font-mono); font-size: 10px;
  padding: 2px 8px; cursor: pointer; transition: all .15s; flex-shrink: 0;
}
.terminal-copy:hover { border-color: var(--amber); color: var(--amber); }
.terminal-copy.copied { border-color: var(--emerald); color: var(--emerald); }
.terminal-body {
  padding: 1.25rem 1.5rem; font-family: var(--font-mono); font-size: .8rem;
  line-height: 2; overflow-x: auto; max-height: 500px; overflow-y: auto;
}
.terminal-body .line { display: block; }
.terminal-body .comment { color: var(--text-muted); font-style: italic; }
.terminal-body .prompt  { color: var(--amber); }
.terminal-body .cmd     { color: var(--text-bright); }
.terminal-body .out     { color: var(--emerald); }

/* Service URLs */
.service-urls {
  display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
  gap: 1rem; margin-top: 1.5rem;
}
.service-url-card {
  background: var(--bg-card); border: 1px solid var(--border-dim);
  border-radius: var(--r-md); padding: 1rem; text-align: center;
  transition: all .2s;
}
.service-url-card:hover { border-color: var(--border-mid); }
.service-url-card .s-icon { font-size: 1.5rem; margin-bottom: 6px; line-height: 1; }
.service-url-card .s-url  { font-family: var(--font-mono); font-size: 13px; color: var(--amber); display: block; }
.service-url-card .s-desc { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* ══════════════════════════════════════════════════════════════════════════════
   API REFERENCE
   ══════════════════════════════════════════════════════════════════════════════ */
.api-layout {
  display: grid; grid-template-columns: 200px 1fr; gap: 2rem; align-items: start;
}
.api-sidebar { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.api-nav-group { margin-bottom: 1.25rem; }
.api-nav-group-label {
  font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase;
  color: var(--text-muted); padding: 4px 10px; display: block;
}
.api-nav-link {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--text-secondary);
  padding: 5px 10px; border-radius: var(--r-sm);
  cursor: pointer; transition: all .15s;
  border: none; background: none; width: 100%; text-align: left;
}
.api-nav-link:hover, .api-nav-link.active { color: var(--text-bright); background: var(--amber-soft); }
.api-nav-link.active { color: var(--amber); }

/* HTTP method badges */
.method-badge {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 3px;
  font-family: var(--font-mono); min-width: 40px; text-align: center;
  letter-spacing: .04em; flex-shrink: 0;
}
.method-badge.get    { background: var(--emerald-soft); color: var(--emerald); }
.method-badge.post   { background: var(--teal-soft);    color: var(--teal-bright); }
.method-badge.patch  { background: var(--indigo-soft);  color: var(--indigo-bright); }
.method-badge.delete { background: var(--red-soft);     color: var(--red); }
.method-badge.put    { background: var(--amber-soft);   color: var(--amber); }

/* Endpoint accordion */
.endpoint-card {
  background: var(--bg-card); border: 1px solid var(--border-dim);
  border-radius: var(--r-lg); margin-bottom: .75rem; overflow: hidden;
  transition: border-color .2s;
}
.endpoint-card.open { border-color: var(--border-mid); }
.endpoint-header {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem 1.25rem; cursor: pointer; user-select: none;
  transition: background .15s;
}
.endpoint-header:hover { background: var(--amber-soft); }
.endpoint-path    { font-family: var(--font-mono); font-size: .8rem; color: var(--text-primary); flex: 1; }
.endpoint-summary { font-size: .72rem; color: var(--text-muted); }
.endpoint-chevron { color: var(--text-muted); transition: transform .2s; font-size: .7rem; }
.endpoint-card.open .endpoint-chevron { transform: rotate(180deg); }
.endpoint-body { display: none; border-top: 1px solid var(--border-dim); }
.endpoint-card.open .endpoint-body { display: block; }
.endpoint-tabs { display: flex; border-bottom: 1px solid var(--border-dim); }
.endpoint-tab {
  font-size: .72rem; font-weight: 600; padding: .6rem 1rem;
  color: var(--text-muted); cursor: pointer; border: none; background: none;
  border-bottom: 2px solid transparent; transition: all .15s; margin-bottom: -1px;
}
.endpoint-tab:hover { color: var(--text-primary); }
.endpoint-tab.active { color: var(--amber-bright); border-bottom-color: var(--amber); }
.endpoint-pane { display: none; padding: 1.25rem; }
.endpoint-pane.active { display: block; }

/* Code block */
.code-block {
  background: var(--bg-void); border: 1px solid var(--border-dim);
  border-radius: var(--r-md); padding: 1rem 1.25rem;
  font-family: var(--font-mono); font-size: .78rem;
  line-height: 1.85; overflow-x: auto; color: var(--text-secondary);
}
.code-block .key { color: var(--amber-bright); }
.code-block .str { color: #86efac; }
.code-block .num { color: #fb923c; }
.code-block .cmt { color: var(--text-muted); font-style: italic; }

/* ══════════════════════════════════════════════════════════════════════════════
   CHANGELOG
   ══════════════════════════════════════════════════════════════════════════════ */
.changelog-timeline { position: relative; }
.changelog-timeline::before {
  content: ''; position: absolute; left: 90px; top: 0; bottom: 0;
  width: 1px; background: var(--border-dim);
}
.changelog-entry { display: flex; gap: 2rem; margin-bottom: 2.5rem; position: relative; }
.entry-version {
  width: 76px; flex-shrink: 0; text-align: right; padding-top: 2px; position: relative;
}
.entry-version::after {
  content: ''; width: 10px; height: 10px; border-radius: 50%;
  background: var(--amber); border: 2px solid var(--bg-void);
  position: absolute; right: -15px; top: 6px;
}
.version-tag  { font-family: var(--font-mono); font-size: .82rem; font-weight: 700; color: var(--amber); display: block; }
.version-date { font-size: .68rem; color: var(--text-muted); margin-top: 2px; display: block; }
.entry-content h3 { font-size: .95rem; margin-bottom: .75rem; }
.change-list  { list-style: none; }
.change-list li {
  display: flex; gap: 7px; align-items: flex-start;
  font-size: .82rem; color: var(--text-secondary);
  padding: .4rem 0; border-bottom: 1px solid var(--border-dim);
}
.change-list li:last-child { border-bottom: none; }
.change-tag {
  font-size: .6rem; font-weight: 700; padding: 2px 6px;
  border-radius: 3px; font-family: var(--font-mono); flex-shrink: 0; margin-top: 2px;
}
.change-tag.feat  { background: var(--teal-soft); color: var(--teal-bright); }
.change-tag.sec   { background: var(--amber-soft); color: var(--amber-bright); }
.change-tag.infra { background: var(--indigo-soft); color: var(--indigo-bright); }
.change-tag.docs  { background: var(--bg-raised); color: var(--text-secondary); }

/* ══════════════════════════════════════════════════════════════════════════════
   CONTRIBUTING
   ══════════════════════════════════════════════════════════════════════════════ */
.contrib-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
.contrib-card {
  background: var(--bg-card); border: 1px solid var(--border-dim);
  border-radius: var(--r-lg); padding: 1.5rem; transition: all .2s;
}
.contrib-card:hover { border-color: var(--border-mid); transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,.4); }
.contrib-card .num { font-size: 2rem; margin-bottom: .75rem; line-height: 1; }
.contrib-card h3 { font-size: .95rem; margin-bottom: .5rem; }
.contrib-card p  { font-size: .8rem; color: var(--text-muted); line-height: 1.55; }

/* ══════════════════════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════════════════════ */
footer {
  background: var(--bg-void); border-top: 1px solid var(--border-dim);
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr repeat(3,1fr); gap: 3rem; margin-bottom: 3rem;
}
.footer-brand p { font-size: .82rem; color: var(--text-muted); max-width: 220px; margin-top: .75rem; line-height: 1.65; }
.footer-col h4 {
  font-family: var(--font-display); font-size: .65rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 1rem; display: block;
}
.footer-col a { display: block; font-size: .82rem; color: var(--text-secondary); padding: 3px 0; transition: color .15s; }
.footer-col a:hover { color: var(--amber); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 2rem; border-top: 1px solid var(--border-dim);
}
.footer-bottom p { font-size: .75rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 1.25rem; }
.footer-links a { font-size: .75rem; color: var(--text-muted); transition: color .15s; }
.footer-links a:hover { color: var(--amber); }
.live-clock { font-size: .72rem; color: var(--text-muted); font-family: var(--font-mono); margin-top: .5rem; display: block; }

/* ══════════════════════════════════════════════════════════════════════════════
   BACK TO TOP
   ══════════════════════════════════════════════════════════════════════════════ */
.back-to-top {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 200;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid var(--border-mid);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary); font-size: 1rem;
  opacity: 0; transform: translateY(12px);
  transition: all .2s;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--amber); color: var(--bg-void); border-color: var(--amber); }

/* ══════════════════════════════════════════════════════════════════════════════
   SCROLL REVEAL
   ══════════════════════════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .6s cubic-bezier(0,0,.2,1), transform .6s cubic-bezier(0,0,.2,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; }
  .arch-preview { max-width: 420px; margin: 0 auto; animation: none; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .quickstart-inner { grid-template-columns: 1fr; }
  .api-layout { grid-template-columns: 1fr; }
  .api-sidebar { position: static; display: none; }
  .flow-cards { grid-template-columns: 1fr; }
  .overview-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  :root { --sec-py: 64px; }
  .nav-links, .nav-badge { display: none; }
  .hamburger { display: flex; }
  .hero-badges .badge:nth-child(n+6) { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .contrib-grid { grid-template-columns: 1fr; }
  .changelog-timeline::before { left: 0; }
  .changelog-entry { flex-direction: column; gap: .5rem; }
  .entry-version { text-align: left; }
  .entry-version::after { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .flow-row { flex-wrap: wrap; gap: 6px; }
  .flow-node { min-width: 70px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
}
