/* =====================================================================
   Prevail Exercise Physiology — styles.css
   Calm & trustworthy: soft teals/greens, warm neutrals, accessible.
   ===================================================================== */

:root {
  /* Brand */
  --brand:        #157e74;
  --brand-dark:   #0f5a54;
  --brand-deep:   #0b3b39;
  --brand-tint:   #e7f3ef;
  --sage:         #5aa791;
  --mint-glow:    #8fe0d3;

  /* Neutrals */
  --ink:          #17302e;
  --muted:        #536b68;
  --paper:        #fcfdfc;
  --paper-2:      #f3f7f5;
  --sand:         #f6f2ea;
  --line:         #dbe7e3;
  --white:        #ffffff;

  /* System */
  --radius:       16px;
  --radius-sm:    10px;
  --radius-lg:    26px;
  --shadow-sm:    0 1px 3px rgba(11,59,57,0.06), 0 1px 2px rgba(11,59,57,0.04);
  --shadow:       0 10px 30px rgba(11,59,57,0.08), 0 2px 8px rgba(11,59,57,0.05);
  --shadow-lg:    0 24px 60px rgba(11,59,57,0.14);
  --maxw:         1120px;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head:    "Fraunces", Georgia, "Times New Roman", serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 500; line-height: 1.15; color: var(--ink); margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.35rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); }
h3 { font-size: 1.24rem; }
p { margin: 0 0 1rem; }
em { font-style: italic; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.narrow { max-width: 780px; }

/* ---------- Accessibility helpers ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--brand-deep); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: .85rem 1.5rem; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  text-decoration: none; line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand-dark); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-deep); box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--brand-dark); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); background: var(--white); }
.btn-sm { padding: .6rem 1.1rem; font-size: .95rem; }
.btn-block { width: 100%; padding-block: 1rem; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(252,253,252,0.86); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; }
.brand:hover { text-decoration: none; }
.brand-mark svg { display: block; border-radius: 11px; box-shadow: var(--shadow-sm); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-head); font-size: 1.4rem; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.brand-sub { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

.main-nav { display: flex; align-items: center; }
.nav-list { list-style: none; display: flex; align-items: center; gap: 1.6rem; margin: 0; padding: 0; }
.nav-list a:not(.btn) { color: var(--ink); font-weight: 500; font-size: .98rem; }
.nav-list a:not(.btn):hover { color: var(--brand-dark); text-decoration: none; }

.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.nav-toggle-bar { display: block; height: 2.5px; background: var(--ink); border-radius: 2px; margin: 5px 0; transition: transform .25s ease, opacity .2s ease; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 480px at 85% -10%, rgba(143,224,211,0.30), transparent 60%),
    radial-gradient(900px 500px at -5% 10%, rgba(21,126,116,0.10), transparent 55%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  padding-block: clamp(3rem, 8vw, 6rem);
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.eyebrow { color: var(--brand-dark); font-weight: 600; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 1rem; }
.hero-copy h1 { margin-bottom: 1.1rem; }
.lead { font-size: clamp(1.05rem, 1.8vw, 1.24rem); color: var(--muted); max-width: 40ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.6rem 0 1rem; }
.hero-trust { font-size: .92rem; color: var(--muted); font-weight: 500; }

.hero-panel { display: flex; justify-content: center; }
.hero-card {
  position: relative; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.6rem; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 360px;
}
.hero-card-row { display: flex; gap: .9rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.hero-card-row:first-child { padding-top: .2rem; }
.hero-card-row .dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(135deg, var(--sage), var(--brand)); box-shadow: 0 0 0 4px var(--brand-tint); }
.hero-card-row strong { display: block; font-size: 1rem; }
.hero-card-row span:last-child { color: var(--muted); font-size: .9rem; }
.hero-card-figure {
  margin-top: 1.1rem; background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; border-radius: var(--radius); padding: 1.1rem 1.2rem; font-family: var(--font-head);
  font-size: 1.15rem; line-height: 1.25; text-align: center;
}

/* ---------- Trust bar ---------- */
.trustbar { background: var(--brand-deep); color: #dceee9; }
.trustbar-inner { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem 2.2rem; padding-block: 1.05rem; }
.trust-item { font-size: .92rem; font-weight: 500; display: inline-flex; align-items: center; gap: .5rem; }
.trust-ico { color: var(--mint-glow); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-tint { background: var(--paper-2); }
.section-head { max-width: 640px; margin-bottom: 2.5rem; }
.section-eyebrow { color: var(--brand); font-weight: 600; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .6rem; }
.section-eyebrow.light { color: var(--mint-glow); }
.section-intro { color: var(--muted); font-size: 1.08rem; }
.section .narrow p { color: var(--muted); font-size: 1.06rem; }
.section .narrow h2 { color: var(--ink); }

/* ---------- Cards (who / services) ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .22s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #cfe1db; }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }
.card-ico {
  display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
  border-radius: 12px; background: var(--brand-tint); color: var(--brand-dark); font-size: 1.3rem; margin-bottom: 1rem;
}

/* ---------- Steps ---------- */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.2rem; }
.step { position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand-dark); color: #fff; font-family: var(--font-head); font-size: 1.1rem; margin-bottom: .8rem;
}
.step h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.step p { color: var(--muted); font-size: .93rem; margin: 0; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(1.6rem, 4vw, 3.2rem); align-items: center; }
.about-photo {
  aspect-ratio: 4 / 5; border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: linear-gradient(150deg, var(--brand-tint), var(--sand));
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow);
}
.about-photo-note { color: var(--muted); font-size: .9rem; text-align: center; padding: 1rem; max-width: 60%; }
.about-copy .creds { list-style: none; margin: 1.3rem 0 0; padding: 0; }
.about-copy .creds li { position: relative; padding-left: 1.7rem; margin-bottom: .55rem; color: var(--ink); font-weight: 500; }
.about-copy .creds li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }

/* ---------- Funding (deep section) ---------- */
.section-deep { background: linear-gradient(160deg, var(--brand-deep), #0a302e); color: #d9ece7; }
.section-deep h2, .section-deep h3 { color: #fff; }
.funding-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.fund { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius); padding: 1.5rem; }
.fund-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.fund h3 { margin: 0; }
.fund p { color: #bcd8d1; font-size: .96rem; margin: 0; }
.pill { font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: .28rem .6rem; border-radius: 999px; background: rgba(255,255,255,0.12); color: #cfe7e0; white-space: nowrap; }
.pill-live { background: var(--mint-glow); color: #08302c; }
.funding-note { margin-top: 1.6rem; color: #bcd8d1; font-size: 1rem; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.15rem .2rem; font-weight: 600; font-size: 1.08rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-head); font-size: 1.5rem; color: var(--brand); transition: transform .2s ease; line-height: 1; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq-body { padding: 0 .2rem 1.2rem; }
.faq-body p { color: var(--muted); margin: 0; }

/* ---------- Waitlist form ---------- */
.waitlist-form {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 4vw, 2.4rem); box-shadow: var(--shadow);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { margin-bottom: 1.1rem; display: flex; flex-direction: column; }
.field label { font-weight: 600; font-size: .95rem; margin-bottom: .4rem; color: var(--ink); }
.req { color: #b4462f; }
.optional { color: var(--muted); font-weight: 400; font-size: .85rem; }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  padding: .8rem .9rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); transition: border-color .16s ease, box-shadow .16s ease; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint);
}
.field textarea { resize: vertical; min-height: 110px; }
.field.consent { margin-top: .3rem; }
.checkbox { display: flex; align-items: flex-start; gap: .6rem; font-weight: 400; font-size: .96rem; color: var(--muted); cursor: pointer; }
.checkbox input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand-dark); flex: none; }
.form-note { font-size: .85rem; color: var(--muted); margin: 1rem 0 0; }
.form-status { margin-top: 1rem; font-weight: 600; padding: 0; }
.form-status.success { color: var(--brand-dark); background: var(--brand-tint); padding: .9rem 1rem; border-radius: var(--radius-sm); }
.form-status.error { color: #922; background: #fdecea; padding: .9rem 1rem; border-radius: var(--radius-sm); }
.field.invalid input, .field.invalid select { border-color: #c0553c; box-shadow: 0 0 0 4px #fbe7e2; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-deep); color: #c7ded8; padding-top: 3rem; }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; padding-bottom: 2.4rem; }
.site-footer .brand-name { color: #fff; font-size: 1.5rem; }
.site-footer .brand-sub { color: var(--mint-glow); display: block; letter-spacing: .14em; font-size: .68rem; text-transform: uppercase; margin-top: 3px; }
.footer-tag { margin-top: .9rem; color: #a9cbc4; font-size: .95rem; max-width: 38ch; }
.footer-col h4 { color: #fff; font-family: var(--font-body); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .9rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .55rem; }
.footer-col a { color: #c7ded8; font-size: .96rem; }
.footer-col a:hover { color: #fff; }
.footer-legal { border-top: 1px solid rgba(255,255,255,0.12); padding-block: 1.4rem; }
.footer-legal p { margin: .2rem 0; font-size: .84rem; color: #9dc0b9; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-panel { justify-content: flex-start; }
  .about-grid { grid-template-columns: 1fr; }
  .cards-3, .funding-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .nav-list {
    position: absolute; top: 74px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: .5rem 1.1rem 1.2rem; display: none;
  }
  .nav-list.open { display: flex; }
  .nav-list li { border-bottom: 1px solid var(--line); }
  .nav-list li:last-child { border-bottom: 0; padding-top: .8rem; }
  .nav-list a:not(.btn) { display: block; padding: .9rem .2rem; }
  .nav-list .btn { width: 100%; }
  .cards-3, .funding-grid, .steps, .field-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 auto; }
}

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