/* =========================================================
   Wholesome Fitness, Homepage stylesheet
   Companion to tokens.css. BEM class naming.
   Breakpoints: 640px (tablet), 1024px (desktop)
   ========================================================= */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  font-family: var(--font-sans);
  color: var(--page-fg);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  transition: background 240ms var(--ease-out), color 240ms var(--ease-out);
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: underline; text-underline-offset: 0.2em; }
a:hover { color: var(--accent-hover); }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 640px) { .container { padding: 0 32px; } }
@media (min-width: 1024px) { .container { padding: 0 48px; } }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-weight: 700;
  font-size: var(--vibe-cta-size);
  padding: var(--vibe-cta-pad-y) 24px;
  border: 0; border-radius: var(--vibe-card-radius); line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer;
  white-space: nowrap;
  transition: background 180ms var(--ease-out), color 120ms, border-color 120ms, transform 80ms;
}
.button:active { transform: translateY(1px); }
.button--primary { background: var(--accent); color: var(--accent-fg); }
.button--primary:hover { background: var(--accent-hover); color: var(--accent-fg); }
.button--secondary {
  background: transparent; color: var(--fg-strong);
  border: 1px solid var(--border-strong);
}
.button--secondary:hover { background: var(--surface-muted); border-color: var(--fg-strong); }
.button--ghost { background: transparent; color: var(--accent); padding: var(--vibe-cta-pad-y) 8px; }
.button--ghost:hover { color: var(--accent-hover); }
.button--accent-ring {
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.button--accent-ring:hover {
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.button--lg { padding: calc(var(--vibe-cta-pad-y) + 4px) 32px; font-size: calc(var(--vibe-cta-size) + 2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; gap: 16px;
}
.site-header__brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--fg-strong);
}
.site-header__brand img { height: 32px; }
[data-theme="dark"] .site-header__brand img { filter: brightness(0) invert(1); }
.site-header__brand-name { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; }
.site-header__nav { display: none; gap: 28px; }
.site-header__nav a {
  color: var(--fg-strong); text-decoration: none;
  font-weight: 600; font-size: 14px;
  transition: color 120ms var(--ease-out);
}
.site-header__nav a:hover { color: var(--accent); }
.site-header__actions { display: flex; gap: 8px; align-items: center; }
@media (min-width: 1024px) {
  .site-header__nav { display: flex; }
  .site-header__sign-in { display: inline-flex; }
}

/* ---------- Vibe / theme switcher ---------- */
/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: var(--vibe-hero-pad-y) 0 calc(var(--vibe-hero-pad-y) - 32px);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: 1.15fr 1fr; gap: 64px; }
}
.hero__eyebrow {
  font-size: 12px; font-weight: 700;
  letter-spacing: var(--vibe-eyebrow-spacing);
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 20px;
}
.hero__title {
  font-size: clamp(44px, 8vw, var(--vibe-hero-display));
  line-height: 1.0; font-weight: 700;
  letter-spacing: var(--vibe-hero-tracking);
  margin: 0 0 20px;
  color: var(--fg-strong);
  text-wrap: balance;
}
.hero__title em {
  font-style: var(--vibe-hero-italic);
  color: var(--vibe-hero-italic-color);
  font-weight: 700;
}
.hero__sub {
  font-size: clamp(16px, 2vw, 20px); line-height: 1.5;
  color: var(--fg-muted);
  max-width: 52ch; margin: 0 0 32px;
  text-wrap: pretty;
}
.hero__ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__stats {
  display: var(--vibe-stat-display);
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px; padding-top: 32px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.hero__stat-num {
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700; line-height: 1;
  letter-spacing: -0.02em;
  color: var(--fg-strong);
}
[data-vibe="performance"] .hero__stat-num { font-variant-numeric: tabular-nums; }
.hero__stat-label {
  font-size: 13px; color: var(--fg-muted); margin-top: 6px;
}
.hero__visual {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--vibe-card-radius);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 55%),
    linear-gradient(45deg, var(--accent-hover) 0%, #2D343B 100%);
  isolation: isolate;
}
.hero__visual::before {
  content: ""; position: absolute; inset: 0;
  background-image: url("./assets/logo-mark.png");
  background-repeat: no-repeat;
  background-position: center 55%;
  background-size: 75% auto;
  opacity: 0.22;
  filter: brightness(0) invert(1);
}
.hero__visual-tag {
  position: absolute; left: 24px; bottom: 24px; z-index: 2; color: #fff;
}
.hero__visual-tag-eyebrow {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85;
}
.hero__visual-tag-title {
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 700; letter-spacing: -0.01em; margin-top: 4px;
}

/* ---------- Section scaffolding ---------- */
.section {
  padding: var(--vibe-section-pad-y) 0;
}
.section--muted { background: var(--surface-muted); }
.section__head {
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}
@media (min-width: 1024px) {
  .section__head { flex-direction: row; align-items: flex-end; }
}
.section__eyebrow {
  font-size: 12px; font-weight: 700;
  letter-spacing: var(--vibe-eyebrow-spacing);
  text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.section__title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.05;
  margin: 0; max-width: 18ch;
  color: var(--fg-strong);
  text-wrap: balance;
}

/* ---------- Class cards ---------- */
.classes {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--vibe-grid-gap);
}
@media (min-width: 640px) { .classes { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .classes { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .classes--four { grid-template-columns: repeat(4, 1fr); } }
.class-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--vibe-card-radius);
  padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  transition: box-shadow 180ms var(--ease-out), border-color 120ms;
}
.class-card:hover {
  box-shadow: var(--shadow-card-hi);
  border-color: var(--border-strong);
}
.class-card__eyebrow {
  font-size: 11px; font-weight: 700;
  letter-spacing: var(--vibe-eyebrow-spacing);
  text-transform: uppercase; color: var(--accent);
}
.class-card__title {
  font-size: 22px; font-weight: 700; line-height: 1.15; margin: 0;
  color: var(--fg-strong);
}
.class-card__desc {
  font-size: 15px; color: var(--fg-muted); margin: 0; line-height: 1.45;
}
.class-card__meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px; color: var(--fg-muted); font-weight: 600;
}
[data-vibe="performance"] .class-card__meta { font-variant-numeric: tabular-nums; }

@media (min-width: 640px) {
  .schedule__row { grid-template-columns: 80px 1.5fr 1fr 100px 130px; padding: 16px 20px; }
}
@media (min-width: 640px) { .schedule__row--head { display: grid; } }
@media (min-width: 640px) { .schedule__coach { display: block; } }
@media (min-width: 640px) { .schedule__cta { display: flex; justify-content: flex-end; } }
@media (min-width: 1024px) { .pricing { grid-template-columns: 1fr 1fr 1fr; } }
/* ---------- CTA band ---------- */
.cta-band {
  background: var(--vibe-band-bg); color: var(--vibe-band-fg);
  padding: clamp(56px, 8vw, 88px) 0;
  position: relative; overflow: hidden;
}
.cta-band__inner {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 24px; position: relative; z-index: 1;
}
@media (min-width: 1024px) {
  .cta-band__inner { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; }
}
.cta-band__title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700; line-height: 1.05; letter-spacing: -0.02em;
  margin: 0; max-width: 16ch; text-wrap: balance;
  color: var(--vibe-band-fg);
}
.cta-band__bg {
  position: absolute; right: -100px; top: 50%;
  transform: translateY(-50%);
  width: 480px; height: 480px;
  background-image: url("./assets/logo-mark.png");
  background-repeat: no-repeat; background-size: contain; background-position: center;
  opacity: 0.08;
  filter: brightness(0) invert(1);
  pointer-events: none;
}
[data-vibe="editorial"] .cta-band__bg,
[data-vibe="performance"] .cta-band__bg { display: none; }
.cta-band .button--primary {
  background: var(--vibe-band-fg);
  color: var(--vibe-band-bg);
}
.cta-band .button--primary:hover {
  background: var(--vibe-band-fg);
  color: var(--vibe-band-bg);
  opacity: 0.88;
}

/* ---------- Testimonial ---------- */
.testimonial {
  max-width: 920px;
}
.testimonial__quote {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  font-style: var(--vibe-hero-italic);
  line-height: 1.15; letter-spacing: -0.01em;
  margin: 0 0 24px;
  color: var(--fg-strong);
  text-wrap: balance;
}
.testimonial__attribution {
  font-size: 14px; color: var(--fg-muted); font-weight: 600;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--surface-inverse);
  color: var(--fg-on-inverse);
  padding: 64px 0 32px;
}
.site-footer__grid {
  display: grid; grid-template-columns: 1fr; gap: 32px;
}
@media (min-width: 640px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .site-footer__grid { grid-template-columns: 2fr repeat(auto-fit, minmax(160px, 1fr)); gap: 48px; }
}
.site-footer__brand img { height: 48px; }
[data-theme="light"] .site-footer__brand img,
:root:not([data-theme="dark"]) .site-footer__brand img { filter: brightness(0) invert(1); }
.site-footer__tagline {
  margin-top: 16px; max-width: 32ch;
  font-size: 14px; opacity: 0.8; line-height: 1.5;
}
.site-footer__col-title {
  font-size: 12px; font-weight: 700;
  letter-spacing: var(--vibe-eyebrow-spacing); text-transform: uppercase;
  opacity: 0.7; margin: 0 0 16px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer a {
  color: var(--fg-on-inverse); text-decoration: none;
  font-size: 14px; opacity: 0.85;
}
.site-footer a:hover { opacity: 1; color: var(--accent); }
.site-footer__legal {
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex; flex-direction: column; gap: 12px;
  justify-content: space-between;
  font-size: 13px; opacity: 0.6;
}
.site-footer__legal-links {
  display: block; line-height: 1.8;
  font-size: 13px; opacity: 0.85;
  width: 100%;
}
.site-footer__legal-links a {
  color: var(--fg-on-inverse); text-decoration: none;
  font-size: 13px; opacity: 1;
}
.site-footer__legal-links a:hover { text-decoration: underline; color: var(--accent); }
.site-footer__legal-links a:not(:last-child)::after {
  content: " · ";
  margin: 0 6px;
  opacity: 0.5;
}
[data-theme="dark"] .site-footer__legal { border-top-color: rgba(255,255,255,0.08); }
@media (min-width: 640px) { .site-footer__legal { flex-direction: row; flex-wrap: wrap; align-items: center; } }

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