/* Terraza — bandas full-bleed, horizonte, sol al scroll */
:root {
  --cal: #f6f0e8;
  --cal-deep: #ebe2d4;
  --terra: #c45c3e;
  --terra-deep: #9a3f28;
  --ink: #2a221c;
  --sky-top: #f2c4a0;
  --sky-mid: #e8885c;
  --sky-low: #7a3a2a;
  --font-display: "Literata", Georgia, serif;
  --font-ui: "DM Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 300;
  color: var(--ink);
  background: var(--cal);
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; background: #fff; padding: .5rem; }

.demo-chrome {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 240, 232, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(42, 34, 28, 0.08);
}
.demo-banner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; padding: 0.45rem 1rem;
  font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--terra-deep);
}
.demo-banner a {
  text-decoration: none; margin-left: 0.85rem;
  border-bottom: 1px solid currentColor;
}

/* Sol fijo detrás del contenido */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    var(--sky-top) 0%,
    var(--sky-mid) 45%,
    var(--sky-low) 100%
  );
  opacity: 0.22;
  transition: opacity 0.4s ease;
}
.sky__sun {
  position: absolute;
  width: clamp(4rem, 12vw, 7rem);
  height: clamp(4rem, 12vw, 7rem);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffe0b8, #e85a30 70%);
  box-shadow: 0 0 60px rgba(232, 90, 48, 0.45);
  left: 50%;
  top: 12%;
  transform: translateX(-50%);
  will-change: transform, top;
}
.sky__horizon {
  position: absolute;
  left: 0; right: 0;
  bottom: 28%;
  height: 1px;
  background: rgba(42, 34, 28, 0.15);
}

main { position: relative; z-index: 1; }

/* ——— Bandas ——— */
.band {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: end stretch;
  overflow: hidden;
}
.band--tall { min-height: 85svh; }
.band__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 1.2s ease-out;
}
.band.is-in .band__img { transform: scale(1); }
/* Hero: pareja a la derecha — móvil prioriza caras; desktop ancla arriba */
.band--photo:first-of-type .band__img {
  object-position: 78% 18%;
  transform-origin: 78% 20%;
}
.band--tall .band__img {
  object-position: center 22%;
}
@media (min-width: 720px) {
  .band--photo:first-of-type .band__img {
    object-position: 68% 8%;
    transform-origin: 68% top;
  }
}
@media (min-width: 1100px) {
  .band--photo:first-of-type .band__img {
    object-position: 62% top;
  }
}
.band__veil {
  position: absolute; inset: 0;
  background: linear-gradient(
    180deg,
    transparent 28%,
    rgba(42, 34, 28, 0.25) 55%,
    rgba(42, 34, 28, 0.72) 100%
  );
}
@media (max-width: 719px) {
  .band--photo:first-of-type {
    min-height: 100svh;
  }
  .band__caption {
    padding-bottom: clamp(2.5rem, 8vh, 4rem);
    max-width: 16rem;
  }
}
.band__veil--soft {
  background: linear-gradient(
    180deg,
    transparent 50%,
    rgba(42, 34, 28, 0.25) 100%
  );
}
.band__caption {
  position: relative;
  z-index: 2;
  padding: clamp(2rem, 6vw, 4rem);
  color: #f6f0e8;
  max-width: 22rem;
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.9s ease, transform 0.9s ease;
}
.band.is-in .band__caption {
  opacity: 1;
  transform: none;
}
.band__kicker {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.band__caption h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.8rem, 9vw, 4.8rem);
  line-height: 1;
  margin: 0;
}
.band__caption h1 em {
  font-style: italic;
  font-weight: 400;
  opacity: 0.85;
}
.band__date {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
}

.band--cal {
  place-items: center;
  min-height: 70svh;
  background: var(--cal);
  text-align: center;
  padding: clamp(3rem, 8vw, 6rem) clamp(1.25rem, 5vw, 3rem);
}
.band__lead {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.25;
  margin: 0 0 1.5rem;
  max-width: 16ch;
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.band--cal.is-in .band__lead {
  opacity: 1;
  transform: none;
}
.band__soft {
  margin: 0 auto;
  max-width: 28ch;
  font-size: 1.05rem;
  color: rgba(42, 34, 28, 0.7);
  opacity: 0;
  transition: opacity 0.8s 0.2s ease;
}
.band--cal.is-in .band__soft { opacity: 1; }

.band--place {
  place-items: center;
  min-height: 55svh;
  background: var(--terra);
  color: var(--cal);
  text-align: center;
  padding: clamp(3rem, 7vw, 5rem) 1.5rem;
}
.band--place .band__kicker { opacity: 0.75; }
.band--place h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin: 0.35rem 0 0.5rem;
}
.band--place p { margin: 0.25rem 0; }
.band--place .band__soft { color: rgba(246, 240, 232, 0.8); max-width: none; }
.band__link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.2rem;
}

/* Horizonte del día */
.horizon {
  position: relative;
  background: var(--cal-deep);
  padding: clamp(3rem, 8vw, 5rem) clamp(1rem, 4vw, 2rem);
  overflow-x: auto;
}
.horizon h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin: 0 0 2.5rem;
  text-align: center;
}
.horizon__line {
  position: absolute;
  left: 1rem; right: 1rem;
  top: calc(3rem + 2.8rem + 2.5rem + 1.6rem);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--terra), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (min-width: 720px) {
  .horizon__line {
    top: calc(3rem + 2.2rem + 2.5rem + 1.6rem);
  }
}
.horizon.is-in .horizon__line { transform: scaleX(1); }
.horizon__marks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: clamp(1.5rem, 5vw, 3rem);
  justify-content: space-between;
  min-width: min(100%, 40rem);
  max-width: 52rem;
  margin-inline: auto;
}
.horizon__marks li {
  flex: 1;
  text-align: center;
  position: relative;
  padding-top: 1.75rem;
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.horizon.is-in .horizon__marks li { opacity: 1; transform: none; }
.horizon.is-in .horizon__marks li:nth-child(1) { transition-delay: 0.15s; }
.horizon.is-in .horizon__marks li:nth-child(2) { transition-delay: 0.3s; }
.horizon.is-in .horizon__marks li:nth-child(3) { transition-delay: 0.45s; }
.horizon.is-in .horizon__marks li:nth-child(4) { transition-delay: 0.6s; }
.horizon__marks li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--terra);
  box-shadow: 0 0 0 4px var(--cal-deep);
}
.horizon__marks time {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--terra-deep);
  margin-bottom: 0.35rem;
}
.horizon__marks span {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
}

/* Mesa RSVP */
.mesa {
  background: var(--cal);
  padding: clamp(3rem, 8vw, 5rem) clamp(1rem, 4vw, 2rem);
}
.mesa__top {
  max-width: 24rem;
  margin: 0 auto;
  background: #fff;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  box-shadow:
    0 1px 0 rgba(42, 34, 28, 0.06),
    0 24px 48px rgba(42, 34, 28, 0.08);
  border-top: 4px solid var(--terra);
}
.mesa__label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terra);
  margin: 0 0 0.4rem;
}
.mesa__top h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.5vw, 2.2rem);
  margin: 0 0 1.5rem;
}
.mesa__form {
  display: grid;
  gap: 1rem;
}
.mesa__form label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(42, 34, 28, 0.7);
}
.mesa__form input,
.mesa__form select {
  font: inherit;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: normal;
  padding: 0.7rem 0.85rem;
  border: none;
  border-bottom: 1px solid rgba(42, 34, 28, 0.25);
  background: transparent;
  color: var(--ink);
  border-radius: 0;
}
.mesa__form input:focus,
.mesa__form select:focus {
  outline: none;
  border-bottom-color: var(--terra);
}
.mesa__form button {
  margin-top: 0.5rem;
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.95rem;
  border: none;
  background: var(--terra);
  color: var(--cal);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease;
}
.mesa__form button:hover {
  background: var(--terra-deep);
  transform: translateY(-1px);
}
.mesa__note {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--terra);
}

/* Contador */
.count {
  position: relative;
  z-index: 1;
  background: var(--cal);
  padding: clamp(2.5rem, 7vw, 4rem) clamp(1rem, 4vw, 2rem);
  text-align: center;
}
.count__kicker {
  margin: 0 0 0.4rem;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terra);
}
.count h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin: 0 0 1.5rem;
}
.count__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 5.5rem));
  gap: 0.75rem;
  justify-content: center;
}
.count__grid strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 500;
  color: var(--terra-deep);
  line-height: 1;
}
.count__grid span {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.55;
}

/* Álbum */
.album {
  position: relative;
  z-index: 1;
  background: var(--cal-deep);
  padding: clamp(2.5rem, 7vw, 4rem) clamp(1rem, 4vw, 2rem);
}
.album__head { text-align: center; margin-bottom: 1.75rem; }
.album__kicker {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terra);
}
.album__head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin: 0;
}
.album__grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.65rem;
  max-width: 52rem;
  margin: 0 auto;
}
.album__grid figure { margin: 0; overflow: hidden; }
.album__grid figure:first-child {
  grid-row: 1 / 3;
  min-height: 18rem;
}
.album__grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s ease;
}
.album__grid figure:hover img { transform: scale(1.04); }
.album__hint {
  text-align: center;
  margin: 1.25rem 0 0;
  font-size: 0.8rem;
  opacity: 0.6;
}

/* Dress + regalos */
.linen {
  position: relative;
  z-index: 1;
  background: var(--cal);
  padding: clamp(2.5rem, 7vw, 4rem) clamp(1.25rem, 5vw, 3rem);
}
.linen__inner {
  max-width: 32rem;
  margin: 0 auto;
  text-align: center;
}
.linen h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  margin: 0 0 1.25rem;
}
.linen__dress,
.linen__gift {
  margin: 0 0 1rem;
  font-size: 1.02rem;
  color: rgba(42, 34, 28, 0.78);
  line-height: 1.55;
}
.linen__gift { margin-bottom: 0; opacity: 0.85; }

/* Hoja flotante */
.float-olive {
  position: fixed;
  z-index: 25;
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: max(5.5rem, calc(4rem + env(safe-area-inset-bottom)));
  pointer-events: none;
  animation: olive-drift 7s ease-in-out infinite;
  filter: drop-shadow(0 6px 12px rgba(42, 34, 28, 0.15));
}
@media (min-width: 720px) {
  .float-olive { bottom: 2.5rem; right: 1.5rem; }
}
@keyframes olive-drift {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(-14px) rotate(6deg); }
}

.demo-foot {
  position: relative;
  z-index: 1;
  padding: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(42, 34, 28, 0.55);
  background: var(--cal);
}
.demo-foot a { text-decoration: underline; text-underline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .band__img { transform: none; }
}
