/* Circuito Creativo — sitio institucional del club */
@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" (y no solo "light") evita que el navegador oscurezca por su cuenta el tema claro */
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f6f3ec;
  --ink: #0c2d57;
  --text: #17304f;
  --muted: #4d6079;
  --line: #e3dfd4;
  --brand: #32699b;
  --brand-hover: #24557f;
  --on-brand: #ffffff;
  --accent: #ffcf33;
  --soft: #dde7f2;
  --soft-hover: #cddcec;
  --band: #0c2d57;
  --focus: #32699b;
  --serif: "Domine", Georgia, "Times New Roman", serif;
  --sans: "Nunito", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --curve: clamp(48px, 7vw, 96px);
  --header-h: 76px;
  --sp: clamp(3.5rem, 7vw, 6.5rem);
  --ease: cubic-bezier(.22, 1, .36, 1);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #0a0a0a;
  --ink: #f4f6fa;
  --text: #e8edf4;
  --muted: #a9b3c2;
  --line: #1f232a;
  --brand: #6aa7dc;
  --brand-hover: #8dbde8;
  --on-brand: #000000;
  --soft: #11151b;
  --soft-hover: #1a2029;
  --band: #0a0a0a;
  --focus: #8dbde8;
}

*, *::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(1180px, 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; }

/* 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; }
.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: bob 2.2s var(--ease) infinite; }
.splash-next:hover { color: var(--ink); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

/* 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: .15rem; }
.site-nav a { text-decoration: none; padding: .55rem .9rem; font-size: .8rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--ink); transition: color .2s; }
.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.3rem; 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; min-height: 54px; padding: .8rem 2.1rem; border-radius: 999px; border: 0; font: inherit; font-size: 1.05rem; font-weight: 800; letter-spacing: .02em; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, transform .2s var(--ease); }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-hover); }
.btn--secondary { background: var(--soft); color: var(--ink); }
.btn--secondary:hover { background: var(--soft-hover); }
.btn--light { background: var(--on-brand); color: var(--brand); }
.btn--light:hover { transform: translateY(-2px); }

.eyebrow { margin-bottom: .9rem; font-size: .8rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--brand); }

/* Inicio */
.hero { scroll-margin-top: var(--header-h); }
.hero-band { background: var(--surface); border-radius: 0 0 0 var(--curve); padding-block: clamp(2.5rem, 6vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
/* Panel azul marino con el logo sobre una placa blanca y un acento amarillo en la esquina */
.hero-media { position: relative; display: grid; place-items: center; aspect-ratio: 5 / 4; }
.hero-media::before { content: ""; position: absolute; inset: 0; background: var(--band); border-radius: calc(var(--curve) * 1.3) 0 calc(var(--curve) * 1.3) 0; }
.hero-media::after { content: ""; position: absolute; right: 0; bottom: 0; width: 26%; height: 30%; background: var(--accent); border-radius: calc(var(--curve) * 1.3) 0 0 0; }
:root[data-theme="dark"] .hero-media::before { background: #000; box-shadow: inset 0 0 0 1.5px #2a2f37; }
.hero-plate { position: relative; z-index: 1; width: 52%; aspect-ratio: 1; display: grid; place-items: center; background: #fff; border-radius: 28px; }
.hero-plate img { height: 78%; width: auto; }
.hero h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(2.2rem, 4.6vw, 3.7rem); line-height: 1.15; letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.hero h1 em { font-style: normal; color: var(--brand); }
.points { display: grid; gap: 1.1rem; margin: 2rem 0 2.2rem; }
.points li { display: flex; align-items: center; gap: 1.1rem; font-size: 1.15rem; color: var(--ink); }
.points .num { flex: none; width: 3.4rem; padding-right: 1rem; border-right: 3px solid var(--accent); font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: var(--brand); }
.cta-row { display: flex; flex-wrap: wrap; gap: 1rem; }

/* 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(2rem, 4vw, 3.2rem); }
.section h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(1.8rem, 3.4vw, 2.7rem); line-height: 1.2; color: var(--ink); text-wrap: balance; }
.section-note { margin-top: 1rem; color: var(--muted); max-width: 62ch; }

.js-ready .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js-ready .reveal.is-in { opacity: 1; transform: none; }

/* El club: banda azul marino */
.club { background: var(--band); color: #fff; border-radius: 0 var(--curve) 0 var(--curve); margin-top: var(--sp); }
.club h2, .club h3 { color: #fff; }
.club .eyebrow { color: var(--accent); }
.club-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem); }
.club-block { padding-top: 1.3rem; border-top: 3px solid var(--accent); }
.club-block h3 { font-family: var(--serif); font-size: 1.35rem; margin-bottom: .7rem; }
.club-block p { color: rgba(255, 255, 255, .82); }
.stats { display: flex; flex-wrap: wrap; gap: 1.5rem 4.5rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
.stats div { display: flex; flex-direction: column; }
.stats dd { font-family: var(--serif); font-weight: 700; font-size: clamp(2.6rem, 5vw, 3.8rem); line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.stats dt { color: rgba(255, 255, 255, .8); }

/* Proyectos: filas alternadas con foto grande y bloque de color detrás */
.project { padding-block: clamp(1.5rem, 3.5vw, 3rem); }
.project__btn { width: 100%; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; padding: 0; background: transparent; border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.project:nth-child(even) .project__figure { order: 2; }
.project__figure { position: relative; display: block; padding: 0 1.6rem 1.6rem 0; }
.project__figure::before { content: ""; position: absolute; right: 0; bottom: 0; width: 68%; height: 68%; background: var(--accent); border-radius: 0 0 calc(var(--curve) * .8) 0; transition: transform .5s var(--ease); }
.project:nth-child(even) .project__figure { padding: 0 0 1.6rem 1.6rem; }
.project:nth-child(even) .project__figure::before { right: auto; left: 0; background: var(--brand); border-radius: 0 0 0 calc(var(--curve) * .8); }
.project__media { position: relative; z-index: 1; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface); border-radius: calc(var(--curve) * 1.1) 10px calc(var(--curve) * 1.1) 10px; }
.project:nth-child(even) .project__media { border-radius: 10px calc(var(--curve) * 1.1) 10px calc(var(--curve) * 1.1); }
.project__media img { width: 100%; height: 100%; object-fit: cover; }
.project__btn:hover .project__figure::before { transform: translate(6px, 6px); }
.project:nth-child(even) .project__btn:hover .project__figure::before { transform: translate(-6px, 6px); }
.project__text { display: block; }
.project__num { display: block; margin-bottom: .6rem; font-family: var(--serif); font-weight: 700; font-size: 1.1rem; color: var(--brand); }
.project__title { display: block; font-family: var(--serif); font-weight: 700; font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.2; color: var(--ink); overflow-wrap: anywhere; transition: color .2s; }
.project__desc { display: block; margin-top: 1rem; color: var(--muted); font-size: 1.15rem; max-width: 44ch; }
.project__more { display: inline-block; margin-top: 1.4rem; font-weight: 800; color: var(--ink); border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.project__btn:hover .project__title { color: var(--brand); }

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

/* Concursos */
.contests { background: var(--surface); border-radius: var(--curve) 0 var(--curve) 0; }
.contest-list { border-top: 3px solid var(--accent); }
.contest { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.75fr); gap: 1rem clamp(1.5rem, 4vw, 4rem); padding-block: clamp(1.4rem, 3vw, 2.2rem); border-bottom: 1px solid var(--line); }
.contest__name { font-family: var(--serif); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2rem); 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.4rem 2.2rem; }
.team { display: block; align-self: start; padding: 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.1rem; color: var(--ink); border-bottom: 2px solid var(--accent); transition: color .2s; }
.team:hover .team__name { color: var(--brand); }
.team__results { display: block; margin-top: .45rem; }
.team__results span { display: block; font-size: 1rem; line-height: 1.5; color: var(--muted); }
.team__results .is-podium { color: var(--ink); font-weight: 800; }

/* Preguntas */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.faq .section-head { margin-bottom: 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; padding: 1.3rem 0; font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 1.7rem; line-height: 1; font-weight: 400; color: var(--brand); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 2.5rem 1.4rem 0; color: var(--muted); }

/* Súmate */
.join { padding-top: 0; }
.join-card { position: relative; overflow: hidden; padding: clamp(2.5rem, 6vw, 5rem); background: var(--brand); color: var(--on-brand); border-radius: 0 calc(var(--curve) * 1.3) 0 calc(var(--curve) * 1.3); }
.join-card::after { content: ""; position: absolute; right: 0; bottom: 0; width: clamp(110px, 18vw, 240px); height: clamp(110px, 18vw, 240px); background: var(--accent); border-radius: calc(var(--curve) * 1.3) 0 0 0; }
.join-card > * { position: relative; z-index: 1; }
.join-card .eyebrow { color: inherit; opacity: .85; }
.join-card h2 { color: inherit; max-width: 22ch; }
.join-text { margin: 1.1rem 0 1.8rem; max-width: 52ch; font-size: 1.2rem; }
.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: var(--on-brand); color: var(--brand); font-weight: 800; text-decoration: none; }
.soon { margin-top: 1.4rem; font-size: 1rem; opacity: .9; }

/* Pie */
.site-footer { padding-block: 2.2rem; background: var(--band); color: rgba(255, 255, 255, .85); font-size: 1rem; }
.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: 22px; }
.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(600px, calc(100% - 1.5rem)); max-height: calc(100dvh - 1.5rem); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 28px 8px 28px 8px; background: var(--bg); color: var(--text); overflow: hidden; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .5); }
.modal[open] { animation: pop .3s var(--ease); }
.modal::backdrop { background: rgba(0, 0, 0, .65); }
@keyframes pop { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.modal__inner { position: relative; max-height: calc(100dvh - 1.5rem); }
.modal__body { padding: clamp(1.5rem, 3vw, 2.5rem); overflow-y: auto; max-height: calc(100dvh - 1.5rem); }
.modal__body h2 { font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.2; margin-bottom: .8rem; padding-right: 2.5rem; color: var(--ink); overflow-wrap: anywhere; }
.modal__body > p { color: var(--muted); }
.modal__body h3 { margin: 1.6rem 0 .5rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .16em; color: var(--brand); }
.recs li { padding: .65rem 0; border-bottom: 1px solid var(--line); }
.modal__close { position: absolute; top: .8rem; right: .8rem; z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.modal__close:hover { border-color: var(--ink); }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .faq-grid, .club-grid, .contest { grid-template-columns: 1fr; }
  .project__btn { grid-template-columns: 1fr; gap: 1.6rem; }
  .project:nth-child(even) .project__figure { order: 0; }
}
@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: .95rem; 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; }
  body { font-size: 1.05rem; }
  .cta-row .btn { flex: 1 1 100%; }
  .faq details p { padding-right: 0; }
}

/* Movimiento reducido */
@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; }
}
