/* ICON — secciones de página */

.section { padding-block: clamp(80px, 12vw, 180px); position: relative; }
.on-bone { background: var(--bone); color: var(--ink); }
.on-bone em { color: var(--ink); background: var(--volt); padding: 0 0.08em; }
.sec-head { display: grid; grid-template-columns: 1fr; gap: 0 48px; margin-bottom: clamp(40px, 6vw, 80px); }
.sec-head .eyebrow { grid-column: 1 / -1; }
.sec-head__aside { max-width: 42ch; color: var(--muted); margin-top: 24px; }
.on-bone .sec-head__aside { color: var(--muted-on-bone); }
@media (min-width: 900px) {
  .sec-head { grid-template-columns: 1.6fr 1fr; align-items: end; }
  .sec-head__aside { margin: 0 0 0.6em; }
}

/* Hero ----------------------------------------------------------------- */
.hero {
  position: relative; min-height: min(88svh, 940px); display: grid; align-items: end; overflow: hidden;
  padding-top: calc(var(--header-h) + 40px); isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; transform-origin: 50% 40%; }
.motion .hero__img { animation: hero-zoom 2.2s var(--ease-out) both; }
.intro:not(.intro-out) .hero__img { animation-play-state: paused; }
@keyframes hero-zoom { from { transform: scale(1.14); filter: brightness(0.4); } to { transform: scale(1); filter: none; } }
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(11, 11, 10, 0.55) 0%, rgba(11, 11, 10, 0) 28%),
    linear-gradient(0deg, rgba(11, 11, 10, 0.96) 6%, rgba(11, 11, 10, 0.55) 45%, rgba(11, 11, 10, 0.15) 75%),
    linear-gradient(90deg, rgba(11, 11, 10, 0.55), rgba(11, 11, 10, 0) 60%);
}
.hero__content { padding-bottom: clamp(32px, 5vw, 64px); }
.hero__eyebrow { color: var(--bone); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--volt); box-shadow: 0 0 0 0 rgba(208, 255, 113, 0.6); }
.motion .dot { animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 12px rgba(208, 255, 113, 0); } 100% { box-shadow: 0 0 0 0 rgba(208, 255, 113, 0); } }
.hero__title {
  font-family: var(--display); text-transform: uppercase; font-size: clamp(3.3rem, 8.4vw, 8.6rem);
  line-height: 0.88; letter-spacing: 0.004em; margin-bottom: clamp(20px, 2.4vw, 32px);
}
.hero__foot { display: grid; gap: 24px; align-items: end; }
.hero__lead { max-width: 46ch; font-size: clamp(1rem, 1.1vw + 0.6rem, 1.2rem); margin: 0; color: var(--bone); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__rail {
  display: flex; justify-content: space-between; gap: 12px; padding-block: 18px; border-top: 1px solid var(--line);
  font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 600;
}
@media (min-width: 900px) {
  .hero__foot { grid-template-columns: 1fr auto; }
}
@media (max-width: 599px) {
  .hero__rail span:nth-child(n + 3) { display: none; }
  .hero__ctas .btn { width: 100%; }
}

/* Marquesina ------------------------------------------------------------ */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: 18px; background: var(--ink); }
.marquee__track { display: flex; width: max-content; }
.marquee__row { display: flex; align-items: center; flex: none; }
.marquee span, .marquee i {
  font-family: var(--display); text-transform: uppercase; font-size: clamp(2.2rem, 5vw, 4.4rem); line-height: 1;
  padding-inline: 0.35em; font-style: normal; white-space: nowrap;
}
.marquee i { color: var(--volt); }
.motion .marquee__track { animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee--volt { background: var(--volt); color: var(--volt-ink); border: 0; }
.marquee--volt i { color: var(--volt-ink); }

/* Tarjetas de centros (portada) --------------------------------------- */
.hc-grid { display: grid; gap: 14px; margin-bottom: 36px; }
.hc { display: flex; flex-direction: column; background: var(--ink-2); border: 1px solid var(--line); }
.hc__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.hc__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.5); transition: filter 0.6s, transform 1s var(--ease-out); }
.hc:hover .hc__media img { filter: none; transform: scale(1.05); }
.hc__body { display: flex; flex-direction: column; gap: 6px; padding: 22px 20px 22px; flex: 1; }
.hc__num { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); font-weight: 700; }
.hc__name { font-family: var(--display); text-transform: uppercase; font-size: clamp(2.8rem, 4vw, 3.8rem); line-height: 0.92; }
.hc__name a { text-decoration: none; }
.hc__name a:hover { color: var(--volt); }
.hc__town { color: var(--muted); margin: 4px 0 0; font-size: 0.95rem; }
.hc__phone { margin: 0 0 16px; }
.hc__phone a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; font-size: 1.05rem; }
.hc__btn { margin-top: auto; align-self: flex-start; }
@media (min-width: 700px) { .hc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .hc-grid { grid-template-columns: repeat(4, 1fr); } .hc:nth-child(even) { transform: translateY(48px); } .hc-grid { margin-bottom: 84px; } }

/* Disciplinas ---------------------------------------------------------- */
.dsc { display: grid; gap: clamp(56px, 8vw, 96px); }
.dsc__media { display: block; overflow: hidden; aspect-ratio: 4 / 5; position: relative; }
.dsc__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.dsc__media:hover img { transform: scale(1.04); }
.wipe img { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
.motion .wipe img { transition: clip-path 1.3s var(--ease-io), transform 1.6s var(--ease-out); }
.motion .wipe:not(.is-in) img { clip-path: polygon(0 100%, 100% 88%, 100% 100%, 0 100%); transform: scale(1.18); }
.dsc__body { padding-top: 28px; max-width: 52ch; }
.dsc__body .h-lg { margin-bottom: 18px; }
.dsc__body .h-lg a:hover { color: var(--volt); }
.dsc__claim { font-size: clamp(1.15rem, 1.4vw, 1.4rem); font-weight: 600; line-height: 1.35; }
.dsc__body p:not(.dsc__claim) { color: var(--muted); }
@media (min-width: 900px) {
  .dsc { grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); }
  .dsc__card--offset { margin-top: clamp(120px, 14vw, 240px); }
}

/* Statement con texto que se ilumina al hacer scroll ------------------- */
.statement__text {
  font-size: clamp(1.6rem, 3.6vw, 3.4rem); line-height: 1.12; font-weight: 600; letter-spacing: -0.015em;
  max-width: 24ch; margin-bottom: 0.8em;
}
.statement__text span { transition: color 0.4s; }
.scrub-on .statement__text span { color: rgba(242, 240, 234, 0.32); }
.scrub-on .statement__text span.lit { color: var(--bone); }
.statement__punch { font-family: var(--display); text-transform: uppercase; font-size: clamp(3.6rem, 11vw, 10.5rem); line-height: 0.86; margin: 0; }

/* Raíl horizontal fijado ----------------------------------------------- */
.hscroll { padding-block: clamp(80px, 10vw, 140px) clamp(60px, 8vw, 100px); background: var(--ink-2); }
.hscroll__head { margin-bottom: clamp(32px, 4vw, 56px); }
.hscroll__viewport { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.hscroll__viewport::-webkit-scrollbar { display: none; }
.rail { display: flex; gap: clamp(14px, 2vw, 28px); padding-inline: var(--gutter); width: max-content; }
.rail__card { width: clamp(240px, 72vw, 420px); scroll-snap-align: start; flex: none; }
.rail__card a { display: block; text-decoration: none; }
.rail__media { display: block; overflow: hidden; aspect-ratio: 1; background: var(--ink-3); }
.rail__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease-out), filter 0.5s; filter: grayscale(0.35); }
.rail__card a:hover img, .rail__card a:focus-visible img { transform: scale(1.06); filter: none; }
.rail__tag { display: block; margin-top: 16px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); font-weight: 600; }
.rail__name { display: block; font-family: var(--display); text-transform: uppercase; font-size: clamp(2.2rem, 3.2vw, 3.2rem); line-height: 0.95; margin-top: 6px; }
.rail__card a:hover .rail__name { color: var(--volt); }
.hscroll__progress { margin: 32px var(--gutter) 0; height: 2px; background: var(--line); position: relative; display: none; }
.hscroll__progress span { position: absolute; inset: 0; background: var(--volt); transform-origin: left; transform: scaleX(0); }
.hscroll-on { padding: 0; }
.hscroll-on .hscroll__sticky { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.hscroll-on .hscroll__viewport { overflow: visible; scroll-snap-type: none; }
.hscroll-on .rail { will-change: transform; }
.hscroll-on .rail__card { width: clamp(260px, 26vw, 400px); }
.hscroll-on .hscroll__progress { display: block; }
@media (max-height: 760px) {
  .hscroll-on .hscroll__head .h-xl { font-size: clamp(2.6rem, 6vw, 5rem); }
  .hscroll-on .rail__card { width: clamp(220px, 22vw, 320px); }
}

/* Servicios (portada) -------------------------------------------------- */
.svc-list { display: grid; border-top: 1px solid var(--line); margin-bottom: 40px; }
.svc { display: grid; grid-template-columns: auto 1fr; gap: 6px 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.svc__num { font-weight: 700; color: var(--volt); font-size: 0.9rem; padding-top: 0.5em; }
.svc__name { font-family: var(--display); text-transform: uppercase; font-size: clamp(2.2rem, 4vw, 3.6rem); line-height: 0.95; }
.svc p { grid-column: 2; color: var(--muted); margin: 0; max-width: 60ch; }
.on-bone .svc-list, .on-bone .svc { border-color: var(--line-on-bone); }
.on-bone .svc p { color: var(--muted-on-bone); }
.on-bone .svc__num { color: var(--ink); }
.on-bone .svc__num::before { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--volt); margin-right: 8px; border: 1px solid var(--ink); }
@media (min-width: 900px) {
  .svc-list { grid-template-columns: 1fr 1fr; column-gap: 56px; }
}

/* Coaches (portada) ---------------------------------------------------- */
.faces { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.face { position: relative; overflow: hidden; background: var(--ink-3); }
.face img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1) contrast(1.05); transition: filter 0.6s, transform 0.9s var(--ease-out); }
.face:hover img { filter: none; transform: scale(1.04); }
.face__name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 14px 12px;
  background: linear-gradient(0deg, rgba(11, 11, 10, 0.9), rgba(11, 11, 10, 0));
  font-family: var(--display); text-transform: uppercase; font-size: clamp(1.6rem, 2.2vw, 2.2rem); line-height: 1;
}
@media (min-width: 700px) { .faces { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .face:nth-child(even) { margin-top: 48px; } }

/* Cierre --------------------------------------------------------------- */
.closing { background: var(--ink); }
.closing__inner { padding-block: clamp(80px, 12vw, 180px); text-align: left; }
.closing__lead { max-width: 44ch; color: var(--muted); font-size: 1.15rem; margin-top: 28px; }
.closing__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
@media (max-width: 599px) { .closing__ctas .btn { width: 100%; } }

/* Entrada de marca (solo portada) --------------------------------------
   Visible solo con html.intro (lo pone un script inline). Temporizador de
   seguridad en CSS: aunque main.js falle, a los 2,2 s desaparece sola. */
.loader { display: none; }
.intro .loader {
  display: block; position: fixed; inset: 0; z-index: 400; color: var(--bone); pointer-events: auto;
  animation: loader-safety 0.3s linear 2.2s forwards;
}
@keyframes loader-safety { to { opacity: 0; visibility: hidden; pointer-events: none; } }
.loader__bg {
  position: absolute; inset: 0; background-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.loader__logo { position: absolute; left: 50%; top: 50%; width: clamp(120px, 16vw, 220px); translate: -50% -50%; clip-path: inset(0 100% 0 0); animation: loader-logo 0.6s 0.05s var(--ease-out) forwards; }
.loader__logo svg { width: 100%; height: auto; display: block; }
@keyframes loader-logo { to { clip-path: inset(0 0 0 0); } }
.loader__count {
  position: absolute; left: var(--gutter); bottom: calc(var(--gutter) + 6px); font-family: var(--display);
  font-size: clamp(5.5rem, 16vw, 14rem); line-height: 0.8; font-variant-numeric: tabular-nums; display: flex; align-items: flex-start;
}
.loader__count small { font-size: 0.28em; color: var(--volt); margin: 0.12em 0 0 0.1em; }
.loader__meta {
  position: absolute; right: var(--gutter); bottom: calc(var(--gutter) + 10px); margin: 0; max-width: 60ch; text-align: right;
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; color: var(--muted);
}
.loader__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.loader__bar span { display: block; height: 100%; background: var(--volt); transform: scaleX(0); transform-origin: left; }
.loader.is-leaving { animation: none; pointer-events: none; }
.loader.is-leaving .loader__bg { transition: clip-path 0.42s var(--ease-io); clip-path: inset(0 0 100% 0); }
.loader.is-leaving .loader__logo, .loader.is-leaving .loader__count, .loader.is-leaving .loader__meta,
.loader.is-leaving .loader__bar { transition: opacity 0.25s, transform 0.5s var(--ease-io); opacity: 0; transform: translateY(-24px); }
.loader__bg { clip-path: inset(0 0 0 0); }
@media (max-width: 599px) {
  .loader__meta { left: var(--gutter); right: var(--gutter); bottom: auto; top: calc(var(--gutter) + 8px); text-align: left; max-width: none; }
}
