/* ─────────────────────────────────────────────
   GymSync — styles
   Palette: near-black base, warm off-white text, one accent (signal lime)
   ───────────────────────────────────────────── */
:root {
  --bg: #0e0e0c;
  --bg-2: #171714;
  --line: #2a2a25;
  --text: #f1efe8;
  --muted: #a3a194;
  --accent: #d4ff3a;
  --accent-ink: #0e0e0c;
  --nav-h: 72px;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --display: "Anton", "Arial Narrow", Impact, sans-serif;
  --body: "Archivo", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.6 var(--body); overflow-x: hidden;
}
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
h1, h2 { font-family: var(--display); text-transform: uppercase; line-height: .98; letter-spacing: .005em; }
h2 { font-size: clamp(2.4rem, 6vw, 5rem); }
p { margin: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; font: 600 .95rem/1 var(--body); text-decoration: none;
  border: 1px solid transparent; border-radius: 4px; cursor: pointer;
  transition: transform .35s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: #e4ff7a; }
.btn--ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--text); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ── Nav ── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; gap: 32px; padding: 0 var(--gutter);
  transition: background .35s, border-color .35s, transform .5s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: var(--bg); border-color: var(--line); }
.nav__logo { display: block; flex: none; line-height: 0; }
.nav__logo img { display: block; height: 28px; width: auto; }
.nav__links { position: relative; display: flex; gap: 4px; margin-left: auto; }
.nav__links a {
  position: relative; padding: 10px 12px; font-size: .92rem; font-weight: 500; text-decoration: none; color: var(--muted);
  transition: color .25s;
}
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__indicator {
  position: absolute; bottom: 2px; left: 0; height: 2px; width: 0; background: var(--accent);
  transition: transform .5s var(--ease), width .5s var(--ease), opacity .3s; opacity: 0;
}
.nav__cta { padding: 11px 18px; white-space: nowrap; }
.nav__status { margin: 0 0 0 8px; font-size: .82rem; color: var(--muted); white-space: nowrap; }
.nav__status b { font-weight: 600; color: var(--text); }
.nav__status::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; background: var(--muted); vertical-align: 1px; }
.nav__status.is-open::before { background: var(--accent); }
.nav__burger { display: none; margin-left: auto; width: 44px; height: 44px; background: none; border: 0; cursor: pointer; position: relative; }
.nav__burger span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--text); transition: transform .4s var(--ease), top .4s var(--ease); }
.nav__burger span:first-child { top: 17px; }
.nav__burger span:last-child { top: 25px; }
.nav__burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ── Sections ── */
.section { padding: clamp(80px, 12vw, 150px) var(--gutter); scroll-margin-top: var(--nav-h); }
.section__head { max-width: 900px; margin-bottom: clamp(40px, 6vw, 72px); }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }

/* ── Hero: asymmetric, editorial. Live "Up next" panel = the real booking product ── */
.hero {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto 1fr;
  column-gap: clamp(32px, 5vw, 80px); padding: calc(var(--nav-h) + 24px) var(--gutter) clamp(64px, 9vw, 120px);
  border-bottom: 1px solid var(--line);
}
/* Text sits in row 1 only, centred against the photo, so the Up next panel loading (row 2) never moves it. */
.hero__text { grid-column: 1; grid-row: 1; align-self: center; }
.hero__where { font-size: .9rem; color: var(--muted); margin-bottom: 28px; }
.hero__title { font-size: clamp(3.4rem, 9.5vw, 9.5rem); line-height: .96; margin-bottom: 36px; max-width: 9ch; }
.hero__lead { max-width: 470px; font-size: 1.1rem; color: #d6d4cb; margin-bottom: 36px; }
.hero__actions { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
/* Photo bleeds off the right edge; shows the class that's up next (hovering an Up next row swaps it).
   One black-and-white treatment so stock photos with clashing colours read as one set. */
.hero__photo { grid-column: 2; grid-row: 1; position: relative; margin: 0 calc(-1 * var(--gutter)) 0 0; min-height: clamp(440px, 74vh, 780px); overflow: hidden; background: #000; }
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%;
  filter: grayscale(1) contrast(1.15) brightness(.92); opacity: 0; transform: scale(1.05);
  transition: opacity .7s ease, transform 1.4s var(--ease);
}
.hero__img.is-on { opacity: 1; transform: none; }
.hero__cap {
  position: absolute; top: 0; right: 0; display: flex; gap: 14px; align-items: center;
  writing-mode: vertical-rl; white-space: nowrap; padding: 22px 14px; background: var(--bg);
}
.hero__cap:empty { display: none; }
.hero__cap b { font: 400 clamp(1.9rem, 3.2vw, 3.1rem)/1 var(--display); text-transform: uppercase; font-weight: 400; }
.hero__cap span { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.upnext { grid-column: 2; grid-row: 2; margin: -64px 68px 0 -48px; /* right: clear of the floating buttons (52px + 16px) */ background: var(--bg); border: 1px solid var(--line); padding: 22px 24px 10px; position: relative; }
.upnext__title { font: 600 .78rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.upnext__title span { color: var(--text); letter-spacing: normal; text-transform: none; font-weight: 500; }
.upnext__list { list-style: none; margin: 0; padding: 0; }
.upnext__list li { display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.upnext__list li:first-child { border-top: 0; }
.upnext__list li[data-cls] { transition: padding .3s var(--ease); }
.upnext__list li.is-hot { padding-left: 10px; box-shadow: inset 2px 0 0 var(--accent); }
.upnext__time { font: 400 1.25rem/1 var(--display); }
.upnext__class { font-weight: 600; font-size: .95rem; line-height: 1.25; }
.upnext__class small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.upnext__empty { display: block !important; color: var(--muted); font-size: .92rem; }
.upnext .btn { padding: 8px 12px; font-size: .85rem; }

.link-arrow { font-weight: 600; font-size: .95rem; text-decoration: none; border-bottom: 1px solid var(--muted); padding-bottom: 3px; transition: border-color .2s, color .2s; }
.link-arrow::after { content: " →"; display: inline-block; transition: transform .25s var(--ease); }
.link-arrow:hover { border-color: var(--accent); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ── About ── */
.about { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 7vw, 110px); align-items: center; }
.about__text h2 { margin-bottom: 28px; }
.about__text > p:not(.eyebrow) { color: var(--muted); max-width: 480px; }
.about__list { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 14px; }
.about__list li { padding: 16px 0; border-top: 1px solid var(--line); color: var(--muted); }
.about__list b { color: var(--text); font-weight: 600; }
.about__media { position: relative; min-height: 560px; }
.about__img { position: absolute; margin: 0; overflow: hidden; }
.about__img img { width: 100%; height: 100%; object-fit: cover; }
.about__img--a { inset: 0 18% 22% 0; }
.about__img--b { inset: 48% 0 0 40%; border: 8px solid var(--bg); }

/* ── Classes ── */
.classes__list { border-top: 1px solid var(--line); }
.class-row {
  position: relative; display: grid; grid-template-columns: 70px 1.2fr 1.6fr 140px 150px; gap: 24px; align-items: center;
  padding: 28px 0; border-bottom: 1px solid var(--line); cursor: default;
}
.class-row__num { font: 400 1.1rem/1 var(--display); color: var(--muted); }
.class-row__name { font: 400 clamp(1.8rem, 3.4vw, 2.8rem)/1 var(--display); text-transform: uppercase; transition: color .3s, transform .5s var(--ease); }
.class-row:hover .class-row__name { color: var(--accent); transform: translateX(8px); }
.class-row__desc { color: var(--muted); font-size: .96rem; }
.class-row__meta { font-size: .85rem; color: var(--muted); }
.class-row__meta b { display: block; color: var(--text); font-weight: 600; font-size: 1rem; }
.class-row__img { width: 150px; height: 100px; overflow: hidden; border-radius: 3px; }
.class-row__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.class-row:hover .class-row__img img { transform: scale(1.08); }

/* ── Schedule ── */
.schedule { background: var(--bg-2); }
.schedule__note { color: var(--muted); max-width: 320px; }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 28px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day {
  flex: 0 0 auto; min-width: 84px; padding: 12px 16px; text-align: left; cursor: pointer;
  background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; font: 500 .85rem/1.2 var(--body);
  transition: background .25s, color .25s, border-color .25s;
}
.day b { display: block; font: 400 1.5rem/1.1 var(--display); color: var(--text); }
.day:hover { border-color: var(--muted); }
.day[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.day[aria-selected="true"] b { color: var(--accent-ink); }
.slots { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.slot {
  display: grid; grid-template-columns: 110px 1fr 1fr 140px 110px; gap: 20px; align-items: center;
  padding: 20px 0; border-bottom: 1px solid var(--line);
  animation: slotIn .6s var(--ease) both; animation-delay: calc(var(--i) * 60ms);
}
@keyframes slotIn { from { opacity: 0; transform: translateY(16px); } }
.slot__time { font: 400 1.5rem/1 var(--display); }
.slot__class { font-weight: 600; }
.slot__coach, .slot__spots { color: var(--muted); font-size: .92rem; }
.slot__spots.is-low { color: #ffb84d; }
.slot__spots.is-full { color: #ff6b5b; }
.slot .btn { padding: 10px 16px; }
.slot .btn--accent, .upnext .btn--accent { background: transparent; color: var(--text); border-color: var(--muted); }
.slot .btn--accent:hover, .upnext .btn--accent:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ── Trainers ── */
.trainers__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.trainer:nth-child(even) { margin-top: 60px; }
.trainer__img { aspect-ratio: 3 / 4; overflow: hidden; margin-bottom: 18px; border-radius: 3px; }
.trainer__img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.35); transition: filter .5s, transform .9s var(--ease); }
.trainer:hover .trainer__img img { filter: none; transform: scale(1.05); }
.trainer h3 { font: 400 1.6rem/1.1 var(--display); text-transform: uppercase; }
.trainer p { color: var(--muted); font-size: .92rem; }

/* ── Pricing: a price list, not a card grid ── */
.prices { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--text); max-width: 1100px; }
.price { display: grid; grid-template-columns: 220px 1fr 200px 190px; gap: 28px; align-items: baseline; padding: 30px 0; border-bottom: 1px solid var(--line); }
.price__name { font: 400 2rem/1 var(--display); text-transform: uppercase; }
.price__what { color: var(--muted); max-width: 440px; }
.price__amount { font: 400 2rem/1 var(--display); }
.price__amount small { display: block; margin-top: 8px; font: 500 .82rem var(--body); color: var(--muted); }
.price .link-arrow { justify-self: end; }
.prices__note { margin-top: 24px; color: var(--muted); font-size: .9rem; }

/* ── Booking ── */
.book { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(40px, 7vw, 110px); align-items: start; }
.book__intro h2 { margin-bottom: 24px; }
.book__intro > p:not(.eyebrow) { color: var(--muted); max-width: 420px; }
.book__img { margin: 40px 0 0; aspect-ratio: 4 / 3; overflow: hidden; max-width: 460px; border-radius: 3px; }
.book__img img { width: 100%; height: 100%; object-fit: cover; }
.form, .confirm { background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: clamp(24px, 4vw, 44px); display: grid; gap: 20px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > span, .field legend { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 8px; }
.field > span { margin-bottom: 0; }
.field input, .field select {
  width: 100%; padding: 14px 14px; font: 500 1rem var(--body); color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px; transition: border-color .25s;
  color-scheme: dark;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field input.is-invalid, .field select.is-invalid { border-color: #ff6b5b; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips__empty { color: var(--muted); font-size: .92rem; }
.chip {
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--text);
  font: 600 .92rem var(--body); cursor: pointer; transition: all .25s var(--ease);
  animation: slotIn .45s var(--ease) both; animation-delay: calc(var(--i) * 40ms);
}
.chip small { display: block; font-weight: 500; font-size: .72rem; color: var(--muted); }
.chip:hover:not([disabled]) { border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip[aria-pressed="true"] small { color: var(--accent-ink); }
.chip[disabled] { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.form__error { min-height: 1.2em; color: #ff6b5b; font-size: .9rem; }
.confirm { text-align: left; animation: slotIn .7s var(--ease) both; }
.confirm h3 { font: 400 clamp(2rem, 4vw, 3rem)/1 var(--display); text-transform: uppercase; }
.confirm p:not(.eyebrow) { color: var(--muted); }
.confirm__code b { color: var(--accent); font: 400 1.6rem var(--display); letter-spacing: .06em; margin-left: 8px; }
.confirm .btn { justify-self: start; }

/* ── Footer ── */
.footer { padding: clamp(80px, 12vw, 140px) var(--gutter) 32px; border-top: 1px solid var(--line); scroll-margin-top: var(--nav-h); }
.footer__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 72px; }
.footer__top h2 { font-size: clamp(3rem, 9vw, 8rem); }
.footer__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; padding: 32px 0; border-top: 1px solid var(--line); }
.footer h4 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; font-weight: 600; }
.footer__grid p { color: var(--muted); }
.footer__grid a { text-decoration: none; }
.footer__grid a:hover { color: var(--accent); }
.footer__legal { margin-top: 32px; font-size: .82rem; color: var(--muted); }

/* ── Floating contact buttons (bottom right): Book · WhatsApp · Call ──
   Square like the rest of the site (4px radius), no shadow / bounce / glow. Lime only on Book (primary action).
   Labels slide in on hover/focus (desktop); phones show icons only. Book hides while #book is on screen (main.js §4). */
.fab-stack { position: fixed; right: var(--gutter); bottom: 24px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
/* Only the square icon takes the pointer: the hidden label must not swallow clicks on content underneath */
.fab { display: flex; align-items: center; text-decoration: none; transition: opacity .3s, visibility .3s; }
.fab__icon { pointer-events: auto; }
.fab.is-hidden { opacity: 0; visibility: hidden; }
.fab__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 4px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text); transition: background .2s, border-color .2s, transform .2s var(--ease); }
.fab:hover .fab__icon { transform: translateY(-2px); border-color: var(--text); }
.fab__icon--accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.fab:hover .fab__icon--accent { background: #e4ff7a; border-color: #e4ff7a; }
.fab__icon--wa { background: #1f7a4a; color: #fff; border-color: #1f7a4a; }
.fab:hover .fab__icon--wa { background: #238a54; border-color: #238a54; }
.fab__label { margin-right: 10px; padding: 8px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px; color: var(--text); font-size: .85rem; font-weight: 600; white-space: nowrap; opacity: 0; transform: translateX(6px); pointer-events: none; transition: opacity .25s, transform .25s var(--ease); }
.fab:hover .fab__label, .fab:focus-visible .fab__label { opacity: 1; transform: none; }
.fab:focus-visible { outline: none; }
.fab:focus-visible .fab__icon { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ─────────────────────────────────────────────
   Motion — kept deliberately small
   .split       : hero headline only, words rise once on load
   .reveal      : section headings, short fade-up once
   .reveal-img  : images fade in once (no wipe/zoom)
   Useful motion stays: animated nav scroll, active-link indicator, slot/chip feedback, hovers.
   ───────────────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.split .w > span { display: inline-block; }
.js .split .w > span { transform: translateY(105%); transition: transform .8s var(--ease); transition-delay: calc(var(--i) * 45ms); }
.js .split.is-in .w > span { transform: none; }

.js .reveal-img { opacity: 0; transition: opacity .7s ease; }
.js .reveal-img.is-in { opacity: 1; }

/* ── Responsive ── */
@media (max-width: 1080px) {
  .price { grid-template-columns: 170px 1fr 170px; }
  .price .link-arrow { grid-column: 2 / -1; justify-self: start; }
  .nav__status { display: none; }
  .class-row { grid-template-columns: 50px 1fr 120px; }
  .class-row__desc, .class-row__img { display: none; }
  .trainers__grid { grid-template-columns: repeat(2, 1fr); }
  .slot { grid-template-columns: 90px 1fr 1fr 100px; }
  .slot__coach { display: none; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; grid-template-rows: none; row-gap: 40px; }
  .hero__text, .hero__photo, .upnext { grid-column: 1; grid-row: auto; }
  .hero__photo { height: auto; min-height: 0; aspect-ratio: 4 / 5; max-height: 80vh; margin: 0 calc(-1 * var(--gutter)); }
  .hero__cap { padding: 16px 10px; gap: 10px; }
  .hero__cap b { font-size: 1.9rem; }
  .upnext { margin: -72px 0 0 20px; }
  .price { grid-template-columns: 1fr auto; gap: 10px 20px; }
  .price__what { grid-column: 1 / -1; grid-row: 2; }
  .price__amount { grid-row: 1; grid-column: 2; text-align: right; }
  .price .link-arrow { grid-column: 1 / -1; }
  .nav__cta { display: none; }
  .nav__burger { display: block; }
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; gap: 0; padding: 12px var(--gutter) 28px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    clip-path: inset(0 0 100% 0); transition: clip-path .55s var(--ease); visibility: hidden;
  }
  .nav__links.is-open { clip-path: inset(0 0 0 0); visibility: visible; }
  .nav__links a { font: 400 1.8rem/1 var(--display); text-transform: uppercase; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav__indicator { display: none; }
  .nav { background: var(--bg); }
  .about, .book { grid-template-columns: 1fr; }
  .about__media { min-height: 420px; }
  .footer__grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .upnext { margin: -56px 0 0 12px; padding: 18px 16px 6px; }
  .upnext__list li { grid-template-columns: 64px 1fr auto; gap: 10px; }
  body { font-size: 16px; }
  .form__row { grid-template-columns: 1fr; }
  .trainers__grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .trainer:nth-child(even) { margin-top: 32px; }
  .slot { grid-template-columns: 70px 1fr auto; gap: 12px; }
  .slot__spots { grid-column: 2; grid-row: 2; font-size: .82rem; }
  .slot .btn { grid-column: 3; grid-row: 1 / span 2; }
  .slot__time { font-size: 1.2rem; }
  .about__media { min-height: 340px; }
  .fab-stack { bottom: 16px; }
  .footer { padding-bottom: 196px; } /* page end scrolls clear of the 3 floating buttons (3×48 + gaps + 16) */
  .fab__icon { width: 48px; height: 48px; }
  .fab__label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
}
