:root {
  color-scheme: only light;
  --bg: #f6f2ee;
  --ink: #2a2420;
  --muted: #6f655e;
  --accent: #c9a88c;
  --card: #ffffff;
  --shadow: 0 24px 60px rgba(38, 30, 24, 0.12);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Cormorant Garamond", "Times New Roman", serif;
}

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

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: radial-gradient(circle at top, #fdfaf7 0%, var(--bg) 55%);
}

body.prelude-active {
  overflow: hidden;
}

.site-shell {
  transition: opacity 0.8s ease;
}

body.prelude-active .site-shell {
  opacity: 0;
  pointer-events: none;
}

body.prelude-reveal .site-shell,
body.prelude-complete .site-shell {
  opacity: 1;
  pointer-events: auto;
}

.letter-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background: transparent;
}

.letter-whitefade {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 1;
  transition: opacity 0.55s ease;
}

.letter-trigger {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  padding: 0;
  width: 100vw;
  height: 100vh;
  max-width: none;
  cursor: pointer;
  transition: opacity 0.55s ease, transform 0.55s ease, filter 0.55s ease;
}

.letter-canvas,
.letter-trigger img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.letter-canvas {
  pointer-events: none;
}

.letter-trigger #letterFallback {
  display: none;
}

.letter-trigger img {
  filter: drop-shadow(0 30px 44px rgba(0, 0, 0, 0.18));
}

.letter-gate.is-fading-white .letter-trigger {
  opacity: 0;
  transform: scale(0.98);
  filter: blur(2px);
  pointer-events: none;
}

.letter-gate.is-fading-white .letter-whitefade {
  opacity: 1;
}

.letter-gate.is-revealing-site .letter-whitefade {
  opacity: 0;
  transition-duration: 0.85s;
}

img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

header.hero {
  position: relative;
  isolation: isolate;
  height: 100vh;
  min-height: 100vh;
  padding: 32px 8vw 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid rgba(42, 36, 32, 0.08);
}

.nav {
  position: absolute;
  top: 32px;
  left: 8vw;
  right: 8vw;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.monogram {
  font-family: var(--serif);
  font-size: 1.3rem;
  letter-spacing: 0.5rem;
  text-transform: uppercase;
  color: var(--ink);
}

.lang-switch {
  position: relative;
}

.lang-button {
  border: 1px solid rgba(42, 36, 32, 0.2);
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: var(--sans);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  overflow: hidden;
  min-width: 140px;
  z-index: 10;
}

.lang-menu button {
  border: none;
  background: transparent;
  padding: 12px 16px;
  font-family: var(--sans);
  text-align: left;
  cursor: pointer;
}

.lang-menu button:hover {
  background: rgba(201, 168, 140, 0.2);
}

.lang-menu.show {
  display: flex;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin-top: 0vh;
  text-align: center;
}

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  font-size: 1.5rem;
  color: var(--muted);
}

.hero-content .eyebrow {
  margin-top: 18px;
}

h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 4vw, 4.2rem);
  margin: 12px 0;
}

.hero-subtitle {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--muted);
  margin-bottom: 18px;
  white-space: pre-line;
}

.hero-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 24px;
}

header.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: none;
  background-position: center bottom;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 1;
  transition: opacity 1.25s ease;
}

body.page-assets-ready header.hero::before {
  /* background-image: url("img/IMG_5198.JPG"); */
  background-image: url("img/IMG_5209.jpg");
  background-position: center bottom;
  background-size: cover;
}

header.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.82) 0%,
    rgba(255, 255, 255, 0.62) 42%,
    rgba(255, 255, 255, 0.86) 100%
  );
}

body.prelude-active header.hero::before {
  opacity: 0;
}

body.prelude-reveal header.hero::before,
body.prelude-complete header.hero::before {
  opacity: 1;
}

body.prelude-reveal header.hero::before {
  transition-delay: 2.35s;
}

.hero-content > * {
  transition: opacity 0.85s ease, transform 0.85s ease;
}

body.prelude-active .hero-content > * {
  opacity: 0;
  transform: translateY(-20px);
}

body.prelude-reveal .hero-content > *,
body.prelude-complete .hero-content > * {
  opacity: 1;
  transform: none;
}

body.prelude-reveal .hero-content h1 {
  transition-duration: 1.25s;
  transition-delay: 0.2s;
}

body.prelude-reveal .hero-content .eyebrow {
  transition-delay: 1s;
}

body.prelude-reveal .hero-content .hero-subtitle {
  transition-delay: 1.35s;
}

body.prelude-reveal .hero-content .hero-body {
  transition-delay: 1.65s;
}

body.prelude-reveal .hero-content .cta {
  transition-delay: 1.95s;
}

.cta {
  display: inline-block;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 0.95rem;
  letter-spacing: 0.04rem;
  border: none;
  cursor: pointer;
}

main {
  display: flex;
  flex-direction: column;
  gap: 96px;
  padding: 64px 8vw 80px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  grid-auto-rows: 200px;
  gap: 18px;
}

.gallery-card {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gallery-card.large {
  grid-column: span 2;
  grid-row: span 2;
}

.details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.details-vertical {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.details-card {
  background: var(--card);
  padding: 28px;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.details-wide {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: center;
  padding: 32px;
  min-height: 320px;
}

.details-wide img {
  border-radius: 18px;
  height: 100%;
  min-height: 260px;
}

.details-wide > .ceremony-left-image {
  display: none;
}

.ceremony-top-image {
  width: 60%;
  max-width: 520px;
  min-width: 160px;
  height: auto;
  min-height: 0;
  border-radius: 14px;
  margin: 20px 0 14px;
  object-fit: contain;
  justify-self: center;
}

.travel-top-image {
  width: 60%;
  max-width: 520px;
  min-width: 160px;
  height: auto;
  min-height: 0;
  border-radius: 14px;
  margin: 20px 0 14px;
  object-fit: contain;
  justify-self: center;
}

.dress-top-image {
  width: 60%;
  max-width: 520px;
  min-width: 160px;
  height: auto;
  min-height: 0;
  border-radius: 14px;
  margin: 20px 0 14px;
  object-fit: contain;
  justify-self: center;
}

.accommodation-top-image {
  width: 60%;
  max-width: 520px;
  min-width: 160px;
  height: auto;
  min-height: 0;
  border-radius: 14px;
  margin: 20px 0 14px;
  object-fit: contain;
  justify-self: center;
}

.ceremony-copy {
  display: grid;
  align-content: start;
  justify-items: center;
  text-align: center;
}

.ceremony-sequence {
  gap: 28px;
}

.ceremony-copy .schedule {
  width: min(100%, 760px);
  text-align: left;
}

.ceremony-copy > * {
  transition: opacity 1.1s ease, transform 1.1s ease;
}

.ceremony-left-image {
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.ceremony-sequence .ceremony-top-image,
.ceremony-sequence .ceremony-copy > *:not(.ceremony-top-image),
.ceremony-sequence .ceremony-left-image {
  opacity: 0;
  transform: translateY(18px);
}

.ceremony-sequence .ceremony-left-image {
  transform: translateX(-28px);
}

.ceremony-sequence.is-visible .ceremony-top-image,
.ceremony-sequence.is-visible .ceremony-copy > *,
.ceremony-sequence.is-visible .ceremony-left-image {
  opacity: 1;
  transform: none;
}

.ceremony-sequence.is-visible .ceremony-top-image {
  transition-delay: 0.2s;
}

.ceremony-sequence.is-visible .ceremony-copy > *:nth-child(2) {
  transition-delay: 0.9s;
}

.ceremony-sequence.is-visible .ceremony-copy > *:nth-child(3) {
  transition-delay: 1.15s;
}

.ceremony-sequence.is-visible .ceremony-copy > *:nth-child(4) {
  transition-delay: 1.4s;
}

.ceremony-sequence.is-visible .ceremony-left-image {
  transition-delay: 1.95s;
}

@media (prefers-reduced-motion: reduce) {
  .ceremony-copy > *,
  .ceremony-left-image {
    transition: none;
  }

  .ceremony-sequence .ceremony-top-image,
  .ceremony-sequence .ceremony-copy > *:not(.ceremony-top-image),
  .ceremony-sequence .ceremony-left-image {
    opacity: 1;
    transform: none;
  }
}

.details-card h2,
.rsvp h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  margin: 0 0 12px;
}

.details-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.info-copy {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0;
}

.info-subtitle {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--muted);
}

.section-content {
  width: min(100%, 760px);
  padding: 0;
  text-align: left;
}

.section-content p {
  color: var(--ink);
}

.section-content .schedule-address {
  margin-top: 14px;
}

.dress-body {
  line-height: 1.8;
}

.dress-body strong {
  font-weight: 700;
}

.schedule-intro {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.schedule-separator {
  width: min(100%, 760px);
  height: 1px;
  margin: 0 0 18px;
  background: rgba(42, 36, 32, 0.18);
}

.map-stack {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.map-card {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 18px 40px rgba(38, 30, 24, 0.08);
}

.map-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}

.map-label {
  font-family: var(--serif);
  font-size: 1.1rem;
}

.map-card a {
  color: var(--ink);
  font-size: 0.85rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(42, 36, 32, 0.3);
}

.map-card iframe {
  width: 100%;
  height: 220px;
  border: none;
  border-radius: 14px;
}

.transport-line {
  font-size: 0.95rem;
  color: var(--ink);
  padding: 12px 16px;
  background: rgba(201, 168, 140, 0.16);
  border-radius: 14px;
}

.schedule {
  display: grid;
  gap: 12px;
  background: rgba(201, 168, 140, 0.12);
  border-radius: 16px;
  padding: 16px 18px;
}

.schedule-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(42, 36, 32, 0.08);
}

.schedule-row:last-child {
  border-bottom: none;
}

.schedule-time {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink);
}

.schedule-event {
  font-size: 0.95rem;
  color: var(--ink);
}

.schedule-title {
  font-weight: 500;
}

.schedule-details {
  width: 100%;
}

.schedule-details summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.schedule-details summary::-webkit-details-marker {
  display: none;
}

.schedule-details summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.schedule-details[open] summary::after {
  transform: rotate(-135deg);
}

.schedule-detail {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-6px);
  transition: max-height 0.35s ease, opacity 0.3s ease, transform 0.3s ease;
}

.schedule-details[open] .schedule-detail {
  max-height: 600px;
  opacity: 1;
  transform: translateY(0);
}

.schedule-note {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
}

.schedule-link {
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(42, 36, 32, 0.3);
  width: fit-content;
}

.schedule-address {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.schedule-map {
  width: 100%;
  height: 180px;
  border: none;
  border-radius: 12px;
}

.accommodation-map {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  width: min(100%, 760px);
  justify-items: start;
}

.accommodation-suggestions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
  justify-items: start;
  width: min(100%, 760px);
}

.accommodation-suggestions-title {
  margin: 10px 0 2px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.accommodation-suggestion-link {
  display: block;
  width: 100%;
  text-decoration: none;
  color: var(--ink);
  background: rgba(201, 168, 140, 0.12);
  border: 1px solid rgba(42, 36, 32, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
  line-height: 1.35;
}

.accommodation-suggestion-link:hover {
  background: rgba(201, 168, 140, 0.16);
}

.accommodation-map .schedule-map {
  width: 100%;
  min-width: 0;
  max-width: none;
  justify-self: start;
}

.rsvp {
  display: grid;
  justify-items: center;
}

.rsvp-shell {
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(42, 36, 32, 0.08);
  border-radius: 16px;
  padding: 28px;
  display: grid;
  gap: 28px;
  justify-items: center;
}

.rsvp-shell > * {
  width: min(100%, 760px);
}

.rsvp-header p {
  color: var(--muted);
  max-width: 100%;
  line-height: 1.7;
}

.rsvp-form {
  display: grid;
  gap: 20px;
  max-width: 100%;
}

.rsvp-form label {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
}

.rsvp-form .field-group {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
}

.rsvp-form input[type="text"],
.rsvp-form input[type="email"],
.rsvp-form input[type="tel"],
.rsvp-form input[type="number"],
.rsvp-form select,
.rsvp-form textarea {
  border: 1px solid rgba(42, 36, 32, 0.2);
  padding: 12px 14px;
  border-radius: 12px;
  font-family: var(--sans);
}

.rsvp-form textarea {
  resize: vertical;
  min-height: 96px;
}

.rsvp-contact {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 8px 0 0;
}

.closing-invitation {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  min-height: 90vh;
  display: grid;
  place-items: center;
  padding: 32px 8vw 72px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.closing-invitation::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("img/IMG_5199.JPG");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.closing-invitation::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.82) 0%,
    rgba(255, 255, 255, 0.62) 42%,
    rgba(255, 255, 255, 0.86) 100%
  );
}

.closing-content {
  position: relative;
  z-index: 2;
  width: min(100%, 760px);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 12px;
  transform: translateY(-6vh);
}

.closing-image {
  width: min(50%, 380px);
  max-width: 100%;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 14px 34px rgba(42, 36, 32, 0.12);
}

.closing-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.2rem, 3.6vw, 3.8rem);
  margin: 10px 0 12px;
}

.closing-body {
  margin-bottom: 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--muted);
  white-space: pre-line;
}

.radio-group {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.guest-count-group {
  gap: 20px;
}

.form-note {
  margin: 0;
  color: var(--muted);
  min-height: 1.2rem;
}

.footer {
  text-align: center;
  padding: 32px 8vw 48px;
  color: var(--muted);
  font-family: var(--serif);
}

@media (max-width: 768px) {
  header.hero {
    padding: 24px 6vw 56px;
  }

  .nav {
    top: 24px;
    left: 6vw;
    right: 6vw;
  }

  .gallery-card.large {
    grid-column: span 1;
    grid-row: span 1;
  }

  .rsvp {
    width: 100%;
  }

  .rsvp-shell {
    width: 100%;
    padding: 22px;
  }

  .closing-image {
    width: min(70%, 340px);
  }

  .details-wide {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .details-wide img {
    min-height: 220px;
  }

  .schedule-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .schedule-map {
    height: 160px;
  }

  .accommodation-map .schedule-map {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .map-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .map-card iframe {
    height: 200px;
  }
}
