/* ============================================================
   HydrogenFX — Design System
   Tone: Editorial authority meets lab precision. Warm ink-black
   sections framing warm off-white content, one restrained gold
   accent reserved for verified-data callouts and primary CTAs.
   Serif headline for gravitas, clean sans body, mono for specs.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Lato:wght@300;400;700;900&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Core palette */
  --ink: #1c1917;
  --ink-2: #292524;
  --ink-3: #44403c;
  --paper: #faf9f7;
  --paper-2: #f2f0ec;
  --card: #ffffff;
  --text: #0c0a09;
  --text-muted: #57534e;
  --border: #e7e2da;
  --border-strong: #d6cfc2;

  /* Accent — used sparingly: primary CTAs + verified-data callouts only */
  --gold: #ca8a04;
  --gold-dark: #a16207;
  --gold-tint: #fef3c7;

  /* Signal colors — small usage only */
  --verified: #15803d;
  --verified-tint: #ecfdf3;
  --caution: #b91c1c;
  --caution-tint: #fef2f2;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --font-head: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;

  --container: 1180px;
  --shadow-sm: 0 1px 2px rgba(28,25,23,0.06), 0 1px 3px rgba(28,25,23,0.08);
  --shadow-md: 0 4px 16px rgba(28,25,23,0.10);
  --shadow-lg: 0 12px 40px rgba(28,25,23,0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 600; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 700; }

p { margin: 0 0 1.1em; max-width: 68ch; }
a { color: var(--ink); }
.container p { color: var(--text-muted); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dark);
  font-weight: 600;
  margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 18px; height: 1.5px; background: var(--gold); display: inline-block; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.section { padding: 88px 0; }
.section-tight { padding: 56px 0; }
.section-ink { background: var(--ink); color: #f5f0e6; }
.section-ink h2, .section-ink h3, .section-ink h4 { color: #fbf7ee; }
.section-ink p { color: #c9c2b4; }
.section-ink .eyebrow { color: var(--gold); }
.section-paper2 { background: var(--paper-2); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease, transform 150ms ease;
  min-height: 44px;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: #1c1508; }
.btn-primary:hover { background: var(--gold-dark); }
.btn-ghost-light { background: transparent; border-color: rgba(245,240,230,0.35); color: #f5f0e6; }
.btn-ghost-light:hover { border-color: #f5f0e6; background: rgba(245,240,230,0.08); }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); }
.btn-sm { padding: 10px 18px; font-size: 0.9rem; min-height: 36px; }
.btn-block { width: 100%; }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.btn-sub { display: block; font-size: 0.78rem; font-weight: 400; opacity: 0.7; margin-top: 6px; text-align: center; }

/* ---------- Nav ---------- */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 247, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.brand .brand-fx { color: var(--gold-dark); font-style: italic; }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none;
  color: var(--ink-3);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 8px 2px;
  border-bottom: 2px solid transparent;
  transition: color 150ms, border-color 150ms;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); border-color: var(--gold); }
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-links { position: fixed; inset: 76px 0 0 0; background: var(--paper); flex-direction: column; align-items: flex-start; padding: 24px 28px; gap: 4px; transform: translateX(100%); transition: transform 220ms ease; overflow-y: auto; }
  .nav-links.open { transform: translateX(0); }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 14px 4px; width: 100%; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: none; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; }
  .nav-cta .btn-sm.header-cta { display: none; }
}

/* ---------- Affiliate disclosure bar ---------- */
.disclosure-bar {
  background: var(--ink);
  color: #ccc4b4;
  font-size: 0.8rem;
  text-align: center;
  padding: 8px 16px;
  font-family: var(--font-mono);
  letter-spacing: 0.01em;
}
.disclosure-bar a { color: #f0e4c0; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 60px;
  background:
    radial-gradient(680px 380px at 88% -10%, rgba(202,138,4,0.10), transparent 60%),
    var(--paper);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
@media (max-width: 940px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin-bottom: 20px; }
.hero-lede { font-size: 1.15rem; color: var(--text-muted); max-width: 52ch; }
.hero-actions { display: flex; align-items: center; gap: 20px; margin-top: 30px; flex-wrap: wrap; }
.hero-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  background: var(--card);
}
.hero-media img { width: 100%; height: auto; }
.hero-badge {
  position: absolute;
  bottom: 18px;
  left: 18px;
  background: rgba(28,25,23,0.88);
  color: #fbf7ee;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.trust-row { display: flex; flex-wrap: wrap; gap: 28px 40px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--border); align-items: center; }
.trust-item { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; color: var(--text-muted); font-weight: 600; }
.trust-item svg { flex: none; color: var(--gold-dark); }

/* ---------- Icons ---------- */
.icon { width: 22px; height: 22px; flex: none; }
.icon-lg { width: 30px; height: 30px; }

/* ---------- Cards / grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px;
}
.card-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--paper-2);
  border-radius: var(--radius-sm);
  color: var(--gold-dark);
  margin-bottom: 18px;
}
.card h3 { margin-bottom: 10px; }
.card p { margin-bottom: 0; font-size: 0.97rem; }

/* Data / spec readout module — the "verified lab number" motif */
.data-card {
  background: var(--ink);
  color: #f5f0e6;
  border-radius: var(--radius-md);
  padding: 26px 28px;
}
.data-card .data-label { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: #b8ac8c; margin-bottom: 8px; }
.data-card .data-value { font-family: var(--font-mono); font-size: 2.1rem; font-weight: 600; color: var(--gold); line-height: 1; margin-bottom: 6px; }
.data-card .data-note { font-size: 0.85rem; color: #c9c2b4; margin: 0; }

.section-head { max-width: 720px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { font-size: 1.08rem; }
.section-head.center p { margin-left: auto; margin-right: auto; }

/* ---------- Section nav pills (use-case / protocol switcher) ---------- */
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  padding: 10px 18px;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink-3);
  transition: border-color 150ms, background-color 150ms, color 150ms;
}
.pill:hover, .pill.active { border-color: var(--gold); background: var(--gold-tint); color: var(--gold-dark); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--border); font-size: 0.94rem; vertical-align: top; }
thead th { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); background: var(--paper-2); }
tbody tr:last-child td { border-bottom: none; }
tbody tr.row-highlight td { background: var(--gold-tint); }
td.check { color: var(--verified); font-weight: 700; }
td.cross { color: var(--text-muted); }

/* ---------- FAQ / accordion ---------- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: none;
  border: none;
  text-align: left;
  padding: 22px 4px;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.faq-q .plus { flex: none; width: 22px; height: 22px; position: relative; }
.faq-q .plus::before, .faq-q .plus::after { content: ''; position: absolute; background: var(--gold-dark); transition: transform 200ms ease; }
.faq-q .plus::before { top: 50%; left: 0; width: 100%; height: 2px; transform: translateY(-50%); }
.faq-q .plus::after { left: 50%; top: 0; width: 2px; height: 100%; transform: translateX(-50%); }
.faq-item.open .faq-q .plus::after { transform: translateX(-50%) rotate(90deg); opacity: 0; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 260ms ease; }
.faq-a-inner { padding: 0 4px 22px; color: var(--text-muted); }
.faq-a-inner p:last-child { margin-bottom: 0; }

/* ---------- Callouts ---------- */
.callout { border-radius: var(--radius-md); padding: 22px 24px; display: flex; gap: 16px; align-items: flex-start; }
.callout svg { flex: none; margin-top: 2px; }
.callout p { margin: 0; font-size: 0.94rem; }
.callout-caution { background: var(--caution-tint); border: 1px solid #f3caca; }
.callout-caution svg { color: var(--caution); }
.callout-verified { background: var(--verified-tint); border: 1px solid #bfe6cc; }
.callout-verified svg { color: var(--verified); }
.callout-note { background: var(--paper-2); border: 1px solid var(--border); }
.callout-note svg { color: var(--ink-3); }

/* ---------- Badge / stat strip ---------- */
.stat-strip { display: flex; flex-wrap: wrap; gap: 40px; }
.stat { min-width: 140px; }
.stat .num { font-family: var(--font-mono); font-size: 2.2rem; font-weight: 600; color: var(--gold); line-height: 1; }
.stat .label { font-size: 0.85rem; color: var(--text-muted); margin-top: 6px; }

/* ---------- Testimonial ---------- */
.quote-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 28px; }
.quote-card .stars { color: var(--gold); letter-spacing: 2px; margin-bottom: 12px; }
.quote-card blockquote { margin: 0 0 16px; font-family: var(--font-head); font-size: 1.15rem; font-style: italic; color: var(--ink); }
.quote-card cite { font-style: normal; font-size: 0.85rem; color: var(--text-muted); display: block; }
.quote-card .self-reported { display: inline-block; margin-top: 10px; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); background: var(--paper-2); padding: 4px 8px; border-radius: 4px; }

/* ---------- Sticky mobile CTA ---------- */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--ink); padding: 12px 16px;
  display: none; align-items: center; justify-content: center;
  box-shadow: 0 -6px 20px rgba(0,0,0,0.18);
}
.mobile-cta .btn { width: 100%; }
@media (max-width: 720px) { .mobile-cta { display: flex; } body { padding-bottom: 74px; } }

/* ---------- Footer ---------- */
footer { background: var(--ink); color: #b8ac8c; padding: 64px 0 28px; }
footer h4 { color: #f5f0e6; font-family: var(--font-body); font-size: 0.92rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 16px; }
footer a { color: #d8cfba; text-decoration: none; font-size: 0.92rem; }
footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid rgba(245,240,230,0.12); }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid li { margin-bottom: 10px; list-style: none; }
.footer-grid ul { padding: 0; margin: 0; }
.footer-legal { padding-top: 28px; font-size: 0.78rem; color: #8f8571; line-height: 1.7; }
.footer-legal p { max-width: none; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 24px; font-size: 0.8rem; color: #8f8571; }

/* ---------- Reveal-on-scroll (one purposeful animation) ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 500ms ease, transform 500ms ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.small { font-size: 0.85rem; color: var(--text-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--gold); color: #1c1508; padding: 10px 16px; border-radius: var(--radius-sm); z-index: 100; transition: top 150ms; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; }
