:root {
  --paper:     #FAF6EE;
  --cream:     #F5EDE0;
  --sand:      #E8D9C1;
  --ink:       #1A1614;
  --ink-soft:  #4A423D;
  --rule:      #C8B79E;
  --accent:    #B85B3F;

  /* Mazunte palette — same colors as the hero canvas. Used by the
     animated section-media gradients below to extend the hero's
     color bands into each section. */
  --p-cream:      #F2E4CB;
  --p-sand:       #E8C9A0;
  --p-amber:      #D4924E;
  --p-terracotta: #B85B3F;
  --p-pink:       #D88B86;
  --p-clay:       #7D4A3A;
  --p-ocean:      #3A6B85;

  --sans: "Inter Tight", "Helvetica Neue", Helvetica, "Inter", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

@property --band-c1 { syntax: '<color>'; initial-value: #B85B3F; inherits: false; }
@property --band-c2 { syntax: '<color>'; initial-value: #D4924E; inherits: false; }

@keyframes palette-breathe {
  0%   { --band-c1: #B85B3F; --band-c2: #D4924E; }
  14%  { --band-c1: #D4924E; --band-c2: #F2E4CB; }
  28%  { --band-c1: #F2E4CB; --band-c2: #E8C9A0; }
  42%  { --band-c1: #E8C9A0; --band-c2: #D88B86; }
  56%  { --band-c1: #D88B86; --band-c2: #3A6B85; }
  70%  { --band-c1: #3A6B85; --band-c2: #7D4A3A; }
  84%  { --band-c1: #7D4A3A; --band-c2: #B85B3F; }
  100% { --band-c1: #B85B3F; --band-c2: #D4924E; }
}




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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; }

/* ─── hero ──────────────────────────────────────────────────── */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  background: var(--ink);
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

.hero-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  padding: clamp(1.25rem, 3vw, 3rem);
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  color: var(--paper);
  pointer-events: none;
  text-shadow: 0 1px 3px rgba(0,0,0,0.28), 0 0 24px rgba(0,0,0,0.15);
}

.hero-top  { align-self: start;  }
.hero-center { align-self: center; }
.hero-foot { align-self: end;    display: flex; flex-direction: column; gap: 1rem; width: 100%; }

.hero-overlay a,
.hero-overlay button { pointer-events: auto; }

.hero-top,
.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
/* top-align so "Save the Date" (top of the left stack) sits on the same
   line as the single-line "Mazunte · Oaxaca · MX" label on the right */
.hero-top { align-items: flex-start; }

.mono {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero-center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
}

.couple {
  font-family: var(--sans);
  font-weight: 300;
  font-style: normal;
  font-size: clamp(0.95rem, 2.3vw, 1.9rem);
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.22em;
  max-width: 28ch;
}

.couple .couple-name {
  display: block;
  text-align: center;
}

.couple .amp {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 0.95em;
  opacity: 0.92;
  line-height: 1;
}
.couple .amp em {
  font-style: italic;
  font-weight: 300;
  font-family: var(--sans);
  display: inline-block;
}

.date {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}


/* Top-left stack: "Save the Date" with a discreet RSVP line under it.
   Both read in the same tracked-uppercase register as the rest of the
   hero corner labels. */
.hero-stack {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.hero-rsvp {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
}

.hero-nav {
  display: flex;
  gap: clamp(0.85rem, 2vw, 1.75rem);
  flex-wrap: wrap;
}
.hero-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: border-color 220ms ease, opacity 220ms ease;
  opacity: 0.92;
}
.hero-nav a:hover {
  border-color: currentColor;
  opacity: 1;
}

.hero-cue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.7;
  padding-top: 0.25rem;
}
.hero-cue-rule {
  display: inline-block;
  width: 36px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

/* ─── sections ─────────────────────────────────────────────── */

main {
  background: var(--paper);
  position: relative;
}

/* Bottom rectangle — the coloured band is exactly 50vw wide at the
   left of the viewport (unchanged from the original placement). The
   image inside is sized and positioned to match the section-image
   grid math exactly, using the same expressions the .section grid
   would produce for its 1fr media column. */
.page-bottom {
  display: flex;
  width: 100%;
  min-height: clamp(24rem, 96vh, 96rem);
}
.page-bottom-left {
  width: 50vw;
  box-sizing: border-box;
  background: linear-gradient(160deg, var(--band-c1, #B85B3F), var(--band-c2, #D4924E));
  animation: palette-breathe 35s linear infinite;
  animation-delay: -9s;
  padding-top: clamp(4rem, 8vw, 8rem);
  padding-bottom: clamp(4rem, 8vw, 8rem);
  /* left offset from viewport = section-left + section-padding-left,
     matching where a section image begins */
  padding-left: calc(max((100vw - 1280px) / 2, 0px) + clamp(1.5rem, 3vw, 3rem));
  padding-right: 0;
}
.page-bottom-right {
  width: 50vw;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 5vw, 5rem);
}
.page-bottom-media {
  /* Same width as a .section-media (1fr of the centered section grid):
     (content width - column gap) / 3 */
  width: calc((min(100vw, 1280px) - 2 * clamp(1.5rem, 3vw, 3rem) - clamp(2rem, 5vw, 5rem)) / 3);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--rule);
  background: var(--cream);
}
.page-bottom-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.page-bottom-verse {
  font-family: "Nanum Myeongjo", serif;
  font-weight: 400;
  color: var(--clay);
  font-size: clamp(1.05rem, 1.7vw, 1.55rem);
  line-height: 2.15;
  letter-spacing: 0.02em;
  text-align: center;
  max-width: 30ch;
  word-break: keep-all;
}

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 8rem) clamp(1.5rem, 3vw, 3rem);
  display: grid;
  grid-template-columns: 1fr 2fr;
  grid-template-areas:
    "head  body"
    "media body";
  gap: clamp(2rem, 5vw, 5rem);
  position: relative;
}

/* Full-viewport-width divider line between sections — extends past the
   centered max-width so it spans the entire screen. */
.section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: calc(50% - 50vw);
  width: 100vw;
  height: 1px;
  background: var(--rule);
  z-index: 4;
}

.section-head  { grid-area: head;  align-self: start; position: sticky; top: 2rem; z-index: 3; }
.section-media { grid-area: media; align-self: start; }
.section-body  { grid-area: body; }

.section-media {
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--cream);
  border: 1px solid var(--rule);
  margin: 0;
}
.section-media img,
.section-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.section-media:empty {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.section-media:empty::after {
  content: attr(data-section);
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--rule);
}

/* ── Banded sections ────────────────────────────────────────────
   #travel and #schedule. The base centered grid is preserved (so
   the photos line up across all five sections); the band is a
   ::before backdrop that extends from viewport-left across more
   than half the screen, with a soft mask fade on its right edge so
   the body text on the right keeps sitting on paper. Gradient
   breathes through the Mazunte palette like the hero rectangles. */
.section--band {
  position: relative;
}
.section--band::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - 50vw);
  width: 50vw;            /* extends to viewport center = hero's centerline */
  z-index: 0;
  background: linear-gradient(160deg, var(--band-c1, #B85B3F), var(--band-c2, #D4924E));
  animation: palette-breathe 35s linear infinite;
}
#schedule.section--band::before { animation-delay: -18s; }

/* Head keeps its base position: sticky and z-index: 3 — always on top
   of everything else in the section. Media and body get explicit
   position so their z-index applies and they sit above the gradient
   but below the heading. */
.section--band .section-media { position: relative; z-index: 1; }
.section--band .section-body  { position: relative; z-index: 1; }

.section--band .section-head .section-num {
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
.section--band .section-head h2 {
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.32);
}


.section-num {
  display: block;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--ink-soft);
  margin-bottom: 0.85rem;
}

.section h2 {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1.85rem, 4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.section-body {
  font-family: var(--sans);
  font-size: 1.02rem;
  color: var(--ink-soft);
  max-width: 60ch;
  margin-left: clamp(9rem, 14vw, 14rem);   /* aligned across all sections */
}
.section-body a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color 200ms ease;
}
.section-body a:hover { border-color: currentColor; }

.lead {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1.1rem, 1.45vw, 1.45rem);
  line-height: 1.42;
  color: var(--ink);
  margin-bottom: 1.5rem;
  letter-spacing: -0.005em;
}

.lead em {
  font-style: italic;
  font-weight: 300;
}

/* Save-the-date RSVP call in the Wedding section — tracked-uppercase
   accent color so it visually carries weight without looking shouty. */
.rsvp-call {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.78rem;
  line-height: 1.6;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
.rsvp-call strong {
  font-weight: 600;
}
.rsvp-call a { color: inherit; }

/* ── RSVP form (Section 06) ─────────────────────────────── */
.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-top: 1.5rem;
  max-width: 40ch;
}
.rsvp-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
/* Override needed because .field[hidden] would otherwise inherit
   display: flex above and stay visible. */
.rsvp-form .field[hidden] { display: none; }

.rsvp-form label,
.rsvp-form legend {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.rsvp-form fieldset.field {
  border: none;
  padding: 0;
  margin: 0;
}
.rsvp-form fieldset.field legend {
  padding: 0;
  margin-bottom: 0.6rem;
}
.rsvp-form label.radio {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  margin-right: 1.75rem;
  cursor: pointer;
}
.rsvp-form label.radio input[type="radio"] {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 0.5rem 0;
  outline: none;
  transition: border-color 200ms ease;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
}
.rsvp-form select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%),
                    linear-gradient(-45deg, transparent 50%, var(--ink-soft) 50%);
  background-position: right 0.5em top 55%, right 0.25em top 55%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 1.5em;
  cursor: pointer;
}
.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  border-bottom-color: var(--ink);
}
.rsvp-form textarea {
  resize: vertical;
  min-height: 3em;
  line-height: 1.4;
}
.rsvp-form button {
  align-self: flex-start;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  border: none;
  padding: 1rem 2.25rem;
  cursor: pointer;
  transition: background 200ms ease;
  margin-top: 0.5rem;
}
.rsvp-form button:hover:not(:disabled) { background: var(--ink); }
.rsvp-form button:disabled { opacity: 0.5; cursor: default; }
.rsvp-status {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--ink-soft);
  min-height: 1.3em;
  margin: 0.5rem 0 0;
  line-height: 1.4;
}

/* travel grid */

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem 2rem;
  margin-top: 2rem;
}
.info-grid > div {
  border-top: 1px solid var(--rule);
  padding-top: 0.75rem;
}
.info-grid dt {
  font-weight: 500;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}
.info-grid dd {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.1rem;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.info-grid dd.dd-sub {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.2rem;
}
.info-grid .price-detail {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-soft);
  font-weight: 300;
  letter-spacing: 0;
  margin-top: 0.15rem;
  line-height: 1.35;
}

/* schedule */

.schedule {
  list-style: none;
  margin-top: 1rem;
}
.schedule li {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 2fr;
  gap: 2rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--rule);
  align-items: baseline;
}
.schedule li:last-child { border-bottom: 1px solid var(--rule); }
.schedule .day {
  font-weight: 500;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.schedule .day-desc {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.25rem;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.note {
  margin-top: 1.5rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* ─── footer ──────────────────────────────────────────────── */

.site-footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(2rem, 4vw, 4rem) clamp(1.5rem, 3vw, 3rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.site-footer a:hover { border-color: currentColor; }
.site-footer-mark {
  font-family: var(--sans);
  font-style: italic;
  font-weight: 300;
  font-size: 1.05rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}

/* ─── responsive ──────────────────────────────────────────── */

@media (max-width: 760px) {
  .section {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "media"
      "body";
    gap: 1.5rem;
  }
  .section-head { position: static; }
  .section-media {
    aspect-ratio: auto;
    padding: 0;
    background: transparent;
    border: none;
  }
  .section-media img,
  .section-media video {
    height: auto;
    object-fit: contain;
  }
  .section-body { margin-left: 0; }
  .section--band::before { display: none; }
  .section--band .section-head .section-num { color: var(--ink-soft); text-shadow: none; }
  .section--band .section-head h2 { color: var(--ink); text-shadow: none; }
  .page-bottom {
    flex-direction: column;
    min-height: 0;
  }
  .page-bottom-left,
  .page-bottom-right {
    width: 100%;
    padding: 2rem;
  }
  .page-bottom-media {
    width: auto;
    aspect-ratio: auto;
    border: none;
    background: transparent;
  }
  .page-bottom-media img {
    height: auto;
    object-fit: contain;
  }
  .hero-nav { gap: 0.85rem; }
  .hero-overlay { padding: 1.1rem; }
  .schedule li { grid-template-columns: 1fr; gap: 0.3rem; }
}

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