/* Peak Growth Academy — Modern Clinical / Academic Press */

:root {
  /* Brand */
  --navy: #023A60;
  --navy-90: #1a4d70;
  --navy-70: #4d7591;
  --teal: #4EBBB7;
  --terracotta: #D67755;
  --beige: #FFE5C6;
  --beige-50: #FFF2DC;
  --beige-25: #FFF9ED;

  /* Neutrals */
  --ink: #1a1d20;
  --ink-70: #4A4A4A;
  --ink-50: #707070;
  --ink-30: #9D9D9D;
  --rule: #d9d6cf;
  --rule-soft: #EFEFEF;
  --paper: #FAFAF7;
  --paper-warm: #F6F1E8;
  --white: #ffffff;

  /* Type */
  --font-display: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Scale */
  --maxw: 1240px;
  --gutter: 32px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* Overflow guard: keep the page from shifting sideways on small screens.
   Applied to <body> only (not <html>) so position:sticky keeps working.
   This is a safety net — the real fixes are the breakpoints at the end. */
body { overflow-x: hidden; width: 100%; max-width: 100%; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* Type */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(40px, 5.4vw, 76px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 500; }
h2 { font-size: clamp(28px, 3.2vw, 44px); line-height: 1.12; letter-spacing: -0.025em; }
h3 { font-size: clamp(20px, 1.8vw, 24px); line-height: 1.25; letter-spacing: -0.015em; }
h4 { font-size: 17px; line-height: 1.3; letter-spacing: -0.01em; font-weight: 600; }

p { margin: 0 0 1em; text-wrap: pretty; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--terracotta);
  display: inline-block;
}
.eyebrow.no-rule::before { display: none; }
.eyebrow.teal { color: var(--teal); }
.eyebrow.teal::before { background: var(--teal); }
.eyebrow.navy { color: var(--navy); }
.eyebrow.navy::before { background: var(--navy); }

.lead {
  font-size: clamp(19px, 1.5vw, 22px);
  line-height: 1.5;
  color: var(--ink-70);
  font-weight: 400;
}

.mono { font-family: var(--font-mono); }

/* Layout */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap-narrow {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section { padding: 96px 0; border-top: 1px solid var(--rule); }
section.no-rule { border-top: none; }
section.beige { background: var(--paper-warm); }
section.navy { background: var(--navy); color: var(--paper); }
section.navy h1, section.navy h2, section.navy h3 { color: var(--paper); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  display: none;
  line-height: 1;
}
.brand-name sup {
  font-size: 0.5em;
  vertical-align: super;
  margin-left: 2px;
  opacity: .7;
  font-weight: 500;
}
@media (min-width: 760px) {
  .brand-name { display: inline; }
}

.nav {
  display: none;
  gap: 4px;
  align-items: center;
}
@media (min-width: 980px) {
  .nav { display: flex; }
}
.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-70);
  padding: 8px 14px;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--navy); background: rgba(2, 58, 96, 0.05); }
.nav a.active { color: var(--navy); }

.header-cta {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Mobile nav button */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 6px;
  width: 38px;
  height: 38px;
  color: var(--navy);
  position: relative;
  z-index: 110;
}
@media (min-width: 980px) { .nav-toggle { display: none; } }

/* Mobile nav drawer */
.mobile-nav {
  position: fixed;
  inset: 72px 0 0 0;
  background: var(--paper);
  z-index: 90;
  padding: 32px 24px 40px;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
body.mobile-nav-open .mobile-nav {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
body.mobile-nav-open { overflow: hidden; }
.mobile-nav .mn-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-50);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 8px;
}
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  color: var(--navy);
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  letter-spacing: -0.015em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-nav a .arrow {
  font-family: var(--font-mono);
  color: var(--terracotta);
  font-size: 14px;
  font-weight: 400;
}
.mobile-nav .mn-cta {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 980px) { .mobile-nav { display: none; } }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  padding: 11px 18px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all .15s ease;
  white-space: nowrap;
  line-height: 1;
}
.btn-primary {
  background: var(--navy);
  color: var(--paper);
}
.btn-primary:hover { background: #034a78; }
.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-secondary:hover { background: rgba(2, 58, 96, 0.06); }
.btn-ghost {
  background: transparent;
  color: var(--navy);
  padding: 11px 14px;
}
.btn-ghost:hover { background: rgba(2, 58, 96, 0.06); }
.btn-terracotta {
  background: var(--terracotta);
  color: var(--white);
}
.btn-terracotta:hover { background: #c46a4a; }
.btn-lg { padding: 15px 24px; font-size: 15px; }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.btn .arrow {
  transition: transform .15s;
}
.btn:hover .arrow { transform: translateX(3px); }

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.72);
  padding: 80px 0 32px;
  font-size: 14px;
  line-height: 1.55;
}
.site-footer h4 {
  color: var(--white);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 16px;
  opacity: .65;
}
.site-footer a { color: rgba(255,255,255,.82); }
.site-footer a:hover { color: var(--white); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-grid .col-brand img {
  width: 40px; height: 40px; margin-bottom: 16px;
}
.footer-grid .col-brand .brand-wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--white);
  font-size: 22px;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-grid .col-brand .brand-wordmark sup {
  font-size: 0.4em;
  vertical-align: super;
  opacity: .65;
  font-weight: 500;
  margin-left: 3px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 12px;
  opacity: .7;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-disclaimer {
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255,255,255,.5);
  max-width: 720px;
  margin-top: 18px;
}

/* Reusable elements */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--rule);
  background: var(--paper);
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--ink-70);
}
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal);
}
.pill.terracotta .dot { background: var(--terracotta); }
.pill.navy .dot { background: var(--navy); }

.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid var(--rule);
  background: var(--white);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--ink-70);
}

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: 0;
}

.cite {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--terracotta);
  vertical-align: super;
  margin-left: 1px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 25, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 56px 20px 20px;
  overflow-y: auto;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--paper);
  width: 100%;
  max-width: 560px;
  border-radius: 10px;
  padding: 36px 36px 32px;
  position: relative;
  box-shadow: 0 30px 80px rgba(2, 25, 42, 0.25);
  animation: modalIn .25s ease;
}
@keyframes modalIn {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 14px; right: 14px;
  background: transparent;
  border: 0;
  width: 32px; height: 32px;
  border-radius: 6px;
  color: var(--ink-70);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--rule-soft); color: var(--navy); }
.modal h3 {
  font-size: 22px;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.modal .modal-sub {
  color: var(--ink-70);
  font-size: 14px;
  margin-bottom: 22px;
}
.modal label {
  display: block;
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-70);
  margin-bottom: 6px;
  margin-top: 14px;
}
.modal input,
.modal select,
.modal textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 11px 13px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
  transition: border-color .15s;
}
.modal input:focus,
.modal select:focus,
.modal textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(2, 58, 96, 0.12);
}
.modal .field-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.modal .submit-row {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.modal .submit-note {
  font-size: 11px;
  color: var(--ink-50);
  line-height: 1.4;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.modal-success {
  text-align: left;
}
.modal-success .checkmark {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

/* Accordion */
.faq-item {
  border-bottom: 1px solid var(--rule);
}
.faq-item:first-child { border-top: 1px solid var(--rule); }
.faq-q {
  width: 100%;
  background: transparent;
  border: 0;
  text-align: left;
  padding: 22px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -0.015em;
  cursor: pointer;
  line-height: 1.35;
}
.faq-q .toggle {
  font-family: var(--font-mono);
  color: var(--terracotta);
  font-size: 18px;
  font-weight: 400;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  transition: transform .2s;
}
.faq-item.open .toggle { transform: rotate(45deg); }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s ease;
}
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a > div {
  overflow: hidden;
  color: var(--ink-70);
  font-size: 16px;
  line-height: 1.6;
}
.faq-a > div > p { padding-bottom: 22px; max-width: 720px; }
.faq-a > div > p:last-child { padding-bottom: 22px; }

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* Citation footer */
.refs {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-50);
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: ref;
  column-count: 1;
}
.refs li {
  padding-left: 28px;
  position: relative;
  counter-increment: ref;
  margin-bottom: 8px;
}
.refs li::before {
  content: '[' counter(ref) ']';
  position: absolute;
  left: 0;
  color: var(--terracotta);
}

/* Honeypot: invisible to humans, but a real input bots will fill.
   Off-screen (not display:none) so HTML form fills/tab order ignore it
   but it still posts. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Utility */
.hide-mobile { display: none; }
@media (min-width: 700px) { .hide-mobile { display: initial; } }
.only-mobile { display: initial; }
@media (min-width: 700px) { .only-mobile { display: none; } }

/* ============================================================
   Responsive — small screens
   One coherent ladder shared by all 7 static pages.
   Tiers: 800px (existing, 4→2 footer cols)
        · 760px (tablet / phone landscape)
        · 560px (phone — footer stacks, no horizontal shift)
   ============================================================ */

/* Tablet & phone-landscape: tighten the fixed desktop gutter and the
   96px section rhythm, and stop wide CTA buttons forcing the page wide. */
@media (max-width: 760px) {
  :root { --gutter: 22px; }
  section { padding: 64px 0; }
  .site-footer { padding: 60px 0 28px; }
  .footer-grid { gap: 36px 32px; padding-bottom: 44px; }
  /* Long CTAs (e.g. "Reserve a seat — next live webinar →") may wrap
     instead of pushing past the viewport edge. */
  .btn { white-space: normal; max-width: 100%; }
  .modal { padding: 28px 24px 24px; }
  .modal .field-row { grid-template-columns: 1fr; gap: 0; }
}

/* Phone: footer collapses to a single column so nothing is clipped or
   pushed off-screen, and the bottom bar stacks instead of squeezing. */
@media (max-width: 560px) {
  :root { --gutter: 18px; }
  section { padding: 52px 0; }
  h1 { font-size: clamp(34px, 9vw, 44px); }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 36px;
  }
  .footer-disclaimer { margin-top: 24px; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  /* Address / email lines must wrap rather than overflow. */
  .footer-bottom span,
  .footer-disclaimer { overflow-wrap: anywhere; }

  /* Modal: edge-to-edge on tiny screens, full-width action button. */
  .modal-backdrop { padding: 24px 14px 14px; }
  .modal { padding: 24px 20px 22px; }
  .modal .submit-row { flex-direction: column; align-items: stretch; }
  .modal .submit-row .btn { width: 100%; }
}
