:root {
  --bg: #f5eee6;
  --bg-soft: #fbf7f2;
  --paper: #fcf8f3;
  --paper-deep: #efe3d7;
  --wine: #b9151e;
  --wine-deep: #8f1017;
  --wine-soft: #d2463d;
  --ink: #2c1b1e;
  --muted: #705d61;
  --gold: #c4a06f;
  --border: rgba(185, 21, 30, 0.16);
  --shadow: 0 25px 60px rgba(92, 38, 32, 0.12);
  --shadow-soft: 0 16px 36px rgba(92, 38, 32, 0.08);
  --radius-xl: 34px;
  --radius-lg: 28px;
  --radius-md: 22px;
  --page-width: min(92vw, 560px);
  --hero-media: radial-gradient(circle at 32% 28%, rgba(255,255,255,.55), transparent 22%),
                radial-gradient(circle at 74% 78%, rgba(255,226,211,.24), transparent 22%),
                linear-gradient(160deg, rgba(255,255,255,.14), rgba(255,255,255,0)),
                linear-gradient(140deg, #df6a5f 0%, #b9151e 55%, #8f1017 100%);
  --second-media: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0)),
                  linear-gradient(135deg, #b98378 0%, #d2463d 28%, #b9151e 78%, #8f1017 100%);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(185, 21, 30, 0.07), transparent 26%),
    radial-gradient(circle at 86% 18%, rgba(173, 134, 107, 0.08), transparent 30%),
    radial-gradient(circle at 72% 82%, rgba(185, 21, 30, 0.05), transparent 26%),
    linear-gradient(180deg, #efe5d9 0%, var(--bg) 35%, #f7f2ec 100%);
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  line-height: 1.55;
  letter-spacing: 0.01em;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background:
    radial-gradient(circle at 20% 18%, rgba(255,255,255,.34), transparent 14%),
    radial-gradient(circle at 80% 30%, rgba(255,255,255,.22), transparent 18%),
    radial-gradient(circle at 75% 82%, rgba(255,255,255,.18), transparent 14%);
  mix-blend-mode: screen;
}

body::after {
  background-image:
    linear-gradient(transparent 96%, rgba(185,21,30,.024) 100%),
    linear-gradient(90deg, transparent 96%, rgba(185,21,30,.028) 100%);
  background-size: 100% 8px, 8px 100%;
  opacity: .12;
}

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

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

a:focus-visible {
  outline: 3px solid rgba(196, 160, 111, .88);
  outline-offset: 4px;
}

.redirect-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.redirect-card {
  width: min(100%, 540px);
  padding: 32px;
}

.redirect-card > * {
  position: relative;
  z-index: 1;
}

.redirect-card__title {
  margin: 0 0 14px;
  font-size: clamp(2rem, 9vw, 3.6rem);
  line-height: 1;
  font-weight: 400;
  color: var(--wine);
}

.redirect-card .btn--light {
  border-color: rgba(185,21,30,.14);
}

.page-shell {
  position: relative;
  z-index: 1;
  padding: 18px 0 48px;
}

.invitation {
  position: relative;
  width: var(--page-width);
  margin: 0 auto;
}

.invitation::before {
  content: "";
  position: absolute;
  inset: 95px 12px 120px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='2200' viewBox='0 0 600 2200'%3E%3Cpath d='M420 90C260 150 470 300 300 420C170 510 220 630 340 720C470 820 435 950 290 1060C170 1150 180 1280 340 1370C520 1472 470 1602 290 1705C170 1776 196 1900 350 2002' fill='none' stroke='%23b9151e' stroke-opacity='0.18' stroke-width='3.5' stroke-linecap='round' stroke-dasharray='6 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% 100%;
  pointer-events: none;
  opacity: .8;
}

.lang-switch {
  position: sticky;
  top: 14px;
  z-index: 20;
  width: var(--page-width);
  margin: 0 auto 22px;
  display: flex;
  justify-content: flex-end;
}

.lang-switch__inner {
  display: inline-flex;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(252,248,243,0.78);
  border: 1px solid rgba(185, 21, 30, 0.12);
  box-shadow: 0 18px 30px rgba(92, 38, 32, 0.06);
  backdrop-filter: blur(16px);
}

.lang-switch__link {
  min-width: 56px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
  transition: transform .24s ease, background-color .24s ease, color .24s ease;
}

.lang-switch__link:hover {
  transform: translateY(-1px);
}

.lang-switch__link.is-active {
  background: linear-gradient(135deg, var(--wine-soft), var(--wine));
  color: #fffaf4;
}

.section {
  position: relative;
  margin-bottom: 18px;
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.card--paper {
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.78), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,.45)),
    linear-gradient(180deg, var(--paper) 0%, #f8f1e9 100%);
}

.card--paper::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 30% 22%, rgba(180, 142, 109, .08) 0 1px, transparent 1px),
    radial-gradient(circle at 70% 70%, rgba(185, 21, 30, .05) 0 1px, transparent 1px);
  background-size: 16px 16px, 18px 18px;
  opacity: .22;
  pointer-events: none;
}

.card--wine {
  color: #fbf7f2;
  background:
    radial-gradient(circle at 12% 10%, rgba(255,255,255,.13), transparent 22%),
    radial-gradient(circle at 88% 82%, rgba(255,255,255,.10), transparent 18%),
    linear-gradient(165deg, #d2463d 0%, var(--wine) 52%, var(--wine-deep) 100%);
}

.card--wine::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.10), transparent 30%),
    linear-gradient(90deg, transparent 0, rgba(255,255,255,.05) 45%, transparent 100%);
  pointer-events: none;
}

.hero {
  padding: 28px;
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__eyebrow,
.label,
.footer-note,
.contact-tag,
.date-card__meta,
.rsvp__note {
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: .72rem;
}

.hero__eyebrow,
.label,
.date-card__meta,
.rsvp__note {
  opacity: .78;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.hero__names {
  margin: 0;
  font-size: clamp(2.4rem, 10vw, 4.4rem);
  line-height: .95;
  letter-spacing: .02em;
}

.hero__monogram {
  font-size: .95rem;
  letter-spacing: .7em;
  text-transform: uppercase;
  opacity: .74;
  margin-bottom: 14px;
}

.hero__title {
  margin: 18px 0 0;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  font-weight: 400;
  line-height: 1.42;
  max-width: min(100%, 58ch);
  text-wrap: balance;
}

.hero__visual {
  position: relative;
  margin-top: 28px;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 24px 45px rgba(20, 6, 11, 0.16);
}

.hero__visual::before {
  content: "";
  display: block;
  aspect-ratio: 0.78;
  background: var(--hero-media);
  background-size: cover;
  background-position: center;
}

.hero__visual::after {
  content: "";
  position: absolute;
  inset: auto 18px 18px auto;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), transparent 28%),
    linear-gradient(135deg, #d6b17e, #b9864f);
  box-shadow: 0 12px 26px rgba(39, 14, 18, 0.28);
  opacity: .94;
}

.hero__visual-label {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(252,248,243,.86);
  color: var(--ink);
  box-shadow: 0 18px 28px rgba(39, 14, 18, 0.14);
}

.hero__visual-label strong {
  font-size: .98rem;
  letter-spacing: .05em;
}

.hero__visual-label span {
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

.script {
  margin: 0 0 14px;
  color: var(--wine);
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: .02em;
}

.letter {
  padding: 28px;
}

.letter p {
  margin: 0 0 14px;
  font-size: 1rem;
  color: rgba(44, 27, 30, .92);
}

.info-grid {
  display: grid;
  gap: 18px;
}

.info-grid > .section {
  margin-bottom: 0;
}

.info-card,
.place-card,
.count-card,
.rsvp,
.contacts,
.envelope-card {
  padding: 28px;
}

.place-card {
  display: grid;
  gap: 18px;
}

.label {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--muted);
}

.card--wine .label,
.card--wine .script,
.card--wine p,
.card--wine .info-card__title,
.card--wine .place-card__title,
.card--wine .count-card__number,
.card--wine .footer-note {
  color: #fffaf4;
}

.info-card__title,
.place-card__title,
.rsvp__title,
.contacts__title {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1.05;
  font-weight: 400;
}

.info-card__text,
.place-card__text,
.rsvp__text,
.contacts__hint {
  margin: 0;
  color: rgba(44, 27, 30, .86);
}

.card--wine .info-card__text,
.card--wine .place-card__text,
.card--wine .rsvp__text {
  color: rgba(255,250,244,.86);
}

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

.place-card .btn-row,
.fund-note .btn {
  margin-top: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .92rem;
  line-height: 1.2;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
  transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease, border-color .22s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(54, 18, 29, .16);
}

.btn:active {
  transform: translateY(0);
}

.btn--light {
  background: #fff8ef;
  color: var(--wine);
  border-color: rgba(255,255,255,.18);
}

.btn--dark {
  background: linear-gradient(135deg, var(--wine-soft), var(--wine));
  color: #fff8ef;
}

.btn--ghost {
  background: rgba(255,255,255,.08);
  color: #fff8ef;
  border-color: rgba(255,255,255,.22);
}

.btn--disabled {
  cursor: default;
  opacity: .68;
  pointer-events: none;
}

.map-panel {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,248,239,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}

.map-panel__iframe {
  display: block;
  width: 100%;
  min-height: 270px;
  height: 100%;
  border: 0;
}

.count-card {
  text-align: center;
}

.count-card__number {
  margin: 10px 0 8px;
  font-size: clamp(3rem, 12vw, 5.4rem);
  line-height: .92;
}

.count-card__unit {
  margin: 0;
  letter-spacing: .24em;
  text-transform: uppercase;
  font-size: .74rem;
  color: var(--muted);
}

.envelope-card__inner {
  position: relative;
  padding: 4.5rem 1.4rem 1.5rem;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.8), rgba(255,255,255,.45)),
    linear-gradient(180deg, #fefbf6 0%, #f7efe5 100%);
  border: 1px solid rgba(185, 21, 30, 0.12);
  overflow: hidden;
}

.envelope-card__inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 7rem;
  background: linear-gradient(180deg, rgba(185,21,30,.05), rgba(185,21,30,0));
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.envelope-card__inner::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 48%;
  background:
    linear-gradient(135deg, rgba(185,21,30,.07) 0 49%, transparent 49% 51%, rgba(185,21,30,.07) 51% 100%);
  opacity: .55;
}

.wax-seal {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: #fef4e8;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,.30), transparent 26%),
    linear-gradient(135deg, #d8b37d 0%, #af7d4a 100%);
  box-shadow: 0 12px 20px rgba(62, 24, 13, .22);
}

.envelope-card__text {
  position: relative;
  z-index: 1;
}

.envelope-card__text p:last-child {
  margin-bottom: 0;
}

.fund-note {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(185, 21, 30, .14);
  background: rgba(255,255,255,.48);
}

.fund-note__text {
  margin: 0;
  color: var(--muted);
}

.rsvp__title {
  max-width: 28ch;
  text-wrap: balance;
}

.rsvp__note {
  display: inline-block;
  margin-bottom: 10px;
  opacity: .65;
}

.contact-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.contact-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 14px;
  padding: 18px 18px 16px;
  border-radius: 22px;
  border: 1px solid rgba(185, 21, 30, 0.12);
  background: rgba(255,255,255,.55);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.contact-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(92, 38, 32, 0.08);
  border-color: rgba(185, 21, 30, 0.2);
}

.contact-card__name {
  margin: 0;
  font-size: 1.22rem;
}

.contact-card__tag {
  align-self: start;
  justify-self: end;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--wine);
  background: rgba(185, 21, 30, .08);
}

.contact-card__phone {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 999px;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--wine);
  border: 1px solid rgba(185,21,30,.14);
  background: rgba(255,255,255,.6);
}

.footer-note {
  padding: 18px 6px 0;
  text-align: center;
  color: var(--wine);
  opacity: .76;
}

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

.js-enabled .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .8s ease, transform .8s ease;
}

.js-enabled .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 720px) {
  .page-shell {
    padding-top: 28px;
  }

  .invitation {
    width: min(90vw, 1120px);
  }

  .lang-switch {
    width: min(90vw, 1120px);
  }

  .hero {
    padding: 42px;
  }

  .hero__visual::before {
    aspect-ratio: 1.08;
  }

  .stack {
    display: grid;
    gap: 22px;
  }

  .stack > .section {
    margin-bottom: 0;
  }

  .stack + .stack {
    margin-top: 22px;
  }

  .letter,
  .info-card,
  .place-card,
  .count-card,
  .contacts,
  .envelope-card,
  .rsvp {
    padding: 34px;
  }

  .letter p {
    max-width: 72ch;
  }

  .map-panel,
  .map-panel__iframe {
    min-height: 320px;
  }

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

@media (min-width: 960px) {
  .hero__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr);
    gap: 32px;
    align-items: end;
  }

  .hero__badge,
  .hero__monogram,
  .hero__eyebrow,
  .hero__names,
  .hero__title {
    grid-column: 1;
  }

  .hero__visual {
    grid-column: 2;
    grid-row: 1 / span 5;
    margin-top: 0;
  }

  .content-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
  }

  .stack + .stack {
    margin-top: 0;
  }

  .contact-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 719px) {
  .hero__visual-label {
    right: 14px;
    left: 14px;
    bottom: 14px;
    width: auto;
  }

  .hero__visual-label span {
    font-size: .72rem;
    line-height: 1.4;
    letter-spacing: .08em;
  }

  .btn-row .btn {
    width: 100%;
  }

  .contact-card {
    grid-template-columns: 1fr;
  }

  .contact-card__tag {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal,
  .js-enabled .reveal,
  .js-enabled .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}
