/* prehab.athleticsmd.org — Prehabilitation Centers of America (routes/prehab.js) */
:root {
  --ink: #0E1B2C;
  --ink-2: #22324A;
  --ivory: #F8F4ED;
  --sand: #EEE6D9;
  --stone: #DCD2C2;
  --gold: #C6A46A;
  --gold-deep: #9C7A43;
  --muted: #5A6372;
  --white: #FFFFFF;
  --err: #A8322A;
  --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --radius: 14px;
  --shadow: 0 24px 60px -28px rgba(14, 27, 44, .45);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font: 400 16px/1.65 var(--sans); color: var(--ink); background: var(--ivory); overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
/* The width/height attributes reserve space; height:auto lets aspect-ratio win. */
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.08; }
h2 { font-size: clamp(32px, 4.2vw, 50px); margin-bottom: 18px; }
h3 { font-size: 26px; margin-bottom: 8px; }
p + p { margin-top: 14px; }
.center { text-align: center; }
.eyebrow { font: 600 12px/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.eyebrow.dark { color: var(--gold-deep); }
.sub { max-width: 720px; margin: 0 auto 40px; color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 26px; border-radius: 999px;
  font: 600 15px/1 var(--sans); letter-spacing: .02em; text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: background .2s, color .2s, border-color .2s, transform .2s; }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #D4B47D; }
.btn-ghost { background: rgba(255, 255, 255, .08); color: var(--white); border-color: rgba(255, 255, 255, .55); }
.btn-ghost:hover { background: rgba(255, 255, 255, .18); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--ivory); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn-wide { width: 100%; }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 48px); background: rgba(248, 244, 237, .94); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--stone); }
.brand { text-decoration: none; display: flex; flex-direction: column; min-width: 0; }
.brand-name { font: 600 20px/1.1 var(--serif); color: var(--ink); letter-spacing: .01em; }
.brand-sub { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.top-nav { display: flex; gap: 26px; font-size: 14px; }
.top-nav a { text-decoration: none; color: var(--ink-2); }
.top-nav a:hover { color: var(--gold-deep); }
.top-cta { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.top-phone { font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; }

/* Hero */
.hero { position: relative; min-height: min(88vh, 860px); display: flex; align-items: flex-end; color: var(--white); overflow: hidden; background: var(--ink); }
.hero-film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-veil { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 20, 34, .88) 0%, rgba(10, 20, 34, .55) 48%, rgba(10, 20, 34, .1) 100%),
  linear-gradient(0deg, rgba(10, 20, 34, .7) 0%, transparent 45%); }
.hero-copy { position: relative; max-width: 700px; padding: 120px clamp(16px, 6vw, 88px) clamp(48px, 8vh, 96px); }
.hero h1 { font-size: clamp(46px, 7vw, 92px); margin-bottom: 20px; }
.lede { font-size: clamp(17px, 1.6vw, 19px); color: rgba(255, 255, 255, .9); max-width: 600px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-actions.center { justify-content: center; }
.hero-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 30px; font-size: 13.5px; color: rgba(255, 255, 255, .82); }
.hero-facts li::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-right: 9px; vertical-align: middle; }

.live-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 22px; padding: 14px 16px;
  background: var(--ink); color: var(--sand); font-size: 14px; text-align: center; }
.live-strip a { color: var(--gold); font-weight: 600; text-decoration: none; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #6FCF97; box-shadow: 0 0 0 0 rgba(111, 207, 151, .6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(111, 207, 151, .55); } 70% { box-shadow: 0 0 0 10px rgba(111, 207, 151, 0); } 100% { box-shadow: 0 0 0 0 rgba(111, 207, 151, 0); } }

/* Sections */
section { padding: clamp(64px, 9vw, 120px) clamp(16px, 5vw, 72px); }
.why, .team { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; max-width: 1240px; margin: 0 auto; }
.why-text p, .team-text > p { color: var(--ink-2); font-size: 17px; }
.why-pic img, .team-pic img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 3.2; object-fit: cover; width: 100%; }

.pillars { background: var(--sand); }
.pillar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; max-width: 1280px; margin: 44px auto 0; }
.pillar { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 30px -22px rgba(14, 27, 44, .5); display: flex; flex-direction: column; }
.pillar figure img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.pillar h3 { font-size: 23px; padding: 20px 22px 0; }
.pillar p { padding: 0 22px 24px; color: var(--muted); font-size: 15px; }

.film { background: var(--ink); color: var(--white); }
.film-head { max-width: 760px; margin: 0 auto 36px; text-align: center; }
.film-head p:not(.eyebrow) { color: rgba(255, 255, 255, .78); }
.film-frame { max-width: 1080px; margin: 0 auto; border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); background: #000; }
.film-frame video { width: 100%; aspect-ratio: 16 / 9; }
.chapters { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 1080px; margin: 22px auto 0; counter-reset: ch; }
.chapters button { background: transparent; color: var(--sand); border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; padding: 8px 14px; font: 500 13px/1 var(--sans); cursor: pointer; }
.chapters button:hover { border-color: var(--gold); color: var(--gold); }

.steps { list-style: none; margin-top: 28px; display: grid; gap: 18px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.step-n { flex: 0 0 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--gold); font: 600 18px/1 var(--serif); }
.steps b { font-size: 16px; }
.steps p { color: var(--muted); font-size: 15px; margin-top: 2px; }

/* Packages */
.packages { background: var(--white); }
.pkg-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; max-width: 1400px; margin: 0 auto; align-items: stretch; }
.pkg { position: relative; display: flex; flex-direction: column; border: 1px solid var(--stone); border-radius: var(--radius); padding: 30px 22px 24px; background: var(--ivory); }
.pkg-featured { background: var(--ink); color: var(--white); border-color: var(--ink); box-shadow: var(--shadow); transform: translateY(-8px); }
.pkg-flag { position: absolute; top: -13px; left: 22px; background: var(--gold); color: var(--ink); font: 600 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: 7px 12px; border-radius: 999px; }
.pkg-tag { font-size: 13.5px; color: var(--muted); min-height: 42px; }
.pkg-featured .pkg-tag, .pkg-featured .pkg-split, .pkg-featured .pkg-incl { color: rgba(255, 255, 255, .78); }
.pkg-price { font: 600 46px/1 var(--serif); margin: 14px 0 6px; }
.pkg-split { font-size: 13px; color: var(--muted); }
.pkg-weeks { font-weight: 600; font-size: 14px; margin: 16px 0 10px; color: var(--gold-deep); }
.pkg-featured .pkg-weeks { color: var(--gold); }
.pkg-visits, .pkg-incl { list-style: none; font-size: 14px; }
.pkg-visits { padding: 12px 0; border-top: 1px solid var(--stone); border-bottom: 1px solid var(--stone); margin-bottom: 14px; font-weight: 500; }
.pkg-featured .pkg-visits { border-color: rgba(255, 255, 255, .18); }
.pkg-visits li + li, .pkg-incl li + li { margin-top: 6px; }
.pkg-incl { color: var(--ink-2); flex: 1; margin-bottom: 22px; }
.pkg-incl li { padding-left: 20px; position: relative; }
.pkg-incl li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 9px; height: 5px; border-left: 2px solid var(--gold-deep); border-bottom: 2px solid var(--gold-deep); transform: rotate(-45deg); }
.pkg-featured .pkg-incl li::before { border-color: var(--gold); }
.pkg-featured .btn-line { color: var(--white); border-color: var(--white); }

/* Enroll */
.enroll { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 80px); max-width: 1240px; margin: 0 auto; align-items: start; }
.enroll-intro p:not(.eyebrow) { color: var(--ink-2); }
.enroll-intro figure img { border-radius: var(--radius); margin: 26px 0 18px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.enroll-note { font-size: 15px; }
.enroll-form { background: var(--white); border: 1px solid var(--stone); border-radius: 20px; padding: clamp(22px, 3vw, 38px); box-shadow: var(--shadow); }
.fld { display: block; margin-bottom: 16px; border: 0; }
.fld > span, .fld legend { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.fld i { font-style: normal; font-weight: 400; color: var(--muted); }
.fld input:not([type="radio"]):not([type="checkbox"]), .fld select { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--stone); border-radius: 10px; background: var(--ivory); font: 400 16px/1.3 var(--sans); color: var(--ink); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pay-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-choice legend { grid-column: 1 / -1; }
.pay-choice input { width: 18px; height: 18px; accent-color: var(--gold-deep); flex-shrink: 0; }
.pay-choice label { display: flex; align-items: center; gap: 10px; border: 1px solid var(--stone); border-radius: 10px; padding: 12px 14px; cursor: pointer; font-size: 14.5px; background: var(--ivory); }
.pay-choice label:has(input:checked) { border-color: var(--gold-deep); background: #FBF6EC; box-shadow: inset 0 0 0 1px var(--gold-deep); }
.terms { background: var(--ivory); border: 1px solid var(--stone); border-radius: 10px; padding: 14px 16px; font-size: 13px; color: var(--ink-2); max-height: 210px; overflow-y: auto; margin: 6px 0 14px; }
.terms b { display: block; font-size: 13px; margin-bottom: 6px; }
.accept { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin-bottom: 18px; cursor: pointer; }
.accept input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--gold-deep); flex-shrink: 0; }
.form-err { color: var(--err); font-size: 14px; min-height: 20px; margin-top: 10px; }
.fine { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

/* FAQ */
.faq { background: var(--sand); }
.faq-list { max-width: 820px; margin: 34px auto 0; }
.faq details { border-bottom: 1px solid var(--stone); padding: 20px 4px; }
.faq summary { cursor: pointer; font: 600 22px/1.3 var(--serif); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--sans); font-weight: 400; color: var(--gold-deep); }
.faq details[open] summary::after { content: '−'; }
.faq details p { color: var(--ink-2); margin-top: 10px; }

/* Closing */
.closing { position: relative; color: var(--white); text-align: center; overflow: hidden; padding-top: clamp(96px, 14vw, 180px); padding-bottom: clamp(96px, 14vw, 180px); }
.closing-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.closing-veil { position: absolute; inset: 0; background: rgba(10, 20, 34, .72); }
.closing-copy { position: relative; max-width: 760px; margin: 0 auto; }
.closing-copy p { color: rgba(255, 255, 255, .86); font-size: 18px; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; padding: 40px clamp(16px, 5vw, 72px); background: var(--ink); color: var(--sand); font-size: 14px; }
.foot a { color: var(--gold); text-decoration: none; }
.foot-links { display: flex; gap: 20px; }
.foot-fine { flex-basis: 100%; font-size: 12px; color: rgba(238, 230, 217, .6); }

/* Small pages around checkout */
.note-body { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: linear-gradient(160deg, var(--ink), #1E3350); }
.note-card { background: var(--ivory); border-radius: 20px; max-width: 560px; width: 100%; padding: clamp(26px, 5vw, 44px); box-shadow: var(--shadow); }
.note-card h1 { font-size: 34px; margin: 14px 0 12px; }
.note-card p { color: var(--ink-2); }
.note-card .btn { margin-top: 8px; }

/* Responsive */
@media (max-width: 1240px) {
  .pkg-grid { grid-template-columns: repeat(3, 1fr); }
  .pkg-featured { transform: none; }
  .pillar-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .top-nav { display: none; }
  .why, .team, .enroll { grid-template-columns: 1fr; }
  .team-pic { order: 2; }
  .pkg-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .brand-name { font-size: 17px; }
  .brand-sub { display: none; }
  .top-phone { display: none; }
  .hero { min-height: 92vh; }
  .hero-copy { padding-top: 96px; }
  .hero-veil { background: linear-gradient(0deg, rgba(10, 20, 34, .92) 0%, rgba(10, 20, 34, .62) 55%, rgba(10, 20, 34, .3) 100%); }
  .hero-actions .btn { width: 100%; }
  .pillar-grid, .pkg-grid, .row2, .pay-choice { grid-template-columns: 1fr; }
  .pkg-tag { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .live-dot { animation: none; }
  .btn:hover { transform: none; }
}
