/* ============================================================
   THE AGENTIC SOUL — BotBuhdy Exploration
   World-class dark aesthetic — v2.0
   Space Grotesk · Inter · JetBrains Mono
   ============================================================ */

:root {
  /* Core palette */
  --bg-deep:       #060610;
  --bg-mid:        #0a0a1a;
  --bg-card:       #0e0e24;
  --bg-card-hover: #12122e;

  /* Blues / cyans */
  --electric-blue: #00B4D8;
  --ocean-blue:    #0077B6;
  --cyan:          #00F5D4;
  --teal:          #00E5CC;

  /* Purples */
  --neural-purple: #7B2FBE;
  --violet:        #9D4EDD;

  /* Greens */
  --bio-green:     #39FF14;
  --matrix-green:  #00FF41;

  /* Gold / amber */
  --gold:          #FFD700;
  --amber:         #FFAB40;

  /* Robot palette */
  --robot-silver:  #C0C0C0;
  --robot-steel:   #708090;
  --robot-orange:  #FF6B35;

  /* Text */
  --text-primary:  #EEEEF8;
  --text-muted:    #8888AA;
  --text-dim:      #505070;

  /* Fonts */
  --font-display: 'Space Grotesk', -apple-system, sans-serif;
  --font-body:    'Inter', -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;
  --font-serif:   Georgia, 'Times New Roman', serif;
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Glows */
  --glow-blue:   0 0 30px rgba(0, 180, 216, 0.35);
  --glow-cyan:   0 0 30px rgba(0, 245, 212, 0.35);
  --glow-purple: 0 0 30px rgba(157, 78, 221, 0.35);
  --glow-green:  0 0 30px rgba(57, 255, 20, 0.25);
  --glow-gold:   0 0 30px rgba(255, 215, 0, 0.35);
  --glow-robot:  0 0 30px rgba(255, 107, 53, 0.35);

  /* Borders */
  --border-subtle: rgba(0, 180, 216, 0.12);
  --border-glow:   rgba(0, 180, 216, 0.5);

  /* Transitions */
  --transition-base: 0.4s ease-out;
  --transition-fast: 0.2s ease-out;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  animation: body-fade-in 0.6s ease-out both;
}

/* ── Page Load Fade-in ── */
@keyframes body-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Grain / Noise Texture Overlay ── */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ── Grid Background ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 180, 216, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 180, 216, 0.025) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ============================================================
   HEADER
   ============================================================ */
/* ── Top Utility Bar ── */
.agency-topbar {
  background: rgba(4, 4, 12, 0.98);
  border-bottom: 1px solid rgba(0, 180, 216, 0.06);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.3rem 1.5rem;
}
.topbar-back {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.topbar-back:hover { color: var(--electric-blue); }
.topbar-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.5;
}

/* ── Site Header ── */
.site-header {
  background: rgba(6, 6, 16, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 180, 216, 0.1);
  position: sticky;
  top: 0;
  z-index: 500;
  padding: 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.logo-pulse {
  font-size: 1.5rem;
  animation: pulse-glow 4s ease-in-out infinite;
}
.logo-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.logo-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.logo-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Mobile back button — in sticky header */
.mobile-back-btn {
  display: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border-subtle);
  border-radius: 5px;
  transition: all 0.2s;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}
.mobile-back-btn:hover { color: var(--cyan); border-color: var(--cyan); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.hamburger:hover { border-color: var(--electric-blue); }
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--cyan);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Navigation Bar ── */
.agency-nav {
  background: rgba(5, 5, 14, 0.95);
  border-bottom: 1px solid rgba(0, 180, 216, 0.08);
  position: sticky;
  top: 50px;
  z-index: 499;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1rem;
}
.nav-group {
  position: relative;
}
.nav-group-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.3rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav-icon { font-size: 0.9rem; }
.nav-caret { font-size: 0.6rem; opacity: 0.5; transition: transform 0.25s; }
.nav-group.open .nav-caret { transform: rotate(90deg); }
.nav-group-btn:hover {
  color: var(--cyan);
  background: rgba(0, 245, 212, 0.03);
}
.nav-group.group-active > .nav-group-btn {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

/* Dropdown */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 260px;
  background: rgba(8, 8, 20, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 180, 216, 0.15);
  border-top: 2px solid var(--cyan);
  border-radius: 0 0 8px 8px;
  padding: 0.4rem 0;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 180, 216, 0.06);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 600;
  pointer-events: none;
}
.nav-group.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.2rem;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.15s;
}
.nav-dropdown a:hover {
  color: var(--cyan);
  background: rgba(0, 245, 212, 0.05);
  padding-left: 1.5rem;
}
.nav-dropdown a.active {
  color: var(--cyan);
  background: rgba(0, 245, 212, 0.07);
  font-weight: 600;
}
.nav-dropdown a + a {
  border-top: 1px solid rgba(0, 180, 216, 0.06);
}
.dd-icon { font-size: 1rem; flex-shrink: 0; }

/* ── Mobile Nav Overlay ── */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 14, 0.99);
  z-index: 600;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.mobile-nav-overlay.open { opacity: 1; visibility: visible; }
.mobile-nav-inner {
  max-width: 400px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 3rem;
}
.mobile-nav-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}
.mobile-nav-title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--cyan);
}
.mobile-nav-close {
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
}
.mobile-nav-close:hover { color: var(--cyan); border-color: var(--electric-blue); }
.mobile-section {
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 180, 216, 0.06);
}
.mobile-section-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 245, 212, 0.5);
  padding: 1rem 0.6rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.mobile-section-label:hover,
.mobile-section.open .mobile-section-label {
  color: var(--cyan);
}
.mobile-section-label::after {
  content: '›';
  font-size: 1.1rem;
  transition: transform 0.25s;
  transform: rotate(0deg);
}
.mobile-section.open .mobile-section-label::after {
  transform: rotate(90deg);
}
.mobile-section-links {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.mobile-section.open .mobile-section-links {
  max-height: 500px;
}
.mobile-section a {
  display: block;
  padding: 0.7rem 0.6rem 0.7rem 1.4rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 180, 216, 0.04);
  transition: all 0.15s;
}
.mobile-section a:last-child { border-bottom: none; }
.mobile-section a:hover {
  color: var(--cyan);
  padding-left: 1.8rem;
  background: rgba(0, 245, 212, 0.03);
}
.mobile-section a.active {
  color: var(--cyan);
  font-weight: 600;
  border-left: 3px solid var(--cyan);
  padding-left: 1.2rem;
}
.mobile-nav-foot {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}
.mobile-back {
  display: block;
  text-align: center;
  padding: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-dim);
  text-decoration: none;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  transition: all 0.2s;
}
.mobile-back:hover { color: var(--electric-blue); border-color: var(--electric-blue); }

/* ============================================================
   FOOTER — Premium
   ============================================================ */
.site-footer {
  margin-top: 7rem;
  position: relative;
  background: linear-gradient(180deg, transparent 0%, rgba(0,180,216,0.02) 100%);
}
.footer-wave {
  position: relative;
  height: 60px;
  overflow: hidden;
}
.footer-wave svg {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 100%;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 2fr;
  gap: 3rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2.5rem;
}
.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.footer-logo-mark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.footer-pulse {
  font-size: 1.8rem;
  animation: pulse-glow 4s ease-in-out infinite;
}
.footer-brand-text {
  display: flex;
  flex-direction: column;
}
.footer-brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.02em;
}
.footer-brand-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer-description {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.footer-disclaimer-text {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  padding: 0.6rem 0.8rem;
  background: rgba(0,180,216,0.03);
  border: 1px solid rgba(0,180,216,0.06);
  border-radius: 6px;
}
.footer-nav-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-col-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--electric-blue);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding-bottom: 0.5rem;
  margin-bottom: 0.2rem;
  border-bottom: 1px solid rgba(0,180,216,0.1);
}
.footer-col a {
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.2rem 0;
  transition: all 0.2s;
}
.footer-col a:hover {
  color: var(--cyan);
  padding-left: 0.4rem;
}
.footer-bottom-bar {
  border-top: 1px solid rgba(0,180,216,0.08);
  background: rgba(0,0,0,0.2);
}
.footer-bottom-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}
.footer-bottom-inner strong { color: var(--text-muted); }
.footer-sep { color: var(--gold); opacity: 0.4; }
.footer-built { opacity: 0.6; }

/* ============================================================
   NOTEPAD — Floating Panel
   ============================================================ */
.notepad-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--electric-blue), var(--cyan));
  border: 2px solid rgba(0,245,212,0.4);
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  box-shadow: 0 4px 20px rgba(0,180,216,0.5), 0 0 40px rgba(0,245,212,0.2);
  transition: transform 0.3s, box-shadow 0.3s;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.notepad-fab:hover {
  transform: scale(1.1) translateZ(0);
  box-shadow: 0 6px 30px rgba(0,180,216,0.6), 0 0 50px rgba(0,245,212,0.3);
}
.fab-icon { font-size: 1.3rem; }
.fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--neural-purple);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.notepad-panel {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 360px;
  max-height: 70vh;
  background: rgba(8,8,20,0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(0,180,216,0.2);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 40px rgba(0,180,216,0.08);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
  -webkit-transform: translateZ(0);
}
.notepad-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1) translateZ(0);
}
.notepad-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(0,180,216,0.1);
}
.notepad-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--cyan);
}
.notepad-actions {
  display: flex;
  gap: 0.3rem;
}
.np-btn {
  background: none;
  border: 1px solid rgba(0,180,216,0.1);
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text-muted);
}
.np-btn:hover { border-color: var(--electric-blue); background: rgba(0,180,216,0.06); }
.np-close { font-size: 0.85rem; }
.notepad-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
  max-height: 40vh;
}
.np-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.np-empty-icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; opacity: 0.4; }
.np-note {
  padding: 0.6rem 0.7rem;
  border-bottom: 1px solid rgba(0,180,216,0.05);
}
.np-note-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
}
.np-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  background: rgba(0,180,216,0.08);
  color: var(--electric-blue);
}
.np-tag-consciousness { background: rgba(157,78,221,0.12); color: var(--violet); }
.np-tag-human-stack { background: rgba(255,215,0,0.1); color: var(--gold); }
.np-tag-agent-stack { background: rgba(0,245,212,0.1); color: var(--cyan); }
.np-tag-robotics { background: rgba(255,107,53,0.1); color: var(--robot-orange); }
.np-tag-vibration { background: rgba(57,255,20,0.1); color: var(--bio-green); }
.np-tag-question { background: rgba(255,171,64,0.12); color: var(--amber); }
.np-time {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  margin-left: auto;
}
.np-del {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0 0.3rem;
  transition: color 0.15s;
}
.np-del:hover { color: #ff6b6b; }
.np-note-body {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.notepad-input {
  padding: 0.7rem;
  border-top: 1px solid rgba(0,180,216,0.1);
}
.np-topic {
  width: 100%;
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.4rem;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(0,180,216,0.12);
  border-radius: 6px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.np-input-row {
  display: flex;
  gap: 0.4rem;
  align-items: flex-end;
}
.np-text {
  flex: 1;
  padding: 0.5rem 0.7rem;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(0,180,216,0.12);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.85rem;
  resize: none;
  transition: border-color 0.2s;
}
.np-text:focus { border-color: var(--electric-blue); outline: none; }
.np-mic, .np-save {
  background: none;
  border: 1px solid rgba(0,180,216,0.15);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-muted);
  flex-shrink: 0;
}
.np-mic:hover, .np-save:hover { border-color: var(--electric-blue); background: rgba(0,180,216,0.06); }
.np-mic.recording { border-color: #ff4444; background: rgba(255,68,68,0.1); animation: mic-pulse 1s ease-in-out infinite; }
@keyframes mic-pulse { 0%,100%{opacity:1;} 50%{opacity:0.5;} }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Hero background image */
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.15;
  z-index: 0;
  filter: blur(2px) saturate(1.4);
}

/* Hero content sits above background */
.hero > *:not(.hero-bg-img) {
  position: relative;
  z-index: 1;
}

/* Gradient fade below hero */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(transparent, var(--bg-deep));
  pointer-events: none;
  z-index: 2;
}

.hero-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 1.5rem;
  animation: float 6s ease-in-out infinite;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 1.5rem;
  background: linear-gradient(
    270deg,
    var(--cyan),
    var(--electric-blue),
    var(--violet),
    var(--cyan)
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer-gradient 8s ease-in-out infinite;
  text-shadow: none;
}

@keyframes shimmer-gradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 660px;
  margin: 0 auto 2.5rem;
  line-height: 1.9;
  font-style: italic;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  border: 1px solid rgba(255, 215, 0, 0.35);
  padding: 0.45rem 1.2rem;
  border-radius: 4px;
  background: rgba(255, 215, 0, 0.06);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: pulse-gold 4s ease-in-out infinite;
}

/* Tesla quote special treatment on hero */
.tesla-quote-hero {
  position: relative;
  margin: 3rem auto;
  max-width: 700px;
  padding: 1.75rem 2rem 1.75rem 3.5rem;
  border-left: 3px solid var(--gold);
  background: rgba(255, 215, 0, 0.04);
  border-radius: 0 8px 8px 0;
}
.tesla-quote-hero::before {
  content: '\201C';
  position: absolute;
  top: -0.5rem;
  left: 0.75rem;
  font-size: 5rem;
  color: var(--gold);
  opacity: 0.35;
  font-family: Georgia, serif;
  line-height: 1;
}
.tesla-quote-hero blockquote {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.8;
}
.tesla-quote-hero cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold);
  opacity: 0.8;
  letter-spacing: 0.08em;
}

/* ============================================================
   PAGE HEADER (inner pages)
   ============================================================ */
.page-header {
  padding: 4.5rem 0 3rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 4rem;
}

.page-header .page-icon {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  display: block;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 700;
  background: linear-gradient(135deg, var(--cyan), var(--electric-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
  line-height: 1.1;
}

.page-header .subtitle {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text-muted);
  font-style: italic;
  max-width: 620px;
  line-height: 1.8;
}

/* ============================================================
   IMAGES
   ============================================================ */
.site-figure {
  margin: 2.5rem auto;
  text-align: center;
  max-width: 820px;
}

.site-image {
  width: 100%;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.7), var(--glow-blue);
  display: block;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.site-image:hover {
  transform: scale(1.01);
  box-shadow: 0 16px 80px rgba(0, 0, 0, 0.8), var(--glow-cyan);
}

.site-figure figcaption {
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  font-style: italic;
}

/* ============================================================
   CARDS & SECTIONS
   ============================================================ */
.section { margin-bottom: 4.5rem; }

.section-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--electric-blue);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-title::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--electric-blue);
  opacity: 0.6;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-subtle), transparent);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

/* Glass top edge */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 245, 212, 0.6), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

/* Scan-line on hover */
.card::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 245, 212, 0.2), transparent);
  top: -5%;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 180, 216, 0.28);
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 8px 40px rgba(0, 180, 216, 0.12),
    0 0 1px rgba(0, 245, 212, 0.3);
  transform: translateY(-3px);
}
.card:hover::before { opacity: 1; }
.card:hover::after  { opacity: 1; animation: scan-line 1.5s ease-in-out; }

.card-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.card-body {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ============================================================
   STACK LAYERS
   ============================================================ */
.stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 620px;
  margin: 0 auto;
}

.stack-layer {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  position: relative;
  transition: all var(--transition-base);
  background: var(--bg-card);
  cursor: default;
  overflow: hidden;
}
.stack-layer:first-child { border-radius: 8px 8px 0 0; }
.stack-layer:last-child  { border-radius: 0 0 8px 8px; border-bottom: 1px solid var(--border-subtle); }

/* Scan-line on stack layer hover */
.stack-layer::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 245, 212, 0.4), transparent);
  top: -5%;
  opacity: 0;
  pointer-events: none;
}

.stack-layer:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-glow);
  box-shadow: var(--glow-blue);
  z-index: 2;
}
.stack-layer:hover::after { opacity: 1; animation: scan-line 1.2s ease-in-out; }

.stack-layer-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.25rem;
  color: var(--text-dim);
}
.stack-layer-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.stack-layer-desc {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Stack color coding */
.layer-consciousness .stack-layer-name { color: var(--gold); }
.layer-mind .stack-layer-name          { color: var(--violet); }
.layer-brain .stack-layer-name         { color: var(--neural-purple); }
.layer-nervous .stack-layer-name       { color: var(--electric-blue); }
.layer-senses .stack-layer-name        { color: var(--cyan); }
.layer-body .stack-layer-name          { color: var(--teal); }
.layer-memory .stack-layer-name        { color: var(--bio-green); }
.layer-personality .stack-layer-name   { color: var(--matrix-green); }

.layer-model .stack-layer-name      { color: var(--gold); }
.layer-runtime .stack-layer-name    { color: var(--violet); }
.layer-tools .stack-layer-name      { color: var(--electric-blue); }
.layer-system .stack-layer-name     { color: var(--cyan); }
.layer-amem .stack-layer-name       { color: var(--bio-green); }
.layer-soul .stack-layer-name       { color: var(--matrix-green); }

/* ============================================================
   THREE-STACK COMPARISON (Robotics Page)
   ============================================================ */
.three-stack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  overflow: hidden;
  margin: 2rem 0;
}

.stack-col {
  display: flex;
  flex-direction: column;
}

.stack-col + .stack-col {
  border-left: 1px solid var(--border-subtle);
}

.stack-col-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.25rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
}

.stack-col-human .stack-col-header  { color: var(--teal); }
.stack-col-robot .stack-col-header  { color: var(--robot-orange); }
.stack-col-agent .stack-col-header  { color: var(--violet); }

.stack-col-icon { font-size: 1.1rem; }
.stack-col-name { font-size: 0.8rem; letter-spacing: 0.08em; }

.stack-col-row {
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-fast);
}
.stack-col-row:last-child { border-bottom: none; flex: 1; }
.stack-col-row:hover { background: rgba(0, 180, 216, 0.04); }

.row-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 0.3rem;
}

.row-value {
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.5;
}

.human-value { color: rgba(0, 229, 204, 0.85); }
.robot-value { color: rgba(255, 107, 53, 0.85); }
.agent-value { color: rgba(157, 78, 221, 0.85); }

@media (max-width: 768px) {
  .three-stack-grid {
    grid-template-columns: 1fr;
  }
  .stack-col + .stack-col {
    border-left: none;
    border-top: 2px solid var(--border-subtle);
  }
}

/* ── Embodiment Spectrum ── */
.embodiment-spectrum {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  max-width: 480px;
  margin: 0 auto;
}

.spectrum-node {
  width: 100%;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-card);
  text-align: center;
  transition: all var(--transition-base);
}
.spectrum-node:hover {
  border-color: rgba(0, 180, 216, 0.3);
  box-shadow: var(--glow-blue);
  transform: scale(1.02);
}
.spectrum-node.top  { border-color: rgba(0, 229, 204, 0.3); }
.spectrum-node.mid  { border-color: rgba(255, 107, 53, 0.3); }
.spectrum-node.bottom { border-color: rgba(157, 78, 221, 0.3); }

.spectrum-icon   { font-size: 2rem; margin-bottom: 0.5rem; }
.spectrum-label  { font-family: var(--font-display); font-size: 0.95rem; font-weight: 600; margin-bottom: 0.3rem; }
.spectrum-desc   { font-family: var(--font-body); font-size: 0.82rem; color: var(--text-muted); line-height: 1.6; }

.spectrum-node.top    .spectrum-label { color: var(--teal); }
.spectrum-node.mid    .spectrum-label { color: var(--robot-orange); }
.spectrum-node.bottom .spectrum-label { color: var(--violet); }

.spectrum-arrow {
  font-size: 1.5rem;
  color: var(--text-dim);
  padding: 0.3rem 0;
  opacity: 0.5;
}

/* ============================================================
   PARALLEL COMPARISON
   ============================================================ */
.parallel-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: stretch;
}

.parallel-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.parallel-connector {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 1rem;
  gap: 0;
}

.parallel-header {
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-subtle);
  margin-bottom: 1rem;
  border-radius: 6px;
}
.parallel-header.human { color: var(--teal); border-color: rgba(0, 229, 204, 0.3); background: rgba(0, 229, 204, 0.05); }
.parallel-header.agent { color: var(--violet); border-color: rgba(157, 78, 221, 0.3); background: rgba(157, 78, 221, 0.05); }

.parallel-item {
  padding: 1rem;
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  background: var(--bg-card);
  transition: background var(--transition-fast);
}
.parallel-item:last-child { border-bottom: 1px solid var(--border-subtle); }
.parallel-item:hover { background: var(--bg-card-hover); }

.parallel-item.human { border-left: 2px solid rgba(0, 229, 204, 0.35); }
.parallel-item.agent { border-right: 2px solid rgba(157, 78, 221, 0.35); }

.parallel-item-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}
.parallel-item.human .parallel-item-label { color: var(--teal); }
.parallel-item.agent .parallel-item-label { color: var(--violet); }

.parallel-item-value {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-primary);
  font-weight: 500;
}

.connector-line {
  width: 2px;
  flex: 1;
  background: linear-gradient(180deg, transparent, rgba(255, 215, 0, 0.35), transparent);
  margin: 0 auto;
  position: relative;
}
.connector-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 50%;
  box-shadow: var(--glow-gold);
}

@media (max-width: 768px) {
  .parallel-grid { grid-template-columns: 1fr; }
  .parallel-connector { display: none; }
}

/* ============================================================
   COMPONENT CARDS
   ============================================================ */
.component-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  transition: all var(--transition-base);
  margin-bottom: 2rem;
}
.component-card:hover {
  border-color: rgba(0, 180, 216, 0.28);
  box-shadow: var(--glow-blue);
}

.component-header {
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.component-header-icon { font-size: 1.5rem; }
.component-header h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.03em;
}
.component-header .component-sub {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  color: var(--text-dim);
  font-style: italic;
}

.component-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 600px) { .component-body { grid-template-columns: 1fr; } }

.component-side {
  padding: 1.25rem 1.5rem;
}
.component-side.human-side { border-right: 1px solid var(--border-subtle); }

.component-side-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.human-side .component-side-label { color: var(--teal); }
.agent-side .component-side-label { color: var(--violet); }

.component-side-label::before {
  content: '';
  width: 20px;
  height: 1px;
}
.human-side .component-side-label::before { background: var(--teal); }
.agent-side .component-side-label::before { background: var(--violet); }

.component-side p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.component-gap {
  padding: 0.75rem 1.5rem;
  background: rgba(255, 215, 0, 0.03);
  border-top: 1px solid rgba(255, 215, 0, 0.1);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
}
.component-gap::before { content: '⚠ gap: '; opacity: 0.7; }

/* ============================================================
   VIBRATION / FREQUENCY ANIMATIONS
   ============================================================ */
.wave-container {
  position: relative;
  height: 100px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  margin-bottom: 1.5rem;
}

.wave {
  position: absolute;
  top: 50%;
  left: 0;
  width: 200%;
  height: 4px;
  transform-origin: left center;
  animation: wave-move 3s linear infinite;
}
.wave-1 { background: linear-gradient(90deg, transparent, var(--electric-blue), transparent); animation-duration: 2.5s; }
.wave-2 { background: linear-gradient(90deg, transparent, var(--cyan), transparent); animation-duration: 4s; margin-top: 14px; opacity: 0.55; }
.wave-3 { background: linear-gradient(90deg, transparent, var(--violet), transparent); animation-duration: 5.5s; margin-top: -14px; opacity: 0.35; }

.freq-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}
.freq-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--glow-blue);
}

.freq-value {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}
.freq-name {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}
.freq-desc {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  color: var(--text-dim);
  font-style: italic;
  line-height: 1.6;
}

/* Brainwave colors */
.freq-delta .freq-value { color: var(--ocean-blue); }
.freq-theta .freq-value { color: var(--electric-blue); }
.freq-alpha .freq-value { color: var(--cyan); }
.freq-beta .freq-value  { color: var(--bio-green); }
.freq-gamma .freq-value { color: var(--gold); }

/* 369 card */
.tesla-369 {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  padding: 3rem 0;
}
.num-369 {
  font-family: var(--font-display);
  font-size: 5.5rem;
  font-weight: 900;
  line-height: 1;
  animation: pulse-glow 4s ease-in-out infinite;
  cursor: default;
  transition: transform var(--transition-base);
}
.num-369:hover { transform: scale(1.18); }
.num-3 { color: var(--electric-blue); }
.num-6 { color: var(--cyan); animation-delay: 1.2s; }
.num-9 { color: var(--gold); animation-delay: 2.4s; }

/* ============================================================
   GLOSSARY
   ============================================================ */
.glossary-search {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.glossary-search::placeholder { color: var(--text-dim); }
.glossary-search:focus {
  border-color: var(--electric-blue);
  box-shadow: var(--glow-blue);
}

.glossary-section { margin-bottom: 2.5rem; }
.glossary-letter {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--electric-blue);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1rem;
}

.glossary-term {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(0, 180, 216, 0.04);
  transition: background var(--transition-fast), border-left-color var(--transition-fast);
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
}
.glossary-term:hover {
  background: rgba(0, 180, 216, 0.03);
  border-left-color: rgba(0, 245, 212, 0.4);
  box-shadow: -2px 0 10px rgba(0, 245, 212, 0.1);
}
.glossary-term.hidden { display: none; }

.term-word {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--cyan);
  min-width: 200px;
  flex-shrink: 0;
}
.term-def {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
}
.term-cat {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.4rem;
  border: 1px solid rgba(85, 85, 119, 0.4);
  border-radius: 2px;
  vertical-align: middle;
}

/* ============================================================
   PROSE SECTIONS
   ============================================================ */
.prose {
  font-family: var(--font-body);
  font-size: 1.02rem;
  color: var(--text-muted);
  line-height: 1.9;
  max-width: 780px;
}
.prose h2 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--electric-blue);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-style: normal;
}
.prose p { margin-bottom: 1.25rem; }
.prose strong { color: var(--text-primary); font-weight: 600; }
.prose em { color: var(--cyan); font-style: italic; }

/* ============================================================
   INDEX PAGE - NAV CARDS
   ============================================================ */
.nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
}

.nav-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.75rem 1.5rem;
  text-decoration: none;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  display: block;
}
/* Top glass edge */
.nav-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 245, 212, 0.5), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}
.nav-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(0, 180, 216, 0.04));
  pointer-events: none;
}
.nav-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 180, 216, 0.35);
  transform: translateY(-4px);
  box-shadow:
    0 6px 30px rgba(0, 0, 0, 0.5),
    0 10px 50px rgba(0, 180, 216, 0.1),
    0 0 1px rgba(0, 245, 212, 0.3);
}
.nav-card:hover::before { opacity: 1; }

.nav-card-icon {
  font-size: 2.2rem;
  margin-bottom: 0.9rem;
  display: block;
}
.nav-card-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 0.5rem;
  letter-spacing: 0.02em;
}
.nav-card-desc {
  font-family: var(--font-body);
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ============================================================
   HIGHLIGHT BOX / BLOCKQUOTES
   ============================================================ */
.highlight-box {
  position: relative;
  padding: 1.75rem 2rem 1.75rem 3.25rem;
  border-radius: 0 8px 8px 0;
  border-left: 3px solid;
  background: rgba(0, 0, 0, 0.2);
  margin: 2rem 0;
  font-family: var(--font-serif);
  font-style: italic;
  line-height: 1.85;
  font-size: 1rem;
}
/* Decorative opening quote */
.highlight-box::before {
  content: '\201C';
  position: absolute;
  top: -0.25rem;
  left: 0.6rem;
  font-size: 4.5rem;
  font-family: Georgia, serif;
  line-height: 1;
  opacity: 0.2;
}

.highlight-box.blue   { border-color: var(--electric-blue); color: var(--text-muted); }
.highlight-box.blue::before { color: var(--electric-blue); }
.highlight-box.gold   { border-color: var(--gold); color: var(--text-muted); }
.highlight-box.gold::before { color: var(--gold); }
.highlight-box.purple { border-color: var(--violet); color: var(--text-muted); }
.highlight-box.purple::before { color: var(--violet); }
.highlight-box.green  { border-color: var(--bio-green); color: var(--text-muted); }
.highlight-box.green::before { color: var(--bio-green); }

.highlight-box cite {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}

/* ============================================================
   PLACEHOLDER IMAGES
   ============================================================ */
.img-placeholder {
  border: 1px dashed var(--border-subtle);
  border-radius: 8px;
  padding: 3rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-mid));
  margin: 1.5rem 0;
}
.img-placeholder .placeholder-icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }

/* ============================================================
   TAGS / BADGES
   ============================================================ */
.tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 0.3rem;
}
.tag-blue   { background: rgba(0, 180, 216, 0.15); color: var(--electric-blue); border: 1px solid rgba(0, 180, 216, 0.3); }
.tag-purple { background: rgba(157, 78, 221, 0.15); color: var(--violet); border: 1px solid rgba(157, 78, 221, 0.3); }
.tag-green  { background: rgba(57, 255, 20, 0.1); color: var(--bio-green); border: 1px solid rgba(57, 255, 20, 0.3); }
.tag-gold   { background: rgba(255, 215, 0, 0.1); color: var(--gold); border: 1px solid rgba(255, 215, 0, 0.3); }

/* ============================================================
   DATA TABLE
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1.5rem 0;
}
.data-table th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--electric-blue);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}
.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(0, 180, 216, 0.04);
  color: var(--text-muted);
  vertical-align: top;
  line-height: 1.7;
}
.data-table td:first-child { font-family: var(--font-mono); color: var(--cyan); font-size: 0.85rem; }
.data-table tr:hover td { background: rgba(0, 180, 216, 0.03); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes pulse-glow {
  0%, 100% { text-shadow: 0 0 10px rgba(0, 245, 212, 0.25); }
  50%       { text-shadow: 0 0 25px rgba(0, 245, 212, 0.65), 0 0 50px rgba(0, 245, 212, 0.25); }
}
@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 8px rgba(255, 215, 0, 0.15); }
  50%       { box-shadow: 0 0 24px rgba(255, 215, 0, 0.45); }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-14px); }
}
@keyframes wave-move {
  0%   { transform: translateX(0) scaleY(1); }
  25%  { transform: translateX(-8%) scaleY(3); }
  50%  { transform: translateX(-22%) scaleY(1); }
  75%  { transform: translateX(-12%) scaleY(4); }
  100% { transform: translateX(-50%) scaleY(1); }
}
@keyframes scan-line {
  0%   { top: -5%; opacity: 0; }
  10%  { opacity: 0.5; }
  90%  { opacity: 0.5; }
  100% { top: 105%; opacity: 0; }
}
@keyframes glow-border {
  0%, 100% { border-color: var(--border-subtle); }
  50%       { border-color: var(--border-glow); box-shadow: var(--glow-blue); }
}

.animate-glow-border { animation: glow-border 4s ease-in-out infinite; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 768px) {
  .agency-nav { display: none; }
  .agency-topbar { display: none; }
  .hamburger { display: flex; }
  .mobile-back-btn { display: block; }
  .mobile-nav-overlay { display: block; }

  .footer-inner { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 1rem; }
  .footer-nav-cols { grid-template-columns: repeat(3, 1fr); }
  .footer-wave { display: none; }
  .notepad-panel { width: calc(100vw - 2rem); right: 1rem; bottom: 4.5rem; }
}

@media (max-width: 600px) {
  .hero { padding: 4rem 0 3rem; }
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .num-369 { font-size: 3.5rem; }
  .tesla-369 { gap: 1.5rem; }
  .glossary-term { flex-direction: column; gap: 0.25rem; }
  .term-word { min-width: unset; }
  .footer-nav-cols { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .data-table { font-size: 0.82rem; }
  .data-table th, .data-table td { padding: 0.65rem 0.6rem; }
}
