/* Root Cause Unlocked · design system v3
   Palette from the actual logo file: black #000000, cornflower #5987C5,
   steel #ACBFD1. No green anywhere.
   Type: Instrument Serif for large display only (sturdy strokes, reads well
   big), Archivo for body, UI, and any heading below h2. v2's Bodoni was hard
   to read at small sizes; nothing small is ever serif again. */

:root {
  --ink: #0E0E10;
  --ink-2: #17171B;
  --body: #2E2E35;
  --paper: #F7F5F0;
  --white: #FFFFFF;
  --blue: #5987C5;
  --blue-ink: #3A66A4;
  --blue-deep: #274B7E;
  --steel: #ACBFD1;
  --line: #E2DFD7;
  --line-dark: #2C2C33;
  --muted: #5D5D57;
  --maxw: 1240px;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: 'Archivo', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --r: 28px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.04rem;
  color: var(--body);
  background: var(--paper);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* film grain over everything, very low, print-like */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 90; pointer-events: none;
  opacity: .05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2 { font-family: var(--serif); font-weight: 400; color: var(--ink); line-height: 1.02; margin: 0 0 .4em; letter-spacing: -.015em; }
h1 { font-size: clamp(3rem, 8vw, 6.4rem); }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.7rem); }
h3 { font-family: var(--sans); font-weight: 600; color: var(--ink); font-size: 1.16rem; line-height: 1.35; margin: 0 0 .45em; letter-spacing: -.005em; }
p { margin: 0 0 1.15em; }
a { color: inherit; }
img { max-width: 100%; }
em.acc, .acc { font-family: var(--serif); font-style: italic; color: var(--blue-ink); letter-spacing: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 740px; }
.mid { max-width: 940px; }

/* letterspaced label, echo of UNLOCKED in the wordmark */
.label {
  display: block; font-size: .74rem; font-weight: 700;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--blue-ink); margin-bottom: 24px;
}
.label::before {
  content: ''; display: inline-block; width: 26px; height: 1px;
  background: var(--blue); vertical-align: middle; margin-right: 12px;
}
.band-dark .label, .cta-band .label, .site-footer .label { color: var(--steel); }
.band-dark .label::before, .cta-band .label::before { background: var(--steel); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 80;
  background: rgba(247, 245, 240, .82);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; max-width: var(--maxw); margin: 0 auto; padding: 10px 28px;
}
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 82px; width: auto; display: block; }

.nav { display: flex; align-items: center; gap: 36px; }
.nav a {
  color: var(--ink); text-decoration: none; font-size: .84rem;
  font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  position: relative;
}
.nav a:not(.btn)::after {
  content: ''; position: absolute; left: 0; bottom: -6px; height: 2px;
  width: 0; background: var(--blue); transition: width .25s ease;
}
.nav a:not(.btn):hover::after { width: 100%; }
/* .nav a's ink color outranks .btn's white; restate for the pill CTA */
.nav a.btn, .nav a.btn:hover { color: var(--white); }

.nav-toggle {
  display: none; background: none; border: 1.5px solid var(--ink);
  border-radius: 999px; padding: 9px 18px; cursor: pointer;
  font-family: var(--sans); font-size: .74rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--white);
  padding: 16px 30px; border-radius: 999px; text-decoration: none;
  font-family: var(--sans); font-size: .84rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; border: 1.5px solid var(--ink);
  transition: background .22s ease, color .22s ease, border-color .22s ease, transform .22s ease, box-shadow .22s ease;
  cursor: pointer;
}
.btn::after { content: '\2192'; font-weight: 400; transition: transform .22s ease; }
.btn:hover { background: var(--blue-ink); border-color: var(--blue-ink); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(58,102,164,.28); }
.btn:hover::after { transform: translateX(4px); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); border-color: var(--ink); color: var(--white); box-shadow: 0 12px 28px rgba(14,14,16,.2); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

.band-dark .btn, .cta-band .btn { background: var(--white); color: var(--ink); border-color: var(--white); }
.band-dark .btn:hover, .cta-band .btn:hover { background: var(--blue); border-color: var(--blue); color: var(--white); }
.band-dark .btn-line, .cta-band .btn-line { background: transparent; color: var(--white); border-color: rgba(255,255,255,.4); }
.band-dark .btn-line:hover, .cta-band .btn-line:hover { background: var(--white); color: var(--ink); border-color: var(--white); }

/* ---------- sections ---------- */
section { padding: 110px 0; position: relative; }
.center { text-align: center; }
.center .btn-row { justify-content: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.lead { font-size: clamp(1.1rem, 1.7vw, 1.32rem); color: var(--body); max-width: 58ch; line-height: 1.66; }
.hero-note { font-size: .86rem; color: var(--muted); margin-top: 22px; }

/* hero with layered glows */
.hero { padding: 120px 0 96px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; top: -30%; right: -12%;
  width: 68vw; height: 68vw; max-width: 980px; max-height: 980px;
  background: radial-gradient(circle at center, rgba(89,135,197,.28), rgba(89,135,197,.1) 42%, transparent 68%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: -42%; left: -14%;
  width: 55vw; height: 55vw; max-width: 780px; max-height: 780px;
  background: radial-gradient(circle at center, rgba(172,191,209,.35), transparent 62%);
  pointer-events: none;
}
.hero .wrap { position: relative; z-index: 2; }
.hero h1 { max-width: 15ch; }
.hero-art {
  position: absolute; z-index: 1; right: -40px; top: 44%;
  transform: translateY(-50%) rotate(10deg);
  width: clamp(280px, 30vw, 460px); opacity: .16; pointer-events: none;
  filter: saturate(1.15);
}

/* stats strip */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--white);
}
.stat { padding: 40px 30px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b {
  display: block; font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.4rem, 4vw, 3.6rem); line-height: 1; color: var(--ink);
  margin-bottom: 10px;
}
.stat b i { font-style: italic; color: var(--blue-ink); }
.stat span { font-size: .82rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* dark rounded sheets */
.band-dark, .cta-band {
  background:
    radial-gradient(90rem 40rem at 110% -10%, rgba(89,135,197,.2), transparent 55%),
    radial-gradient(70rem 36rem at -20% 110%, rgba(89,135,197,.13), transparent 55%),
    var(--ink);
  color: rgba(247,245,240,.85);
  border-radius: var(--r);
  margin: 0 20px;
  overflow: hidden;
}
.band-dark { margin-bottom: 0; }
.cta-band { margin: 0 20px 110px; }
.band-dark h1, .band-dark h2, .cta-band h2 { color: var(--white); }
.band-dark h3, .cta-band h3 { color: var(--white); }
.band-dark p, .cta-band p { color: rgba(247,245,240,.78); }
.band-dark .lead, .cta-band .lead { color: rgba(247,245,240,.85); }

.band-white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- symptom ticker ---------- */
.ticker {
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--white); padding: 20px 0;
}
.ticker-track { display: inline-block; animation: tick 44s linear infinite; }
.ticker span {
  font-family: var(--serif); font-style: italic;
  font-size: 1.5rem; color: var(--ink); padding: 0 18px; opacity: .8;
}
.ticker b { color: var(--blue); font-weight: 400; font-size: 1.2rem; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ---------- editorial index rows ---------- */
.index { border-top: 1px solid var(--line); }
.index-row {
  display: grid; grid-template-columns: 90px 1fr 110px;
  align-items: center; gap: 30px;
  padding: 36px 18px; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit; position: relative;
  transition: background .22s ease, padding-left .22s ease;
}
.index-row::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: var(--blue); transition: width .22s ease;
}
.index-row:hover { background: var(--white); padding-left: 30px; }
.index-row:hover::before { width: 4px; }
.index-num {
  font-family: var(--serif); font-size: 1.35rem; color: var(--steel);
  font-variant-numeric: tabular-nums;
}
.index-body h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: .2em; }
.index-body p { margin: 0; color: var(--muted); max-width: 62ch; font-size: .98rem; }
.index-tag {
  font-size: .7rem; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--blue-ink);
  display: block; margin-bottom: 8px;
}
.index-go {
  justify-self: end;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; color: var(--ink);
  transition: background .22s ease, color .22s ease, border-color .22s ease, transform .22s ease;
}
.index-row:hover .index-go { background: var(--ink); color: var(--white); border-color: var(--ink); transform: rotate(-45deg); }

/* ---------- ghost-numbered features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.feature {
  position: relative; padding: 40px 34px 44px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1); border-radius: 20px;
  backdrop-filter: blur(4px);
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.feature:hover { transform: translateY(-6px); border-color: rgba(89,135,197,.55); background: rgba(89,135,197,.1); }
.feature .ghost {
  font-family: var(--serif); font-size: 4.6rem; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(172,191,209,.65);
  display: block; margin-bottom: 20px;
}
.feature h3 { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; margin-bottom: .4em; }
.feature p { margin: 0; font-size: .99rem; }
.feature .more {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--steel);
  text-decoration: none; font-size: .78rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
}
.feature .more::after { content: '\2192'; transition: transform .2s ease; }
.feature .more:hover { color: var(--white); }
.feature .more:hover::after { transform: translateX(4px); }

/* light-context features (about page etc.) */
.band-white .feature, section:not(.band-dark):not(.cta-band) .feature {
  background: var(--white); border-color: var(--line);
}
section:not(.band-dark) .feature .ghost { -webkit-text-stroke: 1px var(--steel); }
section:not(.band-dark) .feature .more { color: var(--blue-ink); }
section:not(.band-dark) .feature:hover { border-color: var(--blue); background: var(--white); box-shadow: 0 18px 44px rgba(14,14,16,.07); }

/* ---------- prose ---------- */
.note {
  border-left: 3px solid var(--blue); padding: 8px 0 8px 30px;
  margin: 44px 0; font-size: 1.04rem; color: var(--body);
  background: linear-gradient(to right, rgba(89,135,197,.07), transparent 70%);
  border-radius: 0 14px 14px 0;
}
.note p:last-child { margin-bottom: 0; }
.band-dark .note { border-color: var(--steel); color: rgba(247,245,240,.85); background: linear-gradient(to right, rgba(172,191,209,.1), transparent 70%); }

.reco, .checks { list-style: none; padding: 0; margin: 0; }
.reco li, .checks li {
  padding: 21px 0 21px 44px; position: relative;
  border-bottom: 1px solid var(--line); color: var(--body);
}
.reco li:first-child, .checks li:first-child { border-top: 1px solid var(--line); }
.reco li::before {
  content: ''; position: absolute; left: 8px; top: 31px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--blue); box-shadow: 0 0 0 4px rgba(89,135,197,.18);
}
.checks li::before {
  content: ''; position: absolute; left: 10px; top: 27px;
  width: 6px; height: 13px;
  border: solid var(--blue-ink); border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.band-dark .reco li, .band-dark .checks li { border-color: var(--line-dark); color: rgba(247,245,240,.82); }

/* legacy aliases: old markup renders in the new skin */
.callout {
  border-left: 3px solid var(--blue); padding: 8px 0 8px 30px; margin: 44px 0;
  background: linear-gradient(to right, rgba(89,135,197,.07), transparent 70%);
  border-radius: 0 14px 14px 0;
}
.callout p:last-child { margin-bottom: 0; }
.eyebrow {
  display: block; font-size: .74rem; font-weight: 700;
  letter-spacing: .3em; text-transform: uppercase;
  color: var(--blue-ink); margin-bottom: 24px;
}
.eyebrow::before {
  content: ''; display: inline-block; width: 26px; height: 1px;
  background: var(--blue); vertical-align: middle; margin-right: 12px;
}
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: 20px;
  padding: 34px 30px; box-shadow: none;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); font-size: .98rem; }
.card p:last-child { margin-bottom: 0; }
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover, .card:hover { transform: translateY(-5px); box-shadow: 0 20px 48px rgba(14,14,16,.08); border-color: var(--blue); }
.card-tag {
  display: block; font-size: .7rem; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--blue-ink); margin-bottom: 12px;
}
.card-more {
  color: var(--blue-ink); font-weight: 700; font-size: .78rem;
  letter-spacing: .16em; text-transform: uppercase; margin-top: 14px; display: inline-block;
  text-decoration: none;
}
.step-num {
  width: auto; height: auto; border-radius: 0; background: transparent;
  color: transparent; -webkit-text-stroke: 1px var(--steel);
  font-family: var(--serif); font-weight: 400; font-size: 4rem; line-height: 1;
  display: block; margin-bottom: 18px;
}
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); box-shadow: none; }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-lg { padding: 18px 36px; font-size: .87rem; }
.btn-primary { background: var(--ink); }
.section-pale, .section-cream { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
/* .cta-band .btn paints a white background; without restating background here
   the ghost variant rendered white-on-white (invisible text). Keep all three
   properties together at higher specificity. */
.cta-band .btn.btn-ghost, .band-dark .btn.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.4); }
.cta-band .btn.btn-ghost:hover, .band-dark .btn.btn-ghost:hover { background: var(--white); color: var(--ink); border-color: var(--white); }

/* ---------- FAQ ---------- */
details.faq { border-bottom: 1px solid var(--line); padding: 24px 0; }
details.faq:first-of-type { border-top: 1px solid var(--line); }
details.faq summary {
  cursor: pointer; font-family: var(--sans); font-weight: 600; font-size: 1.1rem;
  color: var(--ink); list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: '+'; font-size: 1.5rem; font-weight: 300;
  color: var(--blue-ink); line-height: 1; flex-shrink: 0;
  transition: transform .25s ease;
}
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq .faq-body { padding-top: 14px; color: var(--muted); max-width: 64ch; }
details.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
.site-footer {
  background:
    radial-gradient(70rem 30rem at 85% 0%, rgba(89,135,197,.16), transparent 55%),
    var(--ink);
  color: rgba(247,245,240,.72); padding: 96px 0 36px;
}
/* Adam's actual logo, single-color white so it reads on the dark footer */
.footer-logo-img { width: clamp(250px, 30vw, 400px); height: auto; display: block; }
.footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr; gap: 48px; margin-top: 64px; }
.site-footer h4 {
  color: var(--steel); font-size: .72rem; font-family: var(--sans);
  font-weight: 700; letter-spacing: .24em; text-transform: uppercase; margin: 0 0 18px;
}
.site-footer a { color: rgba(247,245,240,.72); text-decoration: none; transition: color .2s ease; }
.site-footer a:hover { color: var(--white); }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: .96rem; }
.footer-bottom {
  border-top: 1px solid var(--line-dark); margin-top: 70px; padding-top: 26px;
  font-size: .8rem; color: rgba(247,245,240,.45); line-height: 1.75;
}
.footer-bottom p { margin-bottom: .7em; }
.disclaimer { font-size: .85rem; color: var(--muted); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s cubic-bezier(.2,.6,.2,1), transform .8s cubic-bezier(.2,.6,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- responsive ---------- */
@media (min-width: 861px) {
  .split { display: grid; grid-template-columns: 5fr 7fr; gap: 70px; align-items: start; }
  .split-tight { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: end; }
}
@media (max-width: 980px) {
  .feature-grid { grid-template-columns: 1fr; gap: 20px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat { border-top: 1px solid var(--line); }
  .stat:nth-child(-n+2) { border-top: 0; }
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-art { display: none; }
}
@media (max-width: 680px) {
  section { padding: 70px 0; }
  .hero { padding: 66px 0 58px; }
  .logo img { height: 60px; }
  .band-dark, .cta-band { margin: 0 10px; border-radius: 20px; }
  .cta-band { margin-bottom: 70px; }
  .index-row { grid-template-columns: 1fr; gap: 6px; padding: 28px 8px; }
  .index-row:hover { padding-left: 8px; }
  .index-num, .index-go { display: none; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0; padding: 10px 0 18px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 28px; }
  .nav a.btn { margin: 12px 28px 0; justify-content: center; }
  .nav-toggle { display: block; }
  .btn-row .btn { width: 100%; justify-content: center; }
}
