/* ==========================================================================
   Vila-seca CrossFit · Base
   Paleta sacada de su logo y del CSS de su web actual:
   lavanda #B5A6DD y turquesa #04C7B7 (las dos mitades del disco del logo) + tinta negra.
   Ambos colores solo llevan texto en tinta (AA ≈ 9,5:1 y 9,9:1).
   ========================================================================== */
:root {
  --lav: #B5A6DD;
  --lav-soft: #DCD4F0;
  --lav-deep: #4F3F8F;     /* texto lavanda sobre papel (AA) */
  --tq: #04C7B7;
  --tq-soft: #B4EDE7;
  --tq-deep: #00675E;      /* texto turquesa sobre papel (AA) */
  --ink: #111015;
  --ink-2: #1C1A23;
  --paper: #F7F5FB;
  --white: #FFFFFF;
  --muted-on-ink: #C9C5D4;

  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --text: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: max(clamp(16px, 4vw, 56px), env(safe-area-inset-left), env(safe-area-inset-right));
  --maxw: 1320px;
  --radius: 28px;
  --bar: clamp(8px, 1vw, 14px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-roll: cubic-bezier(.16, 1, .3, 1);
  --header-h: 84px;
}
@media (max-width: 640px) { :root { --header-h: 68px; } }

*, *::before, *::after { box-sizing: border-box; }
/* overflow-x en <html> evita que el clip del <body> se propague al viewport: así Chrome/Safari
   móvil no ensanchan el viewport de diseño cuando algo se sale (la cápsula se rompía en la home) */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 110px; overflow-x: clip; }
@media (max-width: 640px) { html { scroll-padding-top: 88px; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(17, 16, 21, .12);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--white);
  border-radius: 6px;
}

.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 999px;
  text-decoration: none; font-weight: 700;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* --- Tipografía --- */
.h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4.2vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.kicker {
  font-family: var(--display);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.kicker--pill {
  display: inline-block;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: .45em 1.1em;
}
@media (max-width: 420px) { .kicker--pill { font-size: .7rem; letter-spacing: .08em; padding: .5em .9em; } }
.kicker--tq { color: var(--tq); }
.kicker--deep { color: var(--tq-deep); }

.prose p + p { margin-top: 1em; }
.prose h2 { font-family: var(--display); font-size: 1.35rem; line-height: 1.2; margin: 2em 0 .6em; }
.prose h3 { font-family: var(--display); font-size: 1.05rem; margin: 1.6em 0 .4em; }
.prose ul { list-style: disc; padding-left: 1.3em; margin: .8em 0; }
.prose li + li { margin-top: .3em; }
.prose a { color: var(--lav-deep); font-weight: 700; }

.pending {
  background: repeating-linear-gradient(-45deg, #FFF1B8 0 8px, #FFE88A 8px 16px);
  color: var(--ink);
  border-radius: 6px;
  padding: 0 .35em;
  font-weight: 700;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* --- Botones píldora con disco --- */
.btn {
  --bg: var(--ink); --fg: var(--white); --disc: var(--tq); --disc-fg: var(--ink);
  display: inline-flex; align-items: center; gap: .9em;
  padding: .55em .6em .55em 1.4em;
  min-height: 56px;
  border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font-family: var(--display); font-weight: 700; font-size: .95rem; letter-spacing: .01em;
  text-decoration: none;
  border: 2px solid var(--ink);
  position: relative; isolation: isolate; overflow: hidden;
  transition: color .35s var(--ease);
}
.btn::before {
  content: ""; position: absolute; z-index: -1;
  right: .6em; top: 50%; width: 40px; height: 40px; border-radius: 50%;
  background: var(--disc);
  transform: translateY(-50%) scale(1);
  transition: transform .55s var(--ease);
}
.btn__disc {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  color: var(--disc-fg); flex: none;
  transition: transform .45s var(--ease);
}
.btn .ico { width: 20px; height: 20px; }
.btn--tq { --bg: var(--tq); --fg: var(--ink); --disc: var(--ink); --disc-fg: var(--tq); --fg-on: var(--white); }
.btn--lav { --bg: var(--lav); --fg: var(--ink); --disc: var(--ink); --disc-fg: var(--lav); --fg-on: var(--white); }
.btn--paper { --bg: var(--white); --fg: var(--ink); --disc: var(--ink); --disc-fg: var(--white); --fg-on: var(--white); }
/* Relleno al pasar el ratón solo con puntero fino; en táctil el :hover se quedaría pegado */
.btn:focus-visible { color: var(--fg-on, var(--disc-fg)); }
.btn:focus-visible::before { transform: translateY(-50%) scale(14); }
.btn:active .btn__disc { transform: scale(.9); }
@media (hover: hover) {
  .btn:hover { color: var(--fg-on, var(--disc-fg)); }
  .btn:hover::before { transform: translateY(-50%) scale(14); }
  .btn:hover .btn__disc { transform: rotate(-45deg); }
}

.link-line {
  font-weight: 800; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
  padding-bottom: 2px;
  transition: background-size .4s var(--ease);
}
@media (hover: hover) { .link-line:hover { background-size: 30% 2px; } }

/* --- Chips de clase --- */
.chip {
  display: inline-block; padding: .2em .8em; border-radius: 999px;
  font-family: var(--display); font-weight: 700; font-size: .78rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink); white-space: nowrap;
}
.chip--crossfit { background: var(--tq); }
.chip--openbox { background: var(--lav); }
.chip--megawod { background: var(--white); box-shadow: inset 0 0 0 2px var(--ink); }
.chip--cfopen { background: linear-gradient(90deg, var(--tq) 50%, var(--lav) 50%); }

/* --- Revelado al hacer scroll (solo con JS) --- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
