/* ==========================================================================
   LUNGE by Ofir Levi (demo): main.css
   Plan: clients/lunge/design.md

   Palette from the subject (rubber floor, chalk, concrete, the club's blue neon sign):
     rubber  #1A2026  dark sections + main text on light
     chalk   #F2F2EE  page background
     concrete#DCDDD8  secondary sections
     neon    #7E9CFF  accent on dark only (the blue of the LUNGE neon sign)
     neon-dk #2346C8  accent on light (links, primary button)
     steel   #48525C  secondary text
   Type: Rubik 800 italic (heavy, leaning forward like a lunge) for headlines,
   Assistant for text.

   CONTRAST (WCAG AA): rubber/chalk 15.6:1, steel/chalk 7.5:1, white/neon-dk 7.4:1,
   neon-dk/chalk 6.9:1, chalk/rubber 15.6:1, neon/rubber 6.6:1, fog/rubber 9.4:1.
   ========================================================================== */

:root {
  --rubber: #1A2026;
  --rubber-line: #3A434C;
  --chalk: #F2F2EE;
  --concrete: #DCDDD8;
  --white: #FBFBF8;
  --mane: #7E9CFF;
  --mane-dk: #2346C8;
  --mane-deeper: #1A369E;
  --steel: #48525C;
  --fog: #B9C0C6;
  --line: #C3C6C0;
  --error: #9A1B2B;
  --focus: var(--mane-dk);

  --font-display: "Rubik", "Arial Black", "Arial", sans-serif;
  --font-text: "Assistant", "Arial", sans-serif;

  --step--1: clamp(0.9rem, 0.87rem + 0.1vw, 0.95rem);
  --step-0: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.45vw, 1.55rem);
  --step-2: clamp(1.6rem, 1.3rem + 1vw, 2.2rem);
  --step-3: clamp(2.4rem, 1.6rem + 3.4vw, 4.6rem);
  --step-4: clamp(2.9rem, 1.4rem + 6.4vw, 7.4rem);
  --step-5: clamp(3.4rem, 1rem + 10vw, 11rem);

  --gutter: clamp(1rem, 0.5rem + 3vw, 3rem);
  --header-h: 4rem;
  --radius: 4px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--chalk);
  color: var(--rubber);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.65;
}

img, svg { display: block; max-width: 100%; }
p { margin: 0 0 1em; }

a {
  color: var(--mane-dk);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { text-wrap: balance; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

.container { width: min(100% - 2 * var(--gutter), 78rem); margin-inline: auto; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -10rem;
  inset-inline-start: 1rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--rubber);
  color: var(--chalk);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
  --focus: var(--mane);
}
.skip-link:focus { top: 1rem; }

.demo-bar {
  margin: 0;
  padding: 0.45rem var(--gutter);
  background: var(--mane);
  color: var(--rubber);
  font-size: var(--step--1);
  font-weight: 600;
  text-align: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.7rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font: 700 var(--step-0) / 1.2 var(--font-text);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn:hover { transform: translateX(-3px); } /* a small step forward (RTL) */
.btn--primary { background: var(--mane-dk); color: var(--white); }
.btn--primary:hover { background: var(--mane-deeper); color: var(--white); }
.btn--ghost-light { background: transparent; color: var(--chalk); border-color: currentColor; }
.btn--ghost-light:hover { background: var(--chalk); color: var(--rubber); border-color: var(--chalk); }
.btn--small { min-height: 2.5rem; padding: 0.45rem 1rem; font-size: var(--step--1); }
.btn--big { min-height: 3.75rem; padding: 0.9rem 2rem; font-size: var(--step-1); }

.link-button {
  padding: 0; border: 0; background: none;
  color: inherit; font: inherit;
  text-decoration: underline; text-underline-offset: 0.22em;
  cursor: pointer;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--chalk);
  border-bottom: 1px solid var(--line);
}
.site-header__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  min-height: var(--header-h);
}
.wordmark {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: 1.85rem;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--rubber);
  text-decoration: none;
}
.site-nav { margin-inline-start: auto; }
.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
  margin: 0; padding: 0;
  list-style: none;
}
.site-nav__list a:not(.btn) { color: var(--rubber); text-decoration: none; padding-block: 0.5rem; font-weight: 600; }
.site-nav__list a:not(.btn):hover { text-decoration: underline; }

.nav-toggle,
.motion-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.85rem;
  border: 2px solid var(--rubber);
  border-radius: var(--radius);
  background: transparent;
  color: var(--rubber);
  font: 600 var(--step--1) / 1.2 var(--font-text);
  cursor: pointer;
}
.nav-toggle__icon { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.motion-toggle__icon { width: 1rem; height: 1rem; fill: currentColor; }
.js .motion-toggle { display: inline-flex; }
.motion-toggle[aria-pressed="true"] { background: var(--rubber); color: var(--chalk); }
.motion-toggle[aria-disabled="true"] { cursor: not-allowed; }

@media (max-width: 959.98px) {
  .js .nav-toggle { display: inline-flex; }
  .js .site-nav__list {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--chalk);
    border-bottom: 1px solid var(--line);
  }
  .js .site-nav__list.is-open { display: flex; }
  .js .site-nav__list a:not(.btn) { display: block; padding-block: 0.85rem; border-bottom: 1px solid var(--line); font-size: var(--step-1); }
  .js .site-nav__cta { padding-top: 1rem; }
  .js .site-nav__cta .btn { width: 100%; min-height: 3rem; font-size: var(--step-0); }
}
@media (max-width: 419.98px) {
  .motion-toggle span,
  .nav-toggle span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* ---------- Hero ---------- */
/* Mobile: the photo fills the hero (a 588:1044 frame, centered, cropped at the sides),
   text sits at the bottom over a scrim. Desktop: text on the right, the photo as a tall
   panel on the left over a blurred copy of itself. */
.hero {
  --focus: var(--mane);
  position: relative;
  display: grid;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  overflow: hidden;
  overflow: clip;
  background: var(--rubber);
  color: var(--chalk);
  isolation: isolate;
}
.hero__bg { display: none; }
.hero__inner { display: grid; align-items: end; }
.hero__content { position: relative; z-index: 2; padding-block: 40vh clamp(2rem, 6vw, 3rem); }

.hero__frame {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 0;
  height: 100%;
  min-width: 100%;
  aspect-ratio: 588 / 1044;
  margin: 0;
  transform: translateX(-50%);
}
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* The "lights off" copy: dark and cold. Only the blue neon sign glows on top of it
   (img/neon.webp = the sign's own pixels, cut out of the same photo). */
.hero__img--dark,
.hero__img--neon { display: none; }
.hero__img--dark { filter: brightness(0.13) saturate(0.6) contrast(1.1); }
.hero__img--neon { filter: drop-shadow(0 0 6px #4F6BFF) drop-shadow(0 0 18px rgba(79, 107, 255, 0.7)); }
/* Legibility scrim behind the text on phones (functional, not decoration). */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(26, 32, 38, 0.94) 0%, rgba(26, 32, 38, 0.7) 34%, rgba(26, 32, 38, 0) 62%);
  pointer-events: none;
}

@media (min-width: 900px) {
  .hero::after { display: none; }
  .hero__bg {
    display: block;
    position: absolute;
    inset: -2rem;
    z-index: 0;
    background: url("../img/class-blur.webp") center / cover no-repeat;
    opacity: 0.22;
  }
  .hero__inner {
    position: relative;
    z-index: 1;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
    padding-block: clamp(1.5rem, 4vh, 3rem);
  }
  .hero__content { padding-block: 0; }
  .hero__frame {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    min-width: 0;
    height: min(calc(100svh - var(--header-h) - 6vh), 50rem);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  }
}

.hero__clock {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 700;
  font-size: var(--step-2);
  line-height: 1;
  color: var(--mane);
  font-variant-numeric: tabular-nums;
  direction: ltr;
  text-align: right;
}
.hero__time--before { display: none; }
.hero__title {
  max-width: 13ch;
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: var(--step-4);
  line-height: 0.98;
  letter-spacing: -0.01em;
}
.hero__lead { max-width: 38ch; margin-bottom: 1.75rem; font-size: var(--step-1); line-height: 1.5; color: var(--chalk); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero__hint { display: none; margin: 1.25rem 0 0; font-weight: 600; color: var(--mane); }

/* Staged (class added by js/motion.js while motion is on). */
.hero.is-staged .hero__img--dark,
.hero.is-staged .hero__img--neon { display: block; will-change: opacity; }
.hero.is-staged .hero__time--before { display: inline; }
.hero.is-staged .hero__time--after { display: none; }
.hero.is-staged.is-open .hero__time--before { display: none; }
.hero.is-staged.is-open .hero__time--after { display: inline; }
.hero.is-staged:not(.is-open) .hero__hint { display: block; }

.intro-pending [data-intro] { visibility: hidden; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4rem, 9vw, 8rem); }
.section__title {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: var(--step-3);
  line-height: 1;
}

.stars { color: var(--mane-dk); letter-spacing: 0.08em; }

/* About */
.about__grid { display: grid; gap: 3rem; }
.about__text p { max-width: 48ch; }
.facts { display: grid; gap: 1.25rem; margin: 0; align-content: start; }
.facts__item { padding-top: 1rem; border-top: 2px solid var(--rubber); }
.facts dt { font-size: var(--step--1); font-weight: 700; color: var(--steel); }
.facts dd { margin: 0.2rem 0 0; font-weight: 600; font-size: var(--step-1); line-height: 1.4; }

@media (min-width: 960px) {
  .about__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(3rem, 7vw, 7rem); align-items: start; }
}

/* Coach */
.coach { background: var(--concrete); }
.coach__grid { display: grid; gap: 2.5rem; }
.coach__photo { position: relative; margin: 0; max-width: 30rem; }
.coach__photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.coach__photo figcaption {
  position: absolute;
  inset-inline: 1rem;
  bottom: 1rem;
  padding: 0.6rem 0.9rem;
  border: 1.5px dashed var(--fog);
  border-radius: var(--radius);
  color: var(--chalk);
  font-weight: 600;
  text-align: center;
  background: rgba(26, 32, 38, 0.72);
}
.coach__role { font-size: var(--step-1); font-weight: 700; }
.coach__story { color: var(--steel); max-width: 46ch; }
.coach__quote {
  margin: 2rem 0 0;
  padding-inline-start: 1.25rem;
  border-inline-start: 4px solid var(--mane-dk);
}
.coach__quote p { margin: 0 0 0.5rem; font-size: var(--step-1); line-height: 1.5; max-width: 40ch; }
.coach__quote footer { color: var(--steel); font-size: var(--step--1); font-weight: 600; }

@media (min-width: 860px) {
  .coach__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(3rem, 7vw, 7rem); align-items: center; }
}

/* House rule: the one big typographic moment after the hero */
.rule {
  --focus: var(--mane);
  background: var(--rubber);
  color: var(--chalk);
  padding-block: clamp(5rem, 12vw, 10rem);
}
.rule__title {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: var(--step-5);
  line-height: 0.95;
  color: var(--chalk);
}
.rule__text { max-width: 40ch; margin: 0; font-size: var(--step-1); color: var(--fog); }

/* Reviews */
.reviews__score { font-weight: 700; margin-bottom: 2.5rem; }
.reviews__list { display: grid; gap: 2.5rem; margin: 0; padding: 0; list-style: none; }
.reviews__list blockquote { margin: 0; }
.reviews__list p { margin: 0 0 0.6rem; font-size: var(--step-1); line-height: 1.5; }
.reviews__list footer { font-weight: 700; color: var(--steel); }
.reviews__list li:first-child p { font-size: var(--step-2); line-height: 1.35; font-weight: 600; }

@media (min-width: 900px) {
  .reviews__list { grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); grid-template-rows: auto auto; column-gap: clamp(3rem, 7vw, 7rem); }
  .reviews__list li:first-child { grid-row: span 2; }
}

/* First session */
.start { background: var(--concrete); }
.start__grid { display: grid; gap: 2rem; }
.steps { display: grid; gap: 2rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; padding-top: 1rem; border-top: 2px solid var(--rubber); }
.steps li::before {
  content: counter(step);
  content: counter(step) / "";
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--mane-dk);
  margin-bottom: 0.5rem;
}
.steps h3 { margin: 0 0 0.35rem; font-size: var(--step-1); line-height: 1.3; }
.steps p { margin: 0; color: var(--steel); }

@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
}

/* Visit */
.visit__grid { display: grid; gap: 2rem 3rem; }
.hours { border-collapse: collapse; width: 100%; max-width: 26rem; }
.hours caption { text-align: start; font-size: var(--step-1); font-weight: 700; padding-bottom: 0.5rem; }
.hours th, .hours td { padding-block: 0.7rem; border-bottom: 1px solid var(--line); text-align: start; font-variant-numeric: tabular-nums; }
.hours th { font-weight: 600; padding-inline-end: 1.5rem; }
.visit__block h3 { margin: 0 0 0.5rem; font-size: var(--step-1); line-height: 1.3; }
.visit__block p { margin: 0; }

@media (min-width: 700px) { .visit__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .visit__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

/* ---------- Footer ---------- */
.site-footer {
  --focus: var(--mane);
  background: var(--rubber);
  color: var(--chalk);
  padding-block: 3.5rem 2.5rem;
}
.site-footer a, .site-footer .link-button { color: var(--chalk); }
.site-footer__grid { display: grid; gap: 2rem; }
.wordmark--footer { margin: 0 0 0.5rem; font-size: 3rem; color: var(--chalk); }
.site-footer__links { display: flex; flex-direction: column; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.site-footer__demo {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rubber-line);
  font-size: var(--step--1);
  color: var(--fog);
}
@media (min-width: 800px) { .site-footer__grid { grid-template-columns: minmax(0, 1fr) auto; } }

/* ---------- Legal pages ---------- */
.page-header .site-header__bar { justify-content: space-between; }
.legal { padding-block: clamp(3rem, 6vw, 5rem) clamp(4rem, 8vw, 6rem); }
.legal__body { max-width: 68ch; }
.legal h1 { margin: 0 0 1rem; font-family: var(--font-display); font-style: italic; font-weight: 800; font-size: var(--step-3); line-height: 1; }
.legal h2 { margin: 2.5rem 0 0.75rem; font-size: var(--step-2); line-height: 1.25; }
.legal h3 { margin: 1.75rem 0 0.5rem; font-size: var(--step-1); line-height: 1.3; }
.legal ul { padding-inline-start: 1.25rem; }
.legal li { margin-bottom: 0.4rem; }
.legal .updated { color: var(--steel); }
.ph { padding: 0 0.2em; border-radius: 3px; background: #F1E3B3; color: var(--rubber); }

/* ---------- Cookie consent theme (only when enabled) ---------- */
#cc-main {
  --cc-font-family: var(--font-text);
  --cc-bg: var(--white);
  --cc-primary-color: var(--rubber);
  --cc-secondary-color: var(--steel);
  --cc-btn-primary-bg: var(--mane-dk);
  --cc-btn-primary-color: var(--white);
  --cc-btn-primary-border-color: var(--mane-dk);
  --cc-btn-primary-hover-bg: var(--mane-deeper);
  --cc-btn-primary-hover-color: var(--white);
  --cc-btn-primary-hover-border-color: var(--mane-deeper);
  --cc-btn-secondary-bg: var(--concrete);
  --cc-btn-secondary-color: var(--rubber);
  --cc-btn-border-radius: var(--radius);
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover { transform: none; }
}
.motion-off *, .motion-off *::before, .motion-off *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}
.motion-off .btn:hover { transform: none; }

@media (forced-colors: active) {
  .btn, .motion-toggle, .nav-toggle { border: 2px solid ButtonText; }
  .motion-toggle[aria-pressed="true"] { outline: 2px solid Highlight; }
}
