/* ============================================================
   Thymulin Source — css/style.css
   Aesthetic: Conversion-Optimized
   Palette: Deep Teal / Ink-Navy / Coral Accent / Cool White
   ============================================================ */

/* ─── Custom Properties ──────────────────────────────────── */
:root {
  --primary:       #15616D;
  --primary-50:    #E6F1F2;
  --primary-100:   #C6E0E3;
  --primary-700:   #0F4751;
  --primary-900:   #0A323A;
  --secondary:     #1E2A3A;
  --accent:        #FF6B4A;
  --accent-700:    #E5512F;
  --neutral-50:    #F7F9FC;
  --neutral-100:   #EDF1F7;
  --neutral-200:   #DDE4EE;
  --neutral-300:   #C4CFDD;
  --neutral-500:   #697586;
  --neutral-700:   #3C4757;
  --neutral-900:   #16202E;
  --bg:            #F7F9FC;
  --surface:       #FFFFFF;
  --surface-alt:   #EEF4F5;
  --text:          #16202E;
  --text-muted:    #5A6677;
  --success:       #1B8A5A;
  --warning:       #B45309;
  --danger:        #C2331F;

  --max-width:        70rem;
  --content-column:   44rem;
  --container-px:     clamp(1rem, 3vw, 2rem);

  --font-heading: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-button: 9999px;
  --radius-card:   1rem;

  --transition: 180ms ease-out;
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--body, 1.0625rem);
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--primary-700); }
ul, ol { padding-left: 1.5rem; }
table { border-collapse: collapse; width: 100%; }

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

/* ─── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.12;
  color: var(--neutral-900);
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.3125rem; font-weight: 600; }
h4 { font-size: 1.0625rem; font-weight: 600; }

p { font-size: 1.0625rem; line-height: 1.65; }
.lede { font-size: 1.1875rem; line-height: 1.65; color: var(--text-muted); max-width: 58ch; }
.small { font-size: 0.875rem; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

/* ─── Layout ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--container-px);
}
.content-column {
  max-width: var(--content-column);
  margin-inline: auto;
}
.section-band {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.section-band--alt { background-color: var(--surface-alt); }
.section-band--surface { background-color: var(--surface); }
.section-band--dark {
  background-color: var(--secondary);
  color: var(--neutral-100);
}
.section-band--dark h2,
.section-band--dark h3,
.section-band--dark h4 { color: var(--neutral-50); }
.section-band--dark p,
.section-band--dark li { color: var(--neutral-300); }
.section-band--dark a { color: var(--primary-100); }

/* ─── Site Header ────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--surface);
  border-bottom: 1px solid var(--neutral-200);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 3.5rem;
}
.site-brand {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary-900);
  text-decoration: none;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}
.site-brand:hover { color: var(--primary); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}
.site-nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.125rem;
}
.site-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-button);
  transition: color var(--transition), background-color var(--transition);
}
.site-nav a:hover {
  color: var(--primary);
  background-color: var(--primary-50);
}
.site-nav .btn-nav-cta {
  margin-left: 0.75rem;
  padding: 0.5rem 1.125rem;
  background-color: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-button);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.site-nav .btn-nav-cta:hover {
  background-color: var(--accent-700);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 74, 0.3);
  color: #fff;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: auto;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border-radius: var(--radius-button);
  padding: 0.8125rem 1.6rem;
  cursor: pointer;
  border: none;
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition), color var(--transition);
}
.btn-primary {
  background-color: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--accent-700);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(255, 107, 74, 0.35);
  color: #fff;
}
.btn-secondary {
  background-color: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-secondary:hover {
  background-color: var(--primary-50);
  color: var(--primary-700);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  align-items: center;
}
.cta-row.centered { justify-content: center; }

/* ─── Hero ───────────────────────────────────────────────── */
.hero {
  background-color: var(--bg);
  padding-block: clamp(3.5rem, 8vw, 6rem);
  text-align: center;
}
.hero-inner {
  max-width: var(--content-column);
  margin-inline: auto;
}
.hero .eyebrow { justify-content: center; margin-bottom: 1.25rem; }
.hero h1 { margin-bottom: 1rem; }
.hero .lede { margin-inline: auto; margin-bottom: 2rem; }
.hero .cta-row { justify-content: center; margin-bottom: 2.5rem; }

/* Trust strip */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--neutral-200);
  border-radius: 0.75rem;
  background-color: var(--surface);
  overflow: hidden;
  margin-block-start: 2.5rem;
  max-width: 36rem;
  margin-inline: auto;
}
.trust-cell {
  padding: 1.125rem 1rem;
  text-align: center;
  border-right: 1px solid var(--neutral-200);
}
.trust-cell:last-child { border-right: none; }
.trust-cell .trust-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.trust-cell .trust-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--primary-900);
  white-space: nowrap;
}

/* Hero illustration card */
.hero-figure-card {
  margin-top: 3rem;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(16,32,46,0.04), 0 8px 24px rgba(16,32,46,0.08);
  background-color: var(--surface);
  max-width: 52rem;
  margin-inline: auto;
}
.hero-figure-card img { width: 100%; }

/* ─── Section header ─────────────────────────────────────── */
.section-header { margin-bottom: 2.5rem; }
.section-header .eyebrow { margin-bottom: 0.75rem; }
.section-header h2 { margin-bottom: 0.75rem; }
.section-header p { color: var(--text-muted); max-width: 52ch; }

.section-header.centered { text-align: center; }
.section-header.centered .eyebrow { justify-content: center; }
.section-header.centered p { margin-inline: auto; }

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background-color: var(--surface);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-card);
  padding: 1.75rem;
  box-shadow: 0 1px 2px rgba(16,32,46,0.04), 0 8px 24px rgba(16,32,46,0.06);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.5rem;
}
.card h3 { margin-bottom: 0.75rem; color: var(--primary-900); }
.card p { color: var(--text-muted); font-size: 0.9375rem; }

/* ─── Callouts ───────────────────────────────────────────── */
.callout {
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  background-color: var(--surface-alt);
  border-left: 4px solid var(--primary);
  margin-block: 1.5rem;
}
.callout p { font-size: 0.9375rem; color: var(--text); }
.callout p:last-child { margin-bottom: 0; }
.callout--warning { border-left-color: var(--warning); }
.callout--warning p { color: var(--neutral-700); }

/* ─── Page content prose ─────────────────────────────────── */
.prose { max-width: var(--content-column); margin-inline: auto; }
.prose h2 { margin-top: 2.5rem; margin-bottom: 1rem; }
.prose h3 { margin-top: 2rem; margin-bottom: 0.75rem; }
.prose p + p { margin-top: 1rem; }
.prose ul, .prose ol { margin-block: 1rem; }
.prose li { margin-bottom: 0.375rem; }
.prose strong { font-weight: 600; color: var(--neutral-900); }
.prose a { color: var(--primary); }
.prose a:hover { color: var(--primary-700); }
.prose figure { margin-block: 2rem; }
.prose figure img {
  border-radius: var(--radius-card);
  box-shadow: 0 1px 2px rgba(16,32,46,0.04), 0 8px 24px rgba(16,32,46,0.08);
  width: 100%;
}
.prose figcaption {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

/* Citation superscripts */
sup a {
  font-family: var(--font-body);
  font-size: 0.75em;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding: 0 0.1em;
}
sup a:hover { color: var(--accent); }

/* ─── Inline text CTA ────────────────────────────────────── */
.inline-cta {
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: gap var(--transition), color var(--transition);
}
.inline-cta::after { content: '→'; }
.inline-cta:hover { color: var(--primary-700); gap: 0.625rem; }

/* ─── Benefit bands ──────────────────────────────────────── */
.benefit-band {
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.benefit-band:nth-child(odd) { background-color: var(--surface); }
.benefit-band:nth-child(even) { background-color: var(--surface-alt); }
.benefit-band .content-column h2 { margin-bottom: 1rem; }
.benefit-band .content-column p { color: var(--text-muted); }

/* ─── Table ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin-block: 1.5rem; border-radius: 0.5rem; border: 1px solid var(--neutral-200); }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
thead tr { background-color: var(--primary); color: #fff; }
thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
}
tbody tr:nth-child(even) { background-color: var(--surface-alt); }
tbody tr:nth-child(odd) { background-color: var(--surface); }
tbody td { padding: 0.625rem 1rem; color: var(--text); line-height: 1.5; border-top: 1px solid var(--neutral-200); }
tbody td code { font-family: var(--font-mono); font-size: 0.875em; }

/* ─── Code / sequence ────────────────────────────────────── */
code, .seq {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background-color: var(--surface-alt);
  border: 1px solid var(--neutral-200);
  padding: 0.125em 0.4em;
  border-radius: 0.25rem;
  color: var(--primary-700);
}

/* ─── Chemical identifiers block ─────────────────────────── */
.chem-ids {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
  margin-block: 1.5rem;
}
.chem-id-cell {
  background-color: var(--surface-alt);
  border: 1px solid var(--neutral-200);
  border-radius: 0.5rem;
  padding: 1rem;
}
.chem-id-cell .chem-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.chem-id-cell .chem-value {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--primary-900);
}

/* ─── FAQ accordion ──────────────────────────────────────── */
.faq-list { max-width: var(--content-column); margin-inline: auto; }
details {
  border: 1px solid var(--neutral-200);
  border-radius: 0.625rem;
  margin-bottom: 0.75rem;
  background-color: var(--surface);
  overflow: hidden;
}
details[open] { box-shadow: 0 4px 12px rgba(16,32,46,0.06); }
summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.125rem 1.5rem;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--neutral-900);
  list-style: none;
  transition: background-color var(--transition);
}
summary::-webkit-details-marker { display: none; }
summary:hover { background-color: var(--neutral-50); }
summary::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform var(--transition);
}
details[open] summary::after { transform: rotate(45deg); }
.faq-answer {
  padding: 0 1.5rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}
.faq-answer p + p { margin-top: 0.75rem; }
.faq-answer ul { margin-top: 0.5rem; }
.faq-answer table { font-size: 0.875rem; }

/* ─── References list ────────────────────────────────────── */
.references-list {
  counter-reset: ref-counter;
  list-style: none;
  padding: 0;
  max-width: var(--content-column);
  margin-inline: auto;
}
.references-list li {
  display: flex;
  gap: 1rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--neutral-200);
  font-size: 0.9375rem;
  color: var(--text);
  align-items: flex-start;
}
.references-list li:last-child { border-bottom: none; }
.ref-num {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  flex-shrink: 0;
  min-width: 2rem;
  padding-top: 0.125rem;
}
.ref-body { flex: 1; }
.ref-body a {
  color: var(--primary);
  font-size: 0.875rem;
  margin-left: 0.5rem;
}

/* ─── Contact form ───────────────────────────────────────── */
.contact-form { max-width: 36rem; }
.form-group { margin-bottom: 1.25rem; }
label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--neutral-700);
  margin-bottom: 0.375rem;
}
input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--neutral-200);
  border-radius: 0.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background-color: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-50);
}
textarea { min-height: 8rem; resize: vertical; }

/* ─── Site Footer ────────────────────────────────────────── */
.site-footer {
  background-color: var(--secondary);
  color: var(--neutral-300);
  padding-block: clamp(2.5rem, 6vw, 4rem) 2rem;
}
.footer-disclaimer {
  font-style: italic;
  color: var(--neutral-500);
  font-size: 0.9375rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer-col-heading {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--neutral-50);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-links a {
  font-size: 0.9375rem;
  color: var(--neutral-500);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--neutral-100); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--neutral-500);
}

/* ─── 404 ────────────────────────────────────────────────── */
.not-found {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1rem;
}
.not-found h1 { font-size: clamp(3rem, 8vw, 6rem); color: var(--neutral-200); margin-bottom: 1rem; }
.not-found h2 { font-size: 1.5rem; margin-bottom: 1rem; }
.not-found p { color: var(--text-muted); margin-bottom: 2rem; }

/* ─── Breadcrumb ─────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-block: 0.75rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-700); }
.breadcrumb-sep { color: var(--neutral-300); }

/* ─── Reading progress bar ───────────────────────────────── */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 1000;
  width: 0%;
  transition: width 0.1s linear;
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .site-nav ul { display: none; }
  .site-nav ul.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 3.5rem;
    left: 0;
    right: 0;
    background-color: var(--surface);
    border-bottom: 1px solid var(--neutral-200);
    padding: 1rem var(--container-px);
    gap: 0.5rem;
    box-shadow: 0 8px 24px rgba(16,32,46,0.1);
  }
  .site-nav .btn-nav-cta {
    display: none;
  }
  .nav-toggle { display: flex; }
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
  .trust-cell { border-bottom: 1px solid var(--neutral-200); }
  .trust-cell:nth-child(3), .trust-cell:nth-child(4) { border-bottom: none; }
  .trust-cell:nth-child(even) { border-right: none; }
}

@media (max-width: 560px) {
  .cta-row { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .trust-strip { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .chem-ids { grid-template-columns: repeat(4, 1fr); }
}

/* Utility spacing */
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
