/* ============================================================
   ANAPLEROSIS.COM — "Luminous Science" Design System
   Complete shared stylesheet for the site redesign.
   Warm, elegant, scientific: refined journal meets art gallery.
   ============================================================ */

/* ------------------------------------------------------------
   1. DESIGN TOKENS
   ------------------------------------------------------------ */

:root {
  /* Base */
  --bg: #faf8f5;
  --bg-warm: #f5f2ed;
  --bg-white: #ffffff;
  --bg-dark: #0c1018;
  --bg-dark-card: #141922;
  --bg-dark-surface: #1a1f2e;

  /* Text */
  --text: #1a1c20;
  --text-muted: #5c6070;
  --text-dim: #8b8fa0;
  --text-bright: #f0f2f5;
  --text-dark-muted: #9ca3b4;

  /* Accents */
  --sage: #2d6a4f;
  --sage-light: #40916c;
  --sage-glow: rgba(45,106,79,0.08);
  --sage-bg: rgba(45,106,79,0.05);
  --gold: #c9953c;
  --gold-light: #d4a853;
  --gold-glow: rgba(201,149,60,0.08);
  --blue: #4a7fb5;
  --blue-light: #6a9fd5;
  --rose: #c44569;
  --rose-glow: rgba(196,69,105,0.08);
  --amber: #d4903c;
  --amber-glow: rgba(212,144,60,0.08);
  --purple: #7c5cbf;
  --purple-glow: rgba(124,92,191,0.08);

  /* Borders & Shadows */
  --border: #e8e4df;
  --border-subtle: #f0ece7;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(45,106,79,0.1);

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  /* Layout */
  --max-width: 1120px;
  --content-width: 70ch;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-pill: 99px;

  /* Animation */
  --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* ------------------------------------------------------------
   2. CSS RESET + BASE TYPOGRAPHY
   ------------------------------------------------------------ */

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

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

a {
  color: var(--sage);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

a:hover {
  color: var(--sage-light);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.25;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

h1 { font-size: 2.75rem; margin-bottom: 0.6em; }
h2 { font-size: 2rem; margin-bottom: 0.5em; }
h3 { font-size: 1.45rem; margin-bottom: 0.45em; }
h4 { font-size: 1.15rem; margin-bottom: 0.4em; }

p {
  margin-bottom: 1.25em;
  color: var(--text-muted);
}

p:last-child { margin-bottom: 0; }

strong { font-weight: 600; color: var(--text); }
em { font-style: italic; }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

code {
  background: var(--sage-bg);
  color: var(--sage);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}

pre {
  background: var(--bg-dark);
  color: var(--text-bright);
  padding: 1.25em 1.5em;
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.6;
  margin-bottom: 1.5em;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
  border-radius: 0;
}

blockquote {
  border-left: 3px solid var(--sage);
  padding: 0.75em 1.25em;
  margin: 1.5em 0;
  background: var(--sage-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  font-style: italic;
}

hr {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 2.5em 0;
}

ul, ol {
  padding-left: 1.5em;
  margin-bottom: 1.25em;
}

li {
  margin-bottom: 0.35em;
  color: var(--text-muted);
}

li::marker {
  color: var(--sage-light);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
  font-size: 0.92rem;
}

th, td {
  padding: 0.65em 1em;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}


/* ------------------------------------------------------------
   3. LAYOUT PRIMITIVES
   ------------------------------------------------------------ */

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

.content-narrow {
  max-width: var(--content-width);
  margin: 0 auto;
}

.section {
  padding: 5rem 0;
}

.section-sm {
  padding: 3rem 0;
}

.section-lg {
  padding: 7rem 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sage);
  margin-bottom: 0.75rem;
  display: block;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }


/* ------------------------------------------------------------
   4. HEADER — Frosted glass navigation
   ------------------------------------------------------------ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 248, 245, 0.82);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid rgba(232, 228, 223, 0.6);
  transition: background 0.35s var(--ease-out),
              border-color 0.35s var(--ease-out);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-mark svg {
  width: 32px;
  height: 32px;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  transition: color 0.2s var(--ease-out);
}

.site-logo:hover .logo-text {
  color: var(--sage);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.45em 0.85em;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: color 0.2s var(--ease-out),
              background 0.2s var(--ease-out);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--sage);
  background: var(--sage-glow);
}

/* Hamburger toggle (mobile) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 1010;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out),
              opacity 0.3s var(--ease-out);
  position: absolute;
  left: 9px;
}

.nav-toggle span:nth-child(1) { top: 12px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 26px; }

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 19px;
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg);
  top: 19px;
}

/* Dark section header override */
.dark-hero + .site-header,
.site-header.header-dark {
  background: rgba(12, 16, 24, 0.82);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.dark-hero + .site-header .logo-text,
.site-header.header-dark .logo-text {
  color: var(--text-bright);
}

.dark-hero + .site-header .nav-link,
.site-header.header-dark .nav-link {
  color: var(--text-dark-muted);
}

.dark-hero + .site-header .nav-link:hover,
.dark-hero + .site-header .nav-link.active,
.site-header.header-dark .nav-link:hover,
.site-header.header-dark .nav-link.active {
  color: var(--text-bright);
  background: rgba(255,255,255,0.06);
}

.dark-hero + .site-header .nav-toggle span,
.site-header.header-dark .nav-toggle span {
  background: var(--text-bright);
}


/* ------------------------------------------------------------
   5. DARK HERO
   ------------------------------------------------------------ */

.dark-hero {
  position: relative;
  background: var(--bg-dark);
  color: var(--text-bright);
  overflow: hidden;
  padding: 8rem 0 6rem;
  min-height: 520px;
  display: flex;
  align-items: center;
}

/* Radial gradient overlay — moody sage/gold/blue glows */
.dark-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 50%, rgba(45,106,79,0.15) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 30%, rgba(201,149,60,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 40% 50% at 60% 80%, rgba(74,127,181,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.hero {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--text-bright) 0%, var(--gold-light) 50%, var(--sage-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .subtitle,
.subtitle {
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--text-dark-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
  font-weight: 400;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* Dark-to-light transition */
.dark-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent 0%, var(--bg) 100%);
  z-index: 3;
  pointer-events: none;
}


/* ------------------------------------------------------------
   6. BUTTONS
   ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.7em 1.6em;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s var(--ease-out);
  white-space: nowrap;
  line-height: 1.4;
}

.btn-primary {
  background: var(--sage);
  color: #fff;
}

.btn-primary:hover {
  background: var(--sage-light);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(45,106,79,0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--sage);
  border: 1.5px solid var(--sage);
}

.btn-ghost:hover {
  background: var(--sage-glow);
  color: var(--sage-light);
  border-color: var(--sage-light);
}

/* Dark hero ghost variant */
.dark-hero .btn-ghost,
.dark-section .btn-ghost {
  color: var(--text-bright);
  border-color: rgba(255,255,255,0.25);
}

.dark-hero .btn-ghost:hover,
.dark-section .btn-ghost:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}

.btn-sm {
  padding: 0.45em 1.1em;
  font-size: 0.84rem;
}

.btn-lg {
  padding: 0.85em 2em;
  font-size: 1rem;
}


/* ------------------------------------------------------------
   7. CARDS
   ------------------------------------------------------------ */

.card {
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform 0.3s var(--ease-out),
              box-shadow 0.3s var(--ease-out);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

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

/* Pathway color badges */
.pw-green .card-icon  { background: var(--sage-glow); color: var(--sage); }
.pw-amber .card-icon  { background: var(--amber-glow); color: var(--amber); }
.pw-purple .card-icon { background: var(--purple-glow); color: var(--purple); }
.pw-rose .card-icon   { background: var(--rose-glow); color: var(--rose); }

.pw-green  { border-top: 3px solid var(--sage); }
.pw-amber  { border-top: 3px solid var(--amber); }
.pw-purple { border-top: 3px solid var(--purple); }
.pw-rose   { border-top: 3px solid var(--rose); }

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5em;
}

.card p {
  font-size: 0.92rem;
  line-height: 1.65;
}


/* ------------------------------------------------------------
   8. CLINICAL GRID
   ------------------------------------------------------------ */

.clinical-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.clinical-card {
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out),
              box-shadow 0.3s var(--ease-out);
  box-shadow: var(--shadow-sm);
}

.clinical-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.clinical-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* Disease cards: rose to amber gradient top border */
.card-disease::before {
  background: linear-gradient(90deg, var(--rose) 0%, var(--amber) 100%);
}

/* Therapy cards: sage to blue gradient top border */
.card-therapy::before {
  background: linear-gradient(90deg, var(--sage) 0%, var(--blue) 100%);
}

.clinical-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5em;
}

.clinical-card p {
  font-size: 0.9rem;
  line-height: 1.65;
}


/* ------------------------------------------------------------
   9. INFO BOX
   ------------------------------------------------------------ */

.info-box {
  background: var(--sage-bg);
  border-left: 4px solid var(--sage);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}

.info-box h4 {
  font-size: 1rem;
  color: var(--sage);
  margin-bottom: 0.4em;
}

.info-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}


/* ------------------------------------------------------------
   10. STAT ROW
   ------------------------------------------------------------ */

.stat-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  padding: 2.5rem 0;
}

.stat {
  text-align: center;
  min-width: 120px;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--sage);
  line-height: 1.1;
  margin-bottom: 0.25em;
  letter-spacing: -0.02em;
}

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

.dark-hero .stat-value,
.dark-section .stat-value {
  color: var(--gold-light);
}

.dark-hero .stat-label,
.dark-section .stat-label {
  color: var(--text-dark-muted);
}


/* ------------------------------------------------------------
   11. LINK GRID
   ------------------------------------------------------------ */

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.25s var(--ease-out),
              box-shadow 0.25s var(--ease-out),
              border-color 0.25s var(--ease-out);
  box-shadow: var(--shadow-sm);
}

.link-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--sage);
  color: var(--text);
}

.link-card .icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--sage-glow);
  color: var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.15rem;
}

.link-card span {
  font-weight: 500;
  font-size: 0.92rem;
}


/* ------------------------------------------------------------
   12. FOOTER
   ------------------------------------------------------------ */

.site-footer {
  background: var(--bg-warm);
  border-top: 1px solid var(--border);
  padding-top: 0;
}

/* Domain sale banner */
.domain-sale-banner {
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1a2030 100%);
  padding: 2rem 0;
  text-align: center;
}

.sale-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.sale-inner p,
.sale-text {
  color: var(--text-dark-muted);
  font-size: 0.92rem;
  margin: 0;
}

.sale-inner strong {
  color: var(--gold-light);
}

.sale-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.55em 1.3em;
  background: var(--gold);
  color: var(--bg-dark);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: all 0.25s var(--ease-out);
}

.sale-cta:hover {
  background: var(--gold-light);
  color: var(--bg-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(201,149,60,0.3);
}

/* Footer grid */
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 2.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3.5rem 2rem 2.5rem;
}

.footer-col {
  min-width: 0;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5em;
}

.footer-tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1em;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 1em;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 0.45em;
}

.footer-col a {
  font-size: 0.88rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}

.footer-col a:hover {
  color: var(--sage);
}

.footer-credentials {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
  margin-top: 1em;
}

.footer-credentials span {
  font-size: 0.72rem;
  padding: 0.25em 0.6em;
  background: var(--sage-glow);
  color: var(--sage);
  border-radius: var(--radius-pill);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Footer bottom */
.footer-bottom {
  border-top: 1px solid var(--border);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 2rem;
}

.medical-disclaimer {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 0.75em;
  padding-bottom: 0.75em;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5em;
}


/* ------------------------------------------------------------
   13. REFERENCES
   ------------------------------------------------------------ */

.ref-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: ref-counter;
}

.ref-list li {
  counter-increment: ref-counter;
  position: relative;
  padding-left: 2.25em;
  margin-bottom: 0.85em;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.ref-list li::before {
  content: counter(ref-counter) '.';
  position: absolute;
  left: 0;
  font-weight: 600;
  color: var(--sage);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.ref-list a {
  color: var(--blue);
  word-break: break-word;
}

.ref-list a:hover {
  color: var(--blue-light);
  text-decoration: underline;
}


/* ------------------------------------------------------------
   14. ARTICLE LAYOUT
   ------------------------------------------------------------ */

.article-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.article-content h2 {
  margin-top: 2.5em;
  padding-top: 1.5em;
  border-top: 1px solid var(--border-subtle);
}

.article-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.article-content img {
  border-radius: var(--radius);
  margin: 2em 0;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.article-meta time {
  font-weight: 500;
}

/* Article cards (featured, listing pages) */
.article-card {
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s var(--ease-out),
              box-shadow 0.3s var(--ease-out);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.article-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.article-card-body {
  padding: 1.75rem;
}

.article-card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5em;
}

.article-card-body h3 a {
  color: var(--text);
  text-decoration: none;
}

.article-card-body h3 a:hover {
  color: var(--sage);
}

.article-card-body p {
  font-size: 0.9rem;
  line-height: 1.6;
}


/* ------------------------------------------------------------
   15. BLOG STYLES
   ------------------------------------------------------------ */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.blog-card {
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s var(--ease-out),
              box-shadow 0.3s var(--ease-out);
  box-shadow: var(--shadow-sm);
}

.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.blog-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-card .article-card-body {
  padding: 1.5rem;
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.75em;
}

.blog-meta .tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sage);
  background: var(--sage-glow);
  padding: 0.2em 0.6em;
  border-radius: var(--radius-pill);
}


/* ------------------------------------------------------------
   16. GLOSSARY
   ------------------------------------------------------------ */

.glossary-nav {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
  gap: 0.4rem;
  margin-bottom: 2rem;
}

.glossary-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s var(--ease-out);
}

.glossary-nav a:hover,
.glossary-nav a.active {
  background: var(--sage);
  color: #fff;
  border-color: var(--sage);
}

.glossary-search {
  position: relative;
  margin-bottom: 2.5rem;
}

.glossary-search input {
  width: 100%;
  padding: 0.75em 1.25em 0.75em 2.75em;
  font-size: 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-white);
  color: var(--text);
  transition: border-color 0.25s var(--ease-out),
              box-shadow 0.25s var(--ease-out);
  outline: none;
}

.glossary-search input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px var(--sage-glow);
}

.glossary-search .search-icon {
  position: absolute;
  left: 1em;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 1rem;
  pointer-events: none;
}

.glossary-term {
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.glossary-term:last-child {
  border-bottom: none;
}

.glossary-term dt {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4em;
}

.glossary-term dt code {
  font-size: 0.82em;
  margin-left: 0.4em;
}

.glossary-term dd {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-left: 0;
}


/* ------------------------------------------------------------
   17. CONTACT FORM
   ------------------------------------------------------------ */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-form {
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5em;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7em 1em;
  font-size: 0.92rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.25s var(--ease-out),
              box-shadow 0.25s var(--ease-out);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px var(--sage-glow);
  background: var(--bg-white);
}

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

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


/* ------------------------------------------------------------
   18. TCA HERO SVG — Animated citric acid cycle
   ------------------------------------------------------------ */

.tca-hero-svg {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

.tca-ring {
  fill: none;
  stroke: rgba(255,255,255,0.12);
  stroke-width: 2;
}

.tca-glow {
  fill: none;
  stroke: var(--sage-light);
  stroke-width: 2.5;
  opacity: 0.5;
  filter: blur(3px);
  animation: ringPulse 4s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% { opacity: 0.3; stroke-width: 2; }
  50%      { opacity: 0.7; stroke-width: 3.5; }
}

.tca-node {
  fill: var(--bg-dark-surface);
  stroke: rgba(255,255,255,0.2);
  stroke-width: 1.5;
  cursor: pointer;
  transition: fill 0.3s var(--ease-out),
              stroke 0.3s var(--ease-out),
              transform 0.3s var(--ease-spring);
  transform-origin: center;
}

.tca-node:hover {
  fill: var(--sage);
  stroke: var(--sage-light);
  transform: scale(1.15);
}

.tca-arrow {
  fill: none;
  stroke: rgba(255,255,255,0.18);
  stroke-width: 1.5;
  marker-end: url(#arrowhead);
}

.anaplerotic-arrow {
  fill: none;
  stroke: var(--gold);
  stroke-width: 2;
  stroke-dasharray: 6 4;
  animation: dashFlow 1.5s linear infinite;
  opacity: 0.7;
}

@keyframes dashFlow {
  0%   { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -20; }
}

.tca-label-ana {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  fill: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.tca-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  fill: var(--text-dark-muted);
  text-anchor: middle;
  letter-spacing: 0.02em;
}


/* ------------------------------------------------------------
   19. SCROLL REVEAL
   ------------------------------------------------------------ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out),
              transform 0.7s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }


/* ------------------------------------------------------------
   20. DARK SECTION VARIANT
   ------------------------------------------------------------ */

.dark-section {
  background: var(--bg-dark);
  color: var(--text-bright);
}

.dark-section h1,
.dark-section h2,
.dark-section h3,
.dark-section h4 {
  color: var(--text-bright);
}

.dark-section p {
  color: var(--text-dark-muted);
}

.dark-section .card {
  background: var(--bg-dark-card);
  border-color: rgba(255,255,255,0.06);
}

.dark-section .card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  border-color: rgba(255,255,255,0.1);
}

.dark-section .card h3 {
  color: var(--text-bright);
}

.dark-section .card p {
  color: var(--text-dark-muted);
}

.dark-section .clinical-card {
  background: var(--bg-dark-card);
  border-color: rgba(255,255,255,0.06);
}

.dark-section .info-box {
  background: rgba(45,106,79,0.08);
  border-left-color: var(--sage-light);
}

.dark-section .info-box h4 {
  color: var(--sage-light);
}

.dark-section .info-box p {
  color: var(--text-dark-muted);
}

.dark-section .link-card {
  background: var(--bg-dark-card);
  border-color: rgba(255,255,255,0.06);
  color: var(--text-bright);
}

.dark-section .link-card:hover {
  border-color: var(--sage);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  color: var(--text-bright);
}

.dark-section .link-card .icon {
  background: rgba(45,106,79,0.15);
}

.dark-section .section-label {
  color: var(--gold-light);
}

.dark-section a {
  color: var(--sage-light);
}

.dark-section a:hover {
  color: var(--gold-light);
}

/* Dark section footer override */
.dark-section .site-footer {
  background: var(--bg-dark-surface);
  border-top-color: rgba(255,255,255,0.06);
}


/* ------------------------------------------------------------
   21. RESPONSIVE
   ------------------------------------------------------------ */

@media (max-width: 768px) {

  /* Mobile nav */
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background: var(--bg-white);
    flex-direction: column;
    align-items: stretch;
    padding: 5rem 1.5rem 2rem;
    gap: 0.25rem;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease-out);
    box-shadow: -4px 0 30px rgba(0,0,0,0.08);
    z-index: 1005;
    overflow-y: auto;
  }

  .site-nav.open {
    transform: translateX(0);
  }

  .site-header.header-dark .site-nav,
  .dark-hero + .site-header .site-nav {
    background: var(--bg-dark-surface);
  }

  .nav-link {
    padding: 0.75em 1em;
    font-size: 0.95rem;
    border-radius: var(--radius);
  }

  /* Layout */
  .container {
    padding: 0 1.25rem;
  }

  .header-inner {
    padding: 0 1.25rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section-lg {
    padding: 4.5rem 0;
  }

  /* Hero */
  .dark-hero {
    padding: 6rem 0 4rem;
    min-height: 400px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero .subtitle {
    font-size: 1.05rem;
  }

  /* Typography */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.55rem; }
  h3 { font-size: 1.2rem; }

  /* Grids */
  .card-grid,
  .clinical-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

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

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2.5rem 1.25rem 2rem;
  }

  /* Stats */
  .stat-row {
    gap: 2rem;
  }

  .stat-value {
    font-size: 2rem;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Hero CTA */
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  /* Sale banner */
  .sale-inner {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {

  /* Footer single column */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Smaller hero */
  .dark-hero {
    padding: 5rem 0 3.5rem;
    min-height: 340px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero .subtitle {
    font-size: 0.95rem;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.35rem; }

  .section {
    padding: 2.5rem 0;
  }

  .container {
    padding: 0 1rem;
  }

  .header-inner {
    padding: 0 1rem;
    height: 56px;
  }

  /* Cards */
  .card {
    padding: 1.5rem;
  }

  .clinical-card {
    padding: 1.5rem;
  }

  /* Contact form */
  .contact-form {
    padding: 1.5rem;
  }

  /* Glossary nav tighter */
  .glossary-nav {
    grid-template-columns: repeat(auto-fill, minmax(32px, 1fr));
    gap: 0.3rem;
  }

  .glossary-nav a {
    width: 32px;
    height: 32px;
    font-size: 0.78rem;
  }

  /* TCA SVG */
  .tca-hero-svg {
    max-width: 320px;
  }

  /* Stat row */
  .stat-row {
    gap: 1.5rem;
  }

  .stat-value {
    font-size: 1.75rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }
}


/* ------------------------------------------------------------
   22. PRINT
   ------------------------------------------------------------ */

@media print {
  .site-header,
  .site-footer,
  .site-nav,
  .nav-toggle,
  .domain-sale-banner,
  .hero-cta,
  .btn,
  .tca-hero-svg {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
    line-height: 1.6;
  }

  .dark-hero,
  .dark-section {
    background: #fff !important;
    color: #000 !important;
    padding: 1em 0;
  }

  .dark-hero::before,
  .dark-hero::after {
    display: none;
  }

  .hero h1 {
    -webkit-text-fill-color: #000;
    background: none;
    font-size: 24pt;
  }

  .hero .subtitle {
    color: #333;
  }

  h1, h2, h3, h4 {
    color: #000;
    page-break-after: avoid;
  }

  p, li {
    color: #333;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    color: #666;
  }

  .card,
  .clinical-card,
  .article-card,
  .blog-card,
  .link-card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }

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

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .section {
    padding: 1.5em 0;
  }

  .article-content {
    max-width: 100%;
    padding: 0;
  }

  img {
    max-width: 100%;
    page-break-inside: avoid;
  }
}
