/* ==========================================================================
   CrossFit Sant Boi · base: fuentes, tokens, reset, tipografía, botones
   Concepto «La barra»: la línea horizontal que atraviesa la S y la B del logo
   ========================================================================== */
@font-face { font-family: "Anybody"; font-style: normal; font-weight: 400 900; font-stretch: 50% 150%; font-display: swap;
  src: url("/assets/fonts/anybody-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+221E, U+FEFF, U+FFFD; }
@font-face { font-family: "Anybody"; font-style: normal; font-weight: 400 900; font-stretch: 50% 150%; font-display: swap;
  src: url("/assets/fonts/anybody-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+A720-A7FF; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap;
  src: url("/assets/fonts/instrument-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-stretch: 75% 100%; font-display: swap;
  src: url("/assets/fonts/instrument-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+A720-A7FF; }

/* --------------------------------------------------------------------------
   Tokens. Color · espaciado (escala de 8 pt) · tipografía · rejilla · movimiento
   -------------------------------------------------------------------------- */
:root {
  /* Color de marca */
  --bronze: #9e7d56;
  --bronze-hi: #b8946a;
  --bronze-deep: #765b3b;   /* bronce para texto sobre claro (AA) */
  --bone: #f5f2ec;
  --paper: #fbfaf7;
  --ink: #111518;
  --ink-2: #1d2328;
  --ink-3: #2d343b;
  --ice: #bad4dc;
  --red: #bc4d4d;
  --steel: #6e7985;
  /* Texto secundario (AA sobre hueso/papel y sobre grafito) */
  --muted: #4a535b;
  --muted-dark: rgba(245, 242, 236, .72);
  /* Líneas de 1 px */
  --line-light: rgba(17, 21, 24, .14);
  --line-dark: rgba(245, 242, 236, .14);
  --rule-light: 1px solid var(--line-light);
  --rule-dark: 1px solid var(--line-dark);
  /* Familias */
  --display: "Anybody", "Arial Black", system-ui, sans-serif;
  --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Escala de espaciado (8 pt) */
  --s-half: 4px; --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 40px; --s6: 48px;
  --s8: 64px; --s10: 80px; --s12: 96px; --s16: 128px; --s20: 160px;
  --section-y: clamp(48px, 9vw, 160px);
  /* Escala tipográfica */
  --fs-micro: .75rem;
  --fs-small: .875rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.125rem, 1.35vw, 1.3rem);
  --fs-h3: clamp(1.25rem, 1.9vw, 1.75rem);
  --fs-h2: clamp(2rem, 5.2vw, 4.5rem);
  --fs-display: clamp(2.75rem, 8.6vw, 9rem);
  --fs-statement: clamp(1.6rem, 3.7vw, 3.6rem);
  /* Rejilla de 12 columnas (4 en móvil) */
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --cols: 4;
  --col-gap: 16px;
  --edge: max(var(--gutter), calc((100vw - var(--max)) / 2));  /* margen hasta la rejilla */
  /* Cabecera, barra inferior, cortes y sombras */
  --header-h: 64px;
  --abar-h: 0px;
  --cut: 14px;               /* corte diagonal de botones (como las letras del logo) */
  --cut-lg: clamp(28px, 4vw, 64px);  /* corte de fotos y paneles */
  --shadow-soft: 0 1px 2px rgba(17, 21, 24, .06), 0 8px 24px -12px rgba(17, 21, 24, .18);
  --shadow-deep: 0 40px 80px -32px rgba(17, 21, 24, .45), 0 16px 32px -16px rgba(17, 21, 24, .25);
  /* Movimiento */
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur: .9s;
}
@media (min-width: 900px) { :root { --cols: 12; --col-gap: 24px; } }
@media (min-width: 1000px) { :root { --header-h: 76px; } }
@media (max-width: 899px) { :root { --abar-h: calc(64px + env(safe-area-inset-bottom, 0px)); } }

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); scroll-padding-bottom: calc(var(--abar-h) + 12px); }
@media (prefers-reduced-motion: no-preference) { html:not(.lenis) { scroll-behavior: smooth; } }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--bone); color: var(--ink);
  font: 400 var(--fs-body)/1.6 var(--text); font-stretch: 100%;
  padding-bottom: var(--abar-h);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-kerning: normal;
}
/* Grano de película muy sutil sobre todo el sitio (estático: no cuesta rendimiento) */
body::after { content: ""; position: fixed; inset: 0; z-index: 400; pointer-events: none; opacity: .07;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
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, figure { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--bronze-hi); outline-offset: 3px; }
::selection { background: var(--bronze); color: var(--ink); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 500; background: var(--bone); color: var(--ink);
  padding: 12px 16px; font-weight: 700; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --------------------------------------------------------------------------
   Tipografía. Display ancha como «SANT BOI»; etiquetas finas; texto Instrument
   -------------------------------------------------------------------------- */
.display, h1, h2 { font-family: var(--display); font-stretch: 125%; font-weight: 700; line-height: .94;
  letter-spacing: -.02em; text-transform: uppercase; text-wrap: balance; }
h3 { font-family: var(--display); font-stretch: 112%; font-weight: 700; line-height: 1.1; letter-spacing: -.005em; }
/* Frase editorial: misma familia, ancho normal, minúsculas y peso medio (contraste con los titulares) */
.statement { font: 450 var(--fs-statement)/1.12 var(--display); font-stretch: 100%; letter-spacing: -.025em; text-transform: none; }
/* Micro-etiqueta: texto pequeño, espaciado y fino */
.micro { font: 600 var(--fs-micro)/1.2 var(--text); letter-spacing: .16em; text-transform: uppercase; }
.num { font-variant-numeric: tabular-nums; }

/* Etiqueta de sección: barra de bronce + índice + texto */
.eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: var(--s3);
  font: 600 var(--fs-micro)/1 var(--text); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.eyebrow b { font-weight: 700; color: var(--bronze-deep); font-variant-numeric: tabular-nums; }
.eyebrow--light { color: var(--muted-dark); }
.eyebrow--light b { color: var(--bronze-hi); }
.eyebrow__bar { flex: none; width: 40px; height: 2px; background: var(--bronze); transform-origin: left; }

/* Rejilla de 12 columnas: cada sección coloca sus piezas con grid-column */
.g12 { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); column-gap: var(--col-gap);
  width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.g12 > * { grid-column: 1 / -1; min-width: 0; }

/* Corte diagonal en esquina (fotos y paneles), eco de las letras del logo */
.cut-tl { clip-path: polygon(var(--cut-lg) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut-lg)); }
.cut-br { clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut-lg)), calc(100% - var(--cut-lg)) 100%, 0 100%); }

/* --------------------------------------------------------------------------
   Botones: esquina cortada, relleno que barre al pasar, flecha que avanza
   -------------------------------------------------------------------------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 56px; padding: 0 28px; text-decoration: none; cursor: pointer; border: 0;
  font: 650 .8125rem/1 var(--display); font-stretch: 112%; letter-spacing: .1em; text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
  transition: color .35s var(--ease); isolation: isolate; overflow: hidden; will-change: transform; }
.btn > span { position: relative; }
.btn .ico { width: 18px; height: 18px; flex: none; transition: transform .45s var(--ease-out); }
.btn:hover .ico--arrow { transform: translateX(5px); }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fx, transparent);
  transform: scaleX(0); transform-origin: right; transition: transform .55s var(--ease-out); }
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); transform-origin: left; }
.btn--bronze { background: var(--bronze); color: var(--ink); --fx: var(--bone); }
.btn--ink { background: var(--ink); color: var(--bone); --fx: var(--bronze); }
.btn--ink:hover { color: var(--ink); }
.btn--ghost { background: transparent; color: var(--bone); box-shadow: inset 0 0 0 1px rgba(245, 242, 236, .4); --fx: var(--bone); }
.btn--ghost:hover { color: var(--ink); }
.btn--line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); --fx: var(--ink); }
.btn--line:hover { color: var(--bone); }
.btn--outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-light); --fx: var(--ink); }
.btn--outline:hover { color: var(--bone); }
.btn--ghost, .btn--line, .btn--outline { clip-path: none; }
@media (max-width: 899px) { .btn { min-height: 52px; padding: 0 22px; } }

/* Enlace de texto con regla que se dibuja */
.tlink { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none;
  font: 650 .8125rem/1 var(--display); font-stretch: 112%; letter-spacing: .1em; text-transform: uppercase;
  background: linear-gradient(currentColor, currentColor) 0 calc(100% - 10px) / 100% 1px no-repeat;
  transition: background-size .5s var(--ease-out); }
.tlink:hover { background-size: 0 1px; background-position: 100% calc(100% - 10px); }
.tlink .ico { width: 16px; height: 16px; transition: transform .45s var(--ease-out); }
.tlink:hover .ico { transform: translateX(4px); }

/* Dato pendiente de confirmar */
.pending { background: repeating-linear-gradient(-45deg, rgba(188, 77, 77, .1) 0 6px, transparent 6px 12px);
  outline: 1.5px dashed var(--red); outline-offset: 2px; padding: 0 4px; }
.pending small { font: 600 .68rem/1 var(--text); letter-spacing: .04em; text-transform: uppercase; color: var(--red);
  white-space: nowrap; }
.phero .pending small, .ink .pending small { color: #e58c8c; }

/* Contenedores y cabeceras de sección (páginas interiores) */
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.shead { max-width: 820px; margin-bottom: clamp(28px, 4vw, 48px); }
.shead__title { font-size: clamp(1.75rem, 4.4vw, 3.4rem); }
.shead__intro { margin-top: 16px; max-width: 58ch; color: var(--muted); }
.shead.is-light .shead__title { color: var(--bone); }

.hours li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: var(--rule-light); }
.hours li span { color: var(--muted); }
.hours li b { font: 700 1rem/1.2 var(--display); font-stretch: 110%; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Apariciones. Solo con JS y movimiento permitido; un temporizador en <head>
   lo enseña todo si main.js no llegara a ejecutarse (nada queda oculto)
   -------------------------------------------------------------------------- */
.ln { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.ln > span { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(32px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out);
    transition-delay: calc(var(--d, 0) * 90ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js [data-lines] .ln > span { transform: translateY(108%); transition: transform 1.1s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 90ms + var(--d, 0) * 90ms); }
  .js [data-lines].is-in .ln > span { transform: none; }
  .js [data-bar] { transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease-out) .25s; }
  .js [data-bar].is-in { transform: none; }
}
.reveal-all [data-reveal], .reveal-all [data-lines] .ln > span, .reveal-all [data-bar] { opacity: 1 !important; transform: none !important; }

/* Pantallas muy estrechas (320–380 px): la ancha se estrecha un poco para que ninguna palabra desborde */
@media (max-width: 380px) {
  h1, h2, .display { font-stretch: 108%; overflow-wrap: break-word; }
}
