/* ============================================================
   KEVIN_AMEN_CLINIC — Brain Health Protocol
   [ai] labs / goailabs design system (Charcoal + Burnt Orange)
   Source: goailabs brand.css v4.0
   ============================================================ */

:root {
  --charcoal: #0A0A0A;
  --orange: #C85A2A;
  --orange-h: #D96A3A;
  --orange-d: #A8491F;
  --white: #FAFAF9;
  --stone: #E8E5E0;
  --surface: #111111;
  --raised: #1A1A1A;
  --muted: #A8A29E;

  --border-subtle: rgba(232, 229, 224, 0.08);
  --border: rgba(232, 229, 224, 0.10);
  --border-mid: rgba(232, 229, 224, 0.14);
  --border-hover: rgba(232, 229, 224, 0.25);
  --orange-glow: rgba(200, 90, 42, 0.10);
  --orange-border: rgba(200, 90, 42, 0.30);
  --orange-surface: rgba(200, 90, 42, 0.06);

  --text-100: var(--white);
  --text-body: var(--stone);
  --text-45: rgba(232, 229, 224, 0.45);
  --text-25: rgba(232, 229, 224, 0.25);

  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-logo: 'Space Mono', 'SF Mono', Consolas, monospace;

  --maxw: 1140px;
  --pad-y: 6rem;
  --gap: 2rem;
  --nav-h: 64px;
  --radius: 8px;
  --ease: 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--charcoal);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--nav-h);
}

::selection {
  background: var(--orange);
  color: var(--white);
}

h1, h2, h3, h4 {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-100);
  line-height: 1.12;
}

.mono { font-family: var(--font-logo); font-weight: 400; }

a { color: var(--orange); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--white); }
strong { color: var(--text-100); font-weight: 700; }

img, video, table, pre, svg { max-width: 100%; }

/* ---------- [ai] labs top nav ---------- */
#top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  height: var(--nav-h);
  background: rgba(10, 10, 10, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  font-size: 20px;
  line-height: 1;
  color: inherit;
}
.wordmark .br {
  font-family: var(--font-logo);
  font-weight: 400;
  color: var(--muted);
}
.wordmark .ai {
  font-family: var(--font-logo);
  font-weight: 700;
  color: var(--white);
}
.wordmark .labs {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--orange);
  margin-left: 4px;
}
.wordmark:hover .labs { color: var(--orange-h); }
.nav-tag {
  font-family: var(--font-logo);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Top progress bar ---------- */
#progress-bar {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--orange);
  z-index: 1000;
  transition: width 80ms linear;
}

/* ---------- Right-side dot nav ---------- */
#dot-nav {
  position: fixed;
  right: 26px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#dot-nav button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--border-hover);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all var(--ease);
  position: relative;
}
#dot-nav button:hover { border-color: var(--orange); transform: scale(1.15); }
#dot-nav button.active {
  background: var(--orange);
  border-color: var(--orange);
}
#dot-nav button .dot-label {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
  font-family: var(--font-logo);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-100);
  background: var(--surface);
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease);
}
#dot-nav button:hover .dot-label { opacity: 1; }

/* ---------- Sections ---------- */
section {
  min-height: 90vh;
  padding: var(--pad-y) 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  border-top: 1px solid var(--border-subtle);
}
section:nth-child(even of section) { background: rgba(232, 229, 224, 0.02); }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-logo);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1.5rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 2rem;
  height: 1px;
  background: var(--orange);
  flex-shrink: 0;
}

.section-title, section h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.subhead, .intro-line, .sub-line {
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--text-body);
  max-width: 640px;
  margin-bottom: 2.5rem;
}

.divider {
  width: 60%;
  height: 1px;
  background: var(--border);
  margin: 2.5rem auto;
  border: none;
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color var(--ease), transform var(--ease);
}
.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.card h3 {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card h4 {
  font-size: 0.75rem;
  margin: 18px 0 8px;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-logo);
  font-weight: 400;
}
.card ul { list-style: none; }
.card ul li {
  padding: 6px 0 6px 18px;
  position: relative;
  color: var(--text-body);
  font-size: 0.9375rem;
}
.card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
}
.card p {
  margin-bottom: 10px;
  color: var(--text-body);
  font-size: 0.9375rem;
}

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

.icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--orange-surface);
  border: 1px solid var(--orange-border);
  margin-bottom: 16px;
}
[data-lucide] { stroke-width: 1.5px; color: var(--orange); }
.card h3 [data-lucide] { width: 20px; height: 20px; }

/* ---------- CTA buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  border: 2px solid var(--orange);
  cursor: pointer;
  transition: background var(--ease), border-color var(--ease), transform var(--ease);
}
.btn:hover {
  background: var(--orange-h);
  border-color: var(--orange-h);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-secondary {
  background: transparent;
  color: var(--orange);
  border: 1px solid var(--border-hover);
}
.btn-secondary:hover {
  color: var(--white);
  border-color: var(--border-hover);
  background: transparent;
  transform: none;
}
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange-surface);
  color: var(--orange);
  border: 1px solid var(--orange-border);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
}
.btn-pill:hover { color: var(--white); border-color: var(--orange); }
.cta-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- Hero ---------- */
#hero {
  position: relative;
  overflow: hidden;
  text-align: left;
  border-top: none;
  background: var(--charcoal);
}
#hero .hero-panel {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 48px 0;
  max-width: 900px;
  box-shadow: none;
}
#hero h1 {
  font-size: clamp(2.75rem, 6vw, 4.5rem);
  letter-spacing: -0.035em;
  margin-bottom: 1.25rem;
  max-width: 18ch;
}
#hero .subhead {
  font-size: 1.125rem;
  font-weight: 300;
  max-width: 600px;
}
.hero-gradient {
  position: absolute;
  top: -40%;
  right: -15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(200, 90, 42, 0.09) 0%, transparent 70%);
  border-radius: 9999px;
  pointer-events: none;
  z-index: 0;
  animation: none;
  opacity: 1;
  inset: auto;
}
.hero-neural {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  z-index: 0;
  pointer-events: none;
}
#hero .container { position: relative; z-index: 1; }
.scroll-hint {
  position: absolute;
  right: 40px;
  bottom: 40px;
  font-family: var(--font-logo);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1;
}
.scroll-hint.hide { opacity: 0; transition: opacity 800ms ease; }
.scroll-hint [data-lucide] { color: var(--muted); width: 14px; height: 14px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin-bottom: 28px; }
.stack-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--orange);
  margin: 28px 0 12px;
  font-family: var(--font-logo);
}
table.stack {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
table.stack th, table.stack td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--text-body);
}
table.stack th {
  background: var(--raised);
  color: var(--text-100);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 0.8125rem;
  text-transform: uppercase;
}
table.stack td:nth-child(2) {
  font-family: var(--font-logo);
  color: var(--orange);
  font-size: 0.8125rem;
}
table.stack tr:last-child td { border-bottom: none; }
table.stack tr:hover td { background: var(--orange-glow); }
table.stack a { color: var(--orange); }
table.stack a:hover { color: var(--white); }

.note-card, .warning-card {
  border-left: 3px solid var(--orange);
  padding: 18px 22px;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--orange-surface);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 20px 0;
  font-size: 0.9375rem;
  color: var(--text-body);
}
.warning-card { border-left-color: var(--orange-h); }

/* ---------- Stat card (MOVE) ---------- */
.stat-card { text-align: center; padding: 48px 32px; }
.formula {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: clamp(1.25rem, 3vw, 2rem);
  color: var(--orange);
  background: var(--orange-surface);
  border: 1px solid var(--orange-border);
  border-radius: var(--radius);
  padding: 26px;
  display: inline-block;
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

/* ---------- Timeline (Daily Flow) ---------- */
.timeline { position: relative; margin-top: 20px; padding-left: 28px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-mid);
}
.timeline-row {
  position: relative;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  margin-bottom: 18px;
  align-items: start;
}
.timeline-row::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 22px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid var(--charcoal);
}
.timeline-time {
  font-family: var(--font-logo);
  font-weight: 400;
  color: var(--orange);
  font-size: 13px;
  padding-top: 16px;
}
.timeline-card { padding: 18px 22px; }
.timeline-card .block-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  font-family: var(--font-logo);
  margin-bottom: 4px;
}

/* ---------- Final CTA block ---------- */
.final-cta {
  background: var(--orange-surface);
  border: 1px solid var(--orange-border);
  color: var(--text-100);
  border-radius: var(--radius);
  padding: 56px;
  text-align: center;
  margin-top: 48px;
}
.final-cta h2 { color: var(--text-100); }
.final-cta p {
  color: var(--text-body);
  margin: 14px 0 28px;
  font-size: 1.125rem;
  font-weight: 300;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.final-cta .btn {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}
.final-cta .btn:hover {
  background: var(--orange-h);
  border-color: var(--orange-h);
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  background: var(--surface);
}
footer .container {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
footer .foot-brand {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
footer .foot-left {
  font-family: var(--font-logo);
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-size: 12px;
}
footer .foot-right {
  color: var(--text-25);
  font-size: 12px;
  max-width: 520px;
}

/* ---------- Resource grid ---------- */
.resource-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  color: inherit;
}
.resource-card:hover { color: inherit; }
.resource-card .icon-wrap { margin-bottom: 0; flex-shrink: 0; }
.resource-card .r-label { font-weight: 600; color: var(--text-100); font-size: 15px; }
.resource-card .r-link {
  font-size: 12px;
  color: var(--orange);
  word-break: break-all;
  font-family: var(--font-logo);
}
.resource-card:hover .r-label { color: var(--orange); }

/* ---------- Fade-in ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ---------- Presentation mode ---------- */
body.presentation-mode #dot-nav { opacity: 0.4; }
body.presentation-mode section { scroll-snap-align: start; }
body.presentation-mode { scroll-snap-type: y proximity; }
.pmode-badge {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 950;
  background: var(--surface);
  color: var(--orange);
  border: 1px solid var(--orange-border);
  font-family: var(--font-logo);
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 8px 14px;
  border-radius: 999px;
  display: none;
}
body.presentation-mode .pmode-badge { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  #dot-nav { display: none; }
}
@media (max-width: 768px) {
  :root { --pad-y: 4rem; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  #hero .hero-panel { padding: 32px 0; }
  #hero h1 { font-size: 2.25rem; }
  .scroll-hint { display: none; }
  .final-cta { padding: 40px 24px; }
  footer .container { flex-direction: column; }
  .nav-tag { display: none; }
}
@media (max-width: 520px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .timeline-row { grid-template-columns: 100px 1fr; gap: 12px; }
  section { padding: var(--pad-y) 16px; }
  h2 { font-size: 1.625rem; }
}
