/* ========================================
   Aevum Dynamics — Gold/Yellow Color Scheme
   with Light/Dark Mode Toggle
   ======================================== */

/* ---- Base variables (dark mode default) ---- */
:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface-2: #1a1a1a;
  --text: #f0f0f0;
  --muted: #9c9c9c;
  --accent: #d4a843;
  --accent-dim: #3a2e14;
  --border: #2a2a2a;
  --hero-bg: #0a0a0a;
  --card-bg: #111111;
}

/* ---- Light mode overrides ---- */
[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f5f5f5;
  --surface-2: #eeeeee;
  --text: #1a1a1a;
  --muted: #595959;
  --accent: #b8860b;
  --accent-dim: #f5e6c3;
  --border: #e0e0e0;
  --hero-bg: #ffffff;
  --card-bg: #f5f5f5;
}

/* ---- Reset & base ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background 0.3s, color 0.3s;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: #0a0a0a;
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus { top: 1rem; text-decoration: none; }

/* ---- Header & Nav ---- */
header {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(8,8,8,0.55);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s, border-color 0.3s;
}
[data-theme="light"] header {
  background: rgba(255,255,255,0.75);
  border-bottom-color: rgba(0,0,0,0.07);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.nav .brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  margin-right: auto;
  display: inline-flex;
  align-items: center;
}
.brand-hex { color: var(--accent); vertical-align: middle; margin-right: 0.3rem; }

.nav a {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.15s;
}
.nav a:hover, .nav a.active { color: var(--accent); text-decoration: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

/* ---- Mobile nav toggle ---- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 38px;
  height: 34px;
  padding: 0 9px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.nav-toggle:hover { border-color: var(--accent); }
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1rem;
    background: rgba(8,8,8,0.94);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: none;
  }
  [data-theme="light"] .nav-links {
    background: rgba(255,255,255,0.96);
    border-bottom-color: rgba(0,0,0,0.08);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    padding: 0.75rem 0.25rem;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links a:last-child { border-bottom: none; }
}

/* ---- Theme toggle ---- */
.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  color: var(--muted);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- Main layout ---- */
main {
  max-width: 880px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

/* ---- Hero ---- */
.hero { padding: 1.5rem 0 2.5rem; position: relative; }
.hero h1 { font-size: 2.2rem; line-height: 1.2; margin-bottom: 0.75rem; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 60ch; }

/* Page hero with background image */
.page-hero {
  position: relative;
  padding: 2.5rem 0 2.25rem;
  margin: 0 0 2.5rem;
  overflow: hidden;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  min-height: 280px;
  background-size: cover;
  background-position: center;
  transition: background-image 0.6s;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--surface) 0%, var(--surface) 35%, transparent 70%);
  z-index: 0;
  opacity: 0.92;
  transition: opacity 0.6s;
}
[data-theme="dark"] .page-hero::before {
  opacity: 0.88;
}
.page-hero > * {
  position: relative;
  z-index: 1;
  padding: 0 1.5rem;
}
.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 0.6rem;
  background: linear-gradient(120deg, var(--text) 0%, var(--text) 55%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-hero p {
  color: var(--muted);
  max-width: 50ch;
}

/* ---- Landing page hero ---- */
.landing-hero {
  text-align: center;
  padding: 3rem 0 3.5rem;
}
.landing-hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
}
.hero-sub {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 55ch;
  margin: 0 auto 2rem;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.stat {
  text-align: center;
}
.stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.9rem 1.9rem;
  border-radius: 10px;
  text-decoration: none !important;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.2s;
  will-change: transform;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.22) 0%, transparent 55%);
  pointer-events: none;
}
.btn-primary:hover {
  box-shadow: 0 8px 36px rgba(212,168,67,0.55);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text) !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.9rem 1.9rem;
  border-radius: 10px;
  text-decoration: none !important;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.04);
  transition: border-color 0.25s, background 0.25s;
  will-change: transform;
}
[data-theme="light"] .btn-ghost {
  border-color: rgba(0,0,0,0.15);
  background: rgba(0,0,0,0.03);
}
.btn-ghost:hover {
  border-color: var(--accent);
  background: rgba(212,168,67,0.08);
}

.section-lead {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

/* ---- Typography ---- */
h1, h2 { letter-spacing: -0.02em; }
h2 { margin: 2rem 0 0.75rem; font-size: 1.5rem; font-weight: 800; }
h3 { margin: 1.5rem 0 0.5rem; font-size: 1.1rem; }
p { margin-bottom: 1rem; }
ul, ol { margin: 0 0 1rem 1.4rem; }
li { margin-bottom: 0.4rem; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* ---- Tabs ---- */
.tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin: 1.5rem 0;
  flex-wrap: wrap;
}
.tab-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---- Cards (glass) ---- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin: 1rem 0 2rem;
}
.card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-radius: 20px;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s, box-shadow 0.35s, transform 0.25s;
}
[data-theme="light"] .card {
  background: rgba(255,255,255,0.72);
  border-color: rgba(0,0,0,0.07);
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
}
.card:hover {
  border-color: rgba(212,168,67,0.45);
  box-shadow: 0 0 0 1px rgba(212,168,67,0.15), 0 16px 48px rgba(212,168,67,0.12);
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(200px circle at var(--gx, 50%) var(--gy, 50%), rgba(212,168,67,0.09), transparent 70%);
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover::before { opacity: 1; }
.card h3 { margin-top: 0; }
.card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.75rem; }

/* ---- App screenshots & store links ---- */
.app-shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin: 1rem 0 2rem;
}
.app-shots img {
  width: 100%;
  display: block;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.07);
}
[data-theme="light"] .app-shots img { border-color: rgba(0,0,0,0.07); }
.store-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.legal-links {
  display: flex;
  gap: 0.75rem 1.5rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  list-style: none;
  padding: 0;
}

/* ---- Linkable cards ---- */
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.card-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}
.card-link .card-icon {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 0.5rem;
}
.card-link h3 { color: var(--text); }
.card-link p { color: var(--muted); }
.card-arrow {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ---- Badge (premium kicker pill) ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(212,168,67,0.08);
  border: 1px solid rgba(212,168,67,0.25);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ---- Meal blocks (glass) ---- */
.meal-block {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-radius: 20px;
  padding: 1.5rem;
  margin: 1rem 0 2rem;
  transition: background 0.3s, border-color 0.35s, box-shadow 0.35s;
}
[data-theme="light"] .meal-block {
  background: rgba(255,255,255,0.72);
  border-color: rgba(0,0,0,0.07);
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
}
.meal-block:hover {
  border-color: rgba(212,168,67,0.35);
}
.meal-block h3 {
  margin-top: 0;
  font-size: 1rem;
  color: var(--accent);
}
.meal-block h3:not(:first-child) { margin-top: 1.25rem; }

/* ---- Timeline ---- */
.timeline { margin: 1rem 0 2rem; }
.timeline-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-step {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}
.timeline-item h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.timeline-item p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---- TOC ---- */
.toc { margin-bottom: 2rem; }
.toc-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.toc-links a {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s;
}
.toc-links a:hover {
  border-color: rgba(212,168,67,0.45);
  color: var(--accent);
  box-shadow: 0 0 0 1px rgba(212,168,67,0.15), 0 8px 24px rgba(212,168,67,0.1);
}

/* ---- Footer (structured) ---- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 3.5rem 1.5rem;
  transition: border-color 0.3s, background 0.3s;
}
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}
.footer-top { margin-bottom: 1.75rem; }
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.footer-tagline {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.75rem;
}
.footer-links a {
  color: var(--muted);
  font-size: 0.87rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.18s;
}
.footer-links a:hover { color: var(--accent); text-decoration: none; }
.footer-copy {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

/* ---- Protocol Sidebar ---- */
.protocol-sidebar {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%) translateX(-100%);
  z-index: 50;
  transition: transform 0.5s cubic-bezier(0.22,1,0.36,1);
  pointer-events: none;
}
.protocol-sidebar.is-visible {
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
}
.sidebar-inner {
  background: rgba(8,8,8,0.75);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.08);
  border-left: none;
  border-radius: 0 16px 16px 0;
  padding: 1.2rem 1.5rem 1.2rem 1.2rem;
  min-width: 170px;
}
[data-theme="light"] .sidebar-inner {
  background: rgba(255,255,255,0.82);
  border-color: rgba(0,0,0,0.08);
}
.sidebar-title {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  font-weight: 500;
}
.sidebar-link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
  text-decoration: none;
}
[data-theme="light"] .sidebar-link:hover {
  background: rgba(0,0,0,0.04);
}
.sidebar-link.active {
  color: var(--accent);
  background: var(--accent-dim);
  font-weight: 700;
}
.s-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
  transition: background 0.2s;
}
.sidebar-link.active .s-dot { background: var(--accent); }

/* ---- Footer legal links ---- */
.footer-legal {
  display: flex;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.footer-legal a {
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: none;
  transition: color 0.18s;
}
.footer-legal a:hover { color: var(--accent); text-decoration: none; }

/* ---- Scroll progress bar ---- */
.scroll-progress-bar {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--accent), #f0c860);
  transform-origin: left center;
  transform: scaleX(0);
  z-index: 9998;
  will-change: transform;
}

/* ---- Glass nav ---- */
.glass-nav {
  background: rgba(8, 8, 8, 0.55) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}
[data-theme="light"] .glass-nav {
  background: rgba(255,255,255,0.72) !important;
  border-bottom: 1px solid rgba(0,0,0,0.08) !important;
}
.glass-nav.scrolled {
  background: rgba(8,8,8,0.82) !important;
}
[data-theme="light"] .glass-nav.scrolled {
  background: rgba(255,255,255,0.92) !important;
}

/* ---- Sections (shared) ---- */
.page-section {
  padding: 7rem 1.5rem;
}
.section-inner {
  max-width: 1120px;
  margin: 0 auto;
}
.section-hd {
  text-align: center;
  max-width: 580px;
  margin: 0 auto 4rem;
}
.section-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}
.section-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem) !important;
  font-weight: 900 !important;
  line-height: 1.05 !important;
  letter-spacing: -0.03em !important;
  margin: 0 0 1rem !important;
  color: var(--text) !important;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.75;
  margin: 0;
}

/* ---- Glass card base ---- */
.glass-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.35s, box-shadow 0.35s, transform 0.25s;
  will-change: transform;
}
[data-theme="light"] .glass-card {
  background: rgba(255,255,255,0.72);
  border-color: rgba(0,0,0,0.07);
  box-shadow: 0 2px 20px rgba(0,0,0,0.04);
}
.glass-card:hover {
  border-color: rgba(212,168,67,0.45);
  box-shadow: 0 0 0 1px rgba(212,168,67,0.15), 0 16px 48px rgba(212,168,67,0.12);
}
.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(200px circle at var(--gx, 50%) var(--gy, 50%), rgba(212,168,67,0.09), transparent 70%);
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s;
}
.glass-card:hover::before { opacity: 1; }

/* ---- Custom animations ---- */
@keyframes heroOrbDrift {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.5; }
  50%  { transform: translate(-60px, 24px) scale(1.15); opacity: 0.8; }
  100% { transform: translate(0, 0) scale(1); opacity: 0.5; }
}
.page-hero::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -60px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,168,67,0.16), transparent 65%);
  filter: blur(10px);
  pointer-events: none;
  z-index: 0;
  animation: heroOrbDrift 14s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,168,67,0.35); }
  60%      { box-shadow: 0 0 0 5px rgba(212,168,67,0); }
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: badgePulse 2.8s ease-out infinite;
}

@media (min-width: 769px) {
  .nav-links a { position: relative; }
  .nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .nav-links a:hover::after,
  .nav-links a.active::after { transform: scaleX(1); }
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 55%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
  pointer-events: none;
}
.btn-primary:hover::before { left: 130%; }

@keyframes h1Shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.page-hero h1 {
  background-size: 200% 100%;
  animation: h1Shimmer 8s ease-in-out infinite;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .protocol-sidebar { display: none; }
}
@media (max-width: 700px) {
  .nav { gap: 0.6rem; }
  .nav a { font-size: 0.8rem; }
  .hero h1 { font-size: 1.7rem; }
  .landing-hero h1 { font-size: 2rem; }
  .hero-stats { gap: 1.5rem; }
  .stat-value { font-size: 1.4rem; }
  .page-hero { min-height: 160px; padding: 2rem 0; }
  .page-hero h1 { font-size: 1.8rem; }
}
