/* ============================================
   altoex — Dark Synth Design System
   ============================================ */

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

/* --- Tokens --- */
:root {
  --bg:             #0a0a0f;
  --bg-surface:     #12121a;
  --bg-elevated:    #1a1a26;
  --bg-hover:       #22222e;
  --text:           #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --accent:         #81C91D;
  --accent-hover:   #6db018;
  --accent-glow:    rgba(129, 201, 29, 0.15);
  --cyan:           #06b6d4;
  --green:          #10b981;
  --magenta:        #ec4899;
  --red:            #ef4444;
  --white:          #e2e8f0;
  --border:         #1e293b;
  --border-light:   #334155;
  --radius:         8px;
  --radius-lg:      12px;
  --radius-xl:      16px;
  --sans:           'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:           'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --max-width:      1200px;
  --nav-height:     64px;
  --transition:     200ms ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 24px);
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.125rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

.mono { font-family: var(--mono); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-cyan { color: var(--cyan); }
.text-green { color: var(--green); }
.text-magenta { color: var(--magenta); }
.text-red { color: var(--red); }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-header {
  margin-bottom: 48px;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  margin-bottom: 16px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 640px;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

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

.nav-logo {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

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

.nav-logo-img {
  height: 28px;
  width: auto;
  display: block;
}

/* --- Brand Wordmark --- */
.wordmark {
  font-family: var(--mono);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  text-decoration: none;
  transition: opacity var(--transition);
}

.wordmark:hover { opacity: 0.85; color: var(--text); }

.wordmark-dot {
  color: var(--accent);
  font-size: 1.2em;
  line-height: 1;
}

.wordmark-nav {
  font-size: 1.35rem;
}

.wordmark-hero {
  font-size: clamp(3rem, 8vw, 5.5rem);
  letter-spacing: -0.04em;
}

.wordmark-splash {
  font-size: clamp(3.5rem, 18vw, 12rem);
  letter-spacing: -0.04em;
  animation: splashPulse 2s ease-in-out;
}

.wordmark-footer {
  font-size: 1.1rem;
}

/* Glow effect on hero/splash */
.wordmark-hero .wordmark-dot,
.wordmark-splash .wordmark-dot {
  text-shadow: 0 0 20px var(--accent), 0 0 40px rgba(129, 201, 29, 0.3);
}

/* Icon mark next to wordmark */
.wordmark-icon {
  height: 1em;
  width: auto;
  margin-right: 0.3em;
  vertical-align: -0.05em;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 6px 0;
  transition: all var(--transition);
}

/* --- Hero --- */
.hero {
  padding: 160px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-tagline {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero-desc {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Stats Bar --- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.stat {
  background: var(--bg-surface);
  padding: 32px 24px;
  text-align: center;
}

.stat-value {
  font-family: var(--mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0f;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #0a0a0f;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--text-muted);
  color: var(--text);
}

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--transition);
}

.card:hover {
  border-color: var(--border-light);
  background: var(--bg-elevated);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.card-icon.amber { background: rgba(129, 201, 29, 0.1); color: var(--accent); }
.card-icon.cyan { background: rgba(6, 182, 212, 0.1); color: var(--cyan); }
.card-icon.green { background: rgba(16, 185, 129, 0.1); color: var(--green); }
.card-icon.magenta { background: rgba(236, 72, 153, 0.1); color: var(--magenta); }
.card-icon.red { background: rgba(239, 68, 68, 0.1); color: var(--red); }

.card h3 { margin-bottom: 12px; }

.card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* --- Signal Type Badge --- */
.signal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
}

.signal-badge.audio { background: rgba(129, 201, 29, 0.15); color: var(--accent); }
.signal-badge.cv { background: rgba(6, 182, 212, 0.15); color: var(--cyan); }
.signal-badge.gate { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.signal-badge.trigger { background: rgba(236, 72, 153, 0.15); color: var(--magenta); }
.signal-badge.clock { background: rgba(226, 232, 240, 0.1); color: var(--white); }

.signal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.signal-dot.audio { background: var(--accent); }
.signal-dot.cv { background: var(--cyan); }
.signal-dot.gate { background: var(--green); }
.signal-dot.trigger { background: var(--magenta); }
.signal-dot.clock { background: var(--white); }

/* --- Tables --- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead {
  background: var(--bg-elevated);
}

th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

tr:last-child td { border-bottom: none; }

tr:hover td { background: var(--bg-hover); }

td:first-child { color: var(--text); font-weight: 500; }

/* --- Method Badges (API) --- */
.method {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.method.get { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.method.post { background: rgba(6, 182, 212, 0.15); color: var(--cyan); }
.method.put { background: rgba(129, 201, 29, 0.15); color: var(--accent); }
.method.delete { background: rgba(239, 68, 68, 0.15); color: var(--red); }
.method.patch { background: rgba(236, 72, 153, 0.15); color: var(--magenta); }

/* --- Gallery --- */
.gallery-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover { border-color: var(--border-light); color: var(--text); }
.filter-btn.active { background: var(--accent); color: #0a0a0f; border-color: var(--accent); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.gallery-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
}

.gallery-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.gallery-item-label {
  padding: 10px 14px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: var(--mono);
}

/* --- Module Detail Modal --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
}

.lightbox.active { display: flex; }

.lightbox-close {
  position: fixed;
  top: 16px;
  right: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 2001;
  transition: all var(--transition);
}

.lightbox-close:hover { border-color: var(--accent); color: var(--accent); }

.module-detail {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 900px;
  width: 100%;
  margin: 40px auto;
  overflow: hidden;
}

.module-detail-header {
  display: flex;
  gap: 32px;
  padding: 32px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.module-detail-img {
  width: 280px;
  min-width: 280px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.module-detail-info { flex: 1; }

.module-detail-category {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 3px 10px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 12px;
}

.module-detail-category.source { background: rgba(129, 201, 29, 0.15); color: var(--accent); }
.module-detail-category.processor { background: rgba(6, 182, 212, 0.15); color: var(--cyan); }
.module-detail-category.logic { background: rgba(16, 185, 129, 0.15); color: var(--green); }
.module-detail-category.risk { background: rgba(239, 68, 68, 0.15); color: var(--red); }
.module-detail-category.utility { background: rgba(236, 72, 153, 0.15); color: var(--magenta); }

.module-detail-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.module-detail-typename {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.module-detail-desc {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.9375rem;
}

.module-detail-body {
  padding: 32px;
}

.module-detail-section {
  margin-bottom: 28px;
}

.module-detail-section:last-child { margin-bottom: 0; }

.module-detail-section h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.port-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.port-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
  font-size: 0.8125rem;
}

.port-item .port-name {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--text);
}

.port-item .port-desc {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.param-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}

.param-item {
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius);
}

.param-item-name {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text);
  margin-bottom: 4px;
}

.param-item-range {
  font-family: var(--mono);
  font-size: 0.6875rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .module-detail-header {
    flex-direction: column;
    gap: 20px;
  }
  .module-detail-img {
    width: 100%;
    min-width: auto;
  }
  .port-list, .param-list {
    grid-template-columns: 1fr;
  }
}

/* --- API Sidebar --- */
.api-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}

.api-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  max-height: calc(100vh - var(--nav-height) - 48px);
  overflow-y: auto;
}

.api-sidebar a {
  display: block;
  padding: 6px 12px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  transition: all var(--transition);
}

.api-sidebar a:hover,
.api-sidebar a.active {
  color: var(--text);
  border-left-color: var(--accent);
  background: var(--accent-glow);
}

.api-section {
  margin-bottom: 48px;
  scroll-margin-top: calc(var(--nav-height) + 24px);
}

.api-section h3 {
  font-family: var(--mono);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* --- Collapsible --- */
.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.collapsible-header h3 { margin: 0; }

.collapsible-arrow {
  transition: transform var(--transition);
  color: var(--text-muted);
}

.collapsible.open .collapsible-arrow { transform: rotate(180deg); }

.collapsible-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease;
}

.collapsible.open .collapsible-body {
  max-height: 5000px;
}

/* --- Tech Stack Grid --- */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.tech-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  transition: all var(--transition);
}

.tech-item:hover { border-color: var(--border-light); }

.tech-item-name {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 4px;
}

.tech-item-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* --- Signal Flow Table --- */
.signal-table {
  width: 100%;
}

.signal-table td:first-child {
  width: 120px;
}

/* --- Coming Soon Banner --- */
.coming-soon {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px;
  text-align: center;
}

.coming-soon h2 { margin-bottom: 16px; }

.coming-soon p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-links a:hover { color: var(--text); }

/* --- Signup Form --- */
.signup-form {
  max-width: 800px;
  margin: 0 auto;
}

.signup-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.signup-input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--text);
  transition: border-color var(--transition);
}

.signup-input:focus {
  outline: none;
  border-color: var(--accent);
}

.signup-input::placeholder {
  color: var(--text-muted);
}

.signup-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  max-width: 180px;
}

.signup-select option {
  background: var(--bg-surface);
  color: var(--text);
}

.signup-row .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .signup-row {
    flex-direction: column;
  }
  .signup-select {
    max-width: none;
  }
}

/* --- Contact Form --- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--text);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

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

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-group select option {
  background: var(--bg-surface);
  color: var(--text);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* --- Splash Screen --- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 800ms ease, visibility 800ms ease;
}

.splash.fade-out {
  opacity: 0;
  visibility: hidden;
}

.splash-logo {
  width: 280px;
  max-width: 60vw;
  animation: splashPulse 1.8s ease-in-out;
}

@keyframes splashPulse {
  0% { opacity: 0; transform: scale(0.8); }
  30% { opacity: 1; transform: scale(1); }
  70% { opacity: 1; transform: scale(1); }
  100% { opacity: 1; transform: scale(1); }
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease, transform 600ms ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
  }

  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }

  .hero { padding: 120px 0 60px; }
  .section { padding: 60px 0; }

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

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

  .api-layout {
    grid-template-columns: 1fr;
  }

  .api-sidebar {
    position: static;
    max-height: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .api-sidebar a {
    border-left: none;
    border-bottom: 2px solid transparent;
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

  .coming-soon { padding: 32px 20px; }

  .footer .container {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .stats-bar { grid-template-columns: 1fr; }
  .stat-value { font-size: 1.5rem; }
  .hero-cta { flex-direction: column; align-items: center; }
}

/* --- Diagram --- */
.diagram-container {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 24px 0;
  overflow-x: auto;
}

.diagram-container img,
.diagram-container svg {
  width: 100%;
  height: auto;
}

/* --- Venue Badge --- */
.venue-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 600;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* --- Hub Table --- */
.hub-row td:first-child {
  font-family: var(--mono);
  color: var(--cyan);
}

/* --- Page Spacer --- */
.page-top { padding-top: calc(var(--nav-height) + 48px); }
/* deploy 1775210886 */
