@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400;1,600&family=Cinzel:wght@400;500;600&family=Jost:wght@200;300;400&display=swap');

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

:root {
  --terra:       #C1654A;
  --terra-light: #D98B72;
  --terra-pale:  #EFC9BA;
  --cream:       #FAF5EE;
  --cream-dark:  #F0E8DA;
  --linen:       #E8DDD0;
  --brown:       #3E2A1A;
  --brown-mid:   #6B4A30;
  --brown-soft:  #9B7355;
  --brown-muted: #B8956E;
  --dark:        #1E120A;
  --white:       #FDFAF6;
}

html { scroll-behavior: smooth; font-size: 120%; }
body {
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  background: var(--cream);
  color: var(--brown);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
a, button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* ─── PHOTO HERO ─── */
#photo-hero {
  position: relative;
  width: 100%;
  height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.photo-hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('beso_inclinado.jpeg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: brightness(0.55);
  transform: scale(1.03);
  animation: zoomOut 8s ease forwards;
}
@media (min-width: 769px) {
  .photo-hero-bg {
    background-image: url('beso_inclinado_d.jpeg');
  }
}
@keyframes zoomOut {
  from { transform: scale(1.06); }
  to   { transform: scale(1); }
}
.photo-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(30,18,10,0.92) 0%,
    rgba(30,18,10,0.35) 55%,
    rgba(193,101,74,0.08) 100%
  );
}
.photo-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 2rem calc(3.5rem + env(safe-area-inset-bottom, 0px));
  text-align: center;
  animation: fadeUp 1.2s ease 0.3s both;
}

/* ─── HERO TYPOGRAPHY ─── */
.hero-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.65em;
  text-transform: uppercase;
  color: var(--terra-pale);
  margin-bottom: 1.1rem;
}
.hero-names {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.8rem, 11vw, 5.2rem);
  color: var(--white);
  line-height: 1.15;
  text-shadow: 0 2px 24px rgba(30,18,10,0.5);
}
.hero-amp {
  color: var(--terra-light);
  font-size: 0.75em;
  font-style: normal;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.05em;
  display: inline-block;
  margin: 0 0.15em;
}
.hero-date-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.4rem;
}
.hero-date-text {
  font-family: 'Jost', sans-serif;
  font-weight: 200;
  font-size: 0.62rem;
  letter-spacing: 0.45em;
  color: var(--terra-pale);
  text-transform: uppercase;
}
.hero-sep { width: 0.5px; height: 14px; background: var(--terra-light); opacity: 0.7; }

/* ─── COUNTDOWN ─── */
#countdown {
  background: var(--dark);
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}
.cd-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.55rem;
  letter-spacing: 0.55em;
  text-transform: uppercase;
  color: var(--terra-pale);
  opacity: 0.7;
}
.cd-wrapper {
  display: flex;
  width: 100%;
  max-width: 400px;
  border: 0.5px solid rgba(193,101,74,0.3);
}
.cd-unit {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.3rem 0.5rem;
  border-right: 0.5px solid rgba(193,101,74,0.2);
  gap: 0.35rem;
}
.cd-unit:last-child { border-right: none; }
.cd-num {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(2rem, 7vw, 3rem);
  color: var(--white);
  line-height: 1;
}
.cd-label {
  font-family: 'Jost', sans-serif;
  font-weight: 200;
  font-size: 0.5rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--terra-light);
}

/* ─── SECTION BASE ─── */
section {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5rem 1.5rem;
}

.eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 1.2rem;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--brown);
  text-align: center;
  line-height: 1.2;
}
.section-body {
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  font-size: 0.88rem;
  color: var(--brown-mid);
  text-align: center;
  line-height: 2;
  max-width: 380px;
}

/* ─── DIVIDERS ─── */
.deco-line {
  flex: 1;
  height: 0.5px;
  background: linear-gradient(to right, transparent, var(--terra-pale), transparent);
}
.diamond {
  width: 7px; height: 7px;
  background: var(--terra);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.diamond-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 460px;
  margin: 1.5rem 0;
}

/* ─── NOVIOS ─── */
#novios { background: var(--cream); padding-bottom: 0; }
.novios-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  max-width: 480px;
  margin-top: 0.5rem;
}
.novio-col { text-align: center; padding: 1.8rem 1rem; }
.novio-sep {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 1.4rem;
  color: var(--terra-light);
  padding: 0 0.3rem;
}
.novio-role {
  font-family: 'Cinzel', serif;
  font-size: 0.5rem;
  letter-spacing: 0.45em;
  color: var(--terra);
  text-transform: uppercase;
  margin-bottom: 0.7rem;
  display: block;
}
.novio-name {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 1.1rem;
  color: var(--brown);
  line-height: 1.6;
}

/* ─── FOTO SPLIT ─── */
.photo-split {
  display: flex;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  gap: 3px;
  background: #3E2A1A;
  overflow: hidden;
}
.photo-split-item {
  overflow: hidden;
  background: #3E2A1A;
  flex: 1 1 50%;
  height: 70svh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-split-item picture {
  display: block;
  width: 100%;
  height: 100%;
}
.photo-split-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
  transition: transform 0.7s ease;
  filter: sepia(15%) saturate(90%);
}
.photo-split-item:hover img { transform: scale(1.04); }

/* Escritorio: zoom leve (hasta el codo) en vez de llenar todo el espacio,
   fotos alineadas hacia el centro para quedar "juntas", con barras de fondo
   solo en los bordes exteriores */
@media (min-width: 769px) {
  .photo-split-item picture {
    width: auto;
    transition: transform 1.2s cubic-bezier(.16,.84,.44,1);
  }
  .photo-split-item img {
    width: auto;
    object-fit: contain;
  }
  .photo-split-item:nth-child(1) { justify-content: flex-end; }
  .photo-split-item:nth-child(2) { justify-content: flex-start; }
  .photo-split-item:nth-child(1) picture { transform: translateX(-140px); }
  .photo-split-item:nth-child(2) picture { transform: translateX(140px); }
  .photo-split.visible .photo-split-item picture { transform: translateX(0); }
}

/* ─── PADRINOS ─── */
#padrinos { background: var(--cream-dark); }
.padrinos-box {
  border: 0.5px solid var(--terra-pale);
  padding: 2.5rem 2.5rem;
  text-align: center;
  max-width: 360px;
  width: 100%;
  background: rgba(250,245,238,0.8);
  margin-top: 0.5rem;
}
.padrino-name {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 1.1rem;
  color: var(--brown);
  line-height: 1.7;
}
.padrino-amp {
  font-size: 1.5rem;
  color: var(--terra-light);
  display: block;
  line-height: 1.4;
}

/* ─── FOTO FULL ─── */
.photo-full {
  width: 100%;
  background: #3E2A1A;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-full img {
  width: 100%;
  height: auto;
  max-height: 100svh;
  object-fit: contain;
  display: block;
  filter: sepia(10%) saturate(90%);
}

/* ─── EVENTO ─── */
#evento { background: var(--linen); }
.evento-card {
  width: 100%;
  max-width: 440px;
  border: 0.5px solid var(--terra-pale);
  background: var(--cream);
  margin-top: 1rem;
  overflow: hidden;
}
.evento-card-body { padding: 2rem; text-align: center; }
.evento-tag {
  font-family: 'Cinzel', serif;
  font-size: 0.5rem;
  letter-spacing: 0.45em;
  color: var(--terra);
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}
.evento-divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  max-width: 300px;
  margin: 1.6rem 0;
}
.diamond-sm { width: 5px; height: 5px; }
.evento-lugar {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--brown);
  margin-bottom: 0.4rem;
}
.evento-dir {
  font-family: 'Jost', sans-serif;
  font-weight: 200;
  font-size: 0.8rem;
  color: var(--brown-soft);
  line-height: 1.9;
  margin-bottom: 1.2rem;
}
.evento-horas {
  display: flex;
  justify-content: center;
  border-top: 0.5px solid var(--linen);
  border-bottom: 0.5px solid var(--linen);
  margin: 0 -2rem 1.5rem;
}
.hora-block { flex: 1; text-align: center; padding: 1rem 0; }
.hora-block + .hora-block { border-left: 0.5px solid var(--linen); }
.hora-label {
  font-family: 'Cinzel', serif;
  font-size: 0.5rem;
  letter-spacing: 0.4em;
  color: var(--terra);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.3rem;
}
.hora-time {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 2.2rem;
  color: var(--brown);
  line-height: 1;
  display: block;
}
.hora-pm {
  font-family: 'Cinzel', serif;
  font-size: 0.48rem;
  letter-spacing: 0.2em;
  color: var(--brown-muted);
  margin-top: 0.2rem;
  display: block;
}
.map-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  min-height: 44px;
  border: 0.5px solid var(--terra);
  background: transparent;
  color: var(--terra);
  font-family: 'Jost', sans-serif;
  font-weight: 200;
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.25s, color 0.25s;
}
.map-btn:hover { background: var(--terra); color: var(--white); }

.cal-hint {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--brown-soft);
  text-align: center;
  margin-top: 2.2rem;
}
.cal-group {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  margin-top: 1.2rem;
  width: 100%;
  max-width: 400px;
}
.cal-group-item { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; }
.cal-group-label {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brown-muted);
}
.cal-btn-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.8rem;
  width: 100%;
}
.cal-btn {
  display: inline-flex;
  flex: 1 1 0;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 0.6rem;
  min-height: 44px;
  border: 0.5px solid var(--brown-muted);
  background: var(--cream);
  color: var(--brown-soft);
  font-family: 'Jost', sans-serif;
  font-weight: 200;
  font-size: 0.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  line-height: 1.3;
  transition: background 0.25s, color 0.25s;
}
.cal-btn:hover { background: var(--brown-soft); color: var(--white); }
.cal-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ─── VESTIMENTA ─── */
#vestimenta {
  background: var(--brown);
  padding: 4.5rem 1.5rem;
}
#vestimenta .eyebrow { color: var(--terra-pale); }
#vestimenta .section-title { color: var(--white); }
.vest-box {
  padding: 0 1rem;
  text-align: center;
  max-width: 380px;
  width: 100%;
  margin-top: 1rem;
}
.vest-photo {
  width: 100%;
  max-width: 260px;
  height: auto;
  border-radius: 2px;
  border: 0.5px solid rgba(193,101,74,0.5);
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
  margin-bottom: 1.6rem;
}
.vest-main {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 1.7rem;
  color: var(--white);
  margin-bottom: 0.8rem;
}
.vest-note {
  font-family: 'Jost', sans-serif;
  font-weight: 200;
  font-size: 0.92rem;
  color: rgba(250,245,238,0.85);
  line-height: 1.9;
}

/* ─── ITINERARIO ─── */
#itinerario { background: var(--cream); }
.timeline {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  margin-top: 0.5rem;
  position: relative;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 4rem;
  top: 1rem;
  bottom: 1rem;
  width: 0.5px;
  background: linear-gradient(to bottom, transparent, var(--terra-pale) 10%, var(--terra-pale) 90%, transparent);
}
.tl-item {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  padding: 1rem 0;
}
.tl-time {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: 1rem;
  color: var(--terra);
  width: 2.8rem;
  text-align: right;
  flex-shrink: 0;
  padding-top: 0.05rem;
}
.tl-dot {
  width: 6px; height: 6px;
  border: 0.5px solid var(--terra);
  background: var(--cream);
  transform: rotate(45deg);
  flex-shrink: 0;
  margin-top: 0.35rem;
  position: relative;
  z-index: 1;
}
.tl-text {
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  font-size: 0.85rem;
  color: var(--brown-mid);
  line-height: 1.5;
}

/* ─── FOTO FAMILIA ─── */
.photo-familia {
  width: 100%;
  background: #3E2A1A;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-familia img {
  width: 100%;
  height: auto;
  max-height: 100svh;
  object-fit: contain;
  display: block;
  filter: sepia(10%) saturate(85%);
}
.photo-familia-caption {
  background: var(--dark);
  text-align: center;
  padding: 2rem 2rem;
}
.photo-familia-caption p {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--terra-pale);
  line-height: 2;
}

/* ─── SOBRES ─── */
#sobres { background: var(--cream-dark); }
.sobres-icon { font-size: 2.2rem; color: var(--terra); margin-bottom: 0.5rem; }

/* ─── NO NIÑOS ─── */
#noninos { background: var(--cream); padding: 3rem 2rem; }
.noninos-inner {
  max-width: 400px;
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-left: 1.5px solid var(--terra-pale);
}
.noninos-inner p {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 1rem;
  color: var(--brown-mid);
  line-height: 2.1;
}

/* ─── CONFIRMAR ─── */
#confirmar { background: var(--dark); position: relative; overflow: hidden; }
.confirmar-bg {
  position: absolute;
  inset: 0;
  background-image: url('pose.jpeg');
  background-size: cover;
  background-position: center 20%;
  background-repeat: no-repeat;
  filter: brightness(0.25) sepia(30%);
}
.confirmar-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 5.5rem 2rem;
  gap: 0.8rem;
}
#confirmar .eyebrow { color: var(--terra-pale); }
#confirmar .section-title { color: var(--white); }
#confirmar .section-body { color: rgba(239,201,186,0.65); }
.rsvp-deadline {
  font-family: 'Jost', sans-serif;
  font-weight: 200;
  font-size: 0.78rem;
  color: rgba(239,201,186,0.85);
  line-height: 1.9;
  text-align: center;
  margin-top: 0.8rem;
}
.rsvp-deadline strong {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 1rem;
  color: var(--terra-pale);
  letter-spacing: 0.02em;
}
.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.5rem;
  padding: 1.1rem 2.5rem;
  min-height: 48px;
  border: 0.5px solid var(--terra-light);
  background: transparent;
  color: var(--terra-pale);
  font-family: 'Jost', sans-serif;
  font-weight: 200;
  font-size: 0.68rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.3s, color 0.3s;
}
.wa-btn:hover { background: var(--terra); color: var(--white); border-color: var(--terra); }
.wa-icon { font-size: 1.1rem; }

/* ─── FOOTER ─── */
footer {
  background: var(--dark);
  border-top: 0.5px solid rgba(193,101,74,0.15);
  padding: 2rem 2rem calc(2rem + env(safe-area-inset-bottom, 0px));
  text-align: center;
}
footer p {
  font-family: 'Jost', sans-serif;
  font-weight: 200;
  font-size: 0.55rem;
  letter-spacing: 0.45em;
  text-transform: uppercase;
  color: rgba(193,101,74,0.3);
}

/* ─── BOTÓN MÚSICA ─── */
.music-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0.5px solid rgba(193,101,74,0.5);
  background: rgba(30,18,10,0.75);
  backdrop-filter: blur(4px);
  color: var(--terra-pale);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s, transform 0.2s;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.music-btn:active { transform: scale(0.92); }
.music-btn .music-icon {
  display: inline-block;
  transition: transform 0.3s ease;
}
.music-btn.playing .music-icon {
  animation: spinNote 3s linear infinite;
}
@keyframes spinNote {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ─── REVEAL ─── */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-photo { opacity: 0; transition: opacity 1s ease; }
.reveal-photo.visible { opacity: 1; }

/* ─── KEYFRAMES ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── MOBILE ─── */
@media (max-width: 480px) {
  section { padding: 3.5rem 1.2rem; }
  .photo-hero-content { padding-left: 1.25rem; padding-right: 1.25rem; }
  .photo-split-item { height: 50svh; }
  .vest-icons { gap: 2rem; }
  .timeline::before { left: 3.2rem; }
  .tl-time { width: 2.4rem; }
}

/* Celulares angostos (iPhone SE, modelos pequeños de Android) */
@media (max-width: 400px) {
  .novio-name { font-size: 0.85rem; }
  .novio-col { padding: 1.8rem 0.6rem; }
  .cd-wrapper { max-width: 100%; }
  .cd-unit { padding: 1rem 0.3rem; }
  .cd-num { font-size: 1.7rem; }
  .hero-date-row { gap: 0.6rem; }
  .hero-date-text { font-size: 0.55rem; letter-spacing: 0.3em; }
  .evento-card-body { padding: 1.5rem 1.2rem; }
  .evento-horas { margin: 0 -1.2rem 1.5rem; }
  .wa-btn { padding: 1rem 1.6rem; font-size: 0.6rem; letter-spacing: 0.3em; }
}
