/* ============================================
   BIOELECTRIC RECOVERY — Site-Wide CSS
   Based on Combined Build Specification (Final)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --- CSS Variables (Color Palette) --- */
:root {
  --deep-charcoal: #1A1A2E;
  --clinical-teal: #2C5F6F;
  --pale-teal: #E8F0F2;
  --light-grey: #F5F5F5;
  --white: #FFFFFF;
  --muted-copper: #C17A56;
  --copper-hover: #A8634A;
  --teal-hover: #1E4A57;
  --body-text: #333333;
  --secondary-text: #555555;
  --light-body: #B0C4CE;
  --caption: #666666;
  --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-text: 720px;
  --max-card: 1080px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; scroll-padding-top: 80px; }

body {
  font-family: var(--font-stack);
  font-size: 17px;
  line-height: 1.7;
  color: var(--body-text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--clinical-teal); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--teal-hover); text-decoration: underline; }

/* --- Typography --- */
h1 { font-weight: 700; font-size: 48px; line-height: 1.15; }
h2 { font-weight: 700; font-size: 32px; line-height: 1.2; color: var(--deep-charcoal); }
h3 { font-weight: 600; font-size: 22px; line-height: 1.3; }
p { margin-bottom: 1.2em; }
p:last-child { margin-bottom: 0; }

/* --- Sections --- */
.section { padding: 80px 24px; }
.section--hero { padding: 140px 24px 80px; }
.section--compact { padding: 60px 24px; }

.section--dark { background: var(--deep-charcoal); color: var(--light-body); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark .section__subtitle { color: var(--light-body); }
.section--dark p { color: var(--light-body); }

.section--grey { background: var(--light-grey); }
.section--teal-light { background: var(--pale-teal); }
.section--teal { background: var(--clinical-teal); color: var(--pale-teal); }
.section--teal h2 { color: var(--white); }
.section--white { background: var(--white); }

.section__inner {
  max-width: var(--max-text);
  margin: 0 auto;
}

.section__inner--wide {
  max-width: var(--max-card);
  margin: 0 auto;
}

.section--center { text-align: center; }

.section__subtitle {
  font-size: 19px;
  font-weight: 400;
  color: var(--secondary-text);
  margin-top: 20px;
  max-width: 700px;
  line-height: 1.6;
}

.section--center .section__subtitle { margin-left: auto; margin-right: auto; }

.section__subtitle--light { color: var(--light-body); }
.section__subtitle--emphasis { color: var(--white); font-weight: 600; }

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-stack);
  font-weight: 600;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  border: none;
  text-align: center;
  letter-spacing: 0.01em;
}

.btn--copper {
  background: var(--muted-copper);
  color: var(--white);
  padding: 14px 40px;
  box-shadow: 0 2px 8px rgba(193, 122, 86, 0.3);
}
.btn--copper:hover {
  background: var(--copper-hover);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(193, 122, 86, 0.4);
}

.btn--teal {
  background: var(--clinical-teal);
  color: var(--white);
  padding: 12px 32px;
}
.btn--teal:hover {
  background: var(--teal-hover);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--clinical-teal);
  padding: 12px 32px;
  border: 1px solid var(--clinical-teal);
}
.btn--ghost:hover { background: var(--pale-teal); text-decoration: none; }

.btn--white {
  background: var(--white);
  color: var(--clinical-teal);
  padding: 12px 32px;
  font-weight: 600;
}
.btn--white:hover { background: var(--pale-teal); text-decoration: none; }

.cta-wrap { margin-top: 36px; }

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 26, 46, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(44, 95, 111, 0.35);
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 64px;
}

.nav__brand {
  font-weight: 700;
  font-size: 18px;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav__brand:hover { color: var(--white); text-decoration: none; }
.nav__brand span { color: var(--clinical-teal); }

.nav__links { display: flex; gap: 28px; list-style: none; }
.nav__links a {
  color: var(--light-body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
  padding: 4px 0;
}
.nav__links a:hover { color: var(--white); text-decoration: none; }
.nav__links a.active {
  color: var(--white);
  border-bottom: 2px solid var(--clinical-teal);
}

.nav__toggle { display: none; background: none; border: none; color: var(--white); font-size: 24px; cursor: pointer; padding: 4px; }

/* --- Pull Quote --- */
.pullquote {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--clinical-teal);
  border-left: 4px solid var(--clinical-teal);
  padding: 24px 0 24px 24px;
  margin: 36px 0;
}

.section--dark .pullquote {
  color: var(--light-body);
  border-left-color: rgba(176, 196, 206, 0.45);
}

.pullquote__attribution {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--secondary-text);
  margin-top: 12px;
  letter-spacing: 0.01em;
}

.section--dark .pullquote__attribution { color: var(--light-body); }

.pullquote__caption {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--secondary-text);
  margin-top: 8px;
  font-style: italic;
}

.section--dark .pullquote__caption { color: rgba(176, 196, 206, 0.75); }

/* --- Stat Grid --- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 28px;
  margin: 40px 0;
}

.stat {
  text-align: center;
  padding: 24px 16px;
  border-top: 2px solid rgba(44, 95, 111, 0.3);
}

.stat__number {
  font-size: 44px;
  font-weight: 700;
  color: var(--clinical-teal);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat__label { font-size: 13px; color: var(--body-text); margin-top: 10px; line-height: 1.5; }

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 36px;
}

.card {
  background: var(--white);
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.2s, transform 0.2s;
  border-top: 3px solid var(--clinical-teal);
}

.card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
  transform: translateY(-3px);
}

.card__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--deep-charcoal);
  margin-bottom: 16px;
  line-height: 1.4;
}

.card__body { font-size: 15px; line-height: 1.7; color: var(--body-text); }
.card__quote {
  font-size: 15px;
  font-style: italic;
  color: var(--clinical-teal);
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--pale-teal);
  font-weight: 500;
}

/* --- Steps (Session Architecture) --- */
.steps { margin-top: 40px; }
.step {
  margin-bottom: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(44, 95, 111, 0.15);
}
.step:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.step__number {
  font-size: 48px;
  font-weight: 700;
  color: var(--clinical-teal);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}

.step__heading {
  font-size: 21px;
  font-weight: 600;
  color: var(--deep-charcoal);
  margin-bottom: 20px;
}

.step__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--clinical-teal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  margin-top: 20px;
}

/* --- Protocol Dosing Box --- */
.dosing-box {
  border-left: 3px solid var(--clinical-teal);
  padding: 28px 28px 28px 32px;
  margin-top: 48px;
  background: var(--pale-teal);
  border-radius: 0 8px 8px 0;
}

.dosing-box h3 { font-size: 18px; color: var(--deep-charcoal); margin-bottom: 20px; }
.dosing-box ul { list-style: none; padding: 0; }
.dosing-box li {
  font-size: 15px;
  margin-bottom: 10px;
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}
.dosing-box li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--clinical-teal);
  font-weight: 600;
}
.dosing-box li strong { color: var(--deep-charcoal); }

/* --- Two Column --- */
.two-col {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}

.two-col__img {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(44, 95, 111, 0.4);
  flex-shrink: 0;
}

/* --- Video Embed --- */
.video-wrap {
  max-width: 720px;
  margin: 36px auto;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.video-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* --- Peer Explainability --- */
.peer-sentence {
  background: rgba(176, 196, 206, 0.12);
  border: 1px solid rgba(176, 196, 206, 0.2);
  border-radius: 8px;
  padding: 20px 24px;
  margin-top: 28px;
  font-style: italic;
  font-weight: 500;
  color: var(--light-body);
  font-size: 16px;
  line-height: 1.6;
}

/* --- Pattern List --- */
.pattern-list { list-style: none; padding: 0; margin-top: 24px; }
.pattern-list li {
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  font-size: 16px;
  line-height: 1.6;
}
.pattern-list li:last-child { border-bottom: none; }
.pattern-list li strong { color: var(--deep-charcoal); }

/* --- Evidence Box --- */
.evidence-box {
  border-left: 3px solid var(--clinical-teal);
  padding: 24px 28px;
  margin-top: 36px;
  font-size: 15px;
  color: var(--secondary-text);
  background: rgba(44, 95, 111, 0.06);
  border-radius: 0 8px 8px 0;
}

.evidence-box p { font-size: 15px; line-height: 1.7; }
.evidence-box p:not(:last-child) { margin-bottom: 12px; }
.evidence-box p:last-child { margin-bottom: 0; }

/* --- Intervention Blocks (Problem Reframe) --- */
.intervention {
  margin-bottom: 24px;
  padding-left: 0;
}
.intervention p { margin-bottom: 0; }
.intervention__name { font-weight: 700; color: var(--deep-charcoal); }

/* --- Newsletter Embed Box --- */
.substack-box {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 40px 32px;
  margin-top: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.substack-box p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  margin-bottom: 20px;
}

/* --- Assessment Steps (Work With Me) --- */
.assessment-steps { margin-top: 32px; }
.assessment-step {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
  align-items: flex-start;
}
.assessment-step__icon {
  width: 40px;
  height: 40px;
  background: var(--clinical-teal);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}
.assessment-step__heading {
  font-size: 18px;
  font-weight: 600;
  color: var(--clinical-teal);
  margin-bottom: 8px;
}

/* --- Footer --- */
.footer {
  background: var(--deep-charcoal);
  color: var(--light-body);
  padding: 48px 24px;
  text-align: center;
  font-size: 14px;
  border-top: 1px solid rgba(44, 95, 111, 0.3);
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: 32px;
  list-style: none;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.footer__links a {
  color: var(--light-body);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--white); text-decoration: none; }

.footer__disclaimer {
  margin-top: 12px;
  font-size: 13px;
  color: rgba(176, 196, 206, 0.6);
}

/* --- Disclaimer --- */
.disclaimer {
  font-size: 14px;
  color: var(--secondary-text);
  font-style: italic;
  margin-top: 28px;
  line-height: 1.6;
}

/* --- Card Footnote --- */
.card__footnote {
  font-size: 14px;
  color: var(--secondary-text);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--pale-teal);
  font-style: italic;
}

/* --- Concept Block (Research page) --- */
.concept-block { margin-bottom: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(44, 95, 111, 0.12); }
.concept-block:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.concept-block__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--clinical-teal);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.concept-block h3 { font-size: 20px; color: var(--deep-charcoal); margin-bottom: 12px; }

/* --- Two-column equal layout --- */
.two-col--equal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-top: 40px;
}

.two-col__col {
  background: var(--white);
  border-radius: 8px;
  padding: 36px;
  border-top: 3px solid var(--clinical-teal);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.two-col__col h3 { font-size: 20px; color: var(--deep-charcoal); margin-bottom: 16px; }

/* --- Research Source List --- */
.source-list { list-style: none; padding: 0; margin-top: 24px; }
.source-list li {
  padding: 16px 0 16px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  font-size: 15px;
  line-height: 1.6;
  position: relative;
}
.source-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--clinical-teal);
  font-weight: 700;
}
.source-list li:last-child { border-bottom: none; }
.source-list li strong { color: var(--deep-charcoal); display: block; font-size: 15px; margin-bottom: 2px; }
.source-list li span { font-size: 14px; color: var(--secondary-text); }

/* --- About Hero with Photo --- */
.hero-with-photo {
  display: flex;
  align-items: flex-start;
  gap: 64px;
}

.hero-photo {
  flex-shrink: 0;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid rgba(44, 95, 111, 0.6);
  box-shadow: 0 0 0 8px rgba(44, 95, 111, 0.15);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-content { flex: 1; }

/* --- Responsive --- */
@media (max-width: 768px) {
  h1 { font-size: 32px; }
  h2 { font-size: 26px; }
  h3 { font-size: 20px; }
  .section { padding: 48px 20px; }
  .section--hero { padding: 108px 20px 56px; }
  .section--compact { padding: 48px 20px; }
  .section__subtitle { font-size: 17px; }
  .pullquote { font-size: 18px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .stat__number { font-size: 32px; }
  .card-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; text-align: center; }
  .two-col__img { margin: 0 auto 32px; }
  .step__number { font-size: 36px; }
  .two-col--equal { grid-template-columns: 1fr; gap: 24px; }
  .hero-with-photo { flex-direction: column; gap: 32px; text-align: center; }
  .hero-photo { width: 180px; height: 180px; }
  .nav__inner { padding: 0 20px; }
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.98);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(44, 95, 111, 0.3);
  }
  .nav__links.open a { font-size: 16px; padding: 8px 0; }
  .assessment-step { flex-direction: column; gap: 12px; }
}
