/* Mizpa Comunidad: estilo compartido por todas las páginas */

:root {
  --fondo: #0d0a06;
  --oro: #d2a95a;
  --crema: #f1e7d2;
  --arena: #b9a585;
  --linea: rgba(210, 169, 90, .28);
  --velo: rgba(210, 169, 90, .045);
  --ancho: 34rem;
}

* { box-sizing: border-box; margin: 0; }
html { background: var(--fondo); -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  color: var(--crema);
  background: var(--fondo);
  font-family: "Cormorant Garamond", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  font-size: clamp(1.15rem, 3.9vw, 1.3rem);
  line-height: 1.6;
  text-align: center;
  padding: 2.5rem 1.75rem 3.5rem;
}

/* Esquinas doradas, como en la portada de la guía */
.marco { position: fixed; inset: 1.25rem; pointer-events: none; z-index: 1; }
.marco::before, .marco::after {
  content: ""; position: absolute; width: 2.75rem; height: 2.75rem;
  border: 1px solid var(--oro); opacity: .6;
}
.marco::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.marco::after { bottom: 0; right: 0; border-left: 0; border-top: 0; }

a { color: var(--crema); text-decoration: underline; text-decoration-color: var(--oro); text-underline-offset: .3em; }
a:hover { color: var(--oro); }
a:focus-visible { outline: 1px solid var(--oro); outline-offset: .35em; }

.saltar { position: absolute; left: -999rem; top: 1rem; z-index: 2; background: var(--fondo); padding: .4rem .8rem; }
.saltar:focus { left: 1rem; }

p, li { text-wrap: pretty; }
main > section + section { margin-top: 5rem; }

h2 {
  font-weight: 500;
  font-size: clamp(1.65rem, 6vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: .02em;
  text-wrap: balance;
}
h2::before { content: "◆"; display: block; color: var(--oro); opacity: .7; font-size: .8rem; margin-bottom: .9rem; }

.boton {
  display: inline-block;
  margin-top: 1rem;
  color: var(--oro);
  font-size: .82em;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
}
.boton:hover { color: var(--crema); }

/* Cabecera de las páginas interiores */
.cabecera { margin-bottom: 2.5rem; }
.cabecera .marca {
  display: inline-flex; align-items: center; gap: .6rem;
  font-size: 1.45rem; letter-spacing: .06em; text-decoration: none;
}
.cabecera .marca img { width: 2.6rem; height: 2.6rem; border-radius: 50%; }

/* Portada del inicio */
.portada { max-width: var(--ancho); margin: 0 auto; animation: aparecer 1.8s ease-out both; }
.emblema {
  display: block;
  width: min(21rem, 78vw);
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto -1.5rem;
  /* Funde los bordes de la imagen con el fondo */
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 72%);
          mask-image: radial-gradient(circle at 50% 50%, #000 58%, transparent 72%);
}
h1 {
  position: relative;
  font-weight: 400;
  font-size: clamp(3.25rem, 13vw, 5rem);
  letter-spacing: .05em;
  line-height: 1;
}
.lema {
  text-wrap: balance;
  font-style: italic;
  font-size: clamp(1.3rem, 4.6vw, 1.6rem);
  color: var(--oro);
  line-height: 1.35;
  margin-top: 1.25rem;
}
.entrada { color: var(--arena); margin-top: 1.25rem; }

/* Las dos puertas: dos mitades que juntas forman un marco */
.dos {
  position: relative;
  display: grid;
  gap: 1.25rem;
  max-width: 46rem;
  margin: 2rem auto 0;
}
.puerta {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: .7rem;
  padding: 2rem 1.5rem 1.75rem;
  background: var(--velo);
  color: var(--crema);
  text-decoration: none;
  transition: background-color .3s ease;
}
.puerta::before, .puerta::after {
  content: ""; position: absolute; width: 1.6rem; height: 1.6rem;
  border: 1px solid var(--oro); opacity: .75;
}
/* En el teléfono, una encima de otra: la de arriba lleva las esquinas de arriba, la de abajo las de abajo */
.puerta-huye::before  { top: 0; left: 0;  border-right: 0; border-bottom: 0; }
.puerta-huye::after   { top: 0; right: 0; border-left: 0;  border-bottom: 0; }
.puerta-queda::before { bottom: 0; left: 0;  border-right: 0; border-top: 0; }
.puerta-queda::after  { bottom: 0; right: 0; border-left: 0;  border-top: 0; }

.puerta-nombre { font-size: clamp(1.75rem, 6.5vw, 2.15rem); font-weight: 500; line-height: 1.1; }
.puerta-quien { color: var(--arena); text-wrap: balance; max-width: 19rem; }
/* margin-top: auto deja el "Entrar" de las dos puertas a la misma altura aunque sus textos midan distinto */
.puerta-entrar { color: var(--oro); font-size: .82em; letter-spacing: .2em; text-transform: uppercase; margin-top: auto; padding-top: .35rem; }
.puerta:hover { background: rgba(210, 169, 90, .1); color: var(--crema); }
.puerta:hover .puerta-entrar { color: var(--crema); }
.puerta:focus-visible { outline: 1px solid var(--oro); outline-offset: .3rem; }

.nota { font-style: italic; color: var(--arena); margin-top: 1.5rem; }
.nota + .nota { margin-top: .4rem; }

@media (min-width: 42rem) {
  .dos { grid-template-columns: 1fr 1fr; gap: 3rem; }
  /* En pantalla ancha, lado a lado: cada una lleva las esquinas de su lado, y en medio una línea de luz */
  .dos::before {
    content: ""; position: absolute; left: 50%; top: 8%; bottom: 8%; width: 1px;
    background: linear-gradient(transparent, var(--oro), transparent);
    box-shadow: 0 0 12px rgba(210, 169, 90, .55);
  }
  .puerta-huye::after   { top: auto; bottom: 0; left: 0; right: auto; border: 1px solid var(--oro); border-right: 0; border-top: 0; }
  .puerta-queda::before { bottom: auto; top: 0; left: auto; right: 0; border: 1px solid var(--oro); border-left: 0; border-bottom: 0; }
}

/* Por qué Mizpa */
.porque, .detras { max-width: var(--ancho); margin-left: auto; margin-right: auto; }
.porque h2, .detras h2 { margin-bottom: 1.25rem; }
.porque p + p, .detras p + p { margin-top: 1.1rem; }
.porque .moneda { font-style: italic; color: var(--oro); }
.porque .frase { font-size: 1.45em; font-weight: 500; line-height: 1.3; margin-top: 2rem; }

/* Lo que encuentras aquí */
.tres { list-style: none; padding: 0; display: grid; gap: 2.25rem; max-width: 54rem; margin: 2rem auto 0; }
.tres h3 { font-weight: 500; font-size: 1.35em; line-height: 1.25; }
.tres p { color: var(--arena); margin-top: .4rem; }
.tres .boton + .boton { margin-left: 1.25rem; }
@media (min-width: 52rem) {
  .tres { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
}

/* Páginas interiores */
.pagina-titulo { max-width: var(--ancho); margin: 0 auto; animation: aparecer 1.2s ease-out both; }
.pagina-titulo h1 { font-size: clamp(2.5rem, 10vw, 3.6rem); line-height: 1.1; text-wrap: balance; }
.pagina-titulo .entrada + .entrada { margin-top: .9rem; }
.urgente { margin-top: 1.5rem; font-size: .9em; color: var(--arena); border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); padding: .8rem 0; }

.texto, .prueba { max-width: var(--ancho); margin-left: auto; margin-right: auto; }
.texto h2, .prueba h2 { margin-bottom: 1.25rem; }
.texto p + p { margin-top: 1.1rem; }
.indicacion { color: var(--arena); font-size: .92em; margin-top: 1.25rem; }
.texto strong { font-weight: 500; color: var(--crema); }

.boton-marco { border: 1px solid var(--oro); padding: .75rem 1.5rem; margin-top: 1.5rem; }
.boton-marco:hover { background: rgba(210, 169, 90, .1); }

/* La prueba "¿Esto es para mí?": no guarda ni envía nada */
.test { margin-top: 1.25rem; text-align: left; }
.test label {
  display: flex; gap: .9rem; align-items: flex-start;
  padding: .85rem .35rem; border-top: 1px solid var(--linea); cursor: pointer;
}
.test label:last-child { border-bottom: 1px solid var(--linea); }
.test label:hover span { color: var(--oro); }
.test input {
  -webkit-appearance: none; appearance: none; flex: none;
  width: 1.25rem; height: 1.25rem; margin-top: .3rem;
  border: 1px solid var(--oro); background: transparent;
  display: grid; place-content: center; cursor: pointer;
}
.test input::after { content: ""; width: .6rem; height: .6rem; background: var(--oro); transform: scale(0); transition: transform .15s ease; }
.test input:checked::after { transform: scale(1); }
.test input:focus-visible { outline: 1px solid var(--crema); outline-offset: 3px; }
.resultado { margin-top: 1.5rem; font-style: italic; color: var(--arena); }
.resultado.si { color: var(--oro); font-size: 1.1em; }

.frases { list-style: none; padding: 0; margin-top: .75rem; font-style: italic; font-size: 1.2em; line-height: 1.5; }
.frases li:last-child { color: var(--oro); }

.verdades { list-style: none; padding: 0; margin: 1.5rem auto 0; counter-reset: verdad; }
.verdades li { counter-increment: verdad; padding: .45rem 0; }
.verdades li::before {
  content: counter(verdad); display: block; color: var(--oro); font-size: .8em;
  font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1;
}

.otra-mitad .boton { font-size: .9em; }

.boton.separado { margin-left: 1.25rem; }

/* Listas de las páginas cortas: preguntas que vienen, libros, lo que creemos */
.lista-preguntas, .creencias, .libros { list-style: none; padding: 0; }
.lista-preguntas li { font-style: italic; padding: .7rem 0; border-top: 1px solid var(--linea); }
.lista-preguntas li:last-child { border-bottom: 1px solid var(--linea); }
.creencias li { padding: .55rem 0; }
.creencias li::before { content: "◆"; display: block; color: var(--oro); opacity: .7; font-size: .55rem; margin-bottom: .35rem; }
.libros li + li { margin-top: 1.75rem; }
.libros h3 { font-weight: 500; font-size: 1.3em; font-style: italic; }
.libros p { color: var(--arena); margin-top: .3rem; }

/* El ejercicio para un día malo: recuadro con esquinas doradas, como las puertas */
.ejercicio { position: relative; background: var(--velo); padding: 2rem 1.5rem 1.75rem; }
.ejercicio::before, .ejercicio::after {
  content: ""; position: absolute; width: 1.6rem; height: 1.6rem;
  border: 1px solid var(--oro); opacity: .75;
}
.ejercicio::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.ejercicio::after { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.ejercicio p + p { margin-top: 1rem; }
/* Aviso médico al principio del ejercicio: va antes de los pasos, no después */
.ejercicio .antes { font-size: .92em; color: var(--arena); padding-bottom: 1.1rem; border-bottom: 1px solid var(--linea); }
.ejercicio .antes + p { margin-top: 1.25rem; }
.pasos { list-style: none; padding: 0; counter-reset: paso; margin: .5rem 0 1.25rem; }
.pasos li { counter-increment: paso; margin-top: 1.4rem; }
.pasos li::before {
  content: counter(paso); display: block; color: var(--oro); font-size: .8em;
  font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1;
}
.pasos strong { display: block; font-weight: 500; font-size: 1.1em; }
.frase-papel { display: block; margin-top: .6rem; font-style: italic; color: var(--oro); font-size: 1.1em; }
.credito { font-size: .85em; color: var(--arena); font-style: italic; }

/* Pie: aclaración, emergencia, contacto */
.pie {
  max-width: var(--ancho);
  margin: 5.5rem auto 0;
  font-size: clamp(1rem, 3.5vw, 1.1rem);
  line-height: 1.55;
  color: var(--arena);
}
.pie > * + * { margin-top: 1rem; }
.pie .rombo { color: var(--oro); opacity: .7; font-size: .8rem; }
.pie h2 { font-size: clamp(1.15rem, 4vw, 1.3rem); color: var(--crema); margin-top: 1.5rem; }
.pie h2::before { content: none; }
.pie h2 + p { margin-top: .4rem; }

.paises { list-style: none; padding: 0; margin: 1.1rem auto 0; max-width: 24rem; text-align: left; }
.paises details { border-top: 1px solid var(--linea); }
.paises li:last-child details { border-bottom: 1px solid var(--linea); }
.paises summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  padding: .7rem .35rem; color: var(--crema); font-size: clamp(1.1rem, 3.8vw, 1.2rem);
}
.paises summary::-webkit-details-marker { display: none; }
.paises summary::after { content: "+"; color: var(--oro); font-size: 1.35em; line-height: 1; transition: transform .2s ease; }
.paises details[open] summary::after { transform: rotate(45deg); }
.paises summary:hover { color: var(--oro); }
.paises summary:focus-visible { outline: 1px solid var(--oro); outline-offset: 2px; }
.lineas { list-style: none; padding: 0 .35rem 1rem; }
.lineas li + li { margin-top: .75rem; }
/* Números de tamaño parejo: en Cormorant los números por defecto bajan de la línea y "911" se lee mal */
.lineas a { font-size: 1.2em; letter-spacing: .04em; font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }
.lineas span { display: block; margin-top: .15rem; }

.mapa { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem 1.1rem; margin-top: 2.25rem; }
.contacto { color: var(--crema); }
.derechos { font-size: .9em; }

@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .portada, .pagina-titulo { animation: none; }
  .puerta, .paises summary::after, .test input::after { transition: none; }
}
