:root {
  --bg-body: #121212;
  --bg-card: #efeded;
  --bg-paper: #f6f4f3;
  --text-main: #202020;
  --text-soft: #4e4e4e;
  --text-inverse: #f7f7f7;
  --line: #d7d4d2;
  --accent-dark: #111111;
  --accent-light: #ffffff;
  --success: #103f1d;
  --error: #9f1d1d;
  --font-body: "Montserrat", "Segoe UI", sans-serif;
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--bg-body);
  line-height: 1.45;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.page-wrapper {
  min-height: 100vh;
}

.mobile-invite {
  width: min(100%, 430px);
  margin: 0 auto;
  background: var(--bg-paper);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 20px 60px rgba(0, 0, 0, 0.45);
}

.hero-photo {
  position: relative;
  overflow: hidden;
  background: #000;
}

.hero-photo::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.38) 52%, rgba(0, 0, 0, 0.68));
  pointer-events: none;
}

.hero-photo img,
.end-photo img {
  aspect-ratio: 3 / 4.5;
  object-fit: cover;
  object-position: center;
}

.hero-photo__caption {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: clamp(3.9rem, 13vw, 5.1rem);
  transform: translateX(-50%);
  width: calc(100% - 2.2rem);
  text-align: center;
  color: rgba(255, 255, 255, 0.97);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.hero-photo__caption::after {
  content: "";
  display: block;
  width: 0.56rem;
  height: 0.56rem;
  margin: 0.46rem auto 0;
  border-right: 1.5px solid rgba(255, 255, 255, 0.86);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.86);
  transform: rotate(45deg);
}

.hero-photo__caption-date {
  margin: 0;
  font-size: clamp(0.82rem, 3vw, 1rem);
  letter-spacing: 0.03em;
  font-weight: 500;
}

.hero-photo__caption-names {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 11vw, 3.15rem);
  line-height: 0.9;
  letter-spacing: 0.035em;
  font-weight: 500;
}

.panel {
  background: var(--bg-paper);
}

.panel__inner {
  padding: 2rem 1.25rem;
  text-align: center;
}

.intro-greeting {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 11vw, 3.3rem);
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 0.95;
}

.intro-text {
  margin: 1rem auto 0;
  max-width: 22rem;
  color: var(--text-soft);
  font-size: 0.98rem;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 11vw, 3.3rem);
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 0.95;
  text-transform: uppercase;
}

.section-title--date {
  margin-top: 1.8rem;
}

.section-title--inverse {
  color: var(--text-inverse);
}

.save-date {
  margin: 0.55rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 10vw, 3.2rem);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.gallery-strip {
  background: var(--accent-light);
  padding: 0 0.4rem 1.4rem;
}

.gallery-strip__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
}

.gallery-strip__item {
  margin: 0;
}

.gallery-strip__item img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 0;
}

.panel--timing {
  background: var(--bg-paper);
}

.timing-list {
  list-style: none;
  margin: 1.8rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.2rem;
}

.timing-list__item {
  margin: 0;
}

.timing-list__time {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.timing-list__text {
  margin: 0.4rem auto 0;
  max-width: 18rem;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.location-card {
  position: relative;
  min-height: 24rem;
  overflow: hidden;
  background: #000;
}

.location-card__bg,
.location-card__overlay,
.location-card__content {
  position: absolute;
  inset: 0;
}

.location-card__bg {
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.location-card__overlay {
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.55), rgba(10, 10, 10, 0.82));
}

.location-card__content {
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  padding: 1.8rem 1.2rem;
  color: var(--text-inverse);
}

.location-card__place {
  margin: 0.9rem 0 0;
  font-size: 1.1rem;
  font-weight: 500;
}

.location-card__address {
  margin: 0.7rem 0 0;
  max-width: 19rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.93rem;
}

.location-card__actions {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.6rem;
  width: 100%;
  max-width: 18.5rem;
}

.button {
  border: 0;
  cursor: pointer;
  font: inherit;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.79rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.7rem 1rem;
  background: var(--accent-dark);
  color: var(--accent-light);
}

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

.button--light {
  background: rgba(255, 255, 255, 0.95);
  color: #101010;
  border: 1px solid rgba(255, 255, 255, 0.95);
}

.panel--dress .panel__inner,
.panel--details .panel__inner,
.panel--form .panel__inner {
  padding-top: 2.2rem;
}

.dress-swatches {
  margin-top: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  max-width: 18rem;
  margin-inline: auto;
}

.dress-swatches__item {
  width: 3.05rem;
  height: 1.45rem;
  background: var(--swatch);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.dress-gallery {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.dress-gallery__item {
  margin: 0;
}

.dress-gallery__item img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.details-notes {
  margin-top: 1.2rem;
  display: grid;
  gap: 1rem;
}

.details-note {
  margin: 0;
  max-width: 22rem;
  margin-inline: auto;
  color: var(--text-soft);
}

.details-qr {
  margin: 1.35rem auto 0;
  width: min(100%, 22rem);
  display: grid;
  gap: 0.7rem;
  justify-items: center;
}

.details-qr__image-link {
  display: block;
  width: min(100%, 16rem);
}

.details-qr__image {
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.45rem;
}

.details-qr__caption {
  margin: 0;
  max-width: 22rem;
}

.details-qr__link {
  color: var(--text-main);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  font-size: 0.95rem;
}

.details-qr__link:focus-visible {
  outline: 2px solid rgba(32, 32, 32, 0.35);
  outline-offset: 2px;
}

.questionnaire-lead {
  margin: 0;
  color: var(--text-soft);
}

.form-card {
  margin: 1.35rem auto 0;
  text-align: left;
  max-width: 23rem;
}

.form-group {
  margin: 0 0 1rem;
}

.form-group--check {
  margin-top: 1.2rem;
}

.form-label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
  color: #242424;
}

.form-input,
.form-textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 0.55rem 0;
  font: inherit;
  color: var(--text-main);
}

.form-textarea {
  border: 1px solid var(--line);
  min-height: 5.5rem;
  resize: vertical;
  padding: 0.65rem;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: #888;
}

.choice-row {
  display: grid;
  gap: 0.55rem;
}

.choice {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.95rem;
}

.choice--wide {
  padding: 0.2rem 0;
}

.form-actions {
  margin-top: 1.35rem;
  display: grid;
  justify-items: center;
  gap: 0.7rem;
}

.form-message {
  margin: 0.25rem 0 0;
  min-height: 1rem;
  color: var(--error);
  font-size: 0.75rem;
}

.form-status {
  width: 100%;
  min-height: 1.1rem;
  text-align: center;
  font-size: 0.82rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.form-status--visible {
  opacity: 1;
}

.form-status--error {
  color: var(--error);
}

.form-status--success {
  color: var(--success);
}

.contact-note {
  margin: 1.45rem auto 0;
  max-width: 22rem;
  color: var(--text-soft);
  font-size: 0.94rem;
}

.contact-actions {
  margin: 0.35rem auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.contact-note__name {
  flex-basis: 100%;
  text-align: center;
  color: var(--text-main);
  font-weight: 500;
}

.contact-note__phone {
  display: inline-flex;
  align-items: center;
  color: var(--text-main);
  text-decoration: underline;
  text-underline-offset: 0.14em;
  font-weight: 500;
}

.contact-copy {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-main);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  min-height: 2.05rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.contact-copy:hover {
  background: #f8f8f8;
}

.contact-copy:focus-visible {
  outline: 2px solid rgba(32, 32, 32, 0.4);
  outline-offset: 2px;
}

.contact-copy.is-copied {
  background: #eef8f0;
  border-color: #b9d9c0;
  color: #103f1d;
}

.contact-copy__icon {
  width: 0.95rem;
  height: 0.95rem;
  display: grid;
  place-items: center;
}

.contact-copy__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.waiting-note {
  margin: 1.15rem 0 0;
  font-family: var(--font-display);
  font-size: 1.9rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.signature-note {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--text-main);
}

.audio-toggle {
  position: fixed;
  right: calc(env(safe-area-inset-right, 0px) + 0.75rem);
  top: calc(env(safe-area-inset-top, 0px) + 0.75rem);
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(12, 12, 12, 0.66);
  color: #fff;
  cursor: pointer;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.audio-toggle__icon {
  width: 1.2rem;
  height: 1.2rem;
  display: grid;
  place-items: center;
}

.audio-toggle__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.audio-toggle__wave,
.audio-toggle__slash {
  transition: opacity 0.2s ease;
}

.audio-toggle__slash {
  opacity: 0;
}

.audio-toggle.is-muted .audio-toggle__wave {
  opacity: 0.25;
}

.audio-toggle.is-muted .audio-toggle__slash {
  opacity: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(16px) scale(0.995);
  filter: blur(1.2px);
  transition:
    opacity 0.95s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.05s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.9s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.not-found {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: #f3f1ef;
}

.not-found__card {
  width: min(100%, 30rem);
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.6rem;
  text-align: center;
}

.not-found__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  text-transform: uppercase;
}

.not-found__text {
  margin: 0.9rem 0 1.2rem;
  color: var(--text-soft);
}

.invitation {
  min-height: 100vh;
  padding: 1.5rem;
  background: #f3f1ef;
}

.container {
  width: min(100%, 30rem);
  margin: 0 auto;
}

.invitation-card {
  border: 1px solid var(--line);
  background: #fff;
  padding: 1.5rem;
  text-align: center;
}

.invitation-card__crest,
.invitation-card__text,
.invitation-card__signature {
  margin: 0.8rem 0;
}

.invitation-card__initials,
.invitation-card__title {
  font-family: var(--font-display);
  text-transform: uppercase;
}

.invitation-card__title {
  margin: 0.7rem 0;
}

.button--outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--text-main);
}

@media (min-width: 481px) {
  .mobile-invite {
    width: 100%;
  }
}

@media (max-width: 480px) {
  body {
    background: var(--bg-paper);
  }

  .mobile-invite {
    width: 100%;
    box-shadow: none;
  }

  .panel__inner {
    padding: 1.85rem 0.95rem;
  }

  .timing-list__time {
    font-size: 1.55rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
