/* ═══════════════════════════════════════════════════════════
   Edgar & Richel — Save the Date
   Paleta: editorial cálido (crema, tinta sepia, terracota)
   ═══════════════════════════════════════════════════════════ */

:root {
  /* Colores — neutros tintados hacia el sepia, nunca puros */
  --cream:        oklch(97.5% 0.008 85);
  --cream-deep:   oklch(94.5% 0.012 82);
  --ink:          oklch(28% 0.021 55);
  --ink-soft:     oklch(45% 0.024 55);
  --ink-faint:    oklch(62% 0.02 55);
  --terracotta:   oklch(58% 0.095 40);
  --terracotta-deep: oklch(48% 0.09 40);
  --line:         oklch(28% 0.021 55 / 0.14);
  --on-image:     oklch(97% 0.006 85);

  /* Tipografía */
  --display: "Cormorant Garamond", "Georgia", serif;
  --body: "Jost", "Avenir", sans-serif;

  /* Ritmo fluido */
  --space-section: clamp(5rem, 12vw, 9.5rem);
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --measure: 34rem;

  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Base ──────────────────────────────────────────────── */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.09rem);
  line-height: 1.7;
  letter-spacing: 0.015em;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

em { font-style: italic; }

::selection {
  background: var(--terracotta);
  color: var(--cream);
}

/* Etiquetas de sección en versalitas */
.section-label {
  margin: 0 0 clamp(2rem, 5vw, 3rem);
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--terracotta);
  text-align: center;
}

/* ─── Nav ───────────────────────────────────────────────── */

.nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: clamp(1rem, 2.5vw, 1.6rem) var(--gutter);
  color: var(--on-image);
}

.nav__monogram {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-decoration: none;
}

.nav__monogram span { font-style: italic; }

.nav__date {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.38em;
  text-transform: uppercase;
}

/* ─── Hero ──────────────────────────────────────────────── */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100svh;
  overflow: hidden;
  text-align: center;
  color: var(--on-image);
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero-zoom 24s var(--ease-out-quint) both, hero-fade 1.6s ease both;
}

@keyframes hero-zoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1); }
}

@keyframes hero-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, oklch(24% 0.02 55 / 0.55), transparent 38%),
    linear-gradient(to top, oklch(22% 0.02 55 / 0.55), transparent 55%),
    oklch(28% 0.021 55 / 0.16);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 0 var(--gutter);
}

.hero__eyebrow {
  margin: 0 0 clamp(1.1rem, 3vw, 1.6rem);
  font-size: clamp(0.8rem, 0.7rem + 0.4vw, 0.95rem);
  font-weight: 400;
  letter-spacing: 0.5em;
  text-indent: 0.5em;
  text-transform: uppercase;
  color: oklch(92% 0.03 60);
}

.hero__names {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(3.1rem, 8vw + 1rem, 8.5rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
}

.hero__names em {
  font-weight: 300;
  font-size: 0.72em;
  color: oklch(88% 0.045 60);
  padding: 0 0.12em;
}

.hero__date {
  margin: clamp(1.4rem, 4vw, 2.2rem) 0 0.9rem;
  font-family: var(--display);
  font-size: clamp(1.5rem, 1rem + 2vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
}

.hero__date span { color: var(--terracotta); padding: 0 0.3em; }

.hero__place {
  margin: 0;
  font-size: clamp(0.78rem, 0.7rem + 0.3vw, 0.9rem);
  font-weight: 400;
  letter-spacing: 0.4em;
  text-indent: 0.4em;
  text-transform: uppercase;
  color: oklch(88% 0.015 70);
}

.hero__scroll {
  position: absolute;
  bottom: clamp(1.4rem, 4vh, 2.4rem);
  left: 50%;
  translate: -50% 0;
  z-index: 1;
  color: var(--on-image);
  opacity: 0.8;
  animation: scroll-hint 2.6s ease-in-out infinite;
}

@keyframes scroll-hint {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(7px); }
}

/* Entrada escalonada del hero */
.reveal-1, .reveal-2, .reveal-3, .reveal-4, .reveal-5 {
  animation: fade-up 1.1s var(--ease-out-quint) both;
}
.reveal-1 { animation-delay: 0.25s; }
.reveal-2 { animation-delay: 0.4s; }
.reveal-3 { animation-delay: 0.6s; }
.reveal-4 { animation-delay: 0.72s; }
.reveal-5 { animation-delay: 1.1s; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Cuenta regresiva ──────────────────────────────────── */

.countdown {
  padding: var(--space-section) var(--gutter);
  text-align: center;
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, var(--cream-deep), transparent 70%),
    var(--cream);
}

.countdown__fallback {
  font-family: var(--display);
  font-size: 1.4rem;
  font-style: italic;
  color: var(--ink-soft);
}

.countdown__grid {
  display: flex;
  justify-content: center;
  align-items: baseline;
  flex-wrap: wrap;
  gap: clamp(0.6rem, 3vw, 2rem);
  margin: 0 auto clamp(2.2rem, 5vw, 3rem);
  max-width: 52rem;
}

.countdown__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(4.6rem, 18vw, 8.5rem);
}

.countdown__num {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(3.4rem, 10vw, 6.8rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  transition: color 0.4s ease;
}

.countdown__unit {
  margin-top: 0.8rem;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.countdown__sep {
  font-family: var(--display);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  color: var(--terracotta);
  align-self: center;
  user-select: none;
}

.countdown__message {
  margin: 0 auto;
  max-width: var(--measure);
  font-family: var(--display);
  font-size: clamp(1.15rem, 0.9rem + 0.8vw, 1.45rem);
  font-style: italic;
  font-weight: 400;
  color: var(--ink-soft);
}

/* ─── Detalles: ceremonia y recepción ───────────────────── */

.details {
  padding: var(--space-section) var(--gutter);
  background: var(--cream);
}

.details__intro {
  display: grid;
  gap: clamp(1.2rem, 3vw, 2rem);
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: end;
  gap: clamp(1.5rem, 5vw, 4rem);
  max-width: 68rem;
  margin: 0 auto clamp(3.5rem, 8vw, 6rem);
}

.details__title {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.6rem, 2rem + 3vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.details__title em { color: var(--terracotta); }

.details__lead {
  margin: 0;
  color: var(--ink-soft);
  max-width: var(--measure);
}

.details__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 6vw, 5rem);
  max-width: 74rem;
  margin: 0 auto;
  align-items: start;
}

/* Asimetría editorial: la segunda columna baja y respira distinto */
.event--reception { margin-top: clamp(2.5rem, 8vw, 6.5rem); }

.event__imgwrap {
  overflow: hidden;
  border-radius: 2px 2px 48% 48% / 2px 2px 12% 12%; /* arco suave, aire de iglesia */
}

.event--reception .event__imgwrap {
  border-radius: 2px;
}

.event__imgwrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out-quint);
}

.event--reception .event__imgwrap img { aspect-ratio: 4 / 5; }

.event:hover .event__imgwrap img { transform: scale(1.035); }

.event__body {
  padding: clamp(1.6rem, 4vw, 2.4rem) clamp(0.5rem, 2vw, 1.5rem) 0;
}

.event__time {
  margin: 0 0 0.7rem;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--terracotta);
}

.event__name {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.9rem);
  line-height: 1.1;
}

.event__place {
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--ink);
}

.event__address {
  margin: 0.4rem 0 1.3rem;
  color: var(--ink-faint);
  font-size: 0.95em;
}

.event__map {
  display: inline-block;
  padding-bottom: 0.25rem;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.event__map span { display: inline-block; transition: transform 0.3s var(--ease-out-quint); }

.event__map:hover,
.event__map:focus-visible {
  color: var(--terracotta-deep);
  border-color: var(--terracotta);
}

.event__map:hover span { transform: translateX(5px); }

/* ─── Cita a sangre ─────────────────────────────────────── */

.quote {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 62svh;
  padding: clamp(4rem, 10vw, 7rem) var(--gutter);
  text-align: center;
  overflow: hidden;
  color: var(--on-image);
}

.quote__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quote__scrim {
  position: absolute;
  inset: 0;
  background: oklch(26% 0.022 55 / 0.52);
}

.quote__text {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.7rem, 1rem + 3vw, 3.2rem);
  line-height: 1.35;
}

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

.footer {
  padding: var(--space-section) var(--gutter) clamp(2.5rem, 6vw, 4rem);
  text-align: center;
  background: var(--ink);
  color: oklch(92% 0.012 80);
}

.footer__title {
  margin: 0 0 1.4rem;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.4rem, 1.6rem + 3vw, 4.2rem);
  line-height: 1.05;
  color: var(--cream);
}

.footer__text {
  margin: 0 auto 2rem;
  max-width: var(--measure);
  color: oklch(80% 0.014 75);
}

.footer__contact {
  margin: 0 0 3.5rem;
  font-size: 0.95rem;
  color: oklch(80% 0.014 75);
}

.footer__contact a {
  color: oklch(78% 0.09 55);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
  transition: color 0.3s ease;
}

.footer__contact a:hover,
.footer__contact a:focus-visible { color: oklch(88% 0.08 55); }

.footer__hashtag {
  margin: 0 0 2.5rem;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.3rem, 1rem + 1vw, 1.8rem);
  letter-spacing: 0.12em;
  color: oklch(70% 0.07 50);
}

.footer__sign {
  margin: 0;
  padding-top: 2rem;
  border-top: 1px solid oklch(92% 0.012 80 / 0.16);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: oklch(65% 0.016 70);
}

/* ─── Scroll reveal ─────────────────────────────────────── */

.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.9s var(--ease-out-quint),
    transform 0.9s var(--ease-out-quint);
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ─── Responsive ────────────────────────────────────────── */

@media (max-width: 720px) {
  .details__intro {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .details__grid {
    grid-template-columns: 1fr;
    gap: clamp(3rem, 10vw, 4.5rem);
  }

  .event--reception { margin-top: 0; }

  .countdown__sep { display: none; }

  .countdown__grid { gap: clamp(1.2rem, 6vw, 2.5rem); }
}

/* ─── Movimiento reducido ───────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero__bg,
  .hero__scroll,
  .reveal-1, .reveal-2, .reveal-3, .reveal-4, .reveal-5 {
    animation: none;
  }

  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .event__imgwrap img { transition: none; }
}
