/* Condal CrossFit — núcleo: marca, tipografía, botones, placas de calle, cabecera, menú, cursor y pie.
   Identidad: señalética urbana de Barcelona (placas de calle, numeración de distrito, carteles de barrio)
   con los colores y letras de su propia web: negro, blanco, gris #f1f1f1 y rojo #d71818, Oswald + Open Sans.
   Regla: todo se ve sin JS. Lo que se oculta para animar va bajo .motion (lo pone main.js). */

:root {
  --black: #0e0e0e;        /* fondo del logo blanco: se funde sin caja */
  --white: #ffffff;
  --grey: #f1f1f1;         /* gris claro de su web */
  --grey-2: #e3e3e3;
  --charcoal: #313131;     /* gris oscuro de su web */
  --mid: #484848;          /* texto secundario sobre claro (8:1) */
  --silver: #bdbdbd;       /* texto secundario sobre negro (10:1) */
  --red: #d71818;          /* rojo corporativo: bloques, botones, titulares grandes */
  --red-deep: #a90f0f;
  --display: "Oswald", "Arial Narrow", "Roboto Condensed", sans-serif;
  --text: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-io: cubic-bezier(0.7, 0, 0.2, 1);
  --gutter: clamp(16px, 3.6vw, 52px);
  --max: 1480px;
  --header-h: 72px;
  --dock-h: 0px;
  --rule: 3px solid var(--black);
  /* Contexto por sección (claro por defecto) */
  --bg: var(--grey);
  --fg: var(--black);
  --soft: var(--mid);
  --line: rgba(14, 14, 14, 0.16);
  --fill: var(--black);
  --fill-fg: var(--white);
}
.on-dark { --bg: var(--black); --fg: var(--white); --soft: var(--silver); --line: rgba(255, 255, 255, 0.18); --fill: var(--white); --fill-fg: var(--black); background: var(--bg); color: var(--fg); }
.on-red { --bg: var(--red); --fg: var(--white); --soft: var(--white); --line: rgba(255, 255, 255, 0.35); --fill: var(--black); --fill-fg: var(--white); background: var(--bg); color: var(--fg); }
.on-white { --bg: var(--white); background: var(--bg); color: var(--fg); }
.on-grey { --bg: var(--grey); background: var(--bg); color: var(--fg); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--grey); color: var(--black); font-family: var(--text);
  font-size: clamp(16px, 0.2vw + 15px, 17.5px); line-height: 1.6; overflow-x: clip;
  padding-top: var(--header-h); padding-bottom: var(--dock-h); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 700; text-transform: uppercase; line-height: 1; letter-spacing: 0.01em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }
button { font: inherit; color: inherit; }
::selection { background: var(--red); color: var(--white); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.on-dark :focus-visible, .on-red :focus-visible { outline-color: var(--white); }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: 12px; z-index: 500; padding: 12px 18px; background: var(--white); color: var(--black); border: var(--rule); font-weight: 700; transform: translateY(-200%); }
.skip:focus { transform: none; }
main:focus { outline: none; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.pending { display: inline-block; padding: 0 0.45em; border: 2px dashed var(--red); background: var(--white); color: var(--black); font-family: var(--display); font-weight: 500; font-size: 0.82em; letter-spacing: 0.04em; text-transform: uppercase; }

/* Tipografía de rótulo ------------------------------------------------- */
.label { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; font-family: var(--display); font-weight: 500; font-size: 0.86rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--soft); }
.label b { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; background: var(--fg); color: var(--bg); font-weight: 600; letter-spacing: 0.04em; }
.h-big { font-size: clamp(2.6rem, 6vw, 5.6rem); line-height: 0.95; }
.h-mid { font-size: clamp(2rem, 3.6vw, 3.2rem); }
.red { color: var(--red); }
.on-red .red, .on-dark .red { color: inherit; }
.mark { background: var(--red); color: var(--white); padding: 0 0.12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.sec { padding-block: clamp(72px, 9vw, 140px); position: relative; }
.head { display: grid; gap: 18px 56px; margin-bottom: clamp(32px, 4.5vw, 64px); padding-top: 18px; border-top: var(--rule); border-top-color: var(--fg); }
.head__p { max-width: 48ch; margin: 0; color: var(--soft); }
.head__p a { color: var(--fg); }
@media (min-width: 920px) { .head { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); align-items: end; } }

/* Revelado con máscara (solo con .motion) ------------------------------ */
.motion [data-reveal] { transition: clip-path 1s var(--ease-io), transform 1s var(--ease); clip-path: inset(0 0 0 0); }
.motion [data-reveal]:not(.is-in) { clip-path: inset(0 0 100% 0); transform: translateY(28px); }
.motion [data-wipe] { transition: clip-path 1.1s var(--ease-io); clip-path: inset(0 0 0 0); }
.motion [data-wipe]:not(.is-in) { clip-path: inset(0 100% 0 0); }

/* Botones: rectángulo de borde grueso + casilla de flecha; el relleno sube desde abajo */
.btn {
  position: relative; isolation: isolate; display: inline-flex; align-items: stretch; min-height: 54px; border: 3px solid var(--fg); color: var(--fg);
  font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.1;
  text-decoration: none; cursor: pointer; background: transparent; overflow: hidden; transition: color 0.35s var(--ease);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fill); transform: scaleY(0); transform-origin: bottom; transition: transform 0.45s var(--ease-io); }
.btn:hover::before, .btn:focus-visible::before { transform: scaleY(1); }
.btn:hover, .btn:focus-visible { color: var(--fill-fg); }
.btn__t { display: flex; align-items: center; padding: 8px 20px; }
.btn__a { display: grid; place-items: center; width: 50px; flex: none; border-left: 3px solid currentColor; transition: background-color 0.35s; }
.btn__a .ico { width: 22px; height: 22px; transition: transform 0.35s var(--ease); }
.btn:hover .btn__a .ico { transform: translateX(4px); }
.btn--red { background: var(--red); border-color: var(--red); color: var(--white); --fill: var(--black); --fill-fg: var(--white); }
.btn--red .btn__a { background: var(--white); color: var(--red); border-left-color: var(--red); }
.btn--red:hover .btn__a, .btn--red:focus-visible .btn__a { background: var(--red); color: var(--white); }
.on-red .btn--red { background: var(--white); border-color: var(--white); color: var(--red); --fill: var(--black); }
.on-red .btn--red .btn__a { background: var(--red); color: var(--white); border-left-color: var(--white); }
.btn--sm { min-height: 44px; font-size: 0.95rem; }
.btn--sm .btn__t { padding: 4px 14px; }
.btn--sm .btn__a { width: 40px; }
.btn--lg { min-height: 64px; font-size: 1.25rem; }
.btn--lg .btn__a { width: 62px; }
.link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-family: var(--display); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 calc(100% - 8px) / 100% 3px no-repeat; transition: background-size 0.4s var(--ease); }
.link:hover { background-size: 0 3px; background-position: 100% calc(100% - 8px); }
.link .ico { width: 18px; height: 18px; }
.ico { width: 20px; height: 20px; flex: none; }

/* Placa de calle: rótulo blanco con borde negro y número de distrito en rojo */
.plaque { text-decoration: none; display: grid; grid-template-columns: auto 1fr; background: var(--white); color: var(--black); border: 4px solid var(--black); }
.plaque__num { display: grid; place-items: center; padding: 0 clamp(10px, 1.4vw, 18px); background: var(--red); color: var(--white); font-family: var(--display); font-weight: 700; font-size: clamp(1.8rem, 3vw, 2.8rem); line-height: 1; border-right: 4px solid var(--black); }
.plaque__body { padding: 10px clamp(12px, 1.6vw, 20px) 12px; min-width: 0; }
.plaque__k { margin: 0; font-family: var(--display); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mid); }
.plaque__name { margin: 2px 0 2px; font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(1.9rem, 3.6vw, 3.4rem); line-height: 0.95; }
.plaque__sub { margin: 0; font-size: 0.92rem; font-weight: 600; }
.metro { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 5px; margin-right: 4px; border-radius: 12px; background: var(--black); color: var(--white); font-family: var(--display); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.04em; vertical-align: 1px; }
.on-dark .metro { background: var(--white); color: var(--black); }

/* Cabecera: barra negra fija; enlaces separados por filetes; CTA rojo a sangre */
.site-header { position: fixed; inset: 0 0 auto; z-index: 100; color: var(--white); background: var(--black); border-bottom: 1px solid #262626; transition: transform 0.45s var(--ease); }
.site-header.is-hidden { transform: translateY(-100%); }
.hd { height: var(--header-h); display: flex; align-items: stretch; padding-left: var(--gutter); }
.brand { display: flex; align-items: center; flex: none; padding-right: 22px; }
.brand img { height: 44px; width: auto; }
.nav { display: flex; margin-left: auto; }
.nav__list { display: flex; height: 100%; border-left: 1px solid #262626; }
.nav__item { position: relative; display: flex; border-right: 1px solid #262626; }
.nav__link {
  display: flex; align-items: center; gap: 6px; padding: 0 clamp(10px, 1.2vw, 18px); text-decoration: none;
  font-family: var(--display); font-weight: 500; font-size: 1rem; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; transition: background-color 0.25s, color 0.25s;
}
.nav__link:hover { background: var(--charcoal); }
.nav__link.is-active { background: var(--white); color: var(--black); }
.nav__chev { width: 14px; height: 14px; transition: transform 0.3s; }
.nav__sub { position: absolute; left: -1px; top: 100%; min-width: 230px; background: var(--white); color: var(--black); border: 3px solid var(--black); border-top: 0; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity 0.2s, transform 0.25s var(--ease), visibility 0.2s; }
.nav__item--drop:hover .nav__sub, .nav__item--drop:focus-within .nav__sub { opacity: 1; visibility: visible; transform: none; }
.nav__item--drop:hover .nav__chev, .nav__item--drop:focus-within .nav__chev { transform: rotate(180deg); }
.nav__sub a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 16px; border-top: 1px solid var(--grey-2); font-family: var(--display); font-weight: 600; font-size: 1.2rem; text-transform: uppercase; text-decoration: none; }
.nav__sub a span { font-size: 0.78rem; font-weight: 500; letter-spacing: 0.12em; color: var(--mid); }
.nav__sub a:hover, .nav__sub a[aria-current="page"] { background: var(--red); color: var(--white); }
.nav__sub a:hover span, .nav__sub a[aria-current="page"] span { color: var(--white); }
.hd__tools { display: flex; align-items: stretch; }
.lang { display: flex; align-items: center; gap: 2px; padding: 0 16px; font-family: var(--display); font-weight: 500; font-size: 0.86rem; letter-spacing: 0.1em; }
.lang span { padding: 4px 5px; }
.lang__on { color: var(--white); border-bottom: 2px solid var(--red); }
.lang__off { color: #8d8d8d; cursor: help; }
.hd__cta { display: flex; align-items: center; gap: 12px; padding: 0 clamp(16px, 1.8vw, 28px); background: var(--red); color: var(--white); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; transition: background-color 0.3s; }
.hd__cta:hover { background: var(--red-deep); }
.hd__cta .ico { width: 20px; height: 20px; transition: transform 0.3s var(--ease); }
.hd__cta:hover .ico { transform: translateX(4px); }
.burger { display: none; align-items: center; gap: 12px; padding: 0 var(--gutter) 0 18px; border-left: 1px solid #262626; text-decoration: none; font-family: var(--display); font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.9rem; }
.burger__box { position: relative; width: 24px; height: 16px; display: block; }
.burger__l { position: absolute; left: 0; width: 100%; height: 2.5px; background: currentColor; transition: transform 0.35s var(--ease), opacity 0.2s; }
.burger__l:nth-child(1) { top: 0; }
.burger__l:nth-child(2) { top: 7px; }
.burger__l:nth-child(3) { top: 14px; }
.site-header.is-open .burger__l:nth-child(1), .site-header:has(.mm:target) .burger__l:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.is-open .burger__l:nth-child(2), .site-header:has(.mm:target) .burger__l:nth-child(2) { opacity: 0; }
.site-header.is-open .burger__l:nth-child(3), .site-header:has(.mm:target) .burger__l:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Menú móvil: hoja blanca con índice numerado y las dos placas de centro */
.mm { display: none; position: fixed; inset: var(--header-h) 0 0; background: var(--white); color: var(--black); overflow-y: auto; padding: 8px var(--gutter) calc(96px + env(safe-area-inset-bottom)); }
.mm:target, .site-header.is-open .mm { display: block; }
.mm__links > li { border-bottom: 2px solid var(--black); }
.mm__link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; text-decoration: none; font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: clamp(1.9rem, 8.4vw, 2.8rem); line-height: 1; }
.mm__link span { font-weight: 500; font-size: 0.9rem; letter-spacing: 0.1em; color: var(--mid); }
.mm__link.is-active { color: var(--red); }
.mm__subs { display: flex; gap: 8px; padding: 0 0 12px; }
.mm__sub { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 2px solid var(--black); font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; text-decoration: none; }
.mm__cta { width: 100%; margin-top: 22px; }
.mm__cta .btn__t { flex: 1; justify-content: center; }
.mm__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; }
.mm__foot .lang { padding: 0; }
.mm__foot .lang__on { color: var(--black); }
.mm__foot .lang__off { color: var(--mid); }
.mm__foot a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

/* Cursor: mira cuadrada (solo ratón) ------------------------------------ */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .has-cursor .cursor { display: block; position: fixed; inset: 0; z-index: 300; pointer-events: none; }
  .cursor__box { position: absolute; left: 0; top: 0; width: 26px; height: 26px; margin: -13px 0 0 -13px; border: 2px solid var(--red); will-change: transform; transform: translate3d(-100px, -100px, 0); transition: width 0.3s var(--ease), height 0.3s var(--ease), margin 0.3s var(--ease), background-color 0.25s, border-color 0.25s; display: grid; place-items: center; }
  .cursor__box::before, .cursor__box::after { content: ""; position: absolute; background: var(--red); }
  .cursor__box::before { width: 2px; height: 8px; }
  .cursor__box::after { width: 8px; height: 2px; }
  .cursor.is-hover .cursor__box { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
  .cursor.is-label .cursor__box { width: auto; height: 34px; margin: -17px 0 0 14px; padding: 0 12px; background: var(--red); }
  .cursor.is-label .cursor__box::before, .cursor.is-label .cursor__box::after { display: none; }
  .cursor__txt { color: var(--white); font-family: var(--display); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; display: none; }
  .cursor.is-label .cursor__txt { display: block; }
}

/* Pie ------------------------------------------------------------------ */
.site-footer { background: var(--black); color: var(--white); }
.ft__top { display: grid; gap: 28px; padding-block: clamp(56px, 7vw, 96px) 40px; }
.ft__brand img { width: clamp(160px, 15vw, 220px); }
.ft__line { margin: 18px 0 0; max-width: 34ch; color: var(--silver); }
.ft__social { display: flex; gap: 8px; margin-top: 20px; }
.ft__social a { display: grid; place-items: center; width: 48px; height: 48px; border: 2px solid #3a3a3a; transition: background-color 0.25s, border-color 0.25s; }
.ft__social a:hover { background: var(--red); border-color: var(--red); }
.ft__plaques { display: grid; gap: 14px; }
.ft__plaques .plaque { text-decoration: none; transition: transform 0.35s var(--ease); }
.ft__plaques .plaque:hover { transform: translateY(-4px); }
.ft__contact p { margin: 0 0 8px; }
.ft__contact a { font-weight: 700; display: inline-block; padding: 2px 0; }
.ft__k { margin: 0 0 10px; font-family: var(--display); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--silver); }
.ft__muted { color: var(--silver); font-size: 0.9rem; }
@media (min-width: 980px) { .ft__top { grid-template-columns: 1fr 1.4fr 1fr; } .ft__plaques { grid-template-columns: 1fr; } }
.ft__nav { display: flex; flex-wrap: wrap; border-top: 1px solid #2a2a2a; border-bottom: 1px solid #2a2a2a; }
.ft__nav a { display: inline-flex; align-items: center; min-height: 52px; padding: 0 16px 0 0; margin-right: 16px; font-family: var(--display); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; }
.ft__nav a:hover { color: var(--white); text-decoration: underline; text-decoration-color: var(--red); }
.ft__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 24px; padding-block: 14px 26px; font-size: 0.84rem; color: var(--silver); }
.ft__legal { display: flex; flex-wrap: wrap; gap: 0 18px; }
.ft__legal a { display: inline-flex; align-items: center; min-height: 44px; color: var(--white); font-weight: 600; }
.ft__bottom p { margin: 0; }

/* Barra fija inferior (móvil) ------------------------------------------- */
.dock { display: none; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1360px) { .nav__link { font-size: 0.92rem; letter-spacing: 0.07em; } .lang { padding: 0 10px; } }
@media (max-width: 1220px) {
  .nav { display: none; }
  .burger { display: inline-flex; }
  .hd__tools { margin-left: auto; }
}
@media (max-width: 979px) {
  :root { --header-h: 62px; --dock-h: calc(64px + env(safe-area-inset-bottom)); }
  .brand img { height: 36px; }
  .hd__tools > .lang, .hd__cta { display: none; }
  .dock { display: grid; grid-template-columns: 1fr 1fr 1.5fr; position: fixed; z-index: 90; left: 0; right: 0; bottom: 0; padding-bottom: env(safe-area-inset-bottom); background: var(--black); color: var(--white); border-top: 3px solid var(--black); }
  .dock__btn { display: flex; align-items: center; justify-content: center; min-height: 64px; border-right: 1px solid #2a2a2a; font-family: var(--display); font-weight: 600; font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; text-align: center; }
  .dock__btn--red { background: var(--red); border-right: 0; }
}
@media (max-width: 380px) { .burger__txt { display: none; } .dock__btn { font-size: 0.9rem; letter-spacing: 0.04em; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
@media (max-width: 380px) { .mm__cta { font-size: 1.05rem; } .mm__cta .btn__t { padding-inline: 12px; } }
