body {
  margin: 0;
  background: #f5ecdd;
  transition: background-color 0.3s ease;
}

/* =========================
   PORTADA
========================= */

.portada {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.logo {
  width: 400px;
  max-width: 75vw;
  height: auto;
}

.subtitulo {
  position: relative;
  height: 72px;
  margin-top: 24px;

  font-size: 22px;
  letter-spacing: 6px;
  color: #8f2424;
  text-transform: uppercase;
}

#frase1,
#frase2 {
  position: absolute;
  left: 50%;
  width: 900px;
  max-width: 90vw;
  text-align: center;

  transition:
    opacity 1.5s ease,
    transform 1.5s ease;
}

#frase1 {
  top: 0;
  transform: translate(-50%, 0);
}

#frase2 {
  top: 38px;
  opacity: 0;
  transform: translate(-50%, 12px);
}

/* =========================
   ENTRA
========================= */

#entra {
  margin-top: 32px;

  color: #8f2424;
  font-size: 18px;
  letter-spacing: 6px;
  text-transform: uppercase;

  cursor: pointer;

  opacity: 0;

  transition:
    opacity 1.2s ease,
    color 0.4s ease;
}

#entra:hover {
  color: #b13b3b;
}

/* =========================
   INTRO NEGRA
========================= */

#intro {
  position: fixed;
  inset: 0;

  background: #000;

  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 9999;
  overflow: hidden;

  transition:
    opacity 0.6s ease,
    background-color 0.3s ease;
}

/* Halo detrás del corazón */

#intro::before {
  content: "";

  position: absolute;

  width: 275px;
  height: 275px;

  background: url("../img/Corazon.png") center / contain no-repeat;

  opacity: 0;

  filter: blur(22px) brightness(1.2) saturate(1.2);

  transform-origin: center;

  animation: haloLatido 1s ease-in-out 2 forwards;
}

#introCorazon {
  position: relative;
  z-index: 2;

  width: 275px;
  height: auto;

  transform-origin: center;

  animation: introLatido 1s ease-in-out 2 forwards;
}

/* Corazón */

@keyframes introLatido {
  0%,
  100% {
    transform: scale(1);
    opacity: 0;
  }

  20% {
    transform: scale(1.15);
    opacity: 1;
  }

  45% {
    transform: scale(1);
    opacity: 1;
  }

  70% {
    transform: scale(1);
    opacity: 0;
  }
}

/* Halo */

@keyframes haloLatido {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.95);
  }

  20% {
    opacity: 0.65;
    transform: scale(1.35);
  }

  40% {
    opacity: 0.25;
    transform: scale(1.25);
  }

  65% {
    opacity: 0;
    transform: scale(1.1);
  }
}

/* =========================
   INTERIOR CASA AMARTÉ
========================= */

#casa {
  position: relative;
  display: none;

  min-height: 100vh;

  background:
    linear-gradient(rgba(249, 246, 239, 0.42), rgba(249, 246, 239, 0.42)),
    url("../img/Fondos/paper.jpg");

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  box-shadow: inset 0 0 180px rgba(70, 45, 20, 0.12);

  justify-content: center;
  align-items: center;
  flex-direction: column;

  text-align: center;

  color: #7a1f22;

  opacity: 0;

  transition: opacity 1.2s ease;
}

#casa h1 {
  font-family: "Cormorant Garamond", serif;

  font-size: 64px;
  font-weight: 500;

  margin-bottom: 16px;
}

#casa p {
  font-size: 22px;
  letter-spacing: 1px;
  line-height: 1.8;
}
/* =========================
   LOBBY
========================= */

.lobby {
  max-width: 900px;
  width: 90%;

  text-align: center;

  animation: aparecer 1.2s ease;
}

.ornamento {
  font-size: 24px;
  color: #8b6b3e;
  margin-bottom: 18px;

  opacity: 0.75;
}

.lobby h1 {
  font-family: "Cormorant Garamond", serif;

  font-size: 68px;
  font-weight: 500;

  color: #7a1f22;

  margin: 0;
}

.frase-lobby {
  margin-top: 18px;

  font-size: 24px;

  letter-spacing: 1px;

  color: #6b3d2a;

  font-style: italic;
}

.linea-lobby {
  width: 170px;
  height: 1px;

  margin: 38px auto;

  background: rgba(122, 31, 34, 0.28);
}

.texto-lobby {
  font-size: 21px;

  line-height: 1.9;

  letter-spacing: 0.5px;

  color: #5e4634;
}

@keyframes aparecer {
  from {
    opacity: 0;

    transform: translateY(18px);
  }

  to {
    opacity: 1;

    transform: translateY(0);
  }
}
/* ===========================================
   MASTHEAD CASA AMARTÉ
=========================================== */

.masthead {
  width: min(900px, 92%);
  margin: 0 auto;

  text-align: center;

  animation: aparecer 1.2s ease;
  padding-top: 40px;
}

.linea {
  width: 420px;
  max-width: 90%;
  height: 1px;

  background: #8f2424;

  opacity: 0.35;

  margin: 18px auto;
}

.edicion {
  font-family: "Cormorant Garamond", serif;

  font-size: 15px;

  letter-spacing: 5px;

  text-transform: uppercase;

  color: #6c5343;
}

.masthead h1 {
  margin: 0 0 12px;

  font-family: "Cormorant Garamond", serif;

  font-size: 82px;

  font-weight: 500;

  letter-spacing: 1px;

  color: #8f2424;

  text-transform: none;
}

.submast {
  margin-bottom: 28px;
  font-family: "Cormorant Garamond", serif;
  font-size: 24px;
  letter-spacing: 3px;
  color: #6d4f40;
}

@keyframes aparecer {
  from {
    opacity: 0;
    transform: translateY(25px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-editorial {
  position: absolute;

  top: 28px;
  left: 20px;

  width: 205px;

  opacity: 0.16;

  transform: rotate(-6deg);

  filter: sepia(1) saturate(0.45) brightness(0.82) contrast(0.88);

  mix-blend-mode: multiply;

  pointer-events: none;
}

.logo-editorial:hover {
  opacity: 0.55;
}
/* =========================
   SECCIÓN EDITORIAL
========================= */

.seccion-editorial {
  width: min(760px, 88%);
  margin: 40px auto 0;
  text-align: left;
}

.numero-seccion {
  font-family: "Cormorant Garamond", serif;
  font-size: 18px;
  letter-spacing: 3px;
  color: #8a6a4d;
  margin-bottom: 2px;
}

.seccion-editorial h2 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 52px;
  font-weight: 500;
  color: #7a1f22;
}

.seccion-editorial p {
  max-width: 560px;
  margin: 10px 0 20px;
  font-family: "Cormorant Garamond", serif;
  font-size: 21px;
  line-height: 1.55;
  color: #5f4636;
}

.filete-seccion {
  width: 220px;
  height: 1px;
  background: rgba(122, 31, 34, 0.28);
}

/* Papel y relieve en la pantalla de bienvenida */
.portada {
  background:
    linear-gradient(rgba(245, 236, 221, 0.72), rgba(245, 236, 221, 0.72)),
    url("../img/Fondos/paper.jpg") center / cover no-repeat;
}

.portada .logo {
  filter:
    drop-shadow(-1px -1px 0 rgba(255, 247, 230, 0.85))
    drop-shadow(2px 3px 1px rgba(91, 38, 24, 0.24))
    drop-shadow(4px 7px 5px rgba(66, 35, 23, 0.19));
}


.redes-portada {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 0 16px 12px;
}

.redes-portada a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  box-sizing: border-box;
  text-decoration: none;
}

.redes-portada img {
  display: block;
}

.redes-portada a:hover {
  opacity: 0.8;
}

.redes-portada a:focus-visible {
  outline: 2px solid #8f2424;
  border-radius: 4px;
}


.portada { min-height: 100svh; height: auto; padding: 20px 12px; box-sizing: border-box; }
.portada .logo { width: min(400px, 75vw, 55svh); }
.portada .subtitulo { width: min(900px, 94%); height: auto; display: grid; gap: 9px; margin: 18px 0 0; font-size: clamp(12px, 2vw, 22px); letter-spacing: clamp(2px, .45vw, 6px); }
.portada #frase1, .portada #frase2 { position: static; width: auto; max-width: none; opacity: 1; transform: none; }
.portada #entra { opacity: 1; border: 0; background: transparent; font-family: inherit; min-height: 44px; margin: 14px 0 0; }
.portada { position: relative; }
#repetir-intro {
  position: absolute;
  inset-inline-start: max(clamp(8px, 2vw, 28px), env(safe-area-inset-left));
  inset-block-end: max(clamp(8px, 2vw, 24px), env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: clamp(98px, 12vw, 138px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #842024;
  cursor: pointer;
}
#repetir-intro svg,
#repetir-intro img { grid-area: 1 / 1; }
#repetir-intro svg { width: 100%; fill: currentColor; font: 700 11px Georgia, serif; }
#repetir-intro img { width: 53%; height: auto; }
#repetir-intro:hover { background: #8420240d; }
#repetir-intro:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
@media (max-width: 520px), (max-height: 490px) {
  .portada { padding-block-end: 105px; }
}
@media (prefers-reduced-motion: no-preference) {
  #repetir-intro:not(:disabled) img { animation: latido-repetir 2.5s ease-in-out infinite; }
}
@keyframes latido-repetir {
  0%, 32%, 100% { transform: scale(1); }
  9% { transform: scale(1.13); }
  22% { transform: scale(1.08); }
}


/* Señal visual de que la bienvenida se puede abrir. */
.portada #entra {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: .6em;
  padding: 0 .9em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .36em;
}
.portada #entra:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .portada #entra:not(:disabled):not(:hover):not(:focus-visible) { animation: invitacion-entrada 3s ease-in-out infinite; }
}
@keyframes invitacion-entrada {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}
