/* ============================================================
   index.css — Main page styles
   Wedding website: Rocío & Emilio · 12.09.2026
   rocioyemilio.es
   ============================================================ */

/* ============================================================
   CSS RESET & BOX MODEL
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ============================================================
   DESIGN TOKENS — CSS Custom Properties
   ============================================================ */
:root {
  --cream:       #faf8f3;
  --cream-warm:  #f2e9d8;
  --cream-mid:   #ede4d3;
  --gold:        #c9a668;
  --gold-light:  #dfc08a;
  --gold-dark:   #a8864a;
  --sage:        #8a9e7a;
  --sage-dark:   #5f7a52;
  --rose:        #c0897a;
  --rose-light:  #d4a898;
  --sepia:       #4a3b2e;
  --sepia-light: #7a6a58;
  --divider:     #d8cfc0;
}

/* ============================================================
   BASE STYLES
   ============================================================ */
html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--sepia);
  font-family: 'Cormorant Garamond', serif;
  overflow-x: hidden;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
#hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  background: linear-gradient(175deg, #f5ede0 0%, #faf8f3 45%, var(--cream-warm) 100%);
  padding-top: 12vh;
  padding-top: 12svh;
}

.hero-vine-left,
.hero-vine-right {
  position: absolute;
  top: -5px;
  width: clamp(200px, 33vw, 380px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
  will-change: transform;
}
.hero-vine-left  { right: calc(50% + 40px); left: auto; transform: scaleX(-1); }
.hero-vine-right { left: calc(50% + 40px); right: auto; transform: none; }

.hero-top {
  position: relative;
  z-index: 5;
  text-align: center;
  padding: 0 2rem;
  will-change: transform;
  animation: fadeDown .9s ease both;
}

.hero-logo {
  width: clamp(65px, 8vw, 90px);
  margin-bottom: 1.8rem;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.18));
}

.hero-names {
  font-family: 'Great Vibes', cursive;
  font-size: min(9.5vw, 5.5rem);
  color: var(--rose);
  line-height: 1.1;
  padding-top: 0.25em;
  clip-path: inset(-0.5em 100% -0.5em -1em);
  animation: inkReveal 1.4s cubic-bezier(.77,0,.175,1) .5s both;
  white-space: nowrap;
}

.hero-amp {
  font-family: 'Great Vibes', cursive;
  font-size: min(6vw, 4rem);
  color: var(--rose);
  display: block;
  margin: .3rem 0 .8rem;
  line-height: 1;
}

.hero-line {
  width: 55px; height: 1px;
  margin: 1.4rem auto;
  background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold-light) 50%, var(--gold-dark) 100%);
  background-size: 200% auto;
  animation: shimmer 3s linear 2s infinite;
}

.hero-date {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: clamp(.65rem, 1.6vw, .8rem);
  letter-spacing: .45em;
  text-transform: uppercase;
  color: var(--sepia-light);
  margin-bottom: 2rem;
}
.hero-date-short { display: none; }
@media (max-width: 480px) {
  .hero-date-long  { display: none; }
  .hero-date-short { display: inline; }

  #hero {
    height: var(--hero-h, 100svh);
    min-height: unset;
    justify-content: center;
    padding-top: 3svh;
    padding-bottom: 5rem;
  }
}

/* Landscape mobile: reduce name font sizes */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-names { font-size: min(6vw, 3rem); }
  .hero-amp   { font-size: min(4vw, 2rem); }
}

@media (min-width: 656px) {
  .hero-vine-left  { right: calc(50% + clamp(80px, 10vw, 220px)); }
  .hero-vine-right { left:  calc(50% + clamp(80px, 10vw, 220px)); }
}

/* ── RSVP Button ── */
.btn-rsvp {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 2.2rem;
  border: 1px solid var(--gold);
  color: var(--sepia);
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: .7rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  transition: color .4s ease;
  cursor: pointer;
}
.btn-rsvp::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateX(-100%);
  transition: transform .4s cubic-bezier(.77,0,.175,1);
  z-index: 0;
}
.btn-rsvp:hover::before { transform: translateX(0); }
.btn-rsvp:hover { color: var(--cream); }
.btn-rsvp span, .btn-rsvp .btn-arrow { position: relative; z-index: 1; }
.btn-arrow { transition: transform .3s ease; }
.btn-rsvp:hover .btn-arrow { transform: translateX(4px); }

/* Hero scroll-down hint */
.hero-rsvp-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  color: var(--sepia-light);
  opacity: .7;
  z-index: 10;
  transition: opacity 1.2s ease;
}
.hero-rsvp-hint.hidden {
  opacity: 0;
  pointer-events: none;
}
.hero-rsvp-hint span {
  font-family: 'Montserrat', sans-serif;
  font-size: .62rem;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--sepia-light);
  text-align: center;
}
.hero-rsvp-arrow {
  width: 1px;
  height: 38px;
  background: linear-gradient(to bottom, var(--gold) 0%, transparent 100%);
  animation: pulseDown 2s ease-in-out infinite;
}

/* RSVP section — invitation-split variant */
#rsvp-section {
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, var(--cream-warm) 0%, var(--cream) 50%, var(--cream-warm) 100%);
}
#rsvp-section .invitation-split-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.rsvp-split-inner .rsvp-text-col { order: 1; }
.rsvp-split-inner .rsvp-img-col  { order: 2; background: none; display: flex; align-items: center; justify-content: center; }
.rsvp-church-img {
  width: auto;
  max-width: 100%;
  max-height: clamp(560px, 65vw, 820px);
  object-fit: contain;
  display: block;
}
@media (max-width: 700px) {
  .rsvp-split-inner .rsvp-text-col { order: 1; }
  .rsvp-split-inner .rsvp-img-col  { order: 2; justify-content: center; padding-top: 0; margin-top: -3rem; }
  .rsvp-church-img {
    max-height: 560px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Sticky RSVP — appears in top-right corner after scrolling past hero */
.btn-sticky {
  position: fixed;
  top: 1.5rem;
  right: 1.8rem;
  z-index: 1000;
  background: var(--cream);
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
  transition: opacity .5s ease, transform .5s ease;
  box-shadow: 0 4px 20px rgba(74,59,46,.12);
  font-size: .62rem;
  padding: .7rem 1.6rem;
}
.btn-sticky.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
@media (max-width: 480px) { .btn-sticky { display: none; } }

/* Church illustration container */
.hero-church-wrap {
  position: relative;
  z-index: 3;
  width: clamp(320px, 65vw, 620px);
  margin-top: 1.5vh;
  margin-top: 1.5svh;
  will-change: transform;
}
.hero-church-wrap img { width: 100%; height: auto; display: block; }

/* Watermark */
.hero-wm {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%) translateY(35%);
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: clamp(5rem, 18vw, 14rem);
  color: var(--cream-warm);
  letter-spacing: .05em;
  white-space: nowrap;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}

/* Floating petals */
.petal {
  position: absolute;
  border-radius: 60% 10% 60% 10%;
  background: linear-gradient(135deg, #f5ddd5 0%, #ebbba8 50%, #f8e6e0 100%);
  animation: petalFall linear infinite;
  pointer-events: none;
  z-index: 4;
  opacity: 0;
}
@keyframes petalFall {
  0%   { transform: translateY(-80px) translateX(0px) rotate(0deg);            opacity: 0;  }
  6%   { opacity: .55; }
  90%  { opacity: .3;  }
  100% { transform: translateY(105vh) translateX(var(--drift,40px)) rotate(var(--rot,360deg)); opacity: 0; }
}

@media (max-width: 1100px) {
  .hero-rsvp  { margin-top: 2.5rem; }
}

/* Tablet portrait: vertically center content to prevent empty space */
@media (min-width: 481px) and (max-width: 1100px) and (orientation: portrait) {
  #hero {
    justify-content: center;
    padding-top: 4vh;
    padding-top: 4svh;
    padding-bottom: 4vh;
    padding-bottom: 4svh;
  }
}
@keyframes pulseDown {
  0%,100% { opacity:.3; transform: scaleY(1); }
  60%      { opacity:1;  transform: scaleY(1.15); }
}

/* ============================================================
   SHARED SECTION STYLES
   ============================================================ */
section { position: relative; padding: 4rem 2rem; }
.s-inner { max-width: 860px; margin: 0 auto; }

.s-label {
  font-family: 'Montserrat', sans-serif; font-weight: 300;
  font-size: .68rem; letter-spacing: .45em; text-transform: uppercase;
  color: var(--sage); margin-bottom: .9rem;
}
.s-title {
  font-family: 'Cormorant Garamond', serif; font-weight: 300;
  font-size: clamp(2rem, 5vw, 3.4rem); color: var(--sepia); line-height: 1.2;
}
.gold-bar {
  width: 50px; height: 1px; margin: 1.5rem auto;
  background: linear-gradient(90deg, var(--gold-dark) 0%, var(--gold-light) 50%, var(--gold-dark) 100%);
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}

/* ============================================================
   COUNTDOWN TIMER
   ============================================================ */
#countdown {
  padding: 1rem 2rem 3.5rem;
  text-align: center;
  background: #f7f2e8;
}
.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: nowrap;
  margin-top: 1.5rem;
  width: 100%;
}
.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem clamp(.4rem, 2vw, 2.5rem);
  min-width: 0;
  flex: 1 1 0;
}
.cd-unit span {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(3rem, 8vw, 5.5rem);
  color: var(--sepia);
  line-height: 1;
  letter-spacing: -.02em;
  display: block;
  min-width: 2ch;
  text-align: center;
}
.cd-unit small {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: clamp(.42rem, 1.2vw, .6rem);
  letter-spacing: clamp(.1em, .5vw, .45em);
  text-transform: uppercase;
  color: var(--sage);
  margin-top: .6rem;
  white-space: nowrap;
}
.cd-sep {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.4rem, 4vw, 4rem);
  color: var(--gold);
  opacity: .5;
  align-self: flex-start;
  padding-top: 1.5rem;
  flex-shrink: 0;
  animation: sepBlink 2s ease-in-out infinite;
}
@keyframes sepBlink {
  0%,100% { opacity:.5; } 50% { opacity:.15; }
}
.cd-finish {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--rose);
  padding: 1.5rem;
}
@media (max-width: 500px) {
  .cd-unit { padding: .8rem clamp(.15rem, 1.2vw, .8rem); }
  .cd-unit span { font-size: clamp(2.2rem, 10vw, 3.2rem); }
  .cd-unit small { font-size: clamp(.45rem, 1.6vw, .58rem); letter-spacing: .12em; }
  .cd-sep { padding-top: .8rem; font-size: clamp(1.4rem, 5vw, 2.2rem); padding-left: 0; padding-right: 0; }
}

.msg-quote {
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 300;
  font-size: clamp(1.35rem, 3vw, 1.95rem); color: var(--sepia);
  line-height: 1.75; max-width: 620px; margin: 0 auto 2.5rem;
}
.msg-quote em { color: var(--rose); font-style: normal; }

/* ============================================================
   INVITATION SPLIT — skyline image + invitation text
   ============================================================ */
#invitation-split {
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, var(--cream-warm) 0%, var(--cream) 50%, var(--cream-warm) 100%);
}

.invitation-split-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: clamp(320px, 42vw, 520px);
  max-width: 100%;
}

.invitation-img-col {
  overflow: hidden;
  position: relative;
}

.invitation-skyline {
  width: 100%;
  height: 115%;
  object-fit: cover;
  object-position: center center;
  display: block;
  will-change: transform;
}

.invitation-text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(2rem, 6vw, 5rem) clamp(2rem, 5vw, 4.5rem);
  text-align: left;
}

.invitation-text-col .msg-quote {
  margin: 0 0 .6rem;
  text-align: left;
  max-width: 520px;
  font-size: clamp(.95rem, 1.7vw, 1.2rem);
  line-height: 1.6;
}

/* Label: desktop only, visible inside text column */
.invitation-label-mobile  { display: none; }
.invitation-label-desktop { display: block; }

@media (max-width: 700px) {
  .invitation-split-inner {
    grid-template-columns: 1fr;
  }
  /* Mobile order: image → label → text */
  .invitation-img-col      { order: 1; }
  .invitation-label-mobile { order: 2; }
  .invitation-text-col     { order: 3; }

  /* Mobile: show top label, hide the one inside the text block */
  .invitation-label-mobile {
    display: block;
    text-align: center;
    padding: 1.5rem 1.5rem 0;
    margin-bottom: 0;
  }
  .invitation-label-desktop { display: none; }

  .invitation-img-col {
    min-height: 220px;
  }
  .invitation-text-col {
    align-items: center;
    text-align: center;
    padding: 2.5rem 1.5rem;
  }
  .invitation-text-col .msg-quote {
    text-align: center;
  }
  /* Match hero background — seamless visual transition between sections */
  #invitation-split {
    background: var(--cream-warm);
  }
}

/* ============================================================
   DATE & VENUE
   ============================================================ */
#date { text-align: center; overflow: hidden; }

.date-day {
  font-family: 'Montserrat', sans-serif; font-weight: 200;
  font-size: clamp(.7rem, 1.8vw, .85rem);
  letter-spacing: .5em; text-transform: uppercase; color: var(--sage);
}
.date-num {
  font-family: 'Cormorant Garamond', serif; font-weight: 300;
  font-size: clamp(5rem, 14vw, 10rem); color: var(--rose); line-height: .9;
}
.date-my {
  font-family: 'Cormorant Garamond', serif; font-weight: 300;
  font-size: clamp(1.1rem, 3vw, 1.9rem);
  color: var(--sepia); letter-spacing: .18em;
}
.date-text {
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.1rem;
  color: var(--sepia-light); max-width: 540px; margin: 1.5rem auto 0;
  line-height: 1.7;
}
.date-text strong { font-style: normal; color: var(--sepia); font-weight: 500; }


/* ============================================================
   TIMELINE / AGENDA
   ============================================================ */
#agenda {
  background: linear-gradient(180deg, var(--cream-mid) 0%, var(--cream) 100%);
  text-align: center;
  padding-top: 1.5rem;
}
.timeline {
  position: relative;
  max-width: 720px; margin: 4rem auto 0;
}
.timeline::before {
  content: '';
  position: absolute; left: 50%; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--divider) 8%, var(--divider) 92%, transparent);
  transform: translateX(-50%);
}
.tl-item {
  display: grid;
  grid-template-columns: 1fr 20px 1fr;
  align-items: center;
  margin-bottom: 3.5rem;
  gap: 0;
}
.tl-item:nth-child(odd) .tl-text  { text-align: right; padding-right: 2.5rem; }
.tl-item:nth-child(odd) .tl-illus { justify-content: flex-start; padding-left: 2.5rem; }
.tl-item:nth-child(even) .tl-text  { text-align: left; padding-left: 2.5rem; grid-column: 3; }
.tl-item:nth-child(even) .tl-illus { justify-content: flex-end; padding-right: 2.5rem; grid-column: 1; grid-row: 1; }
.tl-item:nth-child(even) .tl-dot   { grid-column: 2; grid-row: 1; }

.tl-dot {
  width: 12px; height: 12px;
  background: var(--gold); border-radius: 50%;
  border: 3px solid var(--cream-warm);
  box-shadow: 0 0 0 2px var(--gold);
  justify-self: center; z-index: 2;
}
.tl-illus { display: flex; align-items: center; }
.tl-illus img {
  height: auto; object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(74,59,46,.12));
}
.tl-map-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-top: .6rem;
  font-family: 'Montserrat', sans-serif;
  font-size: .55rem;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-dark);
  text-decoration: none;
  border: 1px solid var(--gold);
  border-radius: 2rem;
  padding: .3rem .7rem;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.tl-map-btn svg { width: 10px; height: 10px; flex-shrink: 0; }
.tl-map-btn:hover { background: var(--gold); color: var(--cream); }

.tl-time {
  font-family: 'Montserrat', sans-serif; font-weight: 300;
  font-size: .62rem; letter-spacing: .4em; text-transform: uppercase;
  color: var(--gold); margin-bottom: .3rem;
}
.tl-event {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem; font-weight: 400; color: var(--sepia);
}
.tl-detail {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: .98rem; color: var(--sepia-light); margin-top: .15rem;
}

/* ============================================================
   INFO SECTION
   ============================================================ */
#info { background: var(--cream-mid); }

.i-icon { width: 44px; height: 44px; margin: 0 auto 1.5rem; }
.i-icon svg { width: 100%; height: 100%; stroke: var(--sage); fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.i-title {
  font-family: 'Montserrat', sans-serif; font-weight: 400;
  font-size: .65rem; letter-spacing: .42em; text-transform: uppercase;
  color: var(--sage); margin-bottom: 1.1rem;
}
.i-body {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.06rem; color: var(--sepia); line-height: 1.8;
}
.i-body ul { list-style: none; text-align: left; margin-top: .6rem; }
.i-body li { padding: .15rem 0 .15rem 1.1rem; position: relative; }
.i-body li::before { content: '·'; position: absolute; left: 0; color: var(--gold); }
.i-accent { color: var(--rose); font-style: italic; margin-top: .6rem; display: block; }

/* ============================================================
   FOOTER
   ============================================================ */
#closing {
  background: var(--sepia);
  padding: 2.8rem 2rem;
  text-align: center;
}
.closing-logo {
  width: clamp(40px, 5vw, 58px);
  opacity: .75;
  mix-blend-mode: screen;
  display: block;
  margin: 0 auto 1.2rem;
}
.closing-names {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  color: var(--cream-warm);
  line-height: 1;
}
.closing-date {
  font-family: 'Montserrat', sans-serif; font-weight: 200;
  font-size: clamp(.6rem, 1.6vw, .75rem);
  letter-spacing: .55em; text-transform: uppercase;
  color: var(--cream-warm); margin-top: .8rem; opacity: .45;
}
.closing-tagline {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: clamp(.9rem, 2vw, 1rem);
  color: var(--cream-warm);
  margin-top: .6rem; opacity: .4;
}
.footer-contact {
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 8vw, 6rem);
  margin-top: 2rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .55rem;
}
.footer-person-name {
  font-family: 'Montserrat', sans-serif; font-weight: 400;
  font-size: .6rem; letter-spacing: .25em; text-transform: uppercase;
  color: var(--cream-warm); opacity: .5;
  margin-bottom: .1rem;
}
.footer-links {
  display: flex;
  gap: 1.1rem;
  align-items: center;
}
@media (max-width: 525px) {
  .footer-links { flex-direction: column; gap: .45rem; align-items: flex-start; }
}
.footer-link {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: 'Montserrat', sans-serif; font-weight: 300;
  font-size: .65rem; letter-spacing: .04em;
  color: var(--cream-warm); opacity: .55;
  text-decoration: none;
  transition: opacity .2s;
}
.footer-link:hover { opacity: .9; }
.footer-link svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ============================================================
   SCROLL REVEAL — IntersectionObserver fade-in
   ============================================================ */
.aos {
  opacity: 0; transform: translateY(28px);
  transition: opacity .85s ease, transform .85s ease;
}
.aos.visible { opacity: 1; transform: translateY(0); }
.aos.d1 { transition-delay: .15s; }
.aos.d2 { transition-delay: .28s; }
.aos.d3 { transition-delay: .42s; }

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */
@keyframes fadeDown {
  from { opacity:0; transform: translateY(-18px); }
  to   { opacity:1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity:0; } to { opacity:1; }
}
@keyframes inkReveal {
  from { clip-path: inset(-0.5em 100% -0.5em -1em); }
  to   { clip-path: inset(-0.5em -300vw -0.5em -1em); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
@keyframes shimmerGlow {
  0%,100% { filter: saturate(0.75) brightness(0.92)  drop-shadow(0 0 0px transparent); }
  50%      { filter: saturate(0.85) brightness(1.0)   drop-shadow(0 0 6px rgba(201,166,104,.3)); }
}

/* ============================================================
   RESPONSIVE — Mobile breakpoints
   ============================================================ */
@media (max-width: 640px) {
  .venues { gap: 1.5rem; }
  .tl-illus img { max-width: 70px; }
  .tl-item:nth-child(odd) .tl-text  { padding-right: 1.2rem; }
  .tl-item:nth-child(odd) .tl-illus { padding-left: 1.2rem; }
  .tl-item:nth-child(even) .tl-text  { padding-left: 1.2rem; }
  .tl-item:nth-child(even) .tl-illus { padding-right: 1.2rem; }
}

@media (min-width: 900px) {
  #agenda .s-inner { max-width: 1100px; }

  .timeline {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    max-width: 100%;
    margin: 3rem auto 0;
    padding: 0 1rem;
  }
  .timeline::before {
    top: 50%; left: 0; right: 0;
    bottom: auto; width: auto; height: 1px;
    background: linear-gradient(to right, transparent, var(--divider) 8%, var(--divider) 92%, transparent);
    transform: translateY(-50%);
  }
  .tl-item {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 20px 1fr;
    align-items: center;
    justify-items: center;
    margin-bottom: 0;
    min-height: 340px;
  }
  .tl-item:nth-child(even) .tl-text  { grid-column:1; grid-row:3; padding-left:0; text-align:center; }
  .tl-item:nth-child(even) .tl-illus { grid-column:1; grid-row:1; padding-right:0; justify-content:center; }
  .tl-item:nth-child(even) .tl-dot   { grid-column:1; grid-row:2; }
  .tl-item:nth-child(odd) .tl-text   { text-align:center; padding-right:0; grid-row:1; }
  .tl-item:nth-child(odd) .tl-illus  { justify-content:center; padding-left:0; grid-row:3; }
  .tl-dot   { grid-row:2; grid-column:1; }
  .tl-illus { justify-content:center; width:100%; padding:.5rem 0; }
  .tl-illus img { max-width:90px; max-height:100px; }
  .tl-text  { padding:.75rem .5rem; display:flex; flex-direction:column; align-items:center; }
}

/* ============================================================
   ACCORDION — Hotels & Transport
   ============================================================ */
.info-accordion-list {
  margin-top: 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.info-accordion-section {
  background: var(--cream);
  padding: 2.5rem 2rem;
  text-align: center;
}
.accordion-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.2rem;
  padding: .75rem 1.8rem;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--sepia);
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  font-size: .68rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color .3s ease;
}
.accordion-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--gold);
  transform: translateX(-100%);
  transition: transform .35s cubic-bezier(.77,0,.175,1);
  z-index: 0;
}
.accordion-btn:hover::before { transform: translateX(0); }
.accordion-btn:hover { color: var(--cream); }
.accordion-btn span { position: relative; z-index: 1; }

.accordion-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .4s ease, opacity .4s ease;
  text-align: left;
}
.accordion-body.open {
  max-height: 3000px;
  opacity: 1;
  margin-top: 2rem;
}
@media (prefers-reduced-motion: reduce) {
  .accordion-body { transition: none; }
}

/* Hotel cards */
.hotel-group { margin-bottom: 2.5rem; }
.hotel-group-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem; font-weight: 400;
  color: var(--sepia); margin-bottom: 1.2rem;
  text-align: center;
}
.hotel-group-title::after {
  content: ''; display: block;
  width: 30px; height: 1px;
  background: var(--gold);
  margin: .4rem auto 0;
}
.hotel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
.hotel-card {
  background: var(--cream-warm);
  border: 1px solid var(--divider);
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
  transition: border-color .3s ease;
}
.hotel-card::after {
  content: '';
  position: absolute; inset: -1px;
  border: 1px solid var(--gold); opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.hotel-card:hover::after { opacity: .5; }
.hotel-card img {
  width: 100%; aspect-ratio: 16/9;
  object-fit: cover; display: block;
  border-bottom: 1px solid var(--divider);
}
.hotel-card-body {
  padding: 1.4rem 1.2rem; flex: 1;
  display: flex; flex-direction: column;
  align-items: center; text-align: center; gap: .45rem;
}
.hotel-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem; font-weight: 500; color: var(--sepia);
}
.hotel-addr {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: .9rem;
  color: var(--sepia-light); flex: 1;
}
.hotel-map-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .45rem 1.1rem;
  border: 1px solid var(--gold);
  color: var(--gold-dark); text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-size: .58rem; font-weight: 300;
  letter-spacing: .25em; text-transform: uppercase;
  position: relative; overflow: hidden;
  transition: color .3s ease;
  margin-top: auto;
}
.hotel-map-btn::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--gold);
  transform: translateX(-100%);
  transition: transform .35s cubic-bezier(.77,0,.175,1);
  z-index: 0;
}
.hotel-map-btn:hover::before { transform: translateX(0); }
.hotel-map-btn:hover { color: var(--cream); }
.hotel-map-btn span { position: relative; z-index: 1; }
.hotel-group-desc { font-size: 0.95rem; color: var(--text); margin: -0.5rem 0 1.25rem; line-height: 1.6; text-align: center; }
.hotel-grid--single { display: flex; justify-content: center; }

/* Transport timeline
   ─────────────────────────────────────────────────────
   Coordinate system:
     container padding-left = 1.5rem
     dot width = 0.8rem → radius = 0.4rem
     dot margin-left = -1.5rem → dot left edge at x=0 (inside container)
     dot center at x = 0.4rem
     line ::before at left = calc(0.4rem - 1px) → centered over the dot
   ───────────────────────────────────────────────────── */
.transport-wrapper {
  display: flex; flex-direction: column; gap: 1.6rem;
  max-width: 740px; margin: 0 auto;
}
/* Mobile: column layout with outbound → bridge → return order */
.transport-legs-grid { display: flex; flex-direction: column; gap: 1.6rem; }
.transport-leg--ida        { order: 1; }
.transport-bridge--grid    { order: 2; }
.transport-leg--vuelta     { order: 3; }

.transport-leg {
  position: relative;
  padding: 1.4rem 1.6rem;
  background: var(--cream-warm);
  border: 1px solid var(--divider);
}

/* Desktop: 2-column grid, bridge row spans full width */
@media (min-width: 640px) {
  .transport-legs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "ida vuelta"
      "bridge bridge";
    gap: 1.5rem;
    align-items: stretch;
  }
  .transport-leg--ida     { grid-area: ida; }
  .transport-leg--vuelta  { grid-area: vuelta; }
  .transport-bridge--grid { grid-area: bridge; order: unset; }
}

.transport-leg-title {
  font-family: 'Montserrat', sans-serif; font-weight: 400;
  font-size: .64rem; letter-spacing: .42em; text-transform: uppercase;
  color: var(--sage); margin-bottom: 1.1rem;
}

.tr-tl { position: relative; padding-left: 1.5rem; }
.tr-tl::before {
  content: ''; position: absolute;
  left: calc(0.4rem - 1px); top: 0.55rem; bottom: 0.55rem;
  width: 2px; background: var(--gold-light);
}

.tr-stop {
  display: flex; align-items: flex-start;
  gap: .7rem; margin-bottom: .85rem;
}
.tr-stop:last-child { margin-bottom: 0; }

.tr-dot {
  flex-shrink: 0;
  width: .8rem; height: .8rem;
  border-radius: 50%;
  background: var(--cream); border: 2px solid var(--gold);
  margin-left: -1.5rem;   /* returns to the left edge of padding */
  margin-top: .28rem;
  position: relative; z-index: 1;
}
.tr-dot--dest  { background: var(--gold); border-color: var(--gold-dark); }
.tr-dot--bridge { background: var(--sage); border-color: var(--sage); }

.tr-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.08rem; font-weight: 600; color: var(--sepia);
}
.tr-time {
  font-family: 'Montserrat', sans-serif;
  font-size: .75rem; color: var(--gold-dark); font-weight: 500;
  letter-spacing: .04em; margin-top: .1rem;
}
.tr-dest-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: .9rem; font-style: italic; color: var(--sepia-light); margin-top: .1rem;
}

.transport-map-link {
  display: inline-block; margin-top: .25rem;
  font-family: 'Montserrat', sans-serif;
  font-size: .7rem; letter-spacing: .04em;
  color: var(--gold-dark); text-decoration: none;
  border-bottom: 1px solid var(--gold-light);
  transition: color .2s ease, border-color .2s ease;
}
.transport-map-link:hover { color: var(--rose); border-color: var(--rose); }

.transport-bridge {
  background: var(--cream-warm);
  border: 1px solid var(--divider);
  padding: .9rem 1.2rem;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: 1rem;
  color: var(--sepia-light); line-height: 1.6; text-align: center;
}

.transport-note {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic; font-size: 1rem;
  color: var(--sepia-light); line-height: 1.7; margin-top: .4rem;
}

/* ============================================================
   VIDEO SECTION
   ============================================================ */
#video-section {
  text-align: center;
  background: linear-gradient(180deg, var(--cream-warm) 0%, var(--cream) 100%);
  padding: 5rem 2rem;
}
.video-wrapper-vertical {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}
.video-wrapper-vertical iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}
#btn-mute-video {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  white-space: nowrap;
  border: 1.5px solid rgba(255,255,255,0.85);
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-family: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 1.1rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background 0.2s;
}
#btn-mute-video:active {
  background: rgba(0,0,0,0.75);
}

/* ============================================================
   BOOK OPENING ANIMATION (full-screen intro overlay)
   ============================================================ */
#book-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #f5f0e8;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 2000px;
  cursor: pointer;
  transition: opacity 0.6s ease;
}
#book-intro.fade-out { opacity: 0; pointer-events: none; }

/* Inner container: matches combined width of both vine decorations */
.book-inner {
  position: relative;
  width: min(calc(2 * clamp(80px, 10vw, 220px) + 2 * clamp(200px, 33vw, 380px)), 100vw);
  height: 100%;
  display: flex;
  align-items: stretch;
}

/* Images hidden until fully loaded — prevents layout flash */
#book-intro img { opacity: 0; transition: opacity 0.25s ease; }
#book-intro.images-ready img { opacity: 1; }
/* Preserve logo fade-out transition while opening */
#book-intro.opening #book-logo { opacity: 0 !important; transition: opacity 0.4s ease !important; }

.book-cover {
  flex: 0 0 50%;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transition: transform 1.8s cubic-bezier(0.6, 0, 0.4, 1);
  will-change: transform;
  backface-visibility: hidden;
}
.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#cover-left {
  transform-origin: left center;
  transform-style: preserve-3d;
}
#cover-left img  { object-position: right center; }
#cover-right {
  transform-origin: right center;
  transform-style: preserve-3d;
}
#cover-right img { object-position: left center; }

#book-intro.opening #cover-left  { transform: rotateY(-180deg); }
#book-intro.opening #cover-right { transform: rotateY(180deg); }

#book-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: min(180px, 28vw);
  z-index: 10000;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.18));
  transition: opacity 0.4s ease;
  pointer-events: none;
  user-select: none;
}
#book-intro.opening #book-logo { opacity: 0; }

@media (max-width: 480px) {
  #book-logo { width: min(120px, 35vw); }
}

/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */
#btn-top {
  position: fixed;
  bottom: 2rem;
  left: 1.5rem;
  z-index: 9999;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: var(--cream);
  color: var(--gold-dark);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation; /* prevents OS gesture interception before tap */
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(74,59,46,0.15);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
}
#btn-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
#btn-top:hover {
  background: var(--cream-warm);
  color: var(--gold);
}

/* ============================================================
   TOUCH DEVICES — replace hover effects with :active states
   Only affects mobile/tablet (hover: none = no real pointer)
   ============================================================ */
@media (hover: none) {

  /* .btn-rsvp & .accordion-btn: disable the sliding ::before fill */
  .btn-rsvp::before,
  .accordion-btn::before {
    display: none;
  }
  .btn-rsvp:hover,
  .accordion-btn:hover {
    color: var(--sepia);
  }
  .btn-rsvp:hover .btn-arrow {
    transform: none;
  }
  .btn-rsvp:active,
  .accordion-btn:active {
    background: var(--gold);
    color: var(--cream);
  }

  /* .tl-map-btn & .hotel-map-btn */
  .tl-map-btn:hover,
  .hotel-map-btn:hover {
    background: transparent;
    color: var(--gold-dark);
  }
  .tl-map-btn:active,
  .hotel-map-btn:active {
    background: var(--gold);
    color: var(--cream);
  }

  /* .transport-map-link */
  .transport-map-link:hover {
    color: var(--gold-dark);
    border-color: var(--gold-light);
  }
  .transport-map-link:active {
    color: var(--rose);
    border-color: var(--rose);
  }

  /* #btn-top */
  #btn-top {
    bottom: calc(env(safe-area-inset-bottom) + 2rem);
  }
  /* Safari iOS: extra offset to clear the browser toolbar claim area */
  #btn-top.safari-ios {
    bottom: calc(env(safe-area-inset-bottom) + 3.5rem);
  }
  #btn-top:hover {
    background: var(--cream);
    color: var(--gold-dark);
  }
  #btn-top:active {
    background: var(--cream-warm);
    transform: translateY(0) scale(0.93);
  }

  /* .footer-link */
  .footer-link:hover {
    opacity: .55;
  }
  .footer-link:active {
    opacity: .9;
  }
}
