/* ============================================================
   AFLM — Academy for Functional and Longevity Medicine
   Design tokens + shared layout
   ============================================================ */

:root {
  --navy-950: #060f1c;
  --navy-900: #0a1929;
  --navy-850: #0d1f33;
  --navy-800: #10263e;
  --navy-700: #163049;
  --navy-600: #1d3c58;

  --gold-600: #b8863c;
  --gold-500: #cf9d4f;
  --gold-400: #e0b568;
  --gold-300: #edcb8c;

  --ink: #0c1420;
  --text-light: #f3f5f8;
  --text-muted-onnavy: #9fb0c3;
  --text-body: #384454;
  --text-muted: #6b7686;

  --bg-page: #ffffff;
  --bg-alt: #f5f7fa;
  --bg-alt-2: #eef1f6;
  --border-soft: #e2e6ec;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-card: 0 10px 30px -12px rgba(10, 25, 41, 0.18);
  --shadow-soft: 0 4px 16px -6px rgba(10, 25, 41, 0.12);

  --max-width: 1240px;
  --font-head: "Georgia", "Iowan Old Style", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-body);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; line-height: 1.15; font-weight: 600; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-500);
}

.accent { color: var(--gold-500); }

.section-title {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  text-align: center;
  letter-spacing: 0.01em;
}
.section-title .accent { font-weight: 700; }
.section-sub {
  text-align: center;
  color: var(--text-muted);
  max-width: 640px;
  margin: 12px auto 0;
  font-size: 0.98rem;
  line-height: 1.6;
}
.section-head { margin-bottom: 44px; }

section { position: relative; }
.pad-lg { padding: 88px 0; }
.pad-md { padding: 64px 0; }

.on-navy { background: var(--navy-900); color: var(--text-light); }
.on-navy .text-muted { color: var(--text-muted-onnavy); }
.on-alt { background: var(--bg-alt); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
  color: var(--navy-950);
  box-shadow: 0 10px 24px -10px rgba(207, 157, 79, 0.65);
}
.btn-gold:hover { box-shadow: 0 14px 28px -8px rgba(207, 157, 79, 0.8); }

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.03);
}
.btn-outline-light:hover { border-color: var(--gold-400); color: var(--gold-300); }

.btn-outline-dark {
  border-color: var(--navy-700);
  color: var(--navy-900);
  background: transparent;
}
.btn-outline-dark:hover { border-color: var(--gold-500); color: var(--gold-600); }

.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 17px 34px; font-size: 0.88rem; }

.icon-arrow { transition: transform 0.15s ease; }
.btn:hover .icon-arrow { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 15, 28, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text-light); }
.brand .brand-mark {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-400);
}
.brand-name { font-family: var(--font-head); font-size: 1.5rem; letter-spacing: 0.03em; line-height: 1; }
.brand-sub { font-size: 0.52rem; letter-spacing: 0.14em; color: var(--text-muted-onnavy); margin-top: 3px; text-transform: uppercase; }

.nav-main { display: flex; align-items: center; gap: 30px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted-onnavy);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-light); border-color: var(--gold-500); }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted-onnavy); border: 1px solid rgba(255,255,255,0.14);
  background: transparent;
}
.icon-btn svg { width: 16px; height: 16px; }
.nav-toggle { display: none; background: none; border: none; color: var(--text-light); }
.nav-toggle svg { width: 26px; height: 26px; }

@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-main.open .nav-links {
    display: flex; position: absolute; top: 76px; left: 0; right: 0;
    flex-direction: column; background: var(--navy-900); padding: 20px 32px 28px; gap: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: radial-gradient(ellipse at 20% 0%, #12233b 0%, var(--navy-950) 62%);
  color: var(--text-light);
  padding: 76px 0 90px;
  overflow: hidden;
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 50px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 4vw, 3.05rem); font-weight: 500; }
.hero h1 b { font-weight: 700; }
.hero .tagline {
  margin-top: 20px; font-size: 0.86rem; font-weight: 700; letter-spacing: 0.08em;
  color: var(--gold-300); line-height: 1.9; text-transform: uppercase;
}
.hero p.desc { margin-top: 20px; color: var(--text-muted-onnavy); line-height: 1.75; max-width: 480px; font-size: 0.97rem; }
.hero .cta-row { display: flex; gap: 16px; margin-top: 34px; flex-wrap: wrap; }
.hero-visual { position: relative; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 340px; margin: 0 auto; }
}

/* ---------- Test CTA banner ---------- */
.test-banner {
  background: linear-gradient(120deg, var(--navy-800), var(--navy-950));
  border-top: 1px solid rgba(224,181,104,0.25);
  border-bottom: 1px solid rgba(224,181,104,0.25);
}
.test-banner .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  padding: 34px 32px; flex-wrap: wrap;
}
.test-banner-text h3 { color: var(--text-light); font-size: 1.35rem; }
.test-banner-text p { color: var(--text-muted-onnavy); margin-top: 6px; font-size: 0.92rem; }

/* ---------- Process row (4/6 step icon chains) ---------- */
.process-row {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; flex-wrap: wrap; margin: 40px 0;
}
.process-step { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 118px; }
.process-circle {
  width: 74px; height: 74px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--navy-900); color: var(--gold-400);
  border: 1px solid rgba(224,181,104,0.3);
}
.process-circle svg { width: 30px; height: 30px; }
.process-step span { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; text-align: center; color: var(--text-body); }
.on-navy .process-step span { color: var(--text-muted-onnavy); }
.process-arrow { color: var(--gold-500); opacity: 0.7; }
.process-arrow svg { width: 20px; height: 20px; }

.quote-box {
  max-width: 760px; margin: 30px auto 0; text-align: center;
  border-left: 3px solid var(--gold-500); padding: 10px 26px;
  font-size: 1.02rem; font-style: italic; color: var(--text-body);
}

/* ---------- Grid cards ---------- */
.card-grid-6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.what-card {
  background: var(--navy-900); border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-md); padding: 30px 24px; color: var(--text-light);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.what-card:hover { border-color: var(--gold-500); transform: translateY(-4px); }
.what-card .icon-wrap { width: 46px; height: 46px; color: var(--gold-400); margin-bottom: 18px; }
.what-card .icon-wrap svg { width: 100%; height: 100%; }
.what-card h4 { font-size: 1.05rem; margin-bottom: 10px; }
.what-card p { font-size: 0.88rem; color: var(--text-muted-onnavy); line-height: 1.6; margin-bottom: 16px; }
.what-card .more { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; color: var(--gold-400); display: inline-flex; align-items: center; gap: 6px; }

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

/* ---------- Areas grid ---------- */
.areas-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 26px 12px; }
.area-item { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.area-icon {
  width: 58px; height: 58px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: center; color: var(--gold-600);
  box-shadow: var(--shadow-soft);
}
.area-icon svg { width: 24px; height: 24px; }
.area-item span { font-size: 0.76rem; font-weight: 600; color: var(--text-body); }
@media (max-width: 900px) { .areas-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .areas-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Stats band ---------- */
.stats-band { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.stat-item { text-align: center; padding: 0 8px; }
.stat-item .num { font-family: var(--font-head); font-size: 2rem; color: var(--gold-400); font-weight: 700; }
.stat-item .label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; margin-top: 6px; color: var(--text-light); }
.stat-item .sub { font-size: 0.76rem; color: var(--text-muted-onnavy); margin-top: 6px; line-height: 1.5; }
@media (max-width: 900px) { .stats-band { grid-template-columns: repeat(3, 1fr); row-gap: 34px; } }
@media (max-width: 560px) { .stats-band { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Programs carousel ---------- */
.programs-strip { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.programs-strip::-webkit-scrollbar { height: 6px; }
.programs-strip::-webkit-scrollbar-thumb { background: var(--navy-700); border-radius: 4px; }
.program-card {
  scroll-snap-align: start; min-width: 210px; flex: 1;
  background: var(--navy-900); border-radius: var(--radius-md); overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08); color: var(--text-light);
}
.program-card .thumb {
  height: 120px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-950)); color: var(--gold-400);
}
.program-card .thumb svg { width: 42px; height: 42px; }
.program-card .body { padding: 16px; }
.program-card h5 { font-size: 0.95rem; margin-bottom: 8px; }
.program-card ul { font-size: 0.76rem; color: var(--text-muted-onnavy); display: flex; flex-direction: column; gap: 4px; }

/* ---------- News grid ---------- */
.news-cols { display: grid; grid-template-columns: 2.8fr 1fr; gap: 30px; }
.news-dual-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 8px; }
.news-dual-header h3 { font-size: 0.85rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink); font-family: var(--font-body); font-weight: 800; }
.news-list { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.news-card { border: 1px solid var(--border-soft); border-radius: var(--radius-md); overflow: hidden; background: #fff; padding: 12px; display: flex; flex-direction: column; }
.news-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.news-num { font-size: 0.7rem; font-weight: 800; color: var(--text-muted); }
.news-arrow { font-size: 0.72rem; color: var(--gold-500); }
.news-card h6 { font-size: 0.76rem; margin: 0 0 4px; line-height: 1.3; font-family: var(--font-body); font-weight: 700; }
.news-card-sub { font-size: 0.66rem; color: var(--text-muted); line-height: 1.4; margin-bottom: 6px; }
.news-card-date { font-size: 0.66rem; font-weight: 700; color: var(--gold-600); margin-bottom: 8px; }
.news-inline-link { font-size: 0.66rem; font-weight: 700; color: var(--gold-600); }
.news-card .thumb { height: 56px; border-radius: 6px; background: linear-gradient(135deg, var(--navy-800), var(--navy-600)); margin-top: auto; }
.congress-card {
  background: var(--navy-950); color: var(--text-light); border-radius: var(--radius-md);
  padding: 26px 22px; display: flex; flex-direction: column; gap: 14px; height: fit-content;
}
.congress-card .badge { color: var(--gold-400); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.congress-card h4 { font-size: 1.3rem; }
@media (max-width: 900px) { .news-cols { grid-template-columns: 1fr; } .news-list { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .news-list { grid-template-columns: 1fr 1fr; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: var(--text-muted-onnavy); padding: 56px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 34px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-brand .brand-name { color: var(--text-light); }
.footer-brand p { margin-top: 14px; font-size: 0.85rem; line-height: 1.6; }
.footer-col h6 { color: var(--text-light); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px; }
.footer-contact li { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 0.86rem; }
.footer-contact svg { width: 16px; height: 16px; color: var(--gold-400); flex-shrink: 0; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 22px; font-size: 0.78rem; flex-wrap: wrap; gap: 10px; }
.footer-bottom a { margin-left: 18px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- DNA helix hero graphic ---------- */
.dna-helix { width: 100%; height: 100%; }
.dna-helix .rung { animation: pulse 3s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
.dna-helix .strand { stroke-dasharray: 6 4; animation: dash 20s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -200; } }

.figure-silhouette { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; }

/* ---------- Utility reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].in { opacity: 1; transform: translateY(0); }
