/* Circuito Creativo, sitio del club (versión 2).
   Identidad conservada: logo en partículas, azul marino, azul y amarillo, Domine y Nunito.
   Una sola escala de esquinas (14px; píldora solo en botones) y un solo acento (amarillo). */
@font-face { font-family: "Domine"; src: url("assets/fonts/domine.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("assets/fonts/nunito.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }

:root {
  /* "light dark" evita que el navegador oscurezca por su cuenta el tema claro */
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #eef3f8;
  --ink: #0c2d57;
  --text: #172c47;
  --muted: #46586f;
  --line: #d5deea;
  --brand: #32699b;
  --brand-hover: #24557f;
  --on-brand: #ffffff;
  --accent: #ffcf33;
  --on-accent: #0c2d57;
  --soft: #dde8f4;
  --soft-hover: #cbdcee;
  --band: #0c2d57;
  --focus: #32699b;
  --serif: "Domine", Georgia, "Times New Roman", serif;
  --sans: "Nunito", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --r: 14px;
  --header-h: 72px;
  --sp: clamp(4.5rem, 9vw, 8rem);
  --ease: cubic-bezier(.22, 1, .36, 1);
  /* Ritmo de movimiento único: lo rápido responde a un toque, lo lento acompaña la lectura */
  --dur-fast: .18s;
  --dur-base: .3s;
  --dur-slow: .6s;
  --shadow: 0 22px 44px -26px rgba(12, 45, 87, .55);
  --outline-img: rgba(0, 0, 0, .1);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1220;
  --surface: #101c30;
  --ink: #f2f6fb;
  --text: #dfe7f1;
  --muted: #a9b6c8;
  --line: #223049;
  --brand: #7db4e6;
  --brand-hover: #9ac6ee;
  --on-brand: #0a1220;
  --soft: #16253d;
  --soft-hover: #1d3150;
  --band: #0c2d57;
  --focus: #9ac6ee;
  --shadow: 0 22px 44px -26px rgba(0, 0, 0, .8);
  --outline-img: rgba(255, 255, 255, .12);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 1.125rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: #0c2d57; }

.wrap { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 100; background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: 8px; transition: top .2s; }
.skip-link:focus { top: 1rem; }
/* Barra de avance de lectura: solo donde el navegador la puede ligar al desplazamiento */
.progress { position: fixed; inset: 0 0 auto 0; z-index: 60; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .progress { animation: grow linear both; animation-timeline: scroll(root); }
  }
}
@keyframes grow { to { transform: scaleX(1); } }

/* Portada: solo el logo en partículas */
.splash { position: relative; min-height: 100svh; display: grid; place-items: center; background: var(--bg); }
.particle-stage { position: relative; width: min(88vw, 560px); height: min(70svh, 640px); }
.particle-stage canvas { position: relative; z-index: 2; width: 100%; height: 100%; display: block; cursor: pointer; touch-action: manipulation; }
.particle-fallback { position: absolute; z-index: 1; inset: 0; margin: auto; height: 86%; width: auto; max-width: 80%; object-fit: contain; }
.particle-stage.is-ready .particle-fallback, .particle-fallback[hidden] { display: none; }
/* La flecha aparece una vez, sin rebotar: orienta a quien duda, sin pedir atención todo el tiempo */
.splash-next { position: absolute; left: 50%; bottom: 1.6rem; width: 52px; height: 52px; margin-left: -26px; display: grid; place-items: center; color: var(--muted); text-decoration: none; animation: cue-in .8s var(--ease) 2s both; }
.splash-next:hover { color: var(--ink); }
.splash-hint { position: absolute; left: 0; right: 0; bottom: 5.2rem; margin: 0; text-align: center; font-weight: 800; font-size: .98rem; color: var(--muted); letter-spacing: .02em; animation: cue-in .7s var(--ease) 1.4s both; pointer-events: none; }
@media (pointer: coarse) { .particle-stage canvas { touch-action: none; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; } }
@keyframes cue-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Encabezado */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: 1rem; margin-right: auto; min-width: 0; }
.brand__club { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--serif); font-weight: 700; color: var(--ink); white-space: nowrap; }
.brand__club img { height: 34px; width: auto; }
.site-nav { display: flex; align-items: center; gap: .25rem; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; padding: .55rem .95rem; font-size: 1rem; font-weight: 700; color: var(--ink); transition: color var(--dur-fast); }
.site-nav a:hover { color: var(--brand); }
.site-nav a.is-active { box-shadow: inset 0 -3px 0 var(--accent); }
.site-nav .nav-cta { margin-left: .6rem; padding-inline: 1.4rem; background: var(--brand); color: var(--on-brand); border-radius: 999px; box-shadow: none; }
.site-nav .nav-cta:hover { background: var(--brand-hover); color: var(--on-brand); }
.site-nav a.nav-cta.is-active { box-shadow: none; }
.header-tools { display: flex; align-items: center; gap: .5rem; }
.theme-toggle, .menu-toggle { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 1.5px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; transition: border-color .2s; }
.theme-toggle:hover, .menu-toggle:hover { border-color: var(--ink); }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }
.menu-toggle { display: none; position: relative; }
.menu-toggle__bars, .menu-toggle__bars::before { content: ""; position: absolute; left: 13px; right: 13px; height: 2px; background: var(--ink); transition: transform .3s var(--ease); }
.menu-toggle__bars { top: 21px; transform: translateY(-3px); }
.menu-toggle__bars::before { left: 0; right: 0; top: 0; transform: translateY(6px); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: rotate(-90deg); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 56px; padding: .8rem 1.6rem .8rem 2.2rem; border-radius: 999px; border: 0; font: inherit; font-size: 1.05rem; font-weight: 800; text-decoration: none; cursor: pointer; transition: background var(--dur-fast), color var(--dur-fast), transform var(--dur-base) var(--ease); }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-hover); }
.btn--accent { min-height: 62px; padding: .8rem 1.4rem .8rem 2.6rem; background: var(--accent); color: var(--on-accent); font-size: 1.2rem; }
.btn--accent:hover { background: #ffd95e; }
/* La flecha vive en su propio círculo, pegada al borde del botón */
.btn__icon { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: color-mix(in srgb, currentColor 16%, transparent); transition: transform var(--dur-base) var(--ease); }
.btn--accent .btn__icon { width: 40px; height: 40px; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 800; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--accent); transition: color var(--dur-fast), border-color var(--dur-fast); }
.text-link:hover { color: var(--brand); border-color: var(--brand); }

/* Inicio */
.hero { position: relative; scroll-margin-top: var(--header-h); overflow: clip; background: radial-gradient(70% 90% at 88% 10%, var(--soft) 0, transparent 66%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 4rem); align-items: center; min-height: calc(100svh - var(--header-h)); padding-block: clamp(3rem, 7vw, 6rem); }
.hero h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(2.5rem, 4.7vw, 4.4rem); line-height: 1.06; letter-spacing: -.02em; color: var(--ink); }
.hero h1 em { font-style: normal; color: var(--brand); }
/* Cada línea del titular sube desde una máscara; el relleno inferior evita recortar los descendentes */
.hl { display: block; overflow: hidden; padding-bottom: .16em; margin-bottom: -.16em; }
.hl > span { display: inline-block; }
.hero-lead { margin-top: 1.8rem; max-width: 38ch; font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 2rem; margin-top: 2.4rem; }

.hero-media { position: relative; width: 100%; max-width: 640px; justify-self: end; aspect-ratio: 1 / 1; }
.hero-media::before { content: ""; position: absolute; left: -4%; top: 42%; width: 46%; height: 46%; background: var(--accent); border-radius: var(--r); }
/* Marco concéntrico: radio exterior = radio interior + grosor del marco, como una foto impresa */
.hm { position: absolute; z-index: 1; display: block; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 30%; border: 5px solid var(--bg); border-radius: calc(var(--r) + 5px); box-shadow: var(--shadow); }
.hm--a { left: 0; top: 12%; width: 72%; }
.hm--b { right: 0; top: 0; width: 46%; z-index: 2; }
.hm--c { right: 4%; bottom: 0; width: 58%; z-index: 2; }

/* Secciones */
.section { padding-block: var(--sp); scroll-margin-top: calc(var(--header-h) + 1.5rem - var(--sp)); }
.section-head { max-width: 780px; margin-bottom: clamp(2.2rem, 4vw, 3.4rem); }
.section h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(2rem, 4.2vw, 3.4rem); line-height: 1.1; letter-spacing: -.015em; color: var(--ink); text-wrap: balance; }
.section-note { margin-top: 1.1rem; color: var(--muted); max-width: 60ch; text-wrap: pretty; }

/* Entrada con intención: solo donde ayuda a leer el orden (club, proyectos, concursos) */
.js-ready .reveal { opacity: 0; transform: translateY(20px); transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); transition-delay: calc(var(--d, 0) * 70ms); }
.js-ready .reveal.is-in { opacity: 1; transform: none; }

/* El club */
.club-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2.5rem, 7vw, 7rem); align-items: start; }
.club h2 { max-width: 19ch; }
.club-lead h3 { margin: 2.4rem 0 .6rem; font-size: 1.05rem; font-weight: 800; color: var(--ink); }
.club-lead p { max-width: 58ch; color: var(--muted); text-wrap: pretty; }
.club-side { display: grid; gap: 1.8rem; padding: clamp(1.6rem, 3vw, 2.4rem); background: var(--surface); border-radius: var(--r); }
.club-block h3 { margin-bottom: .45rem; font-family: var(--serif); font-size: 1.5rem; color: var(--ink); }
.club-block p { color: var(--muted); text-wrap: pretty; }
.club-does li { padding: .8rem 0; border-top: 1px solid var(--line); font-weight: 700; color: var(--ink); }
.stats { display: flex; flex-wrap: wrap; gap: 2rem clamp(3rem, 9vw, 8rem); margin-top: clamp(3rem, 6vw, 5rem); padding-top: clamp(1.8rem, 3vw, 2.6rem); border-top: 1px solid var(--line); }
.stats div { display: flex; flex-direction: column; }
.stats dd { font-family: var(--serif); font-weight: 700; font-size: clamp(3.2rem, 7vw, 5.6rem); line-height: 1; color: var(--brand); font-variant-numeric: tabular-nums; }
.stats dt { margin-top: .5rem; font-weight: 700; color: var(--ink); }

/* Proyectos: mosaico asimétrico, cada foto con su tamaño y SIN recortar a nadie (4:3 original) */
.projects { background: var(--surface); }
.project-list { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(2.5rem, 5vw, 4.5rem) clamp(1.25rem, 2.5vw, 2.25rem); margin-top: clamp(2rem, 4vw, 3rem); }
.project { grid-column: span 4; }
.project:nth-child(7n + 1), .project:nth-child(7n + 7) { grid-column: span 7; }
.project:nth-child(7n + 2), .project:nth-child(7n + 6) { grid-column: span 5; }
.project:nth-child(7n + 2) { margin-top: clamp(2rem, 7vw, 6rem); }
.project__btn { display: block; width: 100%; padding: 0; background: transparent; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; border-radius: var(--r); }
.project__btn:focus-visible { outline-offset: 8px; border-radius: var(--r); }
.project__figure { display: block; }
.project__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--soft); border-radius: var(--r); transition: transform var(--dur-fast) var(--ease); }
.project__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; outline: 1px solid var(--outline-img); outline-offset: -1px; transition: transform var(--dur-slow) var(--ease); }
.project__btn:active .project__media { transform: scale(.99); }
.project__text { display: block; margin-top: 1.15rem; }
.project__title { display: block; margin-top: .2rem; font-family: var(--serif); font-weight: 700; font-size: clamp(1.4rem, 2.2vw, 1.9rem); line-height: 1.15; color: var(--ink); overflow-wrap: anywhere; text-wrap: balance; transition: color var(--dur-fast); }
.project:nth-child(7n + 1) .project__title, .project:nth-child(7n + 7) .project__title { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.project__desc { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: .6rem; max-width: 48ch; color: var(--muted); font-size: 1.05rem; line-height: 1.55; }
.project__more { display: inline-block; margin-top: .9rem; padding-bottom: .15rem; font-weight: 800; color: var(--ink); border-bottom: 2px solid var(--accent); transition: color var(--dur-fast), border-color var(--dur-fast); }
.project-list .status { grid-column: 1 / -1; }

.status { margin-top: 1rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--r); text-align: center; color: var(--muted); }
.status[role="alert"] { border-color: #b3261e; color: #b3261e; }

/* Concursos */
.contest-list { border-top: 1px solid var(--line); }
.contest { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: 1rem clamp(1.5rem, 4vw, 4rem); padding-block: clamp(1.6rem, 3vw, 2.4rem); border-bottom: 1px solid var(--line); }
.contest__name { font-family: var(--serif); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.2; color: var(--ink); }
.contest__count { margin-top: .3rem; font-size: 1rem; color: var(--muted); }
.teams { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.6rem 2.2rem; }
.team:focus-visible { outline-offset: 6px; }
.team { display: block; align-self: start; min-height: 44px; padding: .2rem 0; background: transparent; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.team__name { display: inline-block; font-weight: 800; font-size: 1.12rem; color: var(--ink); border-bottom: 2px solid var(--accent); transition: color .2s; }
.team:hover .team__name { color: var(--brand); }
.team__results { display: grid; justify-items: start; gap: .35rem; margin-top: .6rem; }
.team__results span { font-size: 1rem; line-height: 1.5; color: var(--muted); }
/* Los lugares destacados se leen como una etiqueta amarilla, no como un tono apenas distinto */
.team__results .is-podium { padding: .05rem .55rem; border-radius: 6px; background: var(--accent); color: var(--on-accent); font-weight: 800; }

/* Preguntas */
.faq { background: var(--surface); }
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.faq .section-head { margin-bottom: 0; position: sticky; top: calc(var(--header-h) + 2rem); }
.qa { padding-block: 1.9rem; border-top: 1px solid var(--line); }
.qa:last-child { border-bottom: 1px solid var(--line); }
.qa h3 { margin-bottom: .7rem; font-family: var(--serif); font-size: clamp(1.3rem, 2.2vw, 1.6rem); line-height: 1.25; color: var(--ink); text-wrap: balance; }
.qa p { max-width: 58ch; color: var(--muted); text-wrap: pretty; }

/* Súmate: cierre del sitio; el pie vive dentro del mismo bloque azul */
.join { position: relative; overflow: clip; background: var(--band); color: #fff; }
.join::before { content: ""; position: absolute; top: 0; right: 0; width: clamp(90px, 12vw, 170px); aspect-ratio: 1; background: var(--accent); border-radius: 0 0 0 100%; }
.join-inner { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: clamp(2rem, 6vw, 6rem); align-items: end; padding-block: clamp(6rem, 11vw, 9rem) clamp(3rem, 6vw, 5rem); }
.join h2 { max-width: 15ch; font-family: var(--serif); font-weight: 700; font-size: clamp(2.3rem, 5.4vw, 4.6rem); line-height: 1.07; letter-spacing: -.02em; color: #fff; text-wrap: balance; }
.join-text { margin-top: 1.5rem; max-width: 44ch; font-size: 1.2rem; color: rgba(255, 255, 255, .88); text-wrap: pretty; }
.join-action { display: flex; flex-direction: column; align-items: flex-start; }
.channels { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.channels a { display: inline-block; padding: .5rem 1.2rem; border-radius: 999px; background: #fff; color: var(--band); font-weight: 800; text-decoration: none; }
.soon { margin-top: 1rem; font-size: 1rem; color: rgba(255, 255, 255, .82); }
.site-footer { padding-block: 2rem; background: var(--band); border-top: 1px solid rgba(255, 255, 255, .18); color: rgba(255, 255, 255, .88); font-size: 1rem; }
/* Sobre el azul marino el foco azul no se vería: se usa el amarillo de la marca */
.join :focus-visible, .site-footer :focus-visible { outline-color: var(--accent); }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem 2rem; }
/* Los dos logos sobre una placa blanca: se ven igual en modo claro y oscuro */
.footer-logos { display: inline-flex; align-items: center; gap: 1.2rem; padding: .9rem 1.5rem; background: #fff; border-radius: var(--r); }
.footer-logos img { width: auto; }
.footer-logos img[src$="logo.png"] { height: 52px; }
.footer-logos img[src$="itslp.png"] { height: 46px; }
.footer-logos__sep { width: 1px; height: 40px; background: #d6dbe2; }

/* Detalle de proyecto */
.modal { width: min(1180px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); margin: auto; padding: 0; border: 0; border-radius: 18px; background: var(--bg); color: var(--text); overflow: hidden; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .65); }
.modal[open] { animation: pop var(--dur-base) var(--ease); }
.modal::backdrop { background: rgba(4, 10, 22, .78); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
/* Ficha de proyecto: una tarjeta horizontal con la foto a la izquierda y todo el texto a la derecha, sin necesidad de bajar */
.modal__inner { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); max-height: calc(100dvh - 2rem); overflow-y: auto; overscroll-behavior: contain; }
.modal__media { position: relative; margin: 0; background: #061a33; }
.detail-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; display: block; }
.modal__media::before { content: ""; display: block; aspect-ratio: 4 / 3; }
.modal__body { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.4rem, 2.6vw, 2.4rem) clamp(1.6rem, 3vw, 2.8rem); padding-right: clamp(3.4rem, 5vw, 4.2rem); }
.modal__body h2 { margin: 0 0 .7rem; font-family: var(--serif); font-weight: 700; font-size: clamp(1.8rem, 3vw, 2.7rem); line-height: 1.05; letter-spacing: -.02em; color: var(--ink); overflow-wrap: anywhere; text-wrap: balance; }
#dlg-desc { max-width: 52ch; font-size: 1.05rem; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.modal__body h3 { display: flex; align-items: baseline; gap: .6rem; margin: 1.3rem 0 .4rem; padding-top: 1.1rem; border-top: 1px solid var(--line); font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }
.modal__body h3 span { font: 800 .9rem var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; }
.recs li { padding: .42rem 0; border-top: 1px solid var(--line); line-height: 1.4; font-size: 1rem; }
.recs li:first-child { border-top: 0; }
.recs .is-podium { display: inline-block; padding: .05rem .65rem; border-radius: 8px; background: var(--accent); color: var(--on-accent); font-weight: 800; }
.modal__close { position: absolute; top: .9rem; right: .9rem; z-index: 3; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--bg); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .5); transition: transform var(--dur-fast) var(--ease); }
.modal__close:hover { transform: scale(1.06); }
.modal__close:active { transform: scale(.95); }
/* Pantallas angostas o bajas: la foto pasa arriba, más compacta, y el texto se reduce para seguir cabiendo */
@media (max-width: 820px) {
  .modal { width: min(560px, calc(100% - 1rem)); max-height: calc(100dvh - 1rem); }
  .modal__inner { display: block; max-height: calc(100dvh - 1rem); }
  .modal__media::before { display: none; }
  .detail-image { position: static; height: auto; aspect-ratio: 16 / 9; }
  .modal__media { background: transparent; }
  .modal__body { padding: 1rem 1.2rem 1.3rem; }
  .modal__body h2 { font-size: clamp(1.55rem, 7vw, 2rem); margin: 0 0 .4rem; padding-right: 2.6rem; }
  #dlg-desc { font-size: .98rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .modal__body h3 { margin: .9rem 0 .3rem; padding-top: .8rem; font-size: 1.1rem; }
  /* En el teléfono los reconocimientos son etiquetas que se acomodan en filas, para que quepan sin bajar */
  .recs { display: flex; flex-wrap: wrap; gap: .35rem; }
  .recs li { padding: 0; border: 0; font-size: .86rem; line-height: 1.3; }
  .recs li > span { display: inline-block; padding: .22rem .6rem; border: 1px solid var(--line); border-radius: 8px; }
  .recs .is-podium { padding: .22rem .6rem; border-color: transparent; font-weight: 800; }
  .detail-image { max-height: 30dvh; }
}
@media (max-width: 820px) and (max-height: 780px) { #dlg-desc { -webkit-line-clamp: 2; line-clamp: 2; } .detail-image { max-height: 25dvh; } .modal__body { padding-top: .8rem; } }
@media (max-width: 480px) {
  .detail-image { max-height: 21dvh; aspect-ratio: 2 / 1; }
  .modal__body { padding: .7rem 1rem .9rem; }
  .modal__body h2 { font-size: 1.4rem; line-height: 1.12; margin-bottom: .3rem; }
  #dlg-desc { font-size: .9rem; line-height: 1.4; -webkit-line-clamp: 2; line-clamp: 2; }
  .modal__body h3 { margin: .6rem 0 .25rem; padding-top: .55rem; font-size: 1rem; }
  .recs { gap: .25rem; }
  .recs li { font-size: .74rem; line-height: 1.2; }
  .recs li > span, .recs .is-podium { padding: .14rem .45rem; border-radius: 6px; }
}
@media (max-width: 480px) and (max-height: 780px) { .detail-image { max-height: 17dvh; } .modal__body h3 { margin-top: .45rem; } }
@media (max-height: 560px) and (min-width: 821px) { .modal__body h2 { font-size: 1.6rem; } #dlg-desc { font-size: .95rem; } .recs li { padding: .25rem 0; } }

/* Responsive */
@media (max-width: 1000px) {
  .project-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project, .project:nth-child(n) { grid-column: auto; align-self: start; margin-top: 0; }
  .project:nth-child(7n + 1) .project__title, .project:nth-child(7n + 7) .project__title { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero-media { justify-self: center; max-width: 560px; }
  .club-grid, .faq-grid, .contest, .join-inner { grid-template-columns: 1fr; }
  .faq .section-head { position: static; margin-bottom: 1.5rem; }
}
@media (max-width: 900px) {
  .menu-toggle { display: inline-grid; }
  .site-nav { position: fixed; inset: var(--header-h) 0 auto 0; max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain; flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 1.25rem 1.5rem; background: var(--bg); border-bottom: 1px solid var(--line); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: transform .3s var(--ease), opacity .2s, visibility 0s .3s; }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .site-nav a { padding: 1rem .25rem; font-size: 1.1rem; border-bottom: 1px solid var(--line); box-shadow: none !important; }
  .site-nav a.is-active { color: var(--brand); }
  .site-nav .nav-cta { margin: 1rem 0 0; text-align: center; border: 0; }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .project-list { grid-template-columns: 1fr; }
  body { font-size: 1.05rem; }
  .cta-row .btn { flex: 1 1 100%; }
  .hero-lead { max-width: none; }
  .join .btn--accent { width: 100%; }
}

/* Movimiento: solo si la persona no pidió reducirlo. Todo lo que aparece ya es visible por defecto. */
@media (prefers-reduced-motion: no-preference) {
  .js-ready .hero:not(.is-in) .hl > span { transform: translateY(115%); }
  .js-ready .hero.is-in .hl > span { transition: transform 1s var(--ease); }
  .js-ready .hero.is-in .hl:nth-of-type(2) > span { transition-delay: .12s; }
  .js-ready .hero:not(.is-in) :is(.hero-lead, .cta-row) { opacity: 0; transform: translateY(16px); }
  .js-ready .hero.is-in :is(.hero-lead, .cta-row) { transition: opacity .8s var(--ease) .45s, transform .8s var(--ease) .45s; }
  .js-ready .hero.is-in .cta-row { transition-delay: .6s; }
  .js-ready .hero:not(.is-in) .hm { clip-path: inset(100% 0 0 0 round var(--r)); transform: scale(1.06); }
  .js-ready .hero.is-in .hm { clip-path: inset(0 round var(--r)); transition: clip-path 1.1s var(--ease), transform 1.4s var(--ease); }
  .js-ready .hero.is-in .hm--a { transition-delay: .15s; }
  .js-ready .hero.is-in .hm--b { transition-delay: .35s; }
  .js-ready .hero.is-in .hm--c { transition-delay: .55s; }
  /* Profundidad al bajar: las dos fotos pequeñas se desplazan distinto a la grande */
  @supports (animation-timeline: view()) {
    .hm--b { animation: drift-up linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    .hm--c { animation: drift-down linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
  }
}
/* Pantallas táctiles: sin recortes animados ni profundidad al bajar (muy costosos en iPhone); solo aparecen con un fundido */
@media (prefers-reduced-motion: no-preference) and (pointer: coarse) {
  .js-ready .hero:not(.is-in) .hm { clip-path: none; transform: none; opacity: 0; }
  .js-ready .hero.is-in .hm { clip-path: none; opacity: 1; transition: opacity .7s var(--ease); }
  .hm--b, .hm--c { animation: none; }
}
/* El pasar del cursor solo se anima donde existe un cursor: en el celular un toque no deja efectos pegados */
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover, .btn--accent:hover { transform: translateY(-2px); }
  .btn--primary:active, .btn--accent:active { transform: scale(.97); }
  .btn:hover .btn__icon { transform: translate(3px, -2px); }
  .project__btn:hover .project__media img { transform: scale(1.04); }
  .project__btn:hover .project__more { color: var(--brand); border-color: var(--brand); }
  .project__btn:hover .project__title { color: var(--brand); }
}
@keyframes drift-up { from { translate: 0 26px; } to { translate: 0 -26px; } }
@keyframes drift-down { from { translate: 0 -18px; } to { translate: 0 22px; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js-ready .reveal { opacity: 1; transform: none; }
  .splash-next { animation: none; }
}

/* Movimiento (web-v3): scroll con inercia, titulares por palabras y galería horizontal de proyectos */
html.has-lenis { scroll-behavior: auto; }
.project-list { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.gallery { position: relative; }
.gallery__bar { display: none; }
.gallery.is-active { height: calc(100svh - var(--header-h)); display: flex; align-items: center; overflow: hidden; }
.gallery.is-active .project-list { display: flex; align-items: flex-start; gap: clamp(1.5rem, 3vw, 3rem); width: max-content; margin: 0; padding-inline: max(1.25rem, calc((100vw - 1200px) / 2)); will-change: transform; }
.gallery.is-active .project:nth-child(n) { flex: none; width: clamp(360px, 34vw, 560px); grid-column: auto; margin-top: 0; }
.gallery.is-active .project:nth-child(even) { margin-top: clamp(2rem, 7vh, 4.5rem); }
.gallery.is-active .project:nth-child(n) .project__title { font-size: clamp(1.5rem, 2.1vw, 2rem); }
.gallery.is-active .gallery__bar { display: block; position: absolute; left: max(1.25rem, calc((100vw - 1200px) / 2)); right: max(1.25rem, calc((100vw - 1200px) / 2)); bottom: 1.6rem; height: 3px; background: var(--line); border-radius: 3px; }
.gallery__bar span { display: block; height: 100%; background: var(--brand); border-radius: inherit; transform-origin: 0 50%; transform: scaleX(0); }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.w > span { display: inline-block; }
