/* ==========================================================================
   Matriz del Destino · «Aurora de Medianoche»
   Fraunces (títulos y números) + Outfit (cuerpo y UI). Mobile-first.
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-var-latin.woff2") format("woff2-variations"),
       url("/fonts/fraunces-var-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("/fonts/outfit-var-latin.woff2") format("woff2-variations"),
       url("/fonts/outfit-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --tinta: #0E1330;
  --cobalto: #1F3470;
  --oro: #E9C77B;
  --coral: #FF9E8A;
  --lavanda: #8B7CF6;
  --blanco: #F7F3FF;
  --chispa: #FFD966;
  --niebla: #B9B6D9;
  --abisal: #070A1C;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --oro-texto: linear-gradient(105deg, #D9B266 0%, #E9C77B 22%, #F6DFA6 40%, #FFF8E2 48%, #FFD966 56%, #E9C77B 72%, #D2A458 100%);
  --cristal: linear-gradient(180deg, rgba(31, 52, 112, .52), rgba(14, 19, 48, .86));
  --borde-oro: linear-gradient(160deg, rgba(233, 199, 123, .95), rgba(233, 199, 123, .14) 38%, rgba(139, 124, 246, .38) 68%, rgba(255, 158, 138, .7));
  --sombra-texto: 0 2px 14px rgba(7, 10, 28, .75);
  --suave: cubic-bezier(.22, 1, .36, 1);
  --rebote: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--tinta);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--blanco);
  background: transparent; /* el fondo lo pinta html; si no, taparía el cielo (z-index -1) */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

/* El velo giratorio y los halos de la figura sobresalen al rotar: en móvil
   ensanchaban el viewport de diseño (~30 px de scroll lateral). clip no crea
   contenedor de scroll, así que no rompe el sticky del escenario. */
main { overflow-x: clip; }

img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-optical-sizing: auto;
  font-weight: 600;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; }

a {
  color: var(--oro);
  text-decoration-color: rgba(233, 199, 123, .45);
  text-underline-offset: .2em;
  transition: color .2s, text-decoration-color .2s;
}
a:hover { color: var(--chispa); text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--chispa);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: rgba(255, 217, 102, .35); color: var(--blanco); }

.solo-lectores, .oculto {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.saltar {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--chispa);
  color: var(--tinta);
  font-weight: 600;
  text-decoration: none;
  transition: top .2s;
}
.saltar:focus { top: 12px; }

/* ==========================================================================
   Cielo: halo, aurora, rayos, estrellas (canvas) y grano
   ========================================================================== */

.cielo {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: var(--tinta);
  contain: strict;
}

.cielo__halo {
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(55% 42% at 50% 24%, rgba(31, 52, 112, .95) 0%, rgba(31, 52, 112, .5) 45%, rgba(31, 52, 112, 0) 78%),
    radial-gradient(40% 30% at 88% 78%, rgba(139, 124, 246, .16), rgba(139, 124, 246, 0) 70%),
    radial-gradient(36% 28% at 8% 62%, rgba(255, 158, 138, .08), rgba(255, 158, 138, 0) 70%),
    linear-gradient(180deg, #121a42 0%, var(--tinta) 55%, #0b0f28 100%);
}

/* Aurora y rayos: canvas a baja resolución (js/cielo.js) que el navegador escala;
   el reescalado da el desenfoque sin filtros caros ni capas gigantes en móvil. */
.cielo__aurora {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cielo__estrellas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.grano {
  position: absolute;
  inset: 0;
  opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Cabecera
   ========================================================================== */

.cabecera {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 18px 6px;
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--blanco);
  text-decoration: none;
}
.marca__logo {
  width: 40px; height: 40px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(233, 199, 123, .55), 0 0 22px rgba(139, 124, 246, .45);
  transition: transform .5s var(--rebote), box-shadow .3s;
}
.marca:hover .marca__logo { transform: rotate(22.5deg) scale(1.05); box-shadow: 0 0 0 1px var(--chispa), 0 0 26px rgba(255, 217, 102, .45); }
.marca:hover { color: var(--blanco); }
.marca__nombre {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: .005em;
  line-height: 1;
}
.marca__nombre em { font-style: normal; font-weight: 400; color: var(--niebla); font-size: .86em; }

.cabecera__nav { display: flex; gap: 4px; }
.cabecera__nav a {
  padding: 8px 10px;
  white-space: nowrap;
  border-radius: 999px;
  color: var(--niebla);
  font-size: 14.5px;
  text-decoration: none;
}
.cabecera__nav a:hover { color: var(--blanco); background: rgba(185, 182, 217, .08); }
@media (max-width: 360px) { .cabecera__nav a:first-child { display: none; } }

/* ==========================================================================
   Fichas (píldora dorada con brillo que la recorre, como en los vídeos)
   ========================================================================== */

.ficha {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .25em .55em;
  margin: 0;
  padding: .62em 1.35em .58em;
  border: 1px solid rgba(233, 199, 123, .8);
  border-radius: 999px;
  background: rgba(14, 19, 48, .62);
  box-shadow: 0 8px 24px -10px rgba(7, 10, 28, .9), inset 0 0 18px rgba(233, 199, 123, .07);
  color: var(--oro);
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.2;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 var(--abisal);
  overflow: hidden;
  isolation: isolate;
}
.ficha::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, transparent 30%, rgba(233, 199, 123, .22) 50%, transparent 70%);
  background-size: 250% 100%;
  animation: barrido 5.5s ease-in-out infinite;
}
@keyframes barrido {
  0%, 30% { background-position: 130% 0; }
  70%, 100% { background-position: -30% 0; }
}
.ficha__punto {
  color: var(--coral);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 158, 138, .8);
}
.ficha__num {
  font-weight: 700;
  font-size: 1.32em;
  letter-spacing: .02em;
  color: var(--chispa);
  font-variant-numeric: lining-nums;
}
.ficha--grande { font-size: 14px; max-width: 100%; text-wrap: balance; }
.ficha--pequena { font-size: 11px; padding: .5em 1.1em .46em; margin-bottom: 14px; }

/* ==========================================================================
   Portada
   ========================================================================== */

.portada {
  position: relative;
  isolation: isolate;
  max-width: 720px;
  margin: 0 auto;
  padding: 30px 18px 44px;
  text-align: center;
}

.portada__astro {
  position: absolute;
  z-index: -1;
  top: -14px;
  left: 50%;
  width: min(128vw, 760px);
  margin-left: calc(min(128vw, 760px) / -2);
  color: var(--oro);
  opacity: .15;
  animation: girar 220s linear infinite;
  -webkit-mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 55%, transparent 100%);
}
@keyframes girar { to { transform: rotate(360deg); } }

.portada__titulo {
  margin: 20px 0 14px;
  font-size: clamp(46px, 13.4vw, 92px);
  line-height: .96;
  letter-spacing: -.022em;
  font-weight: 600;
  text-shadow: var(--sombra-texto);
}

.dorado {
  background: var(--oro-texto);
  background-size: 260% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 18px rgba(233, 199, 123, .3)) drop-shadow(0 3px 0 rgba(7, 10, 28, .55));
  animation: brillo-texto 7s ease-in-out infinite;
}
@keyframes brillo-texto {
  0%, 25% { background-position: 100% 0; }
  65%, 100% { background-position: 0% 0; }
}

.portada__entradilla {
  max-width: 33ch;
  margin: 0 auto;
  color: var(--niebla);
  font-size: 17.5px;
  line-height: 1.55;
  text-shadow: var(--sombra-texto);
}

.compartido {
  max-width: 420px;
  margin: 22px auto 0;
  padding: 12px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 158, 138, .45);
  background: rgba(14, 19, 48, .7);
  color: var(--blanco);
  font-size: 15px;
  line-height: 1.45;
}
.compartido b { font-family: var(--serif); color: var(--chispa); font-weight: 700; }

/* --- Formulario de fecha («astrolabio») ---------------------------------- */

.astrolabio, .puerta {
  position: relative;
  margin: 30px auto 0;
  max-width: 440px;
  padding: 26px 20px 20px;
  border: 1px solid transparent;
  border-radius: 30px;
  background: var(--cristal) padding-box, var(--borde-oro) border-box;
  box-shadow:
    0 40px 80px -30px rgba(7, 10, 28, .95),
    0 0 60px -20px rgba(139, 124, 246, .35),
    inset 0 1px 0 rgba(255, 255, 255, .07);
  text-align: left;
}
.astrolabio::before, .astrolabio::after,
.puerta::before, .puerta::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--oro);
  box-shadow: 0 0 10px var(--chispa), 0 0 2px var(--abisal);
}
.astrolabio::before, .puerta::before { left: 22%; }
.astrolabio::after, .puerta::after { right: 22%; }

.astrolabio__campos { margin: 0; padding: 0; border: 0; min-width: 0; }
.astrolabio__leyenda {
  display: block;
  width: 100%;
  margin: 0 0 6px;
  padding: 0;
  color: var(--niebla);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-align: center;
}

.dial {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1.75fr);
  align-items: end;
  gap: 2px;
}
.dial__campo {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  cursor: text;
}
.dial__etiqueta {
  margin-bottom: 0;
  color: var(--niebla);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .06em;
  transition: color .25s;
}
.dial__campo input {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 2px 0 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--chispa);
  caret-color: var(--coral);
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-weight: 600;
  font-size: clamp(36px, 10.6vw, 48px);
  line-height: 1.1;
  text-align: center;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: .02em;
  text-shadow: 0 0 22px rgba(255, 217, 102, .25);
  -moz-appearance: textfield;
  appearance: none;
}
.dial__campo input::placeholder { color: rgba(185, 182, 217, .26); text-shadow: none; }
.dial__campo input:focus { outline: none; }
.dial__linea {
  position: relative;
  display: block;
  width: 100%;
  height: 1px;
  background: rgba(233, 199, 123, .38);
}
.dial__linea::after {
  content: "";
  position: absolute;
  inset: -1px 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--coral), var(--chispa), var(--coral));
  box-shadow: 0 0 12px rgba(255, 217, 102, .8);
  transform: scaleX(0);
  transition: transform .45s var(--suave);
}
.dial__campo:focus-within .dial__etiqueta { color: var(--chispa); }
.dial__campo:focus-within .dial__linea::after { transform: scaleX(1); }
.dial__campo:has(input:focus-visible) .dial__linea::after { inset: -1.5px 0; }
.dial__campo input[aria-invalid="true"] { color: var(--coral); }
.dial__campo:has(input[aria-invalid="true"]) .dial__linea { background: var(--coral); }
.dial__punto {
  padding-bottom: 14px;
  color: var(--coral);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 30px;
  line-height: 1;
  text-shadow: 0 0 12px rgba(255, 158, 138, .9);
}

.astrolabio__nota {
  margin: 12px 0 0;
  color: var(--niebla);
  font-size: 13.5px;
  text-align: center;
  text-wrap: balance;
}

.aviso { margin: 10px 0 0; font-size: 14.5px; line-height: 1.45; min-height: 0; }
.aviso:empty { display: none; }
.aviso--error { color: var(--coral); }
.aviso--ok { color: var(--chispa); text-align: center; }

/* --- Botones -------------------------------------------------------------- */

.boton {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform .25s var(--rebote), box-shadow .3s, background-color .3s, border-color .3s, color .3s;
  touch-action: manipulation;
}
.boton:active { transform: scale(.975); }
.boton:focus-visible { outline: 2px solid var(--blanco); outline-offset: 4px; border-radius: 999px; }

.boton--oro {
  width: 100%;
  margin-top: 20px;
  color: var(--tinta);
  background: linear-gradient(180deg, #FFE7A3 0%, #F1D28C 30%, var(--oro) 60%, #D8AE62 100%);
  box-shadow:
    0 14px 34px -12px rgba(233, 199, 123, .7),
    0 0 0 1px rgba(255, 231, 163, .5),
    inset 0 1px 0 rgba(255, 255, 255, .7),
    inset 0 -3px 0 rgba(140, 92, 30, .22);
}
.boton--oro::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .75) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: destello-boton 4.8s ease-in-out 1.2s infinite;
}
.boton--oro:hover { box-shadow: 0 18px 44px -12px rgba(255, 217, 102, .85), 0 0 0 1px rgba(255, 231, 163, .8), inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 -3px 0 rgba(140, 92, 30, .22); color: var(--tinta); }
.boton--oro:hover::after { animation-duration: 1.4s; animation-delay: 0s; }
@keyframes destello-boton {
  0%, 62% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}
.boton__estrella {
  width: 18px; height: 18px;
  fill: var(--tinta);
  transition: transform .6s var(--rebote);
}
.boton:hover .boton__estrella { transform: rotate(90deg) scale(1.15); }
.boton[aria-busy="true"] { cursor: progress; }
.boton[aria-busy="true"] .boton__estrella { animation: girar 1s linear infinite; }
.boton--compacto { width: auto; min-height: 50px; font-size: 16px; }

.boton--cristal {
  width: 100%;
  color: var(--blanco);
  background: rgba(14, 19, 48, .66);
  border: 1px solid rgba(233, 199, 123, .55);
  box-shadow: 0 10px 30px -14px rgba(7, 10, 28, .9);
  font-size: 16px;
  min-height: 54px;
  padding: 0 18px;
}
.boton--cristal svg {
  width: 22px; height: 22px;
  flex: none;
  fill: none;
  stroke: var(--oro);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.boton--cristal:hover { border-color: var(--chispa); background: rgba(31, 52, 112, .7); color: var(--blanco); }
.boton--coral { border-color: rgba(255, 158, 138, .7); }
.boton--coral svg { stroke: var(--coral); }
.boton--coral:hover { border-color: var(--coral); }

/* ==========================================================================
   Resultado
   ========================================================================== */

.resultado {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 18px 30px;
  scroll-margin-top: 10px;
}
.resultado.entra { animation: entrar .9s var(--suave) both; }
@keyframes entrar {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

.comparativa {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 18px;
  max-width: 520px;
  font-size: 14px;
  color: var(--niebla);
  text-align: center;
}
.comparativa span {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(233, 199, 123, .35);
  background: rgba(14, 19, 48, .6);
}
.comparativa b { font-family: var(--serif); font-weight: 700; color: var(--chispa); font-size: 1.1em; }

.resultado__cabecera { text-align: center; }
.resultado__titulo {
  font-size: 22px;
  font-weight: 500;
  color: var(--niebla);
  letter-spacing: .01em;
}
.resultado__titulo:focus { outline: none; }

.numero-grande {
  position: relative;
  margin: 0 auto;
  width: fit-content;
  padding: 0 .08em;
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-weight: 700;
  font-size: clamp(118px, 36vw, 188px);
  line-height: .95;
  letter-spacing: -.02em;
  font-variant-numeric: lining-nums;
  background: var(--oro-texto);
  background-size: 280% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 26px rgba(233, 199, 123, .42)) drop-shadow(0 5px 0 rgba(7, 10, 28, .6));
}
.numero-grande.aparece {
  animation: numero-aparece 1.3s var(--suave) both, brillo-numero 2.2s ease-out .5s 2 both;
}
@keyframes numero-aparece {
  from { opacity: 0; transform: scale(.55); filter: blur(14px) drop-shadow(0 0 0 rgba(233, 199, 123, 0)); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes brillo-numero {
  from { background-position: 100% 0; }
  to { background-position: 0% 0; }
}
.numero-grande--quieto { margin-top: 24px; }

.resultado__breve {
  max-width: 34ch;
  margin: 16px auto 6px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--blanco);
  text-shadow: var(--sombra-texto);
  text-wrap: pretty;
}
.resultado__sub {
  margin: 0;
  color: var(--niebla);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* --- La figura de ocho puntas -------------------------------------------- */

.resultado__escenario { position: relative; }

.figura {
  position: relative;
  width: min(100%, 470px);
  aspect-ratio: 1;
  margin: 18px auto 0;
  container-type: inline-size;
  user-select: none;
  -webkit-user-select: none;
}
.figura__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.figura__halo { opacity: .7; transition: opacity 1.4s var(--suave); }

.figura__guias { fill: none; stroke: rgba(185, 182, 217, .2); stroke-width: .8; transition: stroke 1.2s; }

.figura__dial text {
  fill: var(--niebla);
  opacity: .32;
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-weight: 600;
  font-size: 11.5px;
  text-anchor: middle;
  dominant-baseline: central;
  transition: opacity .8s, fill .8s;
}
.figura__dial line { stroke: rgba(233, 199, 123, .35); stroke-width: .8; }
.figura__dial line.mayor { stroke: rgba(233, 199, 123, .6); }
.figura__dial text.encendido {
  fill: var(--chispa);
  opacity: 1;
  filter: drop-shadow(0 0 3px rgba(255, 217, 102, .9));
}

.figura__trazos { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.figura__trazos path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.figura__trazos--linea { stroke: var(--oro); stroke-width: 2; opacity: .5; }
.figura__trazos--brillo { stroke: var(--chispa); stroke-width: 8; opacity: 0; transition: opacity 1.2s ease .3s; }
.figura__trazos--chispa { stroke: #FFF8E2; stroke-width: 3.2; opacity: 0; }

.figura.traza .figura__trazos--linea path,
.figura.traza .figura__trazos--brillo path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.9s var(--suave);
}
.figura.traza .figura__trazos path + path { transition-delay: .35s; }

.figura[data-estado="revelada"] .figura__halo { opacity: 1; }
.figura[data-estado="revelada"] .figura__guias { stroke: rgba(233, 199, 123, .3); }
.figura[data-estado="revelada"] .figura__trazos--linea { opacity: 1; stroke-width: 2.4; transition: opacity .6s, stroke-width .6s; }
.figura[data-estado="revelada"] .figura__trazos--brillo { opacity: .62; }
.figura[data-estado="revelada"] .nodo:not(.nodo--E) { box-shadow: 0 0 0 3px rgba(7, 10, 28, .55), 0 0 16px -2px rgba(233, 199, 123, .42); }
.figura.enciende .figura__trazos--chispa { animation: chispa-visible 1.9s ease-out both; }
.figura.enciende .figura__trazos--chispa path {
  stroke-dasharray: .07 1;
  animation: chispa-recorre 1.9s cubic-bezier(.45, 0, .2, 1) both;
}
.figura.enciende .figura__trazos--chispa path + path { animation-delay: .25s; }
@keyframes chispa-recorre {
  from { stroke-dashoffset: 1.07; }
  to { stroke-dashoffset: .07; }
}
@keyframes chispa-visible {
  0% { opacity: 0; }
  8%, 80% { opacity: 1; }
  100% { opacity: 0; }
}

/* Nodos (HTML sobre el SVG para que los números sean nítidos y siempre derechos) */
.figura__nodos { position: absolute; inset: 0; }

.nodo {
  --r: 20;
  position: absolute;
  left: calc(var(--x) / 4.4 * 1%);
  top: calc(var(--y) / 4.4 * 1%);
  width: calc(var(--r) * 2 / 4.4 * 1%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 1.5px solid var(--oro);
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #39408a 0%, #1b2457 45%, var(--tinta) 80%);
  box-shadow: 0 0 0 3px rgba(7, 10, 28, .55), 0 6px 16px -4px rgba(7, 10, 28, .9);
  color: var(--oro);
  font: inherit;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform .35s var(--rebote), box-shadow .35s, border-color .35s;
}
.nodo__num {
  display: block;
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-weight: 700;
  font-size: 18px;
  font-size: calc(var(--r) * 1.0 / 4.4 * 1cqi);
  line-height: 1;
  font-variant-numeric: lining-nums;
  letter-spacing: -.01em;
  background: var(--oro-texto);
  background-size: 280% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  transform: translateY(.03em);
}
.nodo--E {
  --r: 29;
  border-color: var(--chispa);
  border-width: 2px;
  background: radial-gradient(circle at 34% 28%, #4a4fa0 0%, #23306b 45%, var(--tinta) 82%);
  box-shadow: 0 0 0 4px rgba(7, 10, 28, .55), 0 0 26px rgba(255, 217, 102, .55), 0 0 60px rgba(139, 124, 246, .5);
  animation: latido 3.2s ease-in-out infinite;
}
@keyframes latido {
  0%, 100% { box-shadow: 0 0 0 4px rgba(7, 10, 28, .55), 0 0 26px rgba(255, 217, 102, .55), 0 0 56px rgba(139, 124, 246, .5); }
  50% { box-shadow: 0 0 0 4px rgba(7, 10, 28, .55), 0 0 38px rgba(255, 217, 102, .85), 0 0 86px rgba(139, 124, 246, .65); }
}
.nodo:hover, .nodo:focus-visible, .nodo[aria-pressed="true"] {
  transform: translate(-50%, -50%) scale(1.14);
  border-color: var(--chispa);
  box-shadow: 0 0 0 3px rgba(7, 10, 28, .55), 0 0 22px rgba(255, 217, 102, .6);
  z-index: 2;
}
.nodo:focus-visible { outline: 2px solid var(--blanco); outline-offset: 3px; border-radius: 50%; }

.nodo__letra {
  position: absolute;
  top: 100%;
  left: 50%;
  margin-top: 3px;
  color: var(--niebla);
  font-family: var(--sans);
  font-size: 10px;
  font-size: clamp(9px, 2.3cqi, 12px);
  font-weight: 600;
  letter-spacing: .1em;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity .6s;
  pointer-events: none;
}

/* Velada: se intuye la figura, no se leen los números */
.figura[data-estado="velada"] .nodo:not(.nodo--E) {
  cursor: default;
  pointer-events: none;
  border-color: rgba(233, 199, 123, .45);
  box-shadow: 0 0 0 3px rgba(7, 10, 28, .55);
}
.figura[data-estado="velada"] .nodo:not(.nodo--E) .nodo__num {
  filter: blur(3.6px);
  opacity: .75;
}
.figura[data-estado="velada"] .nodo--E { pointer-events: none; }

.figura__velo {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 14%, rgba(14, 19, 48, .0) 15%, rgba(139, 124, 246, .16) 40%, rgba(14, 19, 48, .34) 70%, transparent 72%),
    conic-gradient(from 0deg, rgba(139, 124, 246, .0), rgba(139, 124, 246, .2), rgba(255, 158, 138, .08), rgba(139, 124, 246, .0) 50%, rgba(185, 182, 217, .14) 75%, rgba(139, 124, 246, 0));
  -webkit-mask-image: radial-gradient(circle, transparent 0 13%, #000 20%, #000 62%, transparent 72%);
  mask-image: radial-gradient(circle, transparent 0 13%, #000 20%, #000 62%, transparent 72%);
  animation: girar 38s linear infinite;
  transition: opacity 1.2s var(--suave), transform 1.2s var(--suave);
}
.figura[data-estado="revelada"] .figura__velo { opacity: 0; }

/* Revelado: nodos que aparecen en cascada y números con brillo dorado */
.figura.revela .nodo {
  animation: nodo-entra .9s var(--suave) backwards;
  animation-delay: calc(var(--i) * 85ms + 650ms);
}
.figura.revela .nodo--E { animation: nodo-entra .9s var(--suave) backwards, latido 3.2s ease-in-out 2s infinite; animation-delay: 300ms, 2s; }
.figura.revela .nodo__num {
  animation: brillo-numero 1.6s ease-out backwards;
  animation-delay: calc(var(--i) * 85ms + 1000ms);
  animation-iteration-count: 2;
}
.figura[data-estado="revelada"] .nodo__letra { opacity: .85; transition-delay: 1.6s; }
@keyframes nodo-entra {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.35); filter: blur(6px); }
  60% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); filter: blur(0); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.figura__pista {
  max-width: 34ch;
  margin: 14px auto 0;
  color: var(--niebla);
  font-size: 14.5px;
  text-align: center;
}

/* --- Puerta de email ------------------------------------------------------ */

.puerta { margin-top: 26px; max-width: 470px; padding: 28px 20px 20px; }
.puerta.sale { animation: salir .5s var(--suave) both; }
@keyframes salir { to { opacity: 0; transform: translateY(-10px) scale(.98); } }
.puerta__titulo {
  margin-bottom: 8px;
  font-size: 27px;
  line-height: 1.12;
  text-align: center;
}
.puerta__texto {
  color: var(--niebla);
  font-size: 15.5px;
  line-height: 1.55;
  text-align: center;
  text-wrap: pretty;
}
.puerta__form { margin-top: 18px; }
.puerta__nota {
  margin: 14px 0 0;
  color: var(--niebla);
  font-size: 12.5px;
  text-align: center;
}

.campo { position: relative; }
.campo__input {
  width: 100%;
  height: 60px;
  padding: 24px 18px 8px;
  border: 1px solid rgba(185, 182, 217, .38);
  border-radius: 18px;
  background: rgba(7, 10, 28, .55);
  color: var(--blanco);
  font-family: var(--sans);
  font-size: 17px;
  transition: border-color .25s, box-shadow .25s, background-color .25s;
  appearance: none;
}
.campo__input:hover { border-color: rgba(233, 199, 123, .6); }
.campo__input:focus {
  outline: none;
  border-color: var(--oro);
  background: rgba(7, 10, 28, .75);
  box-shadow: 0 0 0 4px rgba(233, 199, 123, .2), 0 0 24px -6px rgba(255, 217, 102, .5);
}
.campo__input[aria-invalid="true"] { border-color: var(--coral); }
.campo__etiqueta {
  position: absolute;
  left: 19px;
  top: 50%;
  color: var(--niebla);
  font-size: 16.5px;
  transform: translateY(-50%);
  transform-origin: 0 50%;
  pointer-events: none;
  transition: transform .3s var(--suave), color .3s, top .3s var(--suave);
}
.campo__input:focus + .campo__etiqueta,
.campo__input:not(:placeholder-shown) + .campo__etiqueta {
  top: 17px;
  transform: translateY(-50%) scale(.74);
  color: var(--oro);
}

.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consentimiento {
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  align-items: start;
  margin-top: 16px;
  padding: 12px 12px 12px 10px;
  border-radius: 16px;
  cursor: pointer;
  transition: background-color .25s;
}
.consentimiento:hover { background: rgba(185, 182, 217, .06); }
.consentimiento__input {
  position: absolute;
  top: 12px; left: 10px;
  width: 26px; height: 26px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.consentimiento__caja {
  position: relative;
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  margin-top: 1px;
  border: 1.5px solid var(--oro);
  border-radius: 8px;
  background: rgba(7, 10, 28, .6);
  transition: background .3s, border-color .3s, box-shadow .3s, transform .3s var(--rebote);
}
.consentimiento__caja svg { width: 20px; height: 20px; }
.consentimiento__caja path {
  fill: none;
  stroke: var(--tinta);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset .35s var(--suave) .05s;
}
.consentimiento__caja::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 12px;
  border: 1px solid var(--chispa);
  opacity: 0;
  transform: scale(.7);
}
.consentimiento__input:checked + .consentimiento__caja {
  border-color: var(--chispa);
  background: linear-gradient(180deg, #FFE7A3, var(--oro));
  box-shadow: 0 0 16px rgba(255, 217, 102, .55);
  transform: scale(1.06);
}
.consentimiento__input:checked + .consentimiento__caja path { stroke-dashoffset: 0; }
.consentimiento__input:checked + .consentimiento__caja::after { animation: onda .6s ease-out; }
@keyframes onda {
  from { opacity: .9; transform: scale(.8); }
  to { opacity: 0; transform: scale(1.5); }
}
.consentimiento__input:focus-visible + .consentimiento__caja { outline: 2px solid var(--blanco); outline-offset: 3px; }
.consentimiento__input[aria-invalid="true"] + .consentimiento__caja { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(255, 158, 138, .2); }
.consentimiento__texto { color: var(--niebla); font-size: 14px; line-height: 1.5; }
.consentimiento__texto a { color: var(--oro); }

/* --- Lectura completa ----------------------------------------------------- */

.lectura { margin: 30px auto 0; max-width: 640px; }
.lectura.entra > * { animation: entrar .8s var(--suave) both; animation-delay: calc(var(--i, 0) * 70ms + 900ms); }

.acciones { display: grid; gap: 10px; }
@media (min-width: 560px) and (max-width: 999px) { .acciones { grid-template-columns: 1fr 1fr; } }

.lectura__titulo {
  margin: 34px 0 12px;
  font-size: 23px;
  line-height: 1.2;
}
.lectura__titulo span { color: var(--niebla); font-family: var(--sans); font-weight: 400; font-size: 15px; }
.lectura__nota { margin-top: 18px; color: var(--niebla); font-size: 14.5px; }

.posiciones { display: grid; gap: 10px; }
@media (min-width: 560px) { .posiciones { grid-template-columns: 1fr 1fr; } }

.posicion {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px 16px 14px;
  border: 1px solid rgba(233, 199, 123, .2);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(31, 52, 112, .38), rgba(14, 19, 48, .7));
  scroll-margin: 90px;
  transition: border-color .4s, box-shadow .4s, transform .4s var(--suave);
}
.posicion.activa {
  border-color: var(--chispa);
  box-shadow: 0 0 0 1px rgba(255, 217, 102, .4), 0 0 34px -6px rgba(255, 217, 102, .45);
  transform: translateY(-2px);
}
.posicion__num {
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 1.5px solid var(--oro);
  background: radial-gradient(circle at 34% 28%, #39408a 0%, #1b2457 45%, var(--tinta) 80%);
  box-shadow: 0 0 18px -4px rgba(233, 199, 123, .5);
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-weight: 700;
  font-size: 24px;
  font-variant-numeric: lining-nums;
  color: var(--chispa);
  line-height: 1;
}
.posicion__sub {
  margin: 1px 0 2px;
  color: var(--niebla);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.posicion__titulo {
  margin: 0;
  font-family: var(--sans);
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--blanco);
}
.posicion__energia {
  margin: 4px 0 6px;
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-weight: 600;
  font-size: 19px;
  line-height: 1.2;
  color: var(--oro);
}
.posicion__texto { margin: 0 0 6px; color: var(--niebla); font-size: 14.5px; line-height: 1.5; }
.posicion__energia-texto { margin: 0; color: var(--blanco); font-size: 15px; line-height: 1.5; }
.posicion__reto { margin: 8px 0 0; color: var(--niebla); font-size: 14px; line-height: 1.45; }
.posicion__reto b { color: var(--coral); font-weight: 600; }

.posicion--centro {
  grid-template-columns: 76px minmax(0, 1fr);
  margin-top: 18px; /* el aviso de compartir está vacío casi siempre: sin esto toca los botones */
  padding: 20px 18px 18px;
  border-color: rgba(255, 217, 102, .6);
  background:
    radial-gradient(120% 90% at 0% 0%, rgba(139, 124, 246, .25), transparent 60%),
    linear-gradient(180deg, rgba(31, 52, 112, .55), rgba(14, 19, 48, .8));
  box-shadow: 0 0 40px -12px rgba(255, 217, 102, .45);
}
.posicion--centro .posicion__num { width: 76px; height: 76px; font-size: 36px; border-color: var(--chispa); box-shadow: 0 0 26px rgba(255, 217, 102, .5); }
.posicion--centro .posicion__energia { font-size: 23px; color: var(--chispa); }

.posiciones--lineas .posicion { grid-template-columns: 46px minmax(0, 1fr); padding: 14px; }
.posiciones--lineas .posicion__num { width: 46px; height: 46px; font-size: 20px; }

.gancho {
  margin-top: 32px;
  padding: 24px 20px;
  border: 1px solid rgba(255, 158, 138, .45);
  border-radius: 26px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(255, 158, 138, .16), transparent 60%),
    linear-gradient(180deg, rgba(31, 52, 112, .45), rgba(14, 19, 48, .8));
  text-align: center;
}
.gancho__titulo { margin: 0 0 6px; font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: 22px; line-height: 1.2; }
.gancho__texto { color: var(--niebla); font-size: 15px; margin: 0; }
.gancho .boton { margin-top: 16px; }

/* ==========================================================================
   Secciones de contenido
   ========================================================================== */

.seccion {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding: 72px 20px 0;
  scroll-margin-top: 10px;
}
.seccion--ancha { max-width: 1000px; }
.seccion > h2 {
  margin-bottom: 18px;
  font-size: clamp(31px, 8.4vw, 46px);
  line-height: 1.06;
  letter-spacing: -.012em;
  text-shadow: var(--sombra-texto);
}
.seccion > p, .seccion li p { color: var(--niebla); }
.seccion strong { color: var(--blanco); font-weight: 600; }
.seccion em { font-style: italic; color: var(--blanco); }

.nota-cristal {
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid transparent;
  border-radius: 22px;
  background: var(--cristal) padding-box, var(--borde-oro) border-box;
}
.nota-cristal p { margin: 0; color: var(--niebla); font-size: 15.5px; }

.pasos { list-style: none; margin: 26px 0 22px; padding: 0; counter-reset: paso; }
.paso {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  padding-bottom: 24px;
}
.paso::before {
  content: "";
  position: absolute;
  left: 23.5px;
  top: 50px;
  bottom: 2px;
  width: 1px;
  background: linear-gradient(180deg, rgba(233, 199, 123, .6), rgba(233, 199, 123, .05));
}
.paso:last-child::before { display: none; }
.paso__letra {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--oro);
  background: radial-gradient(circle at 34% 28%, #39408a 0%, #1b2457 45%, var(--tinta) 80%);
  color: var(--oro);
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-weight: 700;
  font-size: 21px;
}
.paso--centro .paso__letra { border-color: var(--chispa); color: var(--chispa); box-shadow: 0 0 24px rgba(255, 217, 102, .45); }
.paso h3 { font-size: 20px; margin: 9px 0 4px; }
.paso p { margin: 0 0 6px; font-size: 16px; }
.cuenta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 .32em;
  margin-top: 4px !important;
  padding: 6px 14px;
  border-radius: 14px;
  background: rgba(7, 10, 28, .45);
  border: 1px solid rgba(233, 199, 123, .18);
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-weight: 600;
  font-size: 18px !important;
  font-variant-numeric: lining-nums;
  color: var(--blanco) !important;
}
@media (min-width: 720px) { .cuenta { font-size: 20px !important; } }
.cuenta i { font-style: normal; color: var(--coral); }
.cuenta span { color: var(--niebla); font-family: var(--sans); font-weight: 400; }
.cuenta b { color: var(--chispa); font-weight: 700; font-size: 1.15em; }
.cuenta small { font-size: .7em; color: var(--oro); letter-spacing: .02em; }

.regla {
  margin-top: 28px;
  padding: 22px 20px 6px;
  border-radius: 24px;
  border: 1px solid rgba(255, 158, 138, .5);
  background:
    radial-gradient(100% 80% at 0% 0%, rgba(255, 158, 138, .12), transparent 60%),
    rgba(14, 19, 48, .72);
}
.regla__titulo {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-weight: 600;
  font-size: 21px;
  line-height: 1.25;
  color: var(--blanco);
}
.regla > p { color: var(--niebla); font-size: 16px; }
.regla__comparacion { display: grid; gap: 8px; margin: 4px 0 18px; }
.regla__comparacion p {
  display: flex;
  align-items: center;
  gap: .5em;
  margin: 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(7, 10, 28, .5);
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-weight: 600;
  font-size: 21px;
  font-variant-numeric: lining-nums;
}
.regla__si { color: var(--blanco); }
.regla__si b { color: var(--chispa); }
.regla__si span { color: var(--niebla); }
.regla__no { color: var(--niebla); }
.regla__no s { text-decoration-color: var(--coral); text-decoration-thickness: 2px; }
.regla__no small { font-family: var(--sans); font-size: 13px; font-weight: 400; }
.regla__marca {
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 700;
  flex: none;
}
.regla__si .regla__marca { background: var(--chispa); color: var(--tinta); }
.regla__no .regla__marca { background: var(--coral); color: var(--tinta); }

.energias {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 640px) { .energias { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .energias { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
.energia {
  position: relative;
  padding: 14px 14px 12px;
  border-radius: 20px;
  border: 1px solid rgba(233, 199, 123, .16);
  background: linear-gradient(180deg, rgba(31, 52, 112, .3), rgba(14, 19, 48, .65));
  transition: border-color .35s, transform .35s var(--suave), box-shadow .35s;
}
.energia:hover { border-color: rgba(233, 199, 123, .55); transform: translateY(-3px); box-shadow: 0 16px 30px -18px rgba(255, 217, 102, .5); }
.energia__num {
  display: block;
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
  font-variant-numeric: lining-nums;
  background: var(--oro-texto);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.energia__nombre { margin: 8px 0 4px; font-size: 17px; line-height: 1.2; }
.energia__texto { margin: 0; color: var(--niebla); font-size: 13.5px; line-height: 1.45; }

.preguntas { margin-top: 10px; border-top: 1px solid rgba(233, 199, 123, .18); }
.preguntas details { border-bottom: 1px solid rgba(233, 199, 123, .18); }
.preguntas summary {
  position: relative;
  display: block;
  padding: 18px 44px 18px 2px;
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100;
  font-weight: 600;
  font-size: 19px;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
  transition: color .2s;
}
.preguntas summary::-webkit-details-marker { display: none; }
.preguntas summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 22px; height: 22px;
  margin-top: -11px;
  border-radius: 50%;
  border: 1px solid rgba(233, 199, 123, .6);
  background:
    linear-gradient(var(--oro), var(--oro)) center / 10px 1.5px no-repeat,
    linear-gradient(var(--oro), var(--oro)) center / 1.5px 10px no-repeat;
  transition: transform .35s var(--suave), background-color .3s;
}
.preguntas details[open] summary::after { transform: rotate(45deg); background-color: rgba(233, 199, 123, .12); }
.preguntas summary:hover { color: var(--chispa); }
.preguntas details p { margin: 0 2px 20px; color: var(--niebla); font-size: 16px; }

.pie {
  max-width: 640px;
  margin: 0 auto;
  padding: 90px 20px max(36px, env(safe-area-inset-bottom));
  text-align: center;
  color: var(--niebla);
  font-size: 14px;
}
.pie__logo { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(233, 199, 123, .5), 0 0 30px rgba(139, 124, 246, .45); }
.pie__marca { margin: 0 0 8px; font-family: var(--serif); font-variation-settings: "SOFT" 100; font-weight: 600; font-size: 20px; color: var(--blanco); }
.pie__enlaces { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; }
.pie__legal { margin-top: 16px; font-size: 12.5px; opacity: .85; }

/* ==========================================================================
   Página sobria (privacidad, 404)
   ========================================================================== */

.documento {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 40px;
}
.documento--centrado { text-align: center; padding-top: 40px; }
.documento h1 {
  margin: 14px 0 10px;
  font-size: clamp(32px, 8.4vw, 48px);
  line-height: 1.08;
}
.documento h2 {
  margin: 38px 0 10px;
  font-size: 23px;
  line-height: 1.25;
  color: var(--oro);
}
.documento p, .documento li { color: #DCD8F0; font-size: 16.5px; line-height: 1.7; }
.documento strong { color: var(--blanco); }
.documento ul { padding-left: 1.2em; }
.documento li { margin-bottom: 6px; }
.documento li::marker { color: var(--coral); }
.documento .fecha-doc { color: var(--niebla); font-size: 14px; }
.documento__caja {
  margin: 22px 0;
  padding: 18px 20px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: var(--cristal) padding-box, var(--borde-oro) border-box;
}
.documento__caja p { margin: 0; }
.documento__volver { margin-top: 40px; }

/* ==========================================================================
   Escritorio
   ========================================================================== */

@media (min-width: 720px) {
  body { font-size: 18px; }
  .cabecera { padding: 22px 32px 8px; }
  .marca__nombre { font-size: 20px; }
  .portada { padding: 56px 24px 56px; }
  .portada__astro { top: -40px; }
  .portada__entradilla { font-size: 19px; }
  .astrolabio { padding: 30px 30px 24px; margin-top: 38px; }
  .seccion { padding-top: 96px; }
}

@media (min-width: 1000px) {
  .resultado {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    grid-template-areas:
      "comp comp"
      "escena cabecera"
      "escena puerta"
      "escena lectura";
    grid-template-rows: auto auto auto 1fr;
    column-gap: 56px;
    padding: 40px 32px 30px;
    align-items: start;
  }
  .comparativa { grid-area: comp; }
  .resultado__escenario { grid-area: escena; position: sticky; top: 24px; }
  .resultado__cabecera { grid-area: cabecera; padding-top: 30px; }
  .puerta { grid-area: puerta; margin-left: auto; margin-right: auto; }
  .lectura { grid-area: lectura; margin-top: 28px; }
  /* el panel derecho mide ~500 px: a dos columnas el texto quedaba en ~150 px */
  .lectura .posiciones { grid-template-columns: minmax(0, 1fr); }
  .figura { width: min(100%, 560px); margin-top: 0; }
  .numero-grande { font-size: 168px; }
}

/* ==========================================================================
   Movimiento reducido: fondo quieto, sin brillos en bucle, revelado inmediato
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .2s !important;
    transition-delay: 0s !important;
  }
  .portada__astro, .figura__velo, .ficha::after, .boton--oro::after, .dorado, .nodo--E { animation: none !important; }
  .boton--oro::after { display: none; }
  .figura .figura__trazos--linea path, .figura .figura__trazos--brillo path { transition: none !important; }
  .figura__trazos--chispa { display: none; }
  .resultado.entra, .lectura.entra > *, .numero-grande.aparece, .figura.revela .nodo, .figura.revela .nodo__num { animation: fundido .35s ease both !important; }
  @keyframes fundido { from { opacity: 0; } to { opacity: 1; } }
}
