/* =========================================================
   Santi Concepción Jr. — "La vuelta"
   Fondo asfalto con un carril dibujado y la trazada en azul.
   ========================================================= */

/* Títulos: Aptos Black (instalada en el equipo del visitante).
   Si no la tiene, se usa Archivo Black-like como sustituta. */
@font-face {
  font-family: "SC Title";
  src: local("Aptos Black"), local("Aptos-Black");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* Texto: Archivo, servida desde la propia web (carpeta fonts/,
   licencia SIL OFL 1.1 en fonts/OFL-Archivo.txt). Sin Google Fonts. */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
  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;
}

:root {
  /* Color */
  --asphalt: #07090d;
  --graphite: #0e1218;
  --panel: #141a23;
  --track-edge: #1a1f27;
  --line: rgba(238, 241, 245, 0.12);
  --line-strong: rgba(238, 241, 245, 0.24);
  --text: #eef1f5;
  --muted: #a3adbb;
  --royal: #1037b8;
  --royal-hi: #1a47d6;
  --royal-deep: #0b2a8f;
  --sky: #0a84ff;
  --sky-soft: #5aaeff;
  --error: #ff8a80;
  --ok: #7fd1a8;
  --bg-rgb: 7, 9, 13;          /* el fondo, para transparencias */
  --text-2: #cfd6df;           /* texto secundario */
  --scroll: #2a3442;
  --placeholder: #7d8796;
  --field-focus: #111722;

  /* Type */
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-title: "SC Title", "Archivo", "Helvetica Neue", Arial, sans-serif;
  --fs-body: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --fs-lede: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --fs-h3: clamp(1.125rem, 1.05rem + 0.35vw, 1.375rem);
  --fs-h2: clamp(2.25rem, 1.6rem + 3vw, 4.5rem);
  --fs-h1: clamp(2.75rem, 1.6rem + 5vw, 6rem);
  --fs-hero: clamp(3rem, 1.4rem + 7vw, 6rem);

  /* Space */
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 3rem);
  --section: clamp(5rem, 3rem + 8vw, 9rem);
  --bar-h: 64px;

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --radius: 12px;

  color-scheme: dark;
}

/* ---------- Modo claro: fondo blanco, letras negras, mismos azules ---------- */
:root[data-theme="light"] {
  --asphalt: #ffffff;
  --graphite: #f3f5f8;
  --panel: #eceff3;
  --track-edge: #e4e7ec;
  --line: rgba(7, 9, 13, 0.12);
  --line-strong: rgba(7, 9, 13, 0.24);
  --text: #0b0d12;
  --muted: #5b6573;
  --sky-soft: #1037b8;         /* el azul del logo, legible sobre blanco */
  --error: #c62828;
  --ok: #1e7d4f;
  --bg-rgb: 255, 255, 255;
  --text-2: #2e3540;
  --scroll: #c9ced6;
  --placeholder: #7a8391;
  --field-focus: #ffffff;
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  position: relative;
  background: var(--asphalt);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--royal); color: #fff; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 4px; }
input, textarea { caret-color: var(--sky); }

html { scrollbar-color: var(--scroll) var(--asphalt); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--asphalt); }
::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 10px; border: 2px solid var(--asphalt); }

.skip {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--royal); color: #fff; padding: 0.6rem 1rem; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 1rem; }

main, .foot { position: relative; z-index: 1; }

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

/* ---------- Circuito de fondo ---------- */
.track {
  position: absolute; top: 0; left: 0; width: 100%;
  z-index: 0; pointer-events: none; overflow: hidden;
}
.track svg { display: block; }
.track__edge {
  fill: none; stroke: var(--track-edge);
  stroke-linecap: round; stroke-linejoin: round;
}
.track__line {
  /* sin punto: extremo recto (un extremo redondo dibuja un punto al inicio) */
  fill: none; stroke: var(--sky); stroke-width: 1.6px;
  stroke-linecap: butt; stroke-linejoin: round;
}

/* ---------- Tipografía ---------- */
.h1, .h2, .h3, .hero__name, .season__year, .gal__year, .grid-steps__pos, .palmares__title, .agenda__empty-title {
  font-family: var(--font-title);
  font-weight: 900;
  font-style: normal;
  letter-spacing: -0.015em;
}
.h1 {
  font-size: var(--fs-h1);
  line-height: 0.98;
  margin: 0 0 1.25rem;
  text-wrap: balance;
}
.h2 {
  font-size: var(--fs-h2);
  line-height: 1;
  margin: 0 0 1.5rem;
  text-wrap: balance;
  max-width: 16ch;
}
.h3 {
  font-size: var(--fs-h3);
  line-height: 1.2;
  margin: 0 0 0.6rem;
  letter-spacing: -0.005em;
}
.lede {
  font-size: var(--fs-lede);
  line-height: 1.45;
  color: var(--muted);
  max-width: 46ch;
  margin: 0 0 2.5rem;
  text-wrap: pretty;
}
.prose { max-width: 66ch; }
.prose p { margin: 0 0 1.1em; color: var(--text-2); text-wrap: pretty; }
.prose__close { color: var(--text) !important; font-weight: 600; }

/* ---------- Botones y enlaces ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.75rem 1.4rem;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 650; font-size: 1rem; line-height: 1; letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
.btn:active:not(:disabled) { transform: scale(0.97); }
.btn--primary { background: var(--royal); color: #fff; }
.btn--ghost { border-color: var(--line-strong); color: var(--text); background: rgba(var(--bg-rgb), 0.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn--light { background: #fff; color: var(--royal-deep); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--royal-hi); }
  .btn--ghost:hover { border-color: var(--text); background: rgba(var(--bg-rgb), 0.7); }
  .btn--light:hover:not(:disabled) { background: #e6ecff; }
}

.link {
  color: var(--text); font-weight: 650; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 0.3em; text-decoration-color: var(--sky-soft);
  transition: text-decoration-color 200ms ease;
}
@media (hover: hover) and (pointer: fine) { .link:hover { text-decoration-color: currentColor; } }

/* ---------- Pendientes ---------- */
.pending {
  display: inline-flex; align-items: center;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.2rem 0.55rem; border-radius: 999px;
  border: 1px dashed var(--sky-soft); color: var(--sky-soft);
  vertical-align: middle; white-space: nowrap;
}
.pending--light { border-color: rgba(255, 255, 255, 0.8); color: #fff; }
.pending-note { font-size: 0.875rem; color: var(--muted); margin: 1.25rem 0 0; display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; }

/* ---------- Barra superior ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--bar-h);
  display: flex; align-items: center; gap: 1.5rem;
  padding-inline: var(--gutter);
  background: linear-gradient(to bottom, rgba(var(--bg-rgb), 0.7), rgba(var(--bg-rgb), 0));
  transition: background-color 300ms ease;
}
.bar.is-solid {
  background: rgba(var(--bg-rgb), 0.84);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.bar__brand img { width: 52px; height: auto; }
.bar__nav { display: flex; gap: 1.6rem; margin-left: auto; }
.bar__nav a {
  text-decoration: none; font-size: 0.9375rem; font-weight: 550; color: var(--muted);
  padding-block: 0.4rem; position: relative;
  transition: color 200ms ease;
}
.bar__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--sky); transform: scaleX(0); transform-origin: left;
  transition: transform 260ms var(--ease-out);
}
.bar__nav a[aria-current="page"] { color: var(--text); }
.bar__nav a[aria-current="page"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .bar__nav a:hover { color: var(--text); } }

.bar__end { display: flex; align-items: center; gap: 0.75rem; }
.lang { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; }
.lang button {
  border: 0; background: transparent; cursor: pointer;
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.04em;
  min-width: 40px; min-height: 32px; border-radius: 999px; color: var(--muted);
  transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out);
}
.lang button:active { transform: scale(0.95); }
.lang button[aria-pressed="true"] { background: var(--text); color: var(--asphalt); }

.theme button { display: inline-grid; place-items: center; }
.theme svg { width: 16px; height: 16px; }
@media (max-width: 420px) {
  .bar__end { gap: 0.4rem; }
  .lang button { min-width: 32px; }
  .bar__menu { padding: 0 0.75rem; }
}

.bar__menu {
  display: none; border: 1px solid var(--line-strong); background: transparent; border-radius: 999px;
  min-height: 40px; padding: 0 1rem; font-weight: 650; font-size: 0.875rem; cursor: pointer;
  transition: transform 160ms var(--ease-out);
}
.bar__menu:active { transform: scale(0.97); }

@media (max-width: 1023px) {
  .bar { gap: 0.75rem; }
  .bar__nav {
    position: fixed; top: var(--bar-h); left: 0; right: 0;
    flex-direction: column; gap: 0; margin: 0;
    background: rgba(var(--bg-rgb), 0.97);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.25rem;
    opacity: 0; transform: translateY(-8px); pointer-events: none; visibility: hidden;
    transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s 200ms;
  }
  .bar__nav a { font-size: 1.25rem; padding: 0.85rem 0; border-bottom: 1px solid var(--line); color: var(--text); }
  .bar__nav a::after { display: none; }
  .bar__nav a[aria-current="page"] { color: var(--sky-soft); }
  .bar.is-open .bar__nav { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s; }
  .bar.is-open { background: rgba(var(--bg-rgb), 0.97); }
  .bar__end { margin-left: auto; }
  .bar__menu { display: inline-flex; align-items: center; }
}

/* ---------- Portada ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  background: var(--asphalt);
}
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%;
  animation: heroSettle 1600ms var(--ease-out) both;
}
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--asphalt) 0%, rgba(var(--bg-rgb), 0.88) 26%, rgba(var(--bg-rgb), 0.3) 58%, rgba(var(--bg-rgb), 0.1) 76%, rgba(var(--bg-rgb), 0.55) 100%),
    linear-gradient(to right, rgba(var(--bg-rgb), 0.6), rgba(var(--bg-rgb), 0) 60%);
}
.hero__body {
  width: 100%; max-width: 1240px; margin-inline: auto;
  padding: 0 var(--gutter) clamp(1rem, 0.5rem + 1.2vw, 2rem);
}
.hero__name {
  /* "CONCEPCIÓN" nunca supera el ancho disponible */
  font-size: min(var(--fs-hero), calc((100vw - 2 * var(--gutter)) / 8.6));
  line-height: 0.92;
  margin: 0 0 1.25rem;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.hero__name span { display: block; animation: nameIn 900ms var(--ease-out) both; }
.hero__name span:nth-child(2) { animation-delay: 90ms; }
.hero__line {
  max-width: 42ch; margin: 0 0 2rem; font-size: var(--fs-lede); line-height: 1.4; color: var(--text-2);
  animation: fadeUp 700ms var(--ease-out) 300ms both;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; max-width: 760px; }
.hero__actions .btn { animation: fadeUp 600ms var(--ease-out) both; }
.hero__actions .btn:nth-child(1) { animation-delay: 360ms; }
.hero__actions .btn:nth-child(2) { animation-delay: 400ms; }
.hero__actions .btn:nth-child(3) { animation-delay: 440ms; }
.hero__actions .btn:nth-child(4) { animation-delay: 480ms; }
.hero__actions .btn:nth-child(5) { animation-delay: 520ms; }
.hero__actions .btn:nth-child(6) { animation-delay: 560ms; }

@keyframes heroSettle { from { transform: scale(1.07); } to { transform: scale(1); } }
@keyframes nameIn {
  from { clip-path: inset(0 100% 0 0); transform: translateX(-0.25em); }
  to { clip-path: inset(0 -5% 0 0); transform: none; }
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Secciones de inicio ---------- */
.sector { padding-block: var(--section); position: relative; }
.sector + .sector { border-top: 1px solid var(--line); }

/* Páginas independientes */
.page { padding: calc(var(--bar-h) + clamp(3rem, 2rem + 4vw, 6rem)) 0 var(--section); min-height: 70vh; }

/* Trayectoria */
.tray__grid {
  display: grid; gap: clamp(3rem, 2rem + 4vw, 6rem);
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: start;
}
.palmares { padding-top: 0.5rem; }
.palmares__h { color: var(--muted); font-size: 0.9375rem; letter-spacing: 0.06em; text-transform: uppercase; }
.palmares__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.palmares__list li {
  padding: 1.1rem 0; border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); column-gap: 1rem; row-gap: 0.2rem;

}
.palmares__year { grid-row: span 2; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 0.2rem; }
.palmares__title { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); line-height: 1.15; }
.palmares__note { color: var(--sky-soft); font-weight: 650; font-size: 0.9375rem; }

/* Temporada a temporada */
.seasons__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: clamp(4rem, 3rem + 4vw, 7rem); }
.seasons__h { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem); margin: 0; }
.seasons__hint { margin: 0; color: var(--muted); font-size: 0.9375rem; }
.seasons {
  list-style: none; margin: 1.75rem 0 0; padding: 0 var(--gutter) 1.5rem;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 23vw);
  gap: clamp(1rem, 0.5rem + 1.5vw, 1.75rem);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  scrollbar-width: thin;
}
@media (min-width: 1240px) { .seasons { padding-inline: max(var(--gutter), calc((100vw - 1240px) / 2 + var(--gutter))); scroll-padding-inline: max(var(--gutter), calc((100vw - 1240px) / 2 + var(--gutter))); } }
.season { scroll-snap-align: start; display: flex; flex-direction: column; }
.season figure, .season__noimg { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--panel); }
.season img { width: 100%; height: 100%; object-fit: cover; }
.season__noimg { display: grid; place-items: center; border: 1px dashed var(--line-strong); background: var(--graphite); }
.season__noimg span { font-family: var(--font-title); font-weight: 900; font-size: 2.5rem; color: var(--line-strong); }
.season__noimg--next { background: radial-gradient(120% 90% at 0% 100%, rgba(16, 55, 184, 0.5), rgba(16, 55, 184, 0) 60%), var(--graphite); padding: 1.25rem; text-align: center; }
.season__noimg--next span { color: var(--text); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.season__year {
  margin: 1.1rem 0 0.6rem; font-size: 1.75rem; line-height: 1;
  font-variant-numeric: tabular-nums;
  display: flex; align-items: center; gap: 0.75rem;
}
.season__year::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.18); flex: none; }
.season__year::after { content: ""; flex: 1; height: 1px; background: linear-gradient(to right, var(--sky), rgba(10, 132, 255, 0)); }
.season--next .season__year::before { background: transparent; border: 2px solid var(--sky); }
.season__list { list-style: none; margin: 0; padding: 0 0 0.5rem; display: grid; gap: 0.6rem; }
.season__list li { display: grid; gap: 0.1rem; }
.season__champ { color: var(--text-2); font-weight: 550; line-height: 1.35; }
.season__res { color: var(--muted); font-size: 0.875rem; line-height: 1.35; }
.season__res.is-title { color: var(--sky-soft); font-weight: 700; }
.season__note { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.875rem; }

.js .season.will-reveal figure { clip-path: inset(0 0 100% 0); }
.js .season.is-in figure { clip-path: inset(0 0 0 0); transition: clip-path 900ms var(--ease-in-out); }

/* Newsletter */
.news {
  display: grid; gap: clamp(2.5rem, 2rem + 3vw, 5rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
}
.news__media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; }
.news__media img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 30%; }

.topics { list-style: none; margin: 0 0 2.25rem; padding: 0; border-top: 1px solid var(--line); }
.topics li { padding: 0.75rem 0 0.75rem 1.5rem; border-bottom: 1px solid var(--line); position: relative; }
.topics li::before { content: ""; position: absolute; left: 0; top: 50%; width: 10px; height: 2px; background: var(--sky); }

/* Formularios */
.form { display: grid; gap: 1.1rem; }
.form--inline { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 0.75rem; }
.form--inline .check, .form--inline .form__legal, .form--inline .form__status { grid-column: 1 / -1; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: grid; gap: 0.45rem; }
.field__label { font-size: 0.875rem; font-weight: 650; color: var(--text-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 0.75rem 1rem;
  background: var(--graphite); border: 1px solid var(--line-strong); border-radius: 10px;
  color: var(--text); font-size: 1rem;
  transition: border-color 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.5; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23a3adbb' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none; border-color: var(--sky); background: var(--field-focus); box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.25);
}
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { border-color: var(--error); }
.check { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.9375rem; color: var(--text-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0.15rem 0 0; accent-color: var(--royal); flex: none; }
.check.is-invalid span { color: var(--error); }
.form__actions { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
/* Trampa antispam: invisible para las personas */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { margin: 0; font-size: 0.9375rem; min-height: 1.5em; }
/* Resumen legal junto al botón de envío */
.form__legal { margin: 0; max-width: 72ch; font-size: 0.8125rem; line-height: 1.55; color: var(--muted); }
.form__legal a { color: var(--text-2); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: var(--sky-soft); }
.form__status.is-error { color: var(--error); }
.form__status.is-ok { color: var(--ok); }
.form__status.is-info { color: var(--sky-soft); }

/* Próximamente */
.agenda { border-top: 1px solid var(--line-strong); max-width: 920px; }
.agenda__head, .agenda__item {
  display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) minmax(0, 0.7fr); gap: 1rem; align-items: baseline;
}
.agenda__head { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.agenda__list { list-style: none; margin: 0; padding: 0; }
.agenda__item { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.agenda__date { font-variant-numeric: tabular-nums; font-weight: 700; }
.agenda__event { font-weight: 650; }
.agenda__type { display: block; font-size: 0.8125rem; color: var(--sky-soft); font-weight: 600; }
.agenda__place { color: var(--muted); }
.agenda__empty { padding: 2rem 0 0.5rem; }
.agenda__empty-title { font-size: 1.5rem; margin: 0 0 0.5rem; }
.agenda__empty p { margin: 0 0 0.5rem; color: var(--text-2); max-width: 52ch; }
.agenda__empty .pending-note { color: var(--muted); }
.agenda.has-items .agenda__empty { display: none; }

/* Galería */
.filters { display: grid; gap: 0.75rem; margin: 0 0 3rem; }
.filters__row { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.filters__row::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line-strong); background: rgba(var(--bg-rgb), 0.8); color: var(--muted);
  min-height: 40px; padding: 0 1rem; border-radius: 999px; cursor: pointer;
  font-size: 0.9375rem; font-weight: 600; font-variant-numeric: tabular-nums;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, transform 160ms var(--ease-out);
}
.chip:active { transform: scale(0.96); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--asphalt); }
@media (hover: hover) and (pointer: fine) { .chip:hover:not([aria-pressed="true"]) { border-color: var(--text); color: var(--text); } }

.gal__group { margin-bottom: clamp(3rem, 2rem + 3vw, 5rem); }
.gal__label {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 1.5rem; align-items: baseline;
  margin-bottom: 1.25rem; padding-bottom: 0.85rem; border-bottom: 1px solid var(--line);

}
.gal__year { font-size: clamp(2rem, 1.5rem + 2vw, 3.25rem); line-height: 1; margin: 0; font-variant-numeric: tabular-nums; }
.gal__champs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 0; }
.gal__champs li { color: var(--sky-soft); font-weight: 600; }
.gal__champs li + li::before { content: "·"; color: var(--muted); margin: 0 0.6rem; }
.gal__grid {
  display: grid; gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 46%), 1fr));
  grid-auto-flow: dense;
}
.gal__cell {
  position: relative; display: block; padding: 0; border: 0; cursor: zoom-in;
  aspect-ratio: 3 / 2; overflow: hidden; border-radius: 6px; background: var(--panel);
}
.gal__cell.is-wide { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.gal__cell img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease-out); }
.gal__cell::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .gal__cell:hover img { transform: scale(1.04); } }
.gal__empty { color: var(--muted); padding: 2rem 0; }

/* Visor */
.viewer {
  border: 0; padding: 0; margin: 0; max-width: none; max-height: none; width: 100vw; height: 100dvh;
  background: rgba(4, 6, 9, 0.96); color: #eef1f5;
}
.viewer::backdrop { background: rgba(4, 6, 9, 0.9); }
.viewer[open] { display: grid; place-items: center; }
.viewer__fig { display: grid; gap: 0.85rem; justify-items: center; padding: 4.5rem 4.5rem 2rem; max-height: 100dvh; width: 100%; }
.viewer__fig img { max-width: min(1400px, 100%); max-height: calc(100dvh - 9rem); width: auto; height: auto; border-radius: 6px; object-fit: contain; }
.viewer__fig figcaption { color: #a3adbb; font-size: 0.9375rem; text-align: center; }
.viewer[open] .viewer__fig { animation: viewerIn 260ms var(--ease-out); }
@keyframes viewerIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
.viewer__btn {
  position: fixed; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(238, 241, 245, 0.24); background: rgba(14, 18, 24, 0.8); color: #eef1f5;
  display: grid; place-items: center; cursor: pointer;
  transition: transform 160ms var(--ease-out), border-color 200ms ease;
}
.viewer__btn:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .viewer__btn:hover { border-color: #eef1f5; } }
.viewer__close { top: 1rem; right: 1rem; }
.viewer__prev { left: 1rem; top: 50%; margin-top: -24px; }
.viewer__next { right: 1rem; top: 50%; margin-top: -24px; }
@media (max-width: 640px) {
  .viewer__fig { padding: 4.5rem 0.75rem 6rem; }
  .viewer__prev, .viewer__next { top: auto; bottom: 1.25rem; margin-top: 0; }
  .viewer__prev { left: calc(50% - 60px); }
  .viewer__next { right: calc(50% - 60px); }
}

/* Corre conmigo */
.grid-steps {
  list-style: none; margin: 0; padding: clamp(1.5rem, 1rem + 2vw, 3rem);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-radius: 16px; color: #fff;
  background:
    radial-gradient(90% 90% at 100% 0%, rgba(10, 132, 255, 0.45), rgba(10, 132, 255, 0) 60%),
    var(--royal);
}
.grid-steps li { padding: 0.5rem clamp(1rem, 0.5rem + 1.5vw, 2rem) 0.5rem 0; }
.grid-steps li + li { padding-left: clamp(1rem, 0.5rem + 1.5vw, 2rem); border-left: 1px solid rgba(255, 255, 255, 0.25); }
.grid-steps__pos { margin: 0 0 1.25rem; font-size: 2.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.grid-steps p { color: rgba(255, 255, 255, 0.9); margin: 0 0 1.25rem; }
.grid-steps .link { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.6); }
.grid-steps .pending-note { margin-top: 0.75rem; color: rgba(255, 255, 255, 0.85); }
.races { margin-top: clamp(3rem, 2rem + 3vw, 5rem); border-top: 1px solid var(--line-strong); padding-top: 1.75rem; max-width: 760px; }
.races p { margin: 0; color: var(--text-2); max-width: 60ch; }

/* Contacto */
.contact {
  display: grid; gap: clamp(2.5rem, 2rem + 3vw, 5rem);
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: start;
}
.contact__media { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; position: sticky; top: calc(var(--bar-h) + 2rem); }
.contact__media img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }


/* Pie */
.foot { border-top: 1px solid var(--line); padding-block: 2.5rem; background: var(--asphalt); }
.foot__in { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.foot__in p { margin: 0; color: var(--muted); font-size: 0.875rem; }
.foot__in .pending-note { margin: 0 0 0 auto; }
/* Enlaces legales del pie */
.foot__legal { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin-left: auto; }
.foot__legal a {
  display: inline-flex; align-items: center; min-height: 40px;
  color: var(--muted); font-size: 0.875rem; text-decoration: none; transition: color 200ms ease;
}
.foot__legal a[aria-current="page"] { color: var(--text); text-decoration: underline; text-underline-offset: 0.3em; text-decoration-color: var(--sky-soft); }
@media (hover: hover) and (pointer: fine) { .foot__legal a:hover { color: var(--text); } }
@media (max-width: 900px) { .foot__legal { margin-left: 0; } }

.foot__cookies {
  border: 0; background: none; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; min-height: 40px;
  color: var(--muted); font-size: 0.875rem; transition: color 200ms ease;
}
@media (hover: hover) and (pointer: fine) { .foot__cookies:hover { color: var(--text); } }

/* Aviso de cookies: Aceptar y Rechazar con el mismo peso visual */
.cookies {
  position: fixed; z-index: 60;
  left: 50%; bottom: max(1rem, env(safe-area-inset-bottom));
  width: min(760px, calc(100% - 2 * var(--gutter)));
  display: flex; align-items: center; gap: 1rem 1.5rem; flex-wrap: wrap;
  padding: 1.1rem 1.25rem;
  background: var(--graphite); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  opacity: 0; transform: translate(-50%, 16px);
  transition: opacity 180ms ease, transform 180ms var(--ease-out);
}
.cookies.is-open { opacity: 1; transform: translate(-50%, 0); transition: opacity 240ms ease, transform 240ms var(--ease-out); }
.cookies[hidden] { display: none; }
.cookies__text { flex: 1 1 320px; margin: 0; font-size: 0.875rem; line-height: 1.5; color: var(--text-2); }
.cookies__text a { color: var(--text); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: var(--sky-soft); white-space: nowrap; }
.cookies__actions { display: flex; gap: 0.6rem; flex: 0 0 auto; }
.btn--choice { min-width: 7.5rem; border-color: var(--line-strong); background: var(--asphalt); color: var(--text); }
@media (hover: hover) and (pointer: fine) { .btn--choice:hover { border-color: var(--text); } }
@media (max-width: 600px) {
  .cookies__actions { flex: 1 1 100%; }
  .cookies__actions .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .cookies, .cookies.is-open { transform: translate(-50%, 0); transition: opacity 150ms ease; }
}

/* Páginas legales */
.legal { max-width: 860px; }
.legal p, .legal li { color: var(--text-2); max-width: 70ch; }
.legal p { margin: 0 0 1.1em; }
.legal__h { margin: 2.5rem 0 0.85rem; }
.legal__list { padding-left: 1.25rem; margin: 0 0 1.25rem; }
.legal__list li { margin-bottom: 0.4rem; }
.legal__table { overflow-x: auto; margin: 0 0 1.5rem; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--asphalt); }
.legal table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.legal th { font-weight: 700; color: var(--text); background: var(--graphite); white-space: nowrap; }
.legal tr:last-child td { border-bottom: 0; }
/* Fragmentos PENDIENTE: resaltados y visibles */
.legal__pending {
  background: rgba(255, 196, 0, 0.18); color: var(--text);
  border: 1px dashed rgba(255, 196, 0, 0.85); border-radius: 4px;
  padding: 0.05em 0.35em; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}

.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.social__link {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 40px;
  color: var(--text-2); font-size: 0.9375rem; text-decoration: none;
  transition: color 200ms ease;
}
.social__link svg { width: 20px; height: 20px; flex: none; color: var(--sky-soft); }
a.social__link span {
  text-decoration: underline; text-decoration-thickness: 1px;
  text-underline-offset: 0.3em; text-decoration-color: var(--sky-soft);
}
a.social__link:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { a.social__link:hover { color: var(--text); } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .tray__grid, .news, .contact { grid-template-columns: 1fr; }
  .news__media { aspect-ratio: 16 / 10; }
  .contact__media { position: static; aspect-ratio: 16 / 10; }
  .grid-steps { grid-template-columns: 1fr; }
  .grid-steps li, .grid-steps li + li { padding: 1.25rem 0; border-left: 0; }
  .grid-steps li + li { border-top: 1px solid rgba(255, 255, 255, 0.25); }
  .seasons { grid-auto-columns: minmax(250px, 72vw); }
  .foot__in .pending-note { margin-left: 0; }
}
@media (max-width: 600px) {
  .form__row { grid-template-columns: 1fr; }
  .form--inline { grid-template-columns: 1fr; }
  .form--inline .btn { width: 100%; }
  .agenda__head { display: none; }
  .agenda__item { grid-template-columns: 1fr; gap: 0.2rem; }
  .hero__actions { display: grid; grid-template-columns: 1fr 1fr; }
  .hero__actions .btn { padding-inline: 0.75rem; font-size: 0.9375rem; }
  .gal__label { grid-template-columns: 1fr; row-gap: 0.4rem; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__media img, .hero__name span, .hero__line, .hero__actions .btn { animation: fadeOnly 300ms ease both; }
  .js .season.will-reveal figure, .js .season.is-in figure { clip-path: none; transition: none; }
  .viewer[open] .viewer__fig { animation: fadeOnly 200ms ease; }
  .gal__cell img { transition: none; }
}
@keyframes fadeOnly { from { opacity: 0; } to { opacity: 1; } }
