/* Trainer site layout system.
 *
 * Structure only. Every colour comes from the theme token block in
 * theme-<archetype>.css, generated by scripts/build-themes.js. One layout,
 * nine palettes.
 *
 * The shape follows design/mockups/fullpage: a warm off-white page, a light
 * hero with dark headline type (dark only for the bold archetypes), centred
 * section headings under a small muted eyebrow, circular accent badges holding
 * line icons, alternating tinted bands, quote-mark testimonials, a narrow
 * centred FAQ, and one deep-colour band before the footer.
 *
 * House rules: full-bleed section backgrounds with a centred container, grids
 * that wrap at every width, no sticky anything, no horizontal overflow, no
 * decorative bracket shapes.
 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--page-bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main { flex: 1 0 auto; }
img { max-width: 100%; height: auto; display: block; }

.container { width: min(92%, 1180px); margin-inline: auto; }
.container-narrow { width: min(92%, 760px); margin-inline: auto; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.14; color: var(--text); }
h1 { font-size: clamp(2.25rem, 5.2vw, 3.6rem); font-weight: 800; letter-spacing: -0.025em; margin-bottom: 20px; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; }
h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; }

/* --- buttons --------------------------------------------------------------- */

.btn-primary, .btn-ghost {
  display: inline-block;
  padding: 15px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }

.btn-ghost { background: transparent; color: currentColor; border-color: currentColor; }
.btn-ghost:hover { filter: brightness(0.85); }

/* The nav CTA is an <a> inside .nav-links, so it needs to out-specify the nav
   link colour. This one rule replaces the per-theme override that used to be
   hand-copied into nine files and got it wrong in all nine. */
.nav-links a.btn-primary { color: var(--btn-fg); padding: 11px 24px; font-size: 0.94rem; }

/* --- nav ------------------------------------------------------------------- */

nav { background: var(--nav-bg); }
.nav-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; flex-wrap: wrap; }
.nav-logo { font-family: var(--font-head); color: var(--nav-fg); font-weight: 800; font-size: 1.3rem; text-decoration: none; letter-spacing: -0.015em; }
.nav-links { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.nav-links a { color: var(--nav-link); text-decoration: none; font-weight: 500; font-size: 0.96rem; }
.nav-links a:hover { color: var(--nav-fg); }

/* --- hero ------------------------------------------------------------------ */

/* Full-bleed split hero, the way every mockup does it: copy on a tinted half,
   photograph running hard to the right edge of the viewport and up to the nav.
   No container, no margin, no rounded corner. Boxing the photo into a padded
   rounded card is what made earlier passes read as a template. */
.hero { background: var(--hero-bg); color: var(--hero-fg); display: grid; grid-template-columns: 1fr; align-items: stretch; }
.hero-text { display: flex; align-items: center; padding: clamp(48px, 6vw, 84px) 4vw clamp(52px, 6vw, 88px); }
.hero-copy { width: 100%; max-width: 560px; margin-inline: auto; }
.hero-media { position: relative; min-height: clamp(300px, 46vw, 560px); }
.hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.hero h1 { color: var(--hero-fg); }
.hero-sub { color: var(--hero-sub); font-size: clamp(1.08rem, 1.7vw, 1.28rem); max-width: 46ch; margin-bottom: 34px; line-height: 1.55; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero .btn-ghost { color: var(--hero-fg); }

@media (min-width: 860px) {
  .hero-split { grid-template-columns: 1fr 1fr; }
  /* Right-align the copy block against the photo seam so it lines up with the
     nav's container edge instead of drifting. */
  .hero-split .hero-copy { margin-right: clamp(28px, 4vw, 72px); margin-left: auto; }
}

/* Trust line, not a testimonial. Only ever restates a fact from the profile. */
.hero-trust { display: flex; align-items: center; gap: 9px; margin-top: 26px; color: var(--hero-sub); font-size: 0.98rem; }
.hero-trust svg { color: var(--badge-bg); flex: none; }


/* Photo-free hero. Day one for every prospect is no headshot, so the empty
   half carries a facts card instead of reading as unfinished. */
.hero-facts {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--hero-panel-border);
  border-radius: 18px;
  padding: 32px 34px;
  background: var(--hero-panel);
}
.hero-facts dl { display: grid; gap: 22px; }
.hero-facts dt { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--eyebrow); margin-bottom: 5px; }
.hero-facts dd { font-size: 1.06rem; color: var(--text); line-height: 1.45; }
.theme-challenger .hero-facts dd, .theme-igniter .hero-facts dd, .theme-transformationist .hero-facts dd { color: var(--hero-fg); }
.theme-challenger .hero-facts dt, .theme-igniter .hero-facts dt, .theme-transformationist .hero-facts dt { color: var(--accent); }

/* --- section shell ---------------------------------------------------------- */

.section { padding: clamp(50px, 5.5vw, 78px) 0; }
.section-tint { background: var(--surface); }
.section-deep { background: var(--surface-deep); }
.section-plain { background: #ffffff; }

.section-head { max-width: 58ch; margin: 0 auto clamp(30px, 3.4vw, 44px); text-align: center; }
.section-head.left { margin-inline: 0; text-align: left; }
.section-lead { color: var(--muted); font-size: 1.08rem; }
.section-tint .section-lead, .section-tint .card p, .section-tint .checklist li, .section-tint .step p { color: var(--on-surface-muted); }

.eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--eyebrow);
  margin-bottom: 14px;
}

/* --- circular icon badge (the mockups' signature element) -------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--badge-bg);
  color: var(--badge-fg);
  flex: none;
}
.badge-sm { width: 44px; height: 44px; }

/* --- method columns (icon, title, copy, thin dividers) ----------------------- */

.method { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 40px; }
.method-col { text-align: center; padding: 0 18px; }
.method-col h3 { margin: 20px 0 10px; font-size: 1.3rem; }
.method-col p { color: var(--muted); }
.section-tint .method-col p { color: var(--on-surface-muted); }
@media (min-width: 820px) {
  .method-col + .method-col { border-left: 1px solid var(--border); }
}

/* --- cards ------------------------------------------------------------------ */

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 26px; }

.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 32px 30px; }
.card p { color: var(--muted); }

/* --- split section (copy beside icon rows) ----------------------------------- */

.split { display: grid; grid-template-columns: 1fr; gap: clamp(36px, 5vw, 64px); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } }

.icon-rows { display: grid; gap: 26px; }
.icon-row { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.icon-row h4 { font-family: var(--font-head); font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.icon-row p { color: var(--on-surface-muted); font-size: 0.99rem; }

.checklist { list-style: none; display: grid; gap: 15px; }
.checklist li { display: grid; grid-template-columns: auto 1fr; gap: 13px; align-items: start; color: var(--muted); }
.checklist svg { color: var(--badge-bg); margin-top: 3px; flex: none; }

/* --- phased steps ------------------------------------------------------------ */

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 34px; }
.step { text-align: center; }
.step-label { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; color: var(--eyebrow); margin: 18px 0 6px; }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); }

/* --- services ----------------------------------------------------------------- */

.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 26px; }
.service-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 34px 30px; display: flex; flex-direction: column; text-align: center; align-items: center; overflow: hidden; }
/* A photo card loses its own padding: the image goes edge to edge under the
   rounded corner, the way the programme cards do in the mockups. */
.service-card.has-photo { padding: 0; }
.service-photo { width: 100%; aspect-ratio: 19 / 14; object-fit: cover; }
.service-body { padding: 28px 28px 32px; display: flex; flex-direction: column; align-items: center; width: 100%; flex: 1; }
.service-card.has-photo .service-price { margin-top: 6px; }
.service-price { font-family: var(--font-head); font-size: 2rem; font-weight: 800; margin: 12px 0 4px; }
.service-duration { color: var(--muted); font-size: 0.95rem; margin-bottom: 26px; }
.service-card .btn-primary { margin-top: auto; }
.service-body .btn-primary { margin-top: auto; }
.about-portrait { object-fit: cover; aspect-ratio: 19 / 22; }
.empty-state { color: var(--muted); text-align: center; }

/* --- testimonials (only when the trainer supplies real ones) ------------------ */

.quote-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 16px; padding: 30px 30px 28px; }
.quote-mark { font-family: Georgia, serif; font-size: 3.4rem; line-height: 0.7; color: var(--accent); display: block; margin-bottom: 12px; }
.quote-card blockquote { font-size: 1.04rem; color: var(--muted); }
.quote-card cite { display: block; margin-top: 20px; font-style: normal; font-weight: 700; font-size: 0.95rem; color: var(--text); }
.quote-card .cite-detail { display: block; font-weight: 400; color: var(--muted); font-size: 0.89rem; margin-top: 2px; }

/* --- meet your coach ---------------------------------------------------------- */

.about-coach { display: grid; grid-template-columns: 1fr; gap: clamp(30px, 4vw, 54px); align-items: center; }
@media (min-width: 900px) { .about-coach { grid-template-columns: 0.8fr 1.2fr; } }
.about-portrait { width: 100%; max-width: 420px; border-radius: 18px; }
.about-body p { color: var(--on-surface-muted); font-size: 1.05rem; }
.about-body p + p { margin-top: 18px; }
.about-body .btn-primary { margin-top: 28px; }

/* --- FAQ (native disclosure, no JavaScript) ----------------------------------- */

.faq details { background: var(--card-bg); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 52px 20px 24px;
  font-weight: 600;
  font-size: 1.02rem;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--eyebrow);
  border-bottom: 2px solid var(--eyebrow);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s ease;
}
.faq details[open] summary::after { transform: translateY(-25%) rotate(225deg); }
.faq details p { padding: 0 52px 22px 24px; color: var(--muted); }

/* --- closing band --------------------------------------------------------------- */

.cta-band { background: var(--band-bg); color: var(--band-fg); padding: clamp(52px, 6vw, 76px) 0; text-align: center; }
.cta-band h2 { color: var(--band-fg); max-width: 20ch; margin-inline: auto; }
.cta-band p { color: var(--band-sub); max-width: 54ch; margin: 0 auto 34px; font-size: 1.08rem; }

/* --- interior page headers ------------------------------------------------------ */

.page-header { background: var(--surface); padding: clamp(48px, 6vw, 78px) 0 clamp(40px, 5vw, 62px); text-align: center; }
.page-header p { color: var(--on-surface-muted); max-width: 58ch; margin: 14px auto 0; font-size: 1.06rem; }

.prose { max-width: 68ch; }
.prose p { color: var(--muted); font-size: 1.07rem; }
.prose p + p { margin-top: 20px; }

.meta-list { list-style: none; display: grid; gap: 20px; }
.meta-label { display: block; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--eyebrow); margin-bottom: 3px; }
.meta-value { font-size: 1.04rem; }

.centered-cta { text-align: center; max-width: 56ch; margin-inline: auto; }
.centered-cta p { color: var(--muted); font-size: 1.12rem; margin-bottom: 34px; }

/* --- footer ---------------------------------------------------------------------- */

footer { margin-top: auto; background: var(--band-bg); color: var(--band-fg); padding: clamp(48px, 5vw, 68px) 0 30px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 38px; }
.footer-brand { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; margin-bottom: 10px; color: var(--band-fg); }
.footer-col h4 { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--band-fg); opacity: 0.75; margin-bottom: 15px; }
.footer-col ul { list-style: none; display: grid; gap: 11px; }
.footer-col a, .footer-col p { color: var(--band-sub); text-decoration: none; font-size: 0.97rem; }
.footer-col a:hover { color: var(--band-fg); text-decoration: underline; }
.footer-cta { border: 1px solid rgba(255, 255, 255, 0.26); border-radius: 16px; padding: 26px 24px; }
.footer-cta p { margin-bottom: 18px; }
.footer-bottom { margin-top: 44px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.2); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--band-sub); font-size: 0.9rem; }

/* --- small screens ----------------------------------------------------------------- */

@media (max-width: 640px) {
  .nav-inner { gap: 14px; }
  .nav-links { gap: 18px; width: 100%; }
  .hero h1 { max-width: none; }
  .hero-facts { padding: 26px; }
  .method-col { padding: 0; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
