/* =========================================================
   Copper Bisglycinate — static site
   Hand-written stylesheet, matched to the live site.
   ========================================================= */

:root {
  --ink: #1b1b1b;
  --muted: #6b7280;
  --dot: #c7c7c7;
  --blue: #1277ee;
  --blue-dark: #175aa1;
  --blue-light: #5aa0f7;
  --copper: #aa5831;
  --bg: #ffffff;
  --bg-alt: #fafafa;
  --border: #eaeaea;
  --border-strong: #dcdde0;
  --cell-border: rgba(128, 128, 128, 0.5);
  --pill-bg: rgba(234, 234, 234, 0.45);
  --nav-shadow: 0 3px 8px rgba(0, 0, 0, 0.17);
  --radius: 8px;
  --pill: 99px;
  --container: 1120px;
  --prose: 760px;
  --marquee-duration: 70s;
  --font: -apple-system, "system-ui", "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.4; font-weight: 600; margin: 0 0 .5em; }
h1 { line-height: 1.05; }
p { margin: 0 0 1.15em; }
ul, ol { margin: 0 0 1.15em; padding-left: 1.25em; }
li { margin: .4em 0; }
strong { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 999; }
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: 13px; font-weight: 500; letter-spacing: -0.2px; text-transform: uppercase;
  color: var(--ink); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot); flex: 0 0 auto; }

/* ---------- top accent bar ---------- */
.topbar { height: 10px; background: var(--blue); width: 100%; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; padding: 20px 0; background: transparent; }
.nav-shell {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--pill-bg);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-radius: var(--pill); box-shadow: var(--nav-shadow);
  padding: 11px 16px 11px 22px;
}
.brand { font-size: 18px; font-weight: 700; text-transform: uppercase; color: var(--ink); }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink); font-size: 15px; font-weight: 600; padding: 13px 20px; transition: color .3s ease; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--blue); text-decoration: none; }
/* hamburger -> X toggle */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; flex-direction: column; gap: 6px; }
.nav-toggle span { display: block; width: 26px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .3s, opacity .3s, background .25s; }
.nav-toggle:hover span { background: var(--blue); }
.nav-shell.open .nav-toggle span { background: var(--blue); }
.nav-shell.open .nav-toggle:hover span { background: var(--ink); }
.nav-shell.open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-shell.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-shell.open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- buttons (pill, 3px border) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px;
  border-radius: var(--pill); padding: 12px 24px; cursor: pointer; border: 3px solid transparent;
  transition: .25s ease; line-height: 1.2;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); text-decoration: none; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--ink); text-decoration: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

/* ---------- hero ---------- */
.hero { padding: 24px 0 72px; }
.hero .badges { display: flex; gap: 26px; flex-wrap: wrap; margin-bottom: 100px; }
.hero .badge {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: 13px; font-weight: 500; letter-spacing: -0.2px; text-transform: uppercase; color: var(--ink);
}
.hero .badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--dot); }
.hero h1 { font-size: clamp(42px, 7.4vw, 75px); line-height: 1.02; font-weight: 600; max-width: none; margin: 0 0 44px; }
.hero .lede { font-size: 16px; color: var(--ink); max-width: 52ch; margin-bottom: 30px; line-height: 1.6; }

/* ---------- benefit strip (scrolling marquee) ---------- */
.benefit-strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); overflow: hidden; }
.marquee { overflow: hidden; pointer-events: none; }
.marquee-track {
  list-style: none; margin: 0; padding: 22px 0; display: flex; flex-wrap: nowrap;
  width: max-content; align-items: center; animation: cb-marquee var(--marquee-duration) linear infinite;
}
.marquee-track li { flex: 0 0 auto; white-space: nowrap; margin: 0; font-weight: 600; font-size: 18px; color: var(--ink); padding: 0 44px; }
@keyframes cb-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: 80px 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section h2 { font-size: clamp(28px, 4.2vw, 40px); line-height: 1.4; letter-spacing: .2px; margin-bottom: .55em; }

/* two-column: eyebrow + heading left, body right */
.split { display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr); gap: 68px; align-items: start; }
.split .col-head h2 { margin-top: 0; }
.split .col-body { font-size: 16px; }
.split .col-body > *:first-child { margin-top: 0; }
.split .col-body > :last-child { margin-bottom: 0; }
.split .col-body p { margin-bottom: 32px; }
.split .col-body p:last-child { margin-bottom: 0; }
.split .col-body h3 { font-size: 20px; margin-top: 1.6em; margin-bottom: .5em; }

/* wide-table section: same container width as other sections */
.block .lead-copy { max-width: var(--prose); }
.block h2 { max-width: 18ch; }

/* ---------- feature cards (bordered, blue check) ---------- */
.cardgrid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.cardgrid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.col-body .fcard + .fcard { margin-top: 24px; }
.fcard {
  position: relative; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 30px; background: #fff;
}
.fcard-check { position: absolute; top: 22px; right: 24px; color: var(--blue); width: 20px; height: 20px; }
.fcard-check svg { width: 100%; height: 100%; display: block; }
.fcard .eyebrow { margin-bottom: .9rem; }
.fcard h3 { font-size: 21px; margin: 0 0 .5em; padding-right: 28px; }
.fcard p { margin-bottom: 1em; }
.fcard p:last-child, .fcard ul:last-child, .fcard ol:last-child { margin-bottom: 0; }

/* ---------- tables (full grid) ---------- */
.table-wrap { overflow-x: auto; margin: 0 0 1.4em; }
table { border-collapse: collapse; width: 100%; font-size: 15px; border: 1px solid var(--cell-border); }
th, td { text-align: left; padding: 15px; border: 1px solid var(--cell-border); vertical-align: top; }
thead th { background: transparent; font-weight: 700; }

/* ---------- prose (article / page) ---------- */
.page-head { padding: 64px 0 8px; }
.page-head.ref-head { padding-bottom: 64px; }
.page-head.center { text-align: center; }
.page-head h1 { font-size: clamp(34px, 5.5vw, 58px); letter-spacing: normal; line-height: 1.06; }
.page-head.article-head { padding-bottom: 4px; }
.page-head.article-head h1 { font-size: clamp(30px, 4.6vw, 44px); line-height: 1.15; }
.page-head .lede { font-size: 17px; color: var(--ink); max-width: 62ch; margin-top: .7em; }
.page-head.center .lede { margin-left: auto; margin-right: auto; }
.page-intro { color: var(--ink); max-width: var(--prose); font-size: 16px; }
.cats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.cats a {
  font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--ink); border: 1px solid var(--border-strong); border-radius: var(--pill); padding: 7px 18px;
}
.cats a:hover { color: var(--blue); border-color: var(--blue); text-decoration: none; }
.article { padding: 24px 0 72px; }
.prose { max-width: var(--prose); margin: 0 auto; }
.prose p, .prose li { font-size: 16px; }
.prose > p { margin-bottom: 28px; }
.prose h2 { font-size: 27px; line-height: 1.25; margin-top: 1.9em; }
.prose h3 { font-size: 20px; margin-top: 1.5em; }
.prose h4 { font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 1.9em; }
.prose img { border-radius: var(--radius); margin: 1.5em 0; }
.feature-img { border-radius: var(--radius); margin: 0 auto 2rem; border: 1px solid var(--border); }
.meta-line { color: var(--muted); font-size: 14px; margin-bottom: 1.6em; }
.refs { font-size: 14px; color: var(--ink); }
.refs a { word-break: break-word; }
.reviewed { color: var(--muted); font-size: 14px; margin-top: 2em; }
.backlink { display: inline-block; margin-bottom: 1.2em; font-weight: 600; color: var(--blue); }

/* article two-column (content + ToC/related sidebar) */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 64px; align-items: start; }
.article-main { min-width: 0; max-width: 720px; }
.article-main .prose, .prose.prose--flush { max-width: none; margin: 0; }
.toc-rail { position: sticky; top: 100px; font-size: 14px; }
.toc-rail .rail-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 24px; }
.toc-rail h4 { font-size: 15px; font-weight: 600; color: var(--ink); margin: 0 0 14px; text-transform: none; letter-spacing: 0; }
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list a { display: block; padding: 6px 0; color: var(--muted); font-weight: 500; line-height: 1.35; }
.toc-list a:hover { color: var(--blue); text-decoration: none; }
.rail-related a { display: block; font-weight: 600; color: var(--ink); font-size: 14px; margin-bottom: 14px; line-height: 1.35; }
.rail-related a:hover { color: var(--blue); text-decoration: none; }

/* related (article footer) */
.related { border-top: 1px solid var(--border); margin-top: 3rem; padding-top: 2rem; }
.related h2 { font-size: 22px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.related-grid a { display: block; font-weight: 600; color: var(--ink); font-size: 16px; }
.related-grid a:hover { color: var(--blue); text-decoration: none; }

/* ---------- article index cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.card .card-body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 19px; margin: 0; line-height: 1.3; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--blue); text-decoration: none; }
.card p { color: var(--muted); margin: 0; flex: 1; font-size: 15px; }
.card .read-more { font-weight: 600; color: var(--blue); font-size: 15px; }

/* ---------- Q&A / FAQ accordion (toggle on left) ---------- */
.qa-cats { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 2.5rem; }
.qa-cats a { border: 1px solid var(--border); border-radius: var(--pill); padding: 8px 18px; font-weight: 600; color: var(--ink); font-size: 15px; }
.qa-cats a:hover { background: var(--bg-alt); text-decoration: none; }
.qa-group { margin-bottom: 3rem; }
.qa-group h2 { font-size: 24px; padding-bottom: .4rem; border-bottom: 1px solid var(--cell-border); }
details.qa { border-bottom: 1px solid var(--border); padding: 2px 0; margin: 0; background: transparent; }
details.qa > summary {
  cursor: pointer; font-weight: 600; font-size: 16px; padding: 18px 0; list-style: none;
  display: flex; align-items: center; gap: 14px;
}
details.qa > summary::-webkit-details-marker { display: none; }
details.qa > summary::before { content: "+"; font-size: 20px; color: var(--blue); font-weight: 400; width: 1em; flex: 0 0 auto; text-align: center; }
details.qa[open] > summary::before { content: "\2013"; }
details.qa > .qa-body { padding: 0 0 18px 30px; color: var(--ink); font-size: 16px; }
details.qa > .qa-body p { margin-bottom: 1em; }
details.qa > .qa-body :last-child { margin-bottom: 0; }

/* ---------- directory ---------- */
.dir-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-bottom: 2.5rem; }
.dir-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; background: var(--bg); display: block; color: var(--ink); }
.dir-card:hover { text-decoration: none; border-color: var(--border-strong); }
.dir-card img { width: 56px; height: 56px; object-fit: contain; margin-bottom: 14px; }
.dir-card h3 { font-size: 18px; line-height: 1.3; }
.dir-card p { color: var(--muted); margin: 0; font-size: 15px; }
.source-item { border-bottom: 1px solid var(--border); padding: 18px 0; }
.source-item .src-kicker { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.source-item h3 { font-size: 18px; margin: .3em 0 .5em; }

/* ---------- "learn more" cards ---------- */
.learn { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; margin-top: 2.5rem; }
.learn-card { position: relative; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; background: #fff; }
.learn-card .learn-ico { position: absolute; top: 26px; right: 28px; color: var(--blue); width: 22px; height: 22px; }
.learn-card .eyebrow { margin-bottom: .8rem; }
.learn-card h3 { font-size: 26px; margin: 0 0 .4em; }
.learn-card p { color: var(--ink); margin-bottom: 1.2em; }
.learn-card .learn-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.learn-card .learn-link svg { width: 14px; height: 14px; }
.learn-card .learn-link:hover { color: var(--blue); text-decoration: none; }

/* ---------- contact ---------- */
.contact-box { max-width: var(--prose); margin: 0 auto; text-align: center; }
.contact-box .email-btn { font-size: 18px; margin-top: 1.2rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--bg); border-top: 1px solid var(--border); padding: 56px 0 24px; margin-top: 40px; }
.site-footer .brand { display: inline-block; margin-bottom: 16px; }
.footer-disclaimer { color: var(--muted); font-size: 13px; max-width: 720px; margin: 0 0 26px; line-height: 1.6; }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 28px; list-style: none; margin: 0 0 26px; padding: 0; }
.footer-links a { color: var(--ink); font-weight: 600; font-size: 15px; }
.footer-links a:hover { color: var(--blue); text-decoration: none; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); padding-top: 20px; color: var(--muted); font-size: 14px; }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--blue); text-decoration: none; }

/* ---------- scroll entrance motion (fail-safe) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @keyframes cb-rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
  @keyframes cb-rise-right { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
  html.js-anim .hero .badges { animation: cb-rise .7s ease both; }
  html.js-anim .hero h1      { animation: cb-rise .7s ease .08s both; }
  html.js-anim .hero .lede   { animation: cb-rise .7s ease .16s both; }
  html.js-anim .hero .btn-row{ animation: cb-rise .7s ease .24s both; }
  html.js-anim .cb-anim          { animation: cb-rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  html.js-anim .cb-anim.cb-right { animation-name: cb-rise-right; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; gap: 8px; }
  .toc-rail { position: static; margin-top: 2.5rem; }
  .article-main { max-width: none; }
  .cardgrid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 18px; }
  .nav-toggle { display: flex; z-index: 70; }
  .nav-links {
    position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border: 1px solid var(--border); border-radius: 14px;
    padding: 6px 0; box-shadow: 0 14px 28px rgba(0, 0, 0, .12);
    transform: translateY(-10px); opacity: 0; pointer-events: none;
    transition: opacity .25s ease, transform .25s ease; z-index: 60;
  }
  .nav-shell.open .nav-links { transform: none; opacity: 1; pointer-events: auto; }
  .nav-links li { margin: 0; }
  .nav-links li + li { border-top: 1px solid var(--border); }
  .nav-links a { display: block; padding: 14px 22px; font-size: 18px; }
  .hero { padding: 16px 0 48px; }
  .hero .badges { margin-bottom: 48px; }
  .hero h1 { margin-bottom: 28px; }
  .section { padding: 52px 0; }
  .cardgrid-2, .cardgrid-3 { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-links { text-align: left; }
}
@media (max-width: 480px) {
  .nav-shell { padding: 10px 16px; }
  .container { padding: 0 18px; }
  .marquee-track li { font-size: 16px; padding: 0 26px; }
}
