/* Hadoria: estilo común de todas las páginas.
   Tema único oscuro (el cielo de noche es la marca). Colores de marca/guia-de-marca.html.
   Esquinas: tarjetas 16px, campos 10px, botones de píldora. */

:root {
  --noche: #151b3a;
  --noche-2: #1c2350;
  --noche-3: #0c1027;
  --oro: #e8b54a;
  --oro-claro: #f3d68a;
  --papel: #f6efe2;
  --coral: #e07a5f;
  --malva: #3a2f6e;
  --texto-2: #c9c3d8;
  --texto-3: #9c96b3;
  --linea: rgb(232 181 74 / .22);
  --tarjeta: rgb(28 35 80 / .55);
  --radio: 16px;
  --titulos: "Cormorant Garamond", Georgia, serif;
  --letra: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { overflow-x: clip; }
body {
  margin: 0; min-height: 100dvh; color: var(--papel); font-family: var(--letra); font-size: 17px; line-height: 1.55;
  background: radial-gradient(ellipse 120% 70% at 50% 0%, #232b62 0%, var(--noche) 45%, var(--noche-3) 100%) fixed, var(--noche-3);
}
#cielo { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
img, svg { max-width: 100%; }
a { color: var(--oro-claro); }
a:hover { color: var(--papel); }
h1, h2, h3 { font-family: var(--titulos); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: -.3px; }
h1 { font-size: clamp(40px, 7vw, 68px); }
h2 { font-size: clamp(32px, 5vw, 46px); }
h3 { font-size: 26px; }
h1 em, h2 em { font-style: italic; font-weight: 600; color: var(--oro); padding-bottom: 4px; }
p { margin: 0; }
.ancho { width: min(1120px, 100% - 32px); margin-inline: auto; }
.estrecho { width: min(720px, 100% - 32px); margin-inline: auto; }
.suave { color: var(--texto-2); }
.pequeno { font-size: 14px; color: var(--texto-3); }

/* Cabecera */
.cabecera { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  background: rgb(12 16 39 / .72); border-bottom: 1px solid var(--linea); }
.cabecera .ancho { display: flex; align-items: center; gap: 24px; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--papel);
  font-family: var(--titulos); font-weight: 700; font-size: 28px; }
.logo img { width: 36px; height: 36px; }
.menu { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.menu a { color: var(--texto-2); text-decoration: none; font-size: 15px; white-space: nowrap; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--oro-claro); }
.menu a.entrar { color: var(--papel); font-weight: 600; }
@media (max-width: 760px) {
  .menu a:not(.boton):not(.entrar) { display: none; }
  /* En el móvil: el botón grande ya está en la página; arriba solo "Entrar" como píldora */
  .menu .boton { display: none; }
  .menu a.entrar { padding: 8px 16px; border-radius: 999px; background: var(--oro); color: var(--noche); }
  .cabecera .ancho { height: 58px; gap: 12px; }
  .logo { font-size: 24px; } .logo img { width: 32px; height: 32px; }
  .menu .solo-ancho { display: none; }
  /* Menú abierto: panel con todas las secciones */
  .cabecera.abierta .menu { position: absolute; top: 58px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 18px; background: rgb(12 16 39 / .97); border-bottom: 1px solid var(--linea); box-shadow: 0 18px 30px rgb(0 0 0 / .4); }
  .cabecera.abierta .menu a:not(.boton):not(.entrar) { display: block; padding: 14px 4px; font-size: 18px; color: var(--papel); border-bottom: 1px solid var(--linea); }
  .cabecera.abierta .menu a.entrar { order: -1; align-self: flex-start; margin: 8px 0 6px; }
  .cabecera.abierta .menu .boton { display: inline-flex; margin-top: 16px; }
  /* Botones largos: que bajen de línea en vez de salirse */
  .boton { white-space: normal; text-align: center; line-height: 1.25; max-width: 100%; }
}
.menu-boton { display: none; }
@media (max-width: 760px) {
  .menu-boton { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border: 0; border-radius: 12px; background: transparent; color: var(--papel); cursor: pointer; }
  .menu-boton span, .menu-boton span::before, .menu-boton span::after { display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; position: relative; transition: transform .2s, background .2s; }
  .menu-boton span::before, .menu-boton span::after { content: ''; position: absolute; left: 0; }
  .menu-boton span::before { top: -7px; } .menu-boton span::after { top: 7px; }
  .cabecera.abierta .menu-boton { margin-left: auto; }
  .cabecera.abierta .menu-boton span { background: transparent; }
  .cabecera.abierta .menu-boton span::before { transform: translateY(7px) rotate(45deg); }
  .cabecera.abierta .menu-boton span::after { transform: translateY(-7px) rotate(-45deg); }
}

/* Botones */
.boton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 26px; border-radius: 999px;
  border: 0; background: var(--oro); color: var(--noche); font: 600 16px/1 var(--letra); text-decoration: none; cursor: pointer;
  white-space: nowrap; transition: transform .2s cubic-bezier(.16, 1, .3, 1), background .2s; }
.boton:hover { background: var(--oro-claro); color: var(--noche); }
.boton:active { transform: scale(.98); }
.boton.secundario { background: transparent; color: var(--papel); box-shadow: inset 0 0 0 1px rgb(246 239 226 / .35); }
.boton.secundario:hover { box-shadow: inset 0 0 0 1px var(--oro); color: var(--oro-claro); }
.boton.pequeno { padding: 9px 18px; font-size: 14px; color: var(--noche); }
.boton[disabled] { opacity: .5; cursor: default; }
.menu .boton { color: var(--noche); }

/* Formularios */
.campo { display: grid; gap: 6px; }
.campo label { font-size: 15px; font-weight: 500; color: var(--papel); }
.campo .ayuda { font-size: 13px; color: var(--texto-3); }
.campo .error { font-size: 14px; color: #ffb4a0; display: none; }
.campo.mal .error { display: block; }
input, select { width: 100%; padding: 13px 14px; border-radius: 10px; border: 1px solid rgb(246 239 226 / .25);
  background: rgb(12 16 39 / .7); color: var(--papel); font: 16px var(--letra); }
input::placeholder { color: #8f89a8; }
input:focus, select:focus { outline: 2px solid var(--oro); outline-offset: 1px; border-color: transparent; }
input[type="checkbox"] { width: auto; accent-color: var(--oro); }
.casilla { display: flex; gap: 10px; align-items: center; font-size: 15px; color: var(--texto-2); }

/* Tarjetas */
.tarjeta { background: var(--tarjeta); border: 1px solid var(--linea); border-radius: var(--radio); padding: 26px; }
.tarjeta h3 { margin-bottom: 8px; }

/* Secciones */
section { padding: 72px 0; }
.titulo-seccion { max-width: 640px; margin-bottom: 34px; }
.titulo-seccion p { margin-top: 12px; color: var(--texto-2); font-size: 18px; }

/* Pie */
.pie { border-top: 1px solid var(--linea); padding: 40px 0 56px; margin-top: 40px; color: var(--texto-3); font-size: 14px; }
.pie .ancho { display: grid; gap: 18px; }
.pie nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.pie a { color: var(--texto-2); text-decoration: none; }
.pie a:hover { color: var(--oro-claro); }

/* Carta (dibujo de una carta de baraja) */
.carta-dibujo svg { display: block; width: 100%; height: auto; border-radius: 6%; filter: drop-shadow(0 18px 30px rgb(5 8 25 / .55)); }

/* Aviso de entretenimiento */
.aviso { font-size: 14px; color: var(--texto-3); border-left: 2px solid var(--oro); padding-left: 12px; }

/* Movimiento: solo si la persona no ha pedido reducirlo */
@media (prefers-reduced-motion: no-preference) {
  .aparece { animation: aparece .8s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(var(--i, 0) * 90ms); }
  @keyframes aparece { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}

/* Aviso "Hadoria en tu móvil" (app instalable) */
#aviso-app { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 9999; max-width: 520px; margin: 0 auto; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: #1d2450; border: 1px solid rgb(232 181 74 / .45); box-shadow: 0 12px 34px rgb(0 0 0 / .45); animation: subir .35s ease-out; }
#aviso-app img { width: 44px; height: 44px; border-radius: 10px; flex: none; }
#aviso-app div { flex: 1; min-width: 0; font-size: 14px; color: var(--texto-2); line-height: 1.35; }
#aviso-app b { display: block; color: var(--papel); font-size: 15px; }
#aviso-app .cerrar { background: none; border: 0; color: var(--texto-3); font-size: 24px; line-height: 1; padding: 4px 6px; cursor: pointer; }
@keyframes subir { from { transform: translateY(30px); opacity: 0; } }

/* Botón de idioma (EN / ES), visible también en el móvil */
.cabecera .menu a.idioma { display: inline-grid; place-items: center; min-width: 38px; height: 30px; padding: 0 8px; border-radius: 999px;
  border: 1px solid rgb(232 181 74 / .6); color: var(--oro-claro); font-size: 13px; font-weight: 700; letter-spacing: 1px; }
.cabecera .menu a.idioma:hover { background: rgb(232 181 74 / .15); }
@media (max-width: 760px) { .cabecera .menu a.idioma { display: inline-grid; } .cabecera.abierta .menu a.idioma { align-self: flex-start; margin: 4px 0; } }

/* Casillas obligatorias: más grandes y, si faltan, en rojo y temblando */
.casilla input[type=checkbox], .consentir input[type=checkbox] { width: 22px; height: 22px; flex: none; accent-color: var(--oro); cursor: pointer; }
.falta { outline: 2px solid var(--coral); outline-offset: 6px; border-radius: 10px; color: #ffd9cf !important; animation: temblar .45s ease-in-out 2; }
.falta input[type=checkbox] { box-shadow: 0 0 0 3px var(--coral); border-radius: 4px; }
.aviso-casilla { color: #ff9f86; font-weight: 700; font-size: 15px; margin-top: 10px; }
@keyframes temblar { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
@media (prefers-reduced-motion: reduce) { .falta { animation: none; } }
