/* ═══════════════════════════════════════════════════════════════
   Eva & Óscar · 21.08.2027
   ═══════════════════════════════════════════════════════════════ */

/* ── Fuentes propias ──────────────────────────────────────────── */
@font-face {
  font-family: "Brand";
  src: url("../fonts/Brand.woff") format("woff"),
       url("../fonts/Brand.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue:        #386ba4;
  --blue-dark:   #2c5687;
  --blue-deep:   #16233c;
  --blue-link:   #386ba4;

  --ink:         #1c1e22;
  --ink-soft:    #45484f;
  --paper:       #fbf9f9;   /* tono base de toda la web (blanco clarito) */
  --cream:       #f4f2ec;
  --line:        #e2e0dc;

  --tint:        #314F75;   /* capa azul sutil sobre las fotos (b/n) */
  --countdown-bg: #fcfeff;  /* fondo solo del bloque de la cuenta atrás */

  --display: "Brand", "Libre Baskerville", serif;        /* títulos (Brand · mayúsculas de fábrica) */
  --sans:    "Libre Baskerville", Georgia, "Times New Roman", serif;
  --brand:   "Brand", "Libre Baskerville", serif;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --gutter: clamp(1.5rem, 6vw, 5rem);
  --maxw: 1180px;
  --sgap: clamp(1rem, 2.4vw, 2rem);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Tono base plano #fbf9f9 en toda la web */
  background: var(--paper);
}

img { display: block; max-width: 100%; height: auto; }

/* El texto nunca desborda su columna (títulos cursivos incluidos) */
p, h1, h2, h3, blockquote, cite, .display { overflow-wrap: break-word; }


/* ── Fotos con capa de color azul (#386ba4 · 15 %) ────────────── */

.media {
  position: relative;
  overflow: hidden;
  background: #e7ecf3;
}
.media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.03);   /* blanco y negro */
}
.media::after {                          /* capa azul sutil por encima */
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tint);
  opacity: .2;
  pointer-events: none;
}


/* ── Tipografía ───────────────────────────────────────────────── */

.display {
  font-family: var(--display);
  font-style: normal;
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: .01em;
  margin: 0;
}
.display--xl { font-size: clamp(2.6rem, 9vw, 6rem); }
.display--lg { font-size: clamp(1.9rem, 6.2vw, 3.9rem); }
.display--md { font-size: clamp(1.7rem, 3.8vw, 2.7rem); line-height: 1.3; }
.display em { font-family: inherit; font-size: 1em; font-style: normal; color: inherit; }

/* La cita va en Baskerville itálica (no en Brand ni Aston) */
.quote__text .display {
  font-family: var(--sans);
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.42;
}

.kicker {
  font-family: var(--sans);
  font-weight: 400;
  font-style: normal;
  font-size: clamp(.72rem, 1.5vw, .84rem);
  letter-spacing: 0;               /* interletrado 0 */
  text-transform: uppercase;
  line-height: 1.5;
  margin: 0;
}
.kicker--light { color: #fff; }
.kicker--wide  { letter-spacing: 0; }
.kicker--blue  { color: var(--blue); }

/* Énfasis en mitad de los párrafos: cursiva del mismo cuerpo (no más pequeña), en azul */
em {
  font-family: var(--sans);
  font-style: italic;
  font-size: 1.06em;
  font-weight: 400;
  color: var(--blue);
}

.blue { color: var(--blue); }

.link {
  color: var(--blue-link);
  text-decoration: none;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: 0;
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.link:hover { border-bottom-color: var(--blue-link); }


/* ═══════════════════════════════════════════════════════════
   SOBRE (intro oculta · fondo-sobre.png + solapa-sobre.png)
   ═══════════════════════════════════════════════════════════ */

.env {
  position: relative;
  width: min(520px, 84vw);
  aspect-ratio: 1366 / 768;
  margin: 0 auto;
  perspective: 1500px;
  filter: drop-shadow(0 26px 40px rgba(22, 35, 60, .28));
}
.env__body,
.env__flap {
  position: absolute;
  inset: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
.env__body { background-image: url("../fondo-sobre.png"); z-index: 1; }
.env__flap {
  background-image: url("../solapa-sobre.png");
  z-index: 3;
  transform-origin: center 6%;
  transform: rotateX(calc(var(--flap, 0) * -168deg));
  backface-visibility: hidden;
  opacity: calc(1 - var(--envfade, 0));
}
.env__letter {
  position: absolute;
  inset: 16% 12% 20%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 20px 44px rgba(22, 35, 60, .22);
  opacity: var(--lift, 0);
  transform: translateY(calc(var(--lift, 0) * -28%)) scale(calc(.9 + var(--lift, 0) * .14));
}
.letter__kicker { margin: 0 0 .5rem; font-size: .58rem; letter-spacing: 0; text-transform: uppercase; color: var(--blue-dark); }
.letter__names  { margin: 0; font-family: var(--display); font-style: italic; font-weight: 400; font-size: clamp(1.8rem, 5vw, 2.8rem); color: var(--ink); }
.letter__date   { margin: .6rem 0 0; font-size: .66rem; letter-spacing: 0; color: var(--ink-soft); }

.intro { position: relative; height: 260vh; z-index: 20; }
.intro__sticky {
  position: sticky; top: 0; height: 100vh;
  display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 42%, #fff 0%, var(--cream) 60%, #e6e2da 100%);
  opacity: calc(1 - var(--fade, 0));
}
.intro__hint {
  position: absolute; left: 0; right: 0; bottom: clamp(1.8rem, 6vh, 3.4rem);
  margin: 0; text-align: center; font-size: .66rem; letter-spacing: 0;
  text-transform: uppercase; color: var(--blue-dark);
  opacity: calc(1 - var(--hint, 0));
}
.intro__arrow {
  display: block; width: 12px; height: 12px; margin: 1rem auto 0;
  border-right: 1.5px solid var(--blue-dark); border-bottom: 1.5px solid var(--blue-dark);
  transform: rotate(45deg); animation: nudge 1.8s var(--ease) infinite;
}
@keyframes nudge {
  0%, 100% { transform: rotate(45deg) translate(0,0); opacity: .4; }
  50%      { transform: rotate(45deg) translate(3px,3px); opacity: 1; }
}
.site { opacity: 1; }


/* ═══════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18,28,46,.5), rgba(18,28,46,.3) 45%, rgba(18,28,46,.62));
}
.hero__content { position: relative; z-index: 2; text-align: center; color: #fff; padding: var(--gutter); }
.hero__content .kicker {
  font-family: var(--brand);
  font-size: clamp(1.5rem, 6.5vw, 2.9rem);
  letter-spacing: .06em;
  margin-bottom: .6rem;
}
.hero__date {
  margin: 0;
  font-family: var(--brand);
  font-weight: 400;
  font-size: clamp(3rem, 11vw, 7rem);
  letter-spacing: .02em;
  line-height: 1.02;
  color: #fff;
  text-shadow: 0 6px 40px rgba(0,0,0,.4);
}


/* ═══════════════════════════════════════════════════════════
   SECCIONES
   ═══════════════════════════════════════════════════════════ */

.section {
  position: relative;
  padding: clamp(3.25rem, 9vh, 8.5rem) var(--gutter);
  max-width: var(--maxw);
  margin: 0 auto;
}
/* El bloque de la cuenta atrás con fondo #fcfeff a todo el ancho */
.section--promise {
  display: grid;
  place-items: center;
  text-align: center;
  isolation: isolate;
}
.section--promise::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background: var(--countdown-bg);
  z-index: -1;
}

/* El encaje va pegado al final del bloque save the date */
.section--save { padding-bottom: 0; }

/* Flores decorativas de fondo (esquinas) */
/* Flores ancladas al borde real del viewport (sin paddings) */
.petal { position: absolute; z-index: 0; pointer-events: none; }
.petal--left {
  left: 50%; margin-left: -50vw; bottom: 1%;
  width: clamp(320px, 48vw, 640px); aspect-ratio: 1;
  background: url("../flor-izq.png") left bottom / contain no-repeat;
  opacity: .85;
}
.petal--right {
  right: 50%; margin-right: -50vw; top: 3%;
  width: clamp(300px, 46vw, 600px); aspect-ratio: 1;
  background: url("../flor-dcha.png") right top / contain no-repeat;
  opacity: .9;
}
.petal--stay { top: 2%; }
.section > .promise,
.section > .save,
.section > .quote,
.section > .stay { position: relative; z-index: 1; }


/* ── Para siempre + lugar + cuenta atrás ──────────────────── */

.promise { max-width: 40ch; }
.promise .display { margin-bottom: 1.4rem; }
.place { color: var(--ink); margin-bottom: clamp(2rem, 5vh, 3rem); }
.place a {
  color: inherit; text-decoration: none;
  border-bottom: 1px solid rgba(28,30,34,.4);
  transition: border-color .3s var(--ease), color .3s var(--ease);
}
.place a:hover { color: var(--blue); border-bottom-color: var(--blue); }

.countdown {
  display: inline-flex;
  gap: clamp(1.8rem, 5vw, 3.6rem);
  margin-top: clamp(1rem, 3vh, 2rem);
}
.countdown__item { text-align: center; }
.countdown__num {
  display: block;
  font-family: var(--brand);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(2.4rem, 9vw, 3.8rem);
  line-height: 1;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.countdown__label {
  display: block;
  margin-top: .5rem;
  font-family: var(--sans);
  font-size: .64rem;
  letter-spacing: 0;
  text-transform: lowercase;
  color: var(--ink-soft);
}


/* ── Save the date ────────────────────────────────────────── */

.save {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.save__text p { max-width: 46ch; color: var(--ink-soft); font-size: .9rem; }
.save__text .display { margin-bottom: .5rem; }
.save__date { color: var(--blue) !important; margin: 0 0 1.8rem; }

.save__photos {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.1rem;
}
.save__photo { border: 1px solid var(--line); }
.save__photo--tall { grid-column: 3 / 7; aspect-ratio: 3 / 4; }
.save__photo--wide {
  grid-column: 1 / 5;
  aspect-ratio: 4 / 3;
  margin-top: -30%;
  z-index: 2;
  box-shadow: 0 20px 50px rgba(20, 30, 48, .16);
}
/* Encaje decorativo a todo el ancho, dentro del bloque (pegado al final) */
.lace-band {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  margin-top: clamp(1.8rem, 5vh, 3.4rem);
  line-height: 0;
}
.lace-band img { display: block; width: 100%; height: auto; }


/* ── Cita ─────────────────────────────────────────────────── */

.quote {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.quote__photo { aspect-ratio: 4 / 5; border: 1px solid var(--line); }
.quote__text { margin: 0; text-align: center; }
.quote__text .display { margin-bottom: 1.4rem; }
.quote__text cite { font-style: normal; display: block; }


/* ── Alojamientos ─────────────────────────────────────────── */

.stay { text-align: left; }
.stay__eyebrow { margin: 0 0 .8rem; color: var(--ink); }
.stay > .display { margin-bottom: 1.6rem; }
.stay__intro {
  max-width: 64ch;
  color: var(--ink-soft);
  font-size: .9rem;
  margin: 0 0 1rem;
}
.stay__intro strong { color: var(--ink); font-weight: 700; }
.stay__intro:last-of-type { margin-bottom: clamp(2.4rem, 6vh, 3.6rem); }

.stay__carousel { position: relative; }

.stay__track {
  --per: 3;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--per) - 1) * var(--sgap)) / var(--per));
  gap: var(--sgap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: .5rem;
}
.stay__track::-webkit-scrollbar { display: none; }

.stay__card { scroll-snap-align: start; }
.stay__photo { aspect-ratio: 4 / 3; margin-bottom: 1.1rem; border: 1px solid var(--line); }
.stay__card h3 {
  margin: 0 0 .5rem;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.3;
}
.stay__card p {
  margin: 0 0 1rem;
  font-size: .82rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.stay__links { display: flex; flex-wrap: wrap; gap: 1.4rem; }

/* Flechas del carrusel */
.stay__arrow {
  position: absolute;
  top: calc((100% - 3.5rem) * 0);      /* alineada arriba de la tarjeta */
  top: 22%;
  transform: translateY(-50%);
  z-index: 3;
  width: 2.6rem; height: 2.6rem;
  display: grid; place-items: center;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--sans);
  font-size: 1.3rem;
  color: var(--blue);
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(20,30,48,.12);
  transition: background .25s var(--ease), transform .25s var(--ease), opacity .25s var(--ease);
}
.stay__arrow:hover { background: #fff; }
.stay__arrow--prev { left: -1.2rem; }
.stay__arrow--next { right: -1.2rem; }
.stay__arrow[disabled] { opacity: 0; pointer-events: none; }

.stay__dots {
  display: flex;
  justify-content: center;
  gap: .55rem;
  margin-top: 1.8rem;
}

/* Mapa (MyMaps) con todas las opciones */
.stay__map {
  margin-top: clamp(2.6rem, 7vh, 4.5rem);
  text-align: center;
}
.stay__map-title {
  margin: 0 0 1.2rem;
  color: var(--ink);
}
.stay__map-embed {
  width: 100%;
  height: clamp(360px, 58vh, 560px);
  border: 1px solid var(--line);
  overflow: hidden;
  background: #eef1f5;
}
.stay__map-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.stay__map .link { display: inline-block; margin-top: 1.1rem; }
.stay__dot {
  width: 7px; height: 7px; border-radius: 50%; border: 0; padding: 0;
  background: #cfcdc8; cursor: pointer;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.stay__dot.is-active { background: var(--blue); transform: scale(1.3); }


/* ── Footer ───────────────────────────────────────────────── */

.footer {
  position: relative;
  min-height: 46vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-align: center;
  padding: clamp(3rem, 8vh, 6rem) var(--gutter);
}
.footer__media { position: absolute; inset: 0; }
.footer__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18,28,46,.6), rgba(18,28,46,.72));
}
.footer__content { position: relative; z-index: 2; color: #fff; }
.footer__content .display { margin-bottom: 1.3rem; max-width: 22ch; margin-inline: auto; }


/* ── Reveal on scroll ─────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 860px) {
  .intro { height: 220vh; }

  .save,
  .quote { grid-template-columns: 1fr; }
  .save__photos { margin-top: 1rem; }
  /* En móvil, el texto de la cita va encima de la foto (entre el encaje y la foto) */
  .quote__text { text-align: left; order: 1; margin-bottom: 1.6rem; }
  .quote__photo { order: 2; }

  .stay__track { --per: 1.12; }
  .stay__arrow { display: none; }
}

@media (max-width: 520px) {
  .hero { min-height: 88vh; }
  .env { width: 90vw; }
}


/* ── Accesibilidad: sin animaciones ───────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .intro { display: none; }
  .site { opacity: 1 !important; }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .intro { display: none; }
  .site { opacity: 1 !important; }
}
