:root {
  --accent: #8c6f56;
  --ink: #302c28;
  --paper: #f7f3ec;
  --paper-deep: #e8dfd2;
  --paper-soft: #fbf8f1;
  --white: #fffdf8;
  --muted: rgba(48, 44, 40, 0.82);
  --line: rgba(48, 44, 40, 0.18);
  --strong-line: rgba(48, 44, 40, 0.32);
  --shadow: 0 24px 70px rgba(48, 44, 40, 0.16);
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(247, 243, 236, 0.92), rgba(247, 243, 236, 0.92)),
    radial-gradient(circle at 24px 24px, rgba(48, 44, 40, 0.08) 1px, transparent 1px);
  background-size: auto, 48px 48px;
  color: var(--ink);
}

body.is-loading-invitation {
  overflow: hidden;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
p,
figure {
  margin-top: 0;
}

p {
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  line-height: 1.78;
}

h1,
h2,
h3 {
  font-weight: 400;
}

h1 {
  margin: 18px 0 10px;
  font-size: clamp(3.6rem, 9vw, 7.6rem);
  line-height: 0.9;
}

h1 span {
  display: block;
  margin: 4px 0;
  color: var(--accent);
  font-size: 0.44em;
  line-height: 1;
}

h2 {
  margin-bottom: 28px;
  font-size: clamp(2.8rem, 6.8vw, 6.5rem);
  line-height: 0.9;
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.08;
}

.eyebrow,
.date,
.from-label,
.button,
.site-nav,
.timeline__item time,
.contact-line {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--accent);
  font-size: 0.72rem;
  line-height: 1.45;
}

.preloader,
.reveal {
  position: fixed;
  inset: 0;
}

.preloader {
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background-color: var(--paper);
  background-image: radial-gradient(circle at 24px 24px, rgba(48, 44, 40, 0.08) 1px, transparent 1px);
  background-size: auto, 48px 48px;
  transition: opacity 420ms ease, visibility 420ms ease;
}

.preloader--exiting {
  opacity: 0;
  visibility: hidden;
}

.preloader__inner {
  width: min(100%, 560px);
  text-align: center;
}

.preloader__message {
  margin: 0 auto 28px;
  color: var(--ink);
  font-size: clamp(2.2rem, 6vw, 5.6rem);
  line-height: 0.96;
}

.preloader__meter {
  height: 1px;
  width: min(100%, 420px);
  margin: 0 auto 16px;
  overflow: hidden;
  background: var(--line);
}

.preloader__meter span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 520ms cubic-bezier(0.65, 0, 0.35, 1);
}

.preloader__percent {
  margin-bottom: 28px;
  color: var(--accent);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.preloader__button {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.preloader--ready .preloader__button {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.reveal {
  z-index: 25;
  pointer-events: none;
  visibility: hidden;
  background: transparent;
}

.reveal--active {
  visibility: visible;
}

.reveal__canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.opening {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  overflow: hidden;
  background: var(--paper);
}

.opening__panel {
  min-height: 100svh;
}

.opening__panel--invite {
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 56px);
  background:
    linear-gradient(rgba(247, 243, 236, 0.92), rgba(247, 243, 236, 0.92)),
    radial-gradient(circle at 24px 24px, rgba(48, 44, 40, 0.08) 1px, transparent 1px);
  background-size: auto, 48px 48px;
}

.opening__panel--image {
  background: #241f1a;
}

.opening__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.opening__card {
  position: relative;
  width: min(88%, 530px);
  min-height: min(82svh, 710px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(38px, 7vw, 72px) clamp(26px, 6vw, 56px);
  border: 1px solid rgba(255, 253, 248, 0.82);
  outline: 10px solid rgba(255, 253, 248, 0.13);
  background: rgba(251, 248, 241, 0.96);
  box-shadow: var(--shadow);
  text-align: center;
}

.opening__card::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(140, 111, 86, 0.42);
  pointer-events: none;
}

.opening__card > * {
  position: relative;
}

.from-label {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 0.72rem;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--white);
  font-size: 0.75rem;
  text-decoration: none;
}

.button--line {
  background: rgba(255, 253, 248, 0.76);
  color: var(--ink);
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 4px clamp(20px, 4vw, 48px);
  justify-content: center;
  padding: 18px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  backdrop-filter: blur(14px);
  font-size: 0.72rem;
}

.site-nav a {
  text-decoration: none;
}

.section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(76px, 10vw, 132px) 0;
}

.invitation-band {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(320px, 1.08fr);
  gap: clamp(34px, 7vw, 96px);
  align-items: center;
}

.invitation-card {
  position: relative;
  padding: clamp(46px, 7vw, 82px) clamp(28px, 5vw, 58px);
  border: 1px solid var(--strong-line);
  background: var(--paper-soft);
  box-shadow: var(--shadow);
  text-align: center;
}

.invitation-card::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid var(--line);
  pointer-events: none;
}

.invitation-card > * {
  position: relative;
}

.invitation-card h2 {
  margin-bottom: 18px;
}

.date {
  margin-bottom: 22px;
  color: var(--ink);
  font-size: 0.8rem;
}

.invitation-copy {
  max-width: 620px;
}

.countdown-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(86px, 1fr));
  gap: 10px;
  width: min(780px, 100%);
  margin: 36px auto 0;
}

.countdown__item {
  min-height: 116px;
  display: grid;
  place-items: center;
  padding: 18px 10px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.9);
}

.countdown__item strong,
.countdown__item small {
  display: block;
}

.countdown__item strong {
  color: var(--accent);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 400;
  line-height: 1;
}

.countdown__item small {
  margin-top: 10px;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.story-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(34px, 7vw, 92px);
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(76px, 10vw, 132px) 0;
}

.story-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.story-copy {
  padding: clamp(24px, 4vw, 48px) 0;
}

.signature {
  margin: -12px 0 28px;
  color: var(--accent);
  font-style: italic;
}

.details-section {
  border-top: 1px solid var(--line);
}

.details-note {
  margin: 0 0 28px;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--line);
  background: var(--paper-soft);
}

.details-note ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  line-height: 1.78;
}

.details-note li + li {
  margin-top: 8px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.detail-grid article,
.hotel-card {
  min-height: 220px;
  padding: clamp(24px, 3vw, 34px);
  background: var(--paper-soft);
}

.detail-grid p,
.hotel-card p {
  margin-bottom: 0;
}

.timeline-section h2 {
  max-width: 760px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.timeline__item {
  min-height: 150px;
  padding: clamp(22px, 3vw, 34px);
  background: rgba(255, 253, 248, 0.92);
}

.timeline__item time {
  display: block;
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 0.72rem;
}

.timeline__item h3 {
  margin-bottom: 0;
}

.timeline__item p {
  margin: 12px 0 0;
}

.travel-section {
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(320px, 1.08fr);
  gap: clamp(34px, 7vw, 92px);
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(76px, 10vw, 132px) 0;
  border-top: 1px solid var(--line);
}

.contact-line {
  color: var(--ink);
  font-size: 0.78rem;
}

.hotel-list {
  display: grid;
  gap: 12px;
}

.booking-note {
  margin: 12px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}

.gift-section {
  max-width: 840px;
  text-align: center;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px;
  background: var(--paper-deep);
}

.gallery__item {
  margin: 0;
  overflow: hidden;
}

.gallery__item img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 500ms ease;
}

.gallery__item:hover img {
  transform: scale(1.035);
}

.rsvp {
  max-width: 800px;
  text-align: center;
}

.rsvp p {
  margin-bottom: 32px;
}

.rsvp-form {
  display: grid;
  gap: 18px;
  text-align: left;
}

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

.rsvp-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
  font: 400 1rem/1.45 Georgia, "Times New Roman", serif;
}

.rsvp-form input,
.rsvp-form select {
  min-height: 48px;
  padding: 0 14px;
}

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

.rsvp-form .button {
  justify-self: center;
  margin-top: 6px;
}

.rsvp-form .button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.rsvp-status {
  min-height: 28px;
  margin: 0;
  text-align: center;
}

@media (max-width: 960px) {
  .opening {
    grid-template-columns: 1fr;
  }

  .opening__panel--invite {
    min-height: 100svh;
  }

  .opening__panel--image {
    min-height: 58svh;
  }

  .detail-grid,
  .timeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .invitation-band,
  .story-section,
  .travel-section {
    grid-template-columns: 1fr;
  }

  .story-photo {
    order: 2;
  }
}

@media (max-width: 680px) {
  .section,
  .story-section,
  .travel-section {
    width: min(100% - 28px, 540px);
    padding: 68px 0;
  }

  .opening__card {
    width: min(92vw, 530px);
    min-height: 72svh;
  }

  .countdown,
  .detail-grid,
  .timeline,
  .gallery,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .countdown__item {
    min-height: 94px;
  }
}

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

  h2 {
    font-size: 2.55rem;
  }

  .opening__card {
    padding-inline: 22px;
  }
}
