/* Destello · marca y componentes comunes */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fuentes/inter-latin-wght-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fuentes/inter-latin-ext-wght-normal.woff2') format('woff2'); 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Bricolage'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('../fuentes/bricolage-grotesque-latin-opsz-normal.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Bricolage'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('../fuentes/bricolage-grotesque-latin-ext-opsz-normal.woff2') format('woff2'); 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --noche: #15122E;
  --noche-2: #1E1A42;
  --noche-3: #2A2558;
  --linea: rgba(233, 230, 255, .12);
  --lima: #C8F23C;
  --lima-osc: #A9D417;
  --coral: #FF6A4D;
  --cielo: #7DD3FC;
  --rosa: #F9A8D4;
  --oro: #FCD34D;
  --lavanda: #E9E6FF;
  --texto: #FFFFFF;
  --suave: #B9B4E0;
  --tenue: #8C86BD;
  --radio: 18px;
  --radio-s: 12px;
  --sombra: 0 20px 60px -20px rgba(0, 0, 0, .55);
  --titulo: 'Bricolage', 'Inter', system-ui, sans-serif;
  --cuerpo: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ancho: 1180px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--noche); color: var(--texto); font-family: var(--cuerpo);
  font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--lima); text-underline-offset: 3px; }
a:hover { color: #fff; }
h1, h2, h3, h4 { font-family: var(--titulo); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(2.5rem, 6.4vw, 5.2rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.3rem); }
h3 { font-size: 1.35rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
::selection { background: var(--lima); color: var(--noche); }
:focus-visible { outline: 3px solid var(--lima); outline-offset: 3px; border-radius: 6px; }
.visual-oculto { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.contenedor { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 20px; }
.seccion { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.ceja { display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--lima); margin-bottom: 16px; }
.ceja::before { content: ''; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.intro { color: var(--suave); font-size: 1.15rem; max-width: 640px; }
.centro { text-align: center; }
.centro .intro { margin-left: auto; margin-right: auto; }
.lima { color: var(--lima); }
.coral { color: var(--coral); }
.subrayado { background: linear-gradient(transparent 62%, rgba(200, 242, 60, .35) 62%); padding: 0 .08em; }

/* Botones */
.boton {
  --bg: var(--lima); --fg: var(--noche);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--bg); color: var(--fg); border: 0; border-radius: 999px; padding: 15px 26px;
  font: 700 1rem/1 var(--cuerpo); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .18s cubic-bezier(.2, .8, .2, 1.4), box-shadow .2s, background .2s;
  box-shadow: 0 10px 30px -10px rgba(200, 242, 60, .6);
}
.boton:hover { transform: translateY(-2px) scale(1.02); color: var(--fg); box-shadow: 0 16px 40px -12px rgba(200, 242, 60, .75); }
.boton:active { transform: scale(.97); }
.boton[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.boton.secundario { --bg: transparent; --fg: #fff; box-shadow: inset 0 0 0 1.5px var(--linea); }
.boton.secundario:hover { box-shadow: inset 0 0 0 1.5px var(--lavanda); }
.boton.coral { --bg: var(--coral); --fg: #fff; box-shadow: 0 10px 30px -10px rgba(255, 106, 77, .6); }
.boton.peligro { --bg: transparent; --fg: var(--coral); box-shadow: inset 0 0 0 1.5px rgba(255, 106, 77, .5); }
.boton.peque { padding: 10px 16px; font-size: .9rem; }
.boton.grande { padding: 19px 32px; font-size: 1.1rem; }

/* Cabecera */
.cabecera { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(21, 18, 46, .72); border-bottom: 1px solid transparent; transition: border-color .3s; }
.cabecera.con-borde { border-color: var(--linea); }
.cabecera .contenedor { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 800 1.45rem/1 var(--titulo); color: #fff; text-decoration: none; letter-spacing: -.03em; }
.logo:hover { color: #fff; }
.logo .chispa { width: 30px; height: 30px; color: var(--lima); animation: girar 9s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.menu { display: flex; gap: 6px; align-items: center; }
.menu a { color: var(--suave); text-decoration: none; font-weight: 600; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.menu a:hover, .menu a[aria-current='page'] { color: #fff; background: rgba(255, 255, 255, .06); }
.menu .boton { color: var(--noche); margin-left: 8px; }
.menu .boton:hover { background: var(--lima); color: var(--noche); }
.abrir-menu { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }
@media (max-width: 900px) {
  .abrir-menu { display: block; }
  .menu { position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; background: var(--noche); padding: 16px 20px 28px; border-bottom: 1px solid var(--linea); transform: translateY(-120%); transition: transform .3s; }
  .menu.abierto { transform: none; }
  .menu a { padding: 14px 12px; font-size: 1.05rem; }
  .menu .boton { margin: 10px 0 0; }
}

/* Tarjetas */
.tarjeta { background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02)); border: 1px solid var(--linea); border-radius: var(--radio); padding: 28px; }
.rejilla { display: grid; gap: 20px; }
.rejilla.dos { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.rejilla.tres { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.rejilla.cuatro { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.icono { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; background: rgba(200, 242, 60, .12); margin-bottom: 18px; }
.etiqueta { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: rgba(200, 242, 60, .14); color: var(--lima); }
.etiqueta.coral { background: rgba(255, 106, 77, .15); color: var(--coral); }
.etiqueta.cielo { background: rgba(125, 211, 252, .14); color: var(--cielo); }

/* Pie */
.pie { border-top: 1px solid var(--linea); padding: 64px 0 40px; color: var(--suave); font-size: .95rem; margin-top: 40px; }
.pie .columnas { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.pie h4 { font: 700 .8rem/1 var(--cuerpo); letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.pie ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.pie a { color: var(--suave); text-decoration: none; }
.pie a:hover { color: var(--lima); }
.pie .legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--linea); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: var(--tenue); }
@media (max-width: 760px) { .pie .columnas { grid-template-columns: 1fr 1fr; } .pie .columnas > :first-child { grid-column: 1 / -1; } }

/* Formularios */
label { display: block; font-weight: 600; margin-bottom: 8px; font-size: .95rem; }
.campo { margin-bottom: 18px; }
.ayuda-campo { color: var(--tenue); font-size: .85rem; margin-top: 6px; }
input[type='text'], input[type='email'], input[type='date'], input[type='password'], input[type='number'], select, textarea {
  width: 100%; background: rgba(255, 255, 255, .06); border: 1.5px solid var(--linea); color: #fff; border-radius: var(--radio-s);
  padding: 14px 16px; font: 500 1rem var(--cuerpo); transition: border-color .2s, background .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lima); background: rgba(255, 255, 255, .09); }
select option { background: var(--noche-2); }
textarea { min-height: 96px; resize: vertical; }
.casilla { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; cursor: pointer; }
.casilla input { width: 22px; height: 22px; accent-color: var(--lima); flex: none; margin-top: 2px; }
.interruptor { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--linea); cursor: pointer; margin: 0; }
.interruptor small { display: block; color: var(--tenue); font-weight: 400; font-size: .85rem; }
.interruptor input { appearance: none; -webkit-appearance: none; width: 52px; height: 30px; border-radius: 999px; background: var(--noche-3); position: relative; flex: none; cursor: pointer; transition: background .2s; }
.interruptor input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .25s cubic-bezier(.2, .8, .2, 1.3); }
.interruptor input:checked { background: var(--lima); }
.interruptor input:checked::after { transform: translateX(22px); background: var(--noche); }

/* Avisos flotantes */
.avisos { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: grid; gap: 10px; width: min(92vw, 420px); pointer-events: none; }
.aviso { background: #fff; color: var(--noche); border-radius: 14px; padding: 14px 18px; font-weight: 600; box-shadow: var(--sombra); animation: entrarAviso .35s cubic-bezier(.2, .8, .2, 1.3); pointer-events: auto; }
.aviso.error { background: var(--coral); color: #fff; }
@keyframes entrarAviso { from { opacity: 0; transform: translateY(20px) scale(.95); } }

/* Texto largo (legal, ayuda) */
.prosa { max-width: 780px; }
.prosa h2 { font-size: 1.7rem; margin-top: 2em; }
.prosa h3 { margin-top: 1.6em; }
.prosa p, .prosa li { color: var(--lavanda); }
.prosa li { margin-bottom: .4em; }
.prosa table { width: 100%; border-collapse: collapse; margin: 1em 0 2em; font-size: .95rem; }
.prosa th, .prosa td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--linea); vertical-align: top; }
.prosa th { color: #fff; }
.hueco { background: rgba(252, 211, 77, .16); color: var(--oro); border-radius: 6px; padding: 0 6px; font-weight: 600; }
.cabeza-pagina { padding: 72px 0 24px; }
.cabeza-pagina h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
.migas { font-size: .85rem; color: var(--tenue); margin-bottom: 18px; }
.migas a { color: var(--tenue); }

/* Preguntas */
details.pregunta { border-bottom: 1px solid var(--linea); padding: 6px 0; }
details.pregunta summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font: 700 1.1rem var(--titulo); }
details.pregunta summary::-webkit-details-marker { display: none; }
details.pregunta summary::after { content: '+'; font: 400 1.8rem/1 var(--cuerpo); color: var(--lima); transition: transform .25s; }
details.pregunta[open] summary::after { transform: rotate(45deg); }
details.pregunta p { color: var(--suave); padding-bottom: 12px; }

/* Aparición al hacer scroll */
.aparece { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.aparece.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } .aparece { opacity: 1; transform: none; } }

/* Fondo con brillo */
.brillo { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.brillo::before, .brillo::after { content: ''; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45; }
.brillo::before { width: 520px; height: 520px; background: #4B3FD6; top: -160px; left: -120px; }
.brillo::after { width: 420px; height: 420px; background: rgba(200, 242, 60, .35); top: 120px; right: -140px; }
