:root {
  --ink: #33291f;
  --muted: #746958;
  --rose: #d9949d;
  --rose-deep: #a96369;
  --sage: #7c8667;
  --gold: #a98235;
  --gold-soft: #dfcf9a;
  --paper: #fffaf2;
  --paper-soft: rgba(255, 250, 242, 0.82);
  --line: rgba(180, 138, 64, 0.3);
  --shadow: 0 22px 70px rgba(75, 47, 28, 0.18);
  color-scheme: light;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: #ece5dc;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: inherit;
}

.shell {
  min-height: 100vh;
  background:
    linear-gradient(rgba(255, 250, 242, 0.16), rgba(255, 250, 242, 0.44)),
    url("assets/watercolor-bg.jpg") center top / cover fixed;
}

.invite {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 22px 18px 94px;
}

.invitation-opening .invite {
  animation: bodyReveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.section-panel {
  position: relative;
  min-height: 86vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 24px;
  border-bottom: 1px solid var(--line);
}

.cover {
  min-height: 92vh;
  text-align: center;
}

.monogram-wrap {
  width: 176px;
  height: 176px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 18px 60px rgba(180, 138, 64, 0.18);
}

.monogram {
  width: 154px;
  height: 154px;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--rose-deep);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(3.2rem, 17vw, 5.8rem);
  line-height: 0.9;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(2.1rem, 10vw, 3.6rem);
  line-height: 1;
}

.amp {
  display: block;
  margin: 8px 0;
  color: var(--gold);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cover-copy,
.body-copy,
.closing {
  width: min(100%, 360px);
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.closing {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
}

.date-card {
  width: fit-content;
  max-width: 100%;
  margin: 28px auto 0;
  padding: 11px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 250, 242, 0.64);
  font-size: 0.92rem;
  font-weight: 700;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin: 28px auto 0;
  padding: 0 22px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: #fffaf2;
  background: var(--gold);
  box-shadow: 0 14px 34px rgba(180, 138, 64, 0.24);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.secondary-link {
  color: var(--gold);
  background: rgba(255, 250, 242, 0.72);
}

.button-link {
  width: auto;
}

.body-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: min(100%, 360px);
  margin: 28px auto 0;
}

.body-nav.two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.body-nav .primary-link,
.body-nav .secondary-link {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding-inline: 14px;
  text-align: center;
}

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

.countdown div {
  min-width: 0;
  padding: 16px 7px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
  text-align: center;
  box-shadow: 0 14px 30px rgba(75, 47, 28, 0.08);
}

.countdown strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 8vw, 2.4rem);
  font-weight: 400;
  line-height: 1;
}

.countdown span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timeline {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.timeline-time {
  color: var(--gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
}

.timeline-label {
  display: block;
  margin-top: 4px;
  color: var(--rose-deep);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.timeline h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.timeline p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.detail-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  margin-top: 22px;
}

.detail-grid div {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
}

.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
}

.map-preview {
  position: relative;
  height: 220px;
  overflow: hidden;
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(35deg, rgba(127, 140, 111, 0.2) 0 24%, transparent 24% 40%, rgba(230, 171, 181, 0.2) 40% 66%, transparent 66%),
    linear-gradient(145deg, rgba(255, 250, 242, 0.75), rgba(233, 215, 169, 0.36));
  box-shadow: var(--shadow);
}

.map-pin {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 28px;
  height: 28px;
  border: 7px solid var(--rose-deep);
  border-radius: 50% 50% 50% 0;
  transform: translate(-50%, -50%) rotate(-45deg);
  background: var(--paper);
}

.map-road {
  position: absolute;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.9);
}

.road-one {
  width: 150%;
  left: -20%;
  top: 34%;
  transform: rotate(16deg);
}

.road-two {
  width: 130%;
  left: -15%;
  top: 64%;
  transform: rotate(-22deg);
}

.road-three {
  width: 85%;
  left: 20%;
  top: 50%;
  transform: rotate(78deg);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.gallery button {
  aspect-ratio: 4 / 5;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 250, 242, 0.8);
  border-radius: 8px;
  background: transparent;
  box-shadow: 0 12px 30px rgba(75, 47, 28, 0.13);
  cursor: pointer;
}

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

.forms {
  gap: 16px;
}

form {
  display: grid;
  gap: 13px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.7);
}

label span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(180, 138, 64, 0.38);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(180, 138, 64, 0.15);
}

.form-status {
  min-height: 24px;
  color: var(--sage);
  font-weight: 800;
}

.wish-list {
  display: grid;
  gap: 10px;
}

.wish {
  padding: 14px 16px;
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.66);
}

.wish strong {
  display: block;
  margin-bottom: 4px;
}

.wish p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.thank-you,
.promotion {
  text-align: center;
}

.promo-list {
  display: grid;
  gap: 10px;
  width: min(100%, 380px);
  margin: 28px auto 0;
}

.promo-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.68);
  text-align: left;
  box-shadow: 0 12px 26px rgba(75, 47, 28, 0.09);
}

.promo-item span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid var(--gold);
  background: var(--paper);
}

.promo-item strong {
  font-size: 0.95rem;
  line-height: 1.3;
}

.footer {
  min-height: 180px;
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 42px 20px;
  color: var(--muted);
  text-align: center;
}

.footer strong {
  color: var(--ink);
  font-size: 1.1rem;
}

.music-toggle {
  position: fixed;
  z-index: 25;
  top: 14px;
  right: calc(50% - min(50vw, 260px) + 16px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 250, 242, 0.82);
  box-shadow: 0 10px 28px rgba(75, 47, 28, 0.13);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.music-bars {
  display: inline-flex;
  align-items: end;
  gap: 2px;
  height: 16px;
}

.music-bars i {
  display: block;
  width: 3px;
  height: 8px;
  border-radius: 99px;
  background: var(--gold);
}

.music-bars i:nth-child(2) {
  height: 15px;
}

.music-bars i:nth-child(3) {
  height: 11px;
}

.music-toggle[aria-pressed="true"] .music-bars i {
  animation: pulse 0.8s ease-in-out infinite alternate;
}

.music-toggle[aria-pressed="true"] .music-bars i:nth-child(2) {
  animation-delay: 0.15s;
}

.music-toggle[aria-pressed="true"] .music-bars i:nth-child(3) {
  animation-delay: 0.3s;
}

.music-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bottom-nav {
  position: fixed;
  z-index: 24;
  left: 50%;
  bottom: 12px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(calc(100% - 20px), 500px);
  min-height: 58px;
  overflow: hidden;
  border: 1px solid rgba(180, 138, 64, 0.26);
  border-radius: 18px;
  background: rgba(51, 41, 31, 0.88);
  box-shadow: 0 18px 52px rgba(75, 47, 28, 0.26);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.bottom-nav a {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0 3px;
  color: #fff8ee;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
}

.bottom-nav a.is-active {
  color: var(--gold-soft);
  background: rgba(255, 250, 242, 0.08);
}

.opening {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 250, 242, 0.5), rgba(255, 250, 242, 0.7)),
    url("assets/watercolor-bg.jpg") center / cover;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.opening.is-leaving {
  animation: invitationWipe 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.opening.is-leaving .opening-card {
  animation: cardFloatOut 0.72s ease forwards;
}

.opening.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.opening-card {
  width: min(calc(100vw - 48px), 330px);
  max-width: 330px;
  padding: 32px 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 242, 0.72);
  box-shadow: var(--shadow);
  text-align: center;
  backdrop-filter: blur(10px);
}

.opening-card img {
  width: 162px;
  height: 162px;
  object-fit: contain;
}

.opening-card p {
  margin: 4px 0 8px;
  color: var(--rose-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.opening-card .guest-kicker {
  margin-top: 2px;
  color: var(--gold);
}

.opening-card .guest-line {
  margin: 12px auto 4px;
  width: min(100%, 240px);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.45;
  text-transform: none;
}

.opening-card strong {
  display: block;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.42rem;
  font-weight: 400;
}

.opening-card h2 {
  margin-bottom: 0;
  font-size: clamp(1.95rem, 10vw, 2.55rem);
}

.lightbox {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  border: 0;
  background: rgba(34, 27, 22, 0.86);
}

.lightbox img {
  width: min(100%, 440px);
  max-height: 82vh;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.36);
}

.lightbox button {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

@keyframes pulse {
  from {
    transform: scaleY(0.6);
  }
  to {
    transform: scaleY(1.08);
  }
}

@keyframes invitationWipe {
  0% {
    clip-path: circle(145% at 50% 50%);
    opacity: 1;
  }
  58% {
    clip-path: circle(28% at 50% 50%);
    opacity: 0.96;
  }
  100% {
    clip-path: circle(0% at 50% 50%);
    opacity: 0;
  }
}

@keyframes cardFloatOut {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-28px) scale(0.94);
    opacity: 0;
  }
}

@keyframes bodyReveal {
  0% {
    filter: blur(10px);
    opacity: 0.2;
    transform: translateY(24px) scale(0.985);
  }
  100% {
    filter: blur(0);
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (min-width: 700px) {
  .shell {
    background:
      linear-gradient(90deg, rgba(255, 250, 242, 0.88), rgba(255, 250, 242, 0.54)),
      url("assets/watercolor-bg.jpg") center / cover fixed;
  }

  .invite {
    width: min(100%, 560px);
  }

  .section-panel {
    padding-inline: 38px;
  }

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

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

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