:root {
  color-scheme: light;
  --ink: #24231f;
  --muted: #70695f;
  --paper: #fffaf0;
  --linen: #f3ecdf;
  --olive: #46563b;
  --olive-dark: #283320;
  --olive-light: #72815e;
  --rose: #a8655e;
  --clay: #9a694a;
  --gold: #b39a63;
  --line: rgba(36, 35, 31, 0.16);
  --shadow: 0 26px 70px rgba(34, 31, 25, 0.22);
  font-family: "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

img,
video,
iframe {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.envelope-screen {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 28px 18px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 250, 240, 0.88), rgba(255, 250, 240, 0.82)),
    url("./info/vector2.jpg") center / cover;
}

.envelope-wrap {
  display: grid;
  width: min(100%, 760px);
  gap: 24px;
  justify-items: center;
}

.envelope {
  position: relative;
  width: min(94vw, 700px);
  aspect-ratio: 1.38;
  border: 0;
  background: transparent;
  cursor: pointer;
  perspective: 1200px;
}

.envelope > span {
  position: absolute;
  display: block;
}

.envelope__shadow {
  inset: 9% 4% -5%;
  border-radius: 28px;
  background: rgba(29, 31, 22, 0.18);
  filter: blur(18px);
}

.envelope__body {
  inset: 0;
  z-index: 1;
  border: 1px solid rgba(255, 250, 240, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.08), transparent 38%),
    var(--olive);
  box-shadow: var(--shadow);
}

.envelope__letter {
  left: 9%;
  right: 9%;
  top: 8%;
  z-index: 2;
  display: grid !important;
  height: 74%;
  place-items: center;
  gap: 8px;
  padding: 22px;
  border: 1px solid rgba(179, 154, 99, 0.5);
  border-radius: 12px;
  background:
    linear-gradient(rgba(255, 253, 248, 0.9), rgba(255, 253, 248, 0.9)),
    url("./info/vector4.jpg") center / cover;
  box-shadow: 0 18px 36px rgba(31, 29, 25, 0.14);
  opacity: 0.04;
  transform: translateY(24%) scale(0.92);
  transition:
    opacity 350ms ease,
    transform 880ms cubic-bezier(0.2, 0.84, 0.2, 1);
}

.letter-dog-frame {
  display: grid !important;
  width: 118px;
  aspect-ratio: 0.82;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(70, 86, 59, 0.4);
  border-radius: 999px 999px 46% 46%;
  background: #fffaf0;
  box-shadow:
    0 0 0 5px rgba(255, 250, 240, 0.88),
    0 0 0 6px rgba(179, 154, 99, 0.38),
    0 14px 28px rgba(40, 35, 28, 0.16);
}

.letter-dog-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 36% 43%;
  filter: saturate(0.78) sepia(0.16) contrast(1.04);
}

.letter-mark {
  font-family: "Great Vibes", "Cormorant Garamond", Georgia, serif;
  font-size: 6.5rem;
  font-weight: 400;
  line-height: 0.72;
  color: var(--olive-dark);
}

.letter-note {
  max-width: 250px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.letter-date {
  color: var(--rose);
  font-size: 0.88rem;
  font-weight: 800;
}

.envelope__left,
.envelope__right,
.envelope__bottom {
  inset: 0;
  z-index: 4;
  border-radius: 0 0 18px 18px;
}

.envelope__left {
  clip-path: polygon(0 0, 51% 51%, 0 100%);
  background: linear-gradient(110deg, #5d6a4a, #3d4d34);
}

.envelope__right {
  clip-path: polygon(100% 0, 49% 51%, 100% 100%);
  background: linear-gradient(250deg, #53613f, #324126);
}

.envelope__bottom {
  clip-path: polygon(0 100%, 50% 43%, 100% 100%);
  background: linear-gradient(180deg, #687451, #334226);
}

.envelope__flap {
  inset: 0;
  z-index: 5;
  clip-path: polygon(0 0, 50% 58%, 100% 0);
  transform-origin: top center;
  border-radius: 18px 18px 0 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 52%),
    #596746;
  transition: transform 900ms cubic-bezier(0.2, 0.78, 0.2, 1);
}

.envelope__seal {
  left: 50%;
  top: 46%;
  z-index: 6;
  display: grid !important;
  width: 104px;
  height: 104px;
  place-items: center;
  border: 1px solid rgba(255, 250, 240, 0.38);
  border-radius: 999px;
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.3), transparent 34%),
    var(--gold);
  color: #fffaf0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.1rem;
  font-weight: 700;
  transform: translate(-50%, -50%);
  transition:
    opacity 260ms ease,
    transform 450ms ease;
}

.envelope-screen.is-open .envelope__flap {
  transform: rotateX(178deg);
}

.envelope.is-letter-out .envelope__flap {
  z-index: 1;
}

.envelope.is-letter-out .envelope__letter {
  z-index: 7;
  opacity: 1;
  transform: translateY(-58%) scale(1);
}

.envelope-screen.is-open .envelope__seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
}

.tap-copy,
.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--rose);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 250, 240, 0.42);
  border-radius: 999px;
  background: rgba(40, 51, 32, 0.46);
  color: #fffaf0;
  font-size: 1rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(10px);
}

.tap-copy {
  color: var(--olive-dark);
}

.hero {
  position: relative;
  display: grid;
  min-height: 94svh;
  align-items: end;
  overflow: hidden;
  padding: 88px 24px;
}

.hero__media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(27, 31, 22, 0.1), rgba(27, 31, 22, 0.74)),
    url("./info/hacienda1.jpg") center / cover;
}

.hero__content {
  position: relative;
  width: min(100%, 1080px);
  margin: 0 auto;
  color: #fffaf0;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0;
}

h1 {
  max-width: 980px;
  margin-top: 12px;
  font-family: "Great Vibes", "Cormorant Garamond", Georgia, serif;
  font-size: 8.6rem;
  font-weight: 400;
  line-height: 0.82;
}

h2 {
  font-size: 4.6rem;
  line-height: 0.95;
}

h3 {
  font-size: 2.2rem;
  line-height: 1;
}

.hero__date {
  margin: 24px 0 4px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.2rem;
}

.hero__place {
  margin: 0 0 30px;
  font-weight: 700;
}

.countdown {
  display: grid;
  max-width: 680px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.countdown div {
  min-height: 96px;
  padding: 14px 10px;
  border: 1px solid rgba(255, 250, 240, 0.34);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.12);
  backdrop-filter: blur(12px);
  text-align: center;
}

.countdown strong,
.countdown span {
  display: block;
}

.countdown strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 3.2rem;
  line-height: 0.95;
}

.countdown span {
  margin-top: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.quick-nav {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  gap: 8px;
  justify-content: center;
  overflow-x: auto;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.92);
  backdrop-filter: blur(14px);
}

.quick-nav a {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 10px 13px;
  border-radius: 999px;
  color: var(--olive-dark);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 82px 0;
}

.section-heading {
  display: grid;
  gap: 10px;
}

.intro {
  width: min(900px, calc(100% - 40px));
  text-align: center;
}

.intro h2 {
  margin-top: 14px;
}

.blessing {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
}

.agenda {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 44px;
  align-items: start;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline article,
.details article,
.location-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.54);
}

.timeline article {
  padding: 24px;
}

.timeline span {
  display: block;
  margin-bottom: 10px;
  color: var(--gold);
  font-weight: 900;
}

.timeline p,
.details p,
.locations p,
.map-section p,
.rsvp p,
.venue-feature p {
  color: var(--muted);
  line-height: 1.7;
}

.venue-feature {
  position: relative;
  min-height: 620px;
  display: grid;
  align-items: end;
  margin: 22px 0 0;
  padding: 70px 24px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(20, 24, 17, 0.08), rgba(20, 24, 17, 0.7)),
    url("./info/hacienda2.jpg") center / cover;
  color: #fffaf0;
}

.venue-feature__text {
  width: min(100%, 980px);
  margin: 0 auto;
}

.venue-feature__text p {
  max-width: 560px;
  color: rgba(255, 250, 240, 0.86);
}

.locations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.location-card {
  overflow: hidden;
}

.location-card img {
  width: 100%;
  aspect-ratio: 1.22;
  object-fit: cover;
}

.location-card div {
  padding: 24px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--olive);
  border-radius: 999px;
  background: var(--olive);
  color: #fffaf0;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
}

.button--secondary {
  background: transparent;
  color: var(--olive-dark);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.map-section {
  display: grid;
  grid-template-columns: minmax(0, 0.65fr) minmax(0, 1.35fr);
  gap: 28px;
  align-items: stretch;
}

.map-section iframe {
  width: 100%;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.video-section {
  width: min(1020px, calc(100% - 40px));
  margin: 0 auto;
  padding: 86px 0;
}

.save-video {
  width: 100%;
  margin-top: 28px;
  border-radius: 8px;
  background: #000;
  box-shadow: var(--shadow);
}

.details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.details article {
  padding: 24px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: min(1320px, calc(100% - 24px));
  margin: 0 auto;
}

.gallery img {
  width: 100%;
  aspect-ratio: 0.82;
  border-radius: 8px;
  object-fit: cover;
}

.rsvp {
  width: min(780px, calc(100% - 40px));
  text-align: center;
}

.rsvp .button {
  margin-top: 18px;
}

@media (max-width: 900px) {
  h1 {
    font-size: 5.2rem;
  }

  h2 {
    font-size: 3.4rem;
  }

  .agenda,
  .locations,
  .map-section,
  .details {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .envelope-screen {
    padding: 18px 12px;
  }

  .envelope {
    width: min(98vw, 480px);
  }

  .envelope__seal {
    width: 78px;
    height: 78px;
    font-size: 1.55rem;
  }

  .letter-mark {
    font-size: 4.35rem;
  }

  .letter-dog-frame {
    width: 86px;
  }

  .letter-note {
    max-width: 190px;
    font-size: 0.62rem;
  }

  .hero {
    min-height: 90svh;
    padding: 70px 18px;
  }

  h1 {
    font-size: 4.7rem;
  }

  h2 {
    font-size: 2.8rem;
  }

  h3 {
    font-size: 1.85rem;
  }

  .hero__date {
    font-size: 1.65rem;
  }

  .countdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .countdown strong {
    font-size: 2.5rem;
  }

  .section,
  .video-section,
  .rsvp {
    width: min(100% - 28px, 1120px);
    padding: 58px 0;
  }

  .venue-feature {
    min-height: 520px;
    padding: 54px 18px;
  }

  .timeline article,
  .location-card div,
  .details article {
    padding: 20px;
  }

  .button {
    width: 100%;
  }

  .gallery {
    width: min(100% - 16px, 1320px);
    grid-template-columns: 1fr;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
