/* Sistema visual de Pasaje Polanco. Colores, fuentes y medidas se cambian solo en :root.
   Fuentes: Cormorant Garamond y Jost, licencia SIL Open Font 1.1. */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fuentes/cormorant-garamond-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("assets/fuentes/jost-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("assets/fuentes/jost-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --color-marfil: #fbf6ec;
  --color-dorado: #fcd798;
  --color-herreria: #342f2e;
  --sombra-rgb: 46 33 32;
  --fuente-titulos: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --fuente-texto: "Jost", "Century Gothic", system-ui, sans-serif;
  --gutter: clamp(1rem, 5vw, 2.5rem);
  --radio: 2px;
  --entrada: 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-herreria);
  color: var(--color-marfil);
  font-family: var(--fuente-texto);
  font-weight: 400;
  line-height: 1.5;
}
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--fuente-titulos); font-weight: 500; line-height: 1; }

.portada {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}
.portada__foto { position: absolute; inset: 0; z-index: -2; }
.portada__foto img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 64.5% 0%; }

/* Oscurece solo el cielo detrás del texto y el piso detrás del pie; el resto de la foto queda limpio. */
.portada::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgb(var(--sombra-rgb) / 0.28) 0%, rgb(var(--sombra-rgb) / 0) 42%),
    linear-gradient(to top, rgb(var(--sombra-rgb) / 0.56) 0, rgb(var(--sombra-rgb) / 0.42) 2.5rem, rgb(var(--sombra-rgb) / 0) 5.5rem);
}

.portada__contenido {
  position: relative;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(1.75rem, 4.5vh, 3rem) var(--gutter) 2rem;
  text-align: center;
  text-shadow: 0 1px 18px rgb(var(--sombra-rgb) / 0.45);
}
.portada__contenido > * { animation: entrar var(--entrada) both; }
.portada__contenido > :nth-child(2) { animation-delay: 80ms; }
.portada__contenido > :nth-child(3) { animation-delay: 160ms; }
.portada__contenido > :nth-child(4) { animation-delay: 240ms; }
.portada__contenido > :nth-child(5) { animation-delay: 320ms; }
.portada__contenido > :nth-child(6) { animation-delay: 400ms; }

h1 { font-size: clamp(2.75rem, min(14.5vw, 10vh), 5.75rem); letter-spacing: 0.005em; }

.ciudad {
  display: flex;
  align-items: center;
  gap: 0.9em;
  margin-top: clamp(0.5rem, 1.2vh, 0.75rem);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}
.ciudad::before, .ciudad::after { content: ""; width: 2.25rem; height: 1px; background: var(--color-dorado); }

h2 { margin-top: clamp(1rem, 2.2vh, 1.5rem); font-size: clamp(1.875rem, min(9vw, 5vh), 2.75rem); letter-spacing: 0.01em; }

.pilares {
  display: flex;
  flex-direction: column;
  gap: 0.25em;
  margin-top: clamp(0.625rem, 1.4vh, 0.875rem);
  font-size: clamp(0.75rem, 3.3vw, 0.8125rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.pilares__union { display: none; white-space: pre; }

.frase { margin-top: clamp(0.5rem, 1vh, 0.625rem); font-size: clamp(0.875rem, 3.7vw, 0.9375rem); }
.frase span { display: inline-block; }

.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  margin-top: clamp(1rem, 2vh, 1.25rem);
  padding: 0.75rem 2.25rem;
  border-radius: var(--radio);
  background: var(--color-dorado);
  color: var(--color-herreria);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-decoration: none;
  text-shadow: none;
  text-transform: uppercase;
  transition: background-color 180ms ease, transform 180ms ease;
}
.boton:hover { background: var(--color-marfil); transform: translateY(-1px); }
.boton:active { transform: translateY(0); }
.boton:focus-visible { outline: 2px solid var(--color-marfil); outline-offset: 3px; }

.pie { padding: 0 var(--gutter) 1rem; font-size: 0.75rem; letter-spacing: 0.06em; text-align: center; }

/* Página 404: mismos elementos sobre fondo liso. */
.sencilla { display: grid; place-items: center; min-height: 100vh; min-height: 100svh; }
.sencilla .portada__contenido { align-self: center; }
.sencilla h1 { margin-top: 1.25rem; font-size: clamp(2.25rem, 9vw, 3.5rem); }

@media (min-aspect-ratio: 1/1) and (min-width: 48rem) {
  .pilares { flex-direction: row; gap: 0; }
  .pilares__union { display: inline; }
}

/* En horizontal el cielo de la foto queda al 64.5% del ancho: el texto y el encuadre comparten ese eje.
   La sombra es vino, del color del atardecer, para no agrisar los muros blancos. */
@media (min-aspect-ratio: 1/1) {
  .portada { --sombra-rgb: 78 30 42; }
  .portada__contenido {
    padding-inline: 29vw 0;
    text-shadow: 0 1px 2px rgb(var(--sombra-rgb) / 0.7), 0 0 18px rgb(var(--sombra-rgb) / 0.55);
  }
  .portada__contenido::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -4rem;
    bottom: -3.5rem;
    left: calc(64.5% - 25rem);
    width: 50rem;
    background: radial-gradient(closest-side, rgb(var(--sombra-rgb) / 0.72) 0%, rgb(var(--sombra-rgb) / 0.66) 58%, rgb(var(--sombra-rgb) / 0.32) 80%, rgb(var(--sombra-rgb) / 0) 100%);
  }
  .pie { position: relative; padding-inline: 29vw 0; }
  .pie::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -1.25rem;
    bottom: 0;
    left: calc(64.5% - 14rem);
    width: 28rem;
    background: radial-gradient(closest-side, rgb(var(--sombra-rgb) / 0.66) 0%, rgb(var(--sombra-rgb) / 0.54) 60%, rgb(var(--sombra-rgb) / 0) 100%);
  }
  .sencilla .portada__contenido { padding-inline: var(--gutter); }
  .sencilla .portada__contenido::before { display: none; }
  .pilares { letter-spacing: 0.13em; }
  .frase { font-weight: 500; }
}

/* Pantallas muy panorámicas: baja un poco el encuadre para no cortar la esfera. */
@media (min-aspect-ratio: 11/5) {
  .portada__foto img { object-position: 64.5% 35%; }
}

/* En vertical la foto trae cielo abierto: el degradado baja desde arriba y deja respirar la plaza. */
@media (max-aspect-ratio: 1/1) {
  .portada__foto img { object-position: 58% 100%; }
  .portada::after {
    background:
      linear-gradient(to bottom, rgb(var(--sombra-rgb) / 0.6) 0%, rgb(var(--sombra-rgb) / 0.54) 42%, rgb(var(--sombra-rgb) / 0) 62%),
      linear-gradient(to top, rgb(var(--sombra-rgb) / 0.78) 0%, rgb(var(--sombra-rgb) / 0) 12%);
  }
}

/* Celular acostado: el texto ocupa toda la altura, así que la foto se oscurece pareja. */
@media (min-aspect-ratio: 1/1) and (max-height: 32rem) {
  .portada::after { background: rgb(var(--sombra-rgb) / 0.66); }
  .portada__contenido::before, .pie::before { display: none; }
}

@keyframes entrar {
  from { opacity: 0; transform: translateY(0.75rem); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .portada__contenido > * { animation: none; }
  .boton { transition: none; }
}
