:root {
  --emerald: #0b3f38;
  --emerald-2: #11574d;
  --emerald-dark: #071d18;
  --paper: #fffaf3;
  --ivory: #f6eee4;
  --soft: #f1e8dd;
  --ink: #1e2422;
  --muted: #6b706b;
  --gold: #c69d59;
  --gold-2: #e6c98f;
  --white: #ffffff;
  --radius-lg: 34px;
  --radius-md: 22px;
  --shadow: 0 30px 90px rgba(8, 28, 23, 0.16);
  --shadow-strong: 0 45px 120px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }

.page-noise,
.preloader__grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: .08;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.6) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,.45) 0 1px, transparent 1px);
  background-size: 4px 4px, 6px 6px;
  mix-blend-mode: soft-light;
}
.site { position: relative; z-index: 2; }

.preloader {
  position: fixed;
  inset: 0;
  z-index: 99;
  background:
    radial-gradient(circle at 50% 35%, rgba(198,157,89,.18), transparent 20%),
    linear-gradient(180deg, #041412, #081d19 60%, #05100f);
  display: grid;
  place-items: center;
  transition: opacity .85s ease, visibility .85s ease;
}
.preloader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader__glow {
  position: absolute;
  width: 50vw;
  height: 50vw;
  max-width: 680px;
  max-height: 680px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198,157,89,.22), transparent 65%);
  filter: blur(8px);
}
.preloader__stage {
  position: relative;
  width: min(92vw, 780px);
  min-height: 88vh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 28px;
  padding: 32px 22px;
}
.preloader__eyebrow {
  margin: 0;
  color: rgba(255,250,243,.78);
  text-transform: uppercase;
  letter-spacing: .36em;
  font-size: 11px;
}
.preloader__text { text-align: center; max-width: 520px; }
.preloader__title {
  margin: 0 0 10px;
  color: var(--paper);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 600;
}
.preloader__subtitle {
  margin: 0;
  color: rgba(255,250,243,.78);
  line-height: 1.7;
  font-size: 14px;
}
.preloader__line {
  width: min(64vw, 300px);
  height: 2px;
  overflow: hidden;
  background: rgba(255,255,255,.14);
  border-radius: 999px;
}
.preloader__line span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  animation: progressGrow 4.3s ease forwards;
}

.scene-envelope {
  position: relative;
  width: min(80vw, 390px);
  height: min(56vw, 280px);
  transform: translateY(12px);
  animation: envelopeLift 1.2s cubic-bezier(.18,.76,.22,1) .2s both;
}
.scene-envelope__shadow {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  width: 82%;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.34);
  filter: blur(12px);
}
.scene-envelope__back,
.scene-envelope__flap-outer,
.scene-envelope__flap-inner,
.scene-envelope__body-left,
.scene-envelope__body-right,
.scene-envelope__body-front,
.scene-envelope__liner {
  position: absolute;
  inset: 0;
  border-radius: 18px;
}
.scene-envelope__back {
  background: linear-gradient(180deg, #0d5a4f, #0b3f38);
  box-shadow: var(--shadow-strong);
}
.scene-envelope__liner {
  inset: 8px 18px auto;
  height: 124px;
  background:
    linear-gradient(45deg, rgba(255,255,255,.16) 25%, transparent 25% 50%, rgba(255,255,255,.16) 50% 75%, transparent 75%),
    linear-gradient(180deg, #e0bc71, #b98326);
  background-size: 18px 18px, cover;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
  opacity: .95;
}
.scene-envelope__liner--left { transform: translateX(-7px); }
.scene-envelope__liner--right { transform: translateX(7px); }
.scene-envelope__flap-outer {
  transform-origin: top center;
  clip-path: polygon(0 0, 50% 78%, 100% 0);
  background: linear-gradient(180deg, #0f6356, #08342d);
  z-index: 7;
}
.scene-envelope__flap-inner {
  inset: 7px 18px auto;
  height: 118px;
  transform-origin: top center;
  clip-path: polygon(0 0, 50% 78%, 100% 0);
  background:
    linear-gradient(45deg, rgba(255,255,255,.2) 25%, transparent 25% 50%, rgba(255,255,255,.2) 50% 75%, transparent 75%),
    linear-gradient(180deg, #efcf89, #bb8c39);
  background-size: 18px 18px, cover;
  z-index: 6;
}
.scene-envelope__body-left {
  clip-path: polygon(0 0, 55% 50%, 0 100%);
  background: linear-gradient(180deg, #0f6255, #0b4d43);
  z-index: 8;
}
.scene-envelope__body-right {
  clip-path: polygon(100% 0, 45% 50%, 100% 100%);
  background: linear-gradient(180deg, #0d564b, #093d36);
  z-index: 8;
}
.scene-envelope__body-front {
  clip-path: polygon(0 100%, 50% 38%, 100% 100%);
  background: linear-gradient(180deg, #0c5b4f, #0a473f);
  z-index: 9;
}
.scene-envelope__seal {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #f8e4a2, #ce9738 58%, #a66b20 90%);
  color: #fff4d2;
  box-shadow: 0 10px 24px rgba(0,0,0,.32);
  font-size: 16px;
}
.scene-envelope__invite {
  position: absolute;
  left: 50%;
  top: 24px;
  width: 72%;
  transform: translateX(-50%) translateY(26px);
  z-index: 4;
}
.preloader.is-animating .scene-envelope__flap-outer,
.preloader.is-animating .scene-envelope__flap-inner {
  animation: flapOpen 1.1s cubic-bezier(.24,.82,.24,1) 1.4s forwards;
}
.preloader.is-animating .scene-envelope__invite {
  animation: inviteRise 1.25s cubic-bezier(.16,.78,.2,1) 2s forwards;
}
.preloader.is-animating .scene-envelope__seal { animation: sealFade .5s ease 1.45s forwards; }

.invite-sheet {
  position: relative;
  border-radius: 10px;
  background: linear-gradient(180deg, #fffdf9, #f7efe5);
  border: 1px solid rgba(198,157,89,.4);
  box-shadow: 0 18px 45px rgba(16, 24, 22, 0.15);
  text-align: center;
  padding: 24px 20px;
}
.invite-sheet__border {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(198,157,89,.26);
  border-radius: 4px;
  pointer-events: none;
}
.invite-sheet__kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
}
.invite-sheet h2 {
  margin: 0 0 10px;
  font-family: 'Great Vibes', cursive;
  font-size: clamp(34px, 4.4vw, 52px);
  color: var(--emerald);
  font-weight: 400;
}
.invite-sheet p {
  margin: 0 0 6px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: .03em;
}
.invite-sheet small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}
.invite-sheet--loader {
  padding: 18px 16px 16px;
}
.invite-sheet--loader h2 { font-size: clamp(24px, 4vw, 38px); }
.invite-sheet--loader p { font-size: 19px; }
.invite-sheet--loader small { font-size: 10px; }
.invite-sheet--hero {
  width: min(430px, 100%);
  position: absolute;
  right: -14px;
  top: 14px;
  z-index: 3;
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px clamp(20px, 4vw, 46px);
}
.brand {
  font-family: 'Great Vibes', cursive;
  font-size: 36px;
  color: var(--gold-2);
}
.menu {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(5, 22, 18, 0.35);
  backdrop-filter: blur(14px);
}
.menu a {
  color: rgba(255,250,243,.88);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: .18em;
}
.menu a:hover { color: var(--gold-2); }

.hero {
  position: relative;
  min-height: 100svh;
  color: var(--paper);
  overflow: hidden;
  background: #081b18;
  padding: 120px 20px 70px;
}
.hero__video-wrap { position: absolute; inset: 0; }
.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(.72) contrast(1.05) brightness(.36);
  transform: scale(1.05);
}
.hero__video-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 34%, rgba(198,157,89,.14), transparent 18%),
    linear-gradient(90deg, rgba(5, 19, 17, .96) 0%, rgba(5, 19, 17, .82) 43%, rgba(5, 19, 17, .42) 100%),
    linear-gradient(180deg, rgba(5,19,17,.74), rgba(5,19,17,.18) 24%, rgba(5,19,17,.82) 100%);
}
.hero__inner {
  position: relative;
  z-index: 4;
  width: min(1200px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(34px, 5vw, 72px);
  align-items: center;
}
.hero__copy h1 {
  margin: 0 0 16px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(58px, 9vw, 112px);
  line-height: .94;
  letter-spacing: -.03em;
  font-weight: 600;
}
.hero__copy h1 span { color: var(--gold-2); font-family: 'Great Vibes', cursive; font-weight: 400; }
.hero__lead {
  margin: 0;
  max-width: 620px;
  color: rgba(255,250,243,.84);
  line-height: 1.78;
  font-size: 16px;
}
.hero__actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: 12px;
}
.eyebrow--light { color: var(--gold-2); }
.hero__visual { position: relative; }
.hero-composition {
  position: relative;
  min-height: 620px;
}
.card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card--photo {
  width: min(520px, 100%);
  margin-left: auto;
  background: #ece3d5;
}
.card--photo img {
  width: 100%;
  height: auto;
  object-fit: cover;
}
.card__shine {
  position: absolute;
  inset: -40% auto -40% -20%;
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transform: rotate(20deg);
  animation: shineMove 6.2s ease-in-out infinite;
}
.floating-note {
  position: absolute;
  background: rgba(255,250,243,.96);
  color: var(--emerald);
  border: 1px solid rgba(198,157,89,.34);
  box-shadow: 0 18px 50px rgba(10, 31, 25, 0.12);
}
.floating-note--name,
.floating-note--name2 {
  padding: 14px 22px;
  border-radius: 6px;
  font-family: 'Great Vibes', cursive;
  font-size: 40px;
}
.floating-note--name { left: -16px; bottom: 118px; transform: rotate(-4deg); }
.floating-note--name2 { left: 22px; bottom: 42px; transform: rotate(2deg); }
.floating-note--rings {
  right: 28px;
  top: 118px;
  width: 110px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 34px;
  letter-spacing: -8px;
}
.scroll-down {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 4;
  color: rgba(255,250,243,.74);
  text-transform: uppercase;
  letter-spacing: .26em;
  font-size: 10px;
}

.section { position: relative; padding: 110px 20px; overflow: hidden; }
.section--paper { background: linear-gradient(180deg, var(--paper), #faf3ea); }
.section--dark {
  color: var(--paper);
  background:
    radial-gradient(circle at 20% 0%, rgba(25, 94, 83, .45), transparent 28%),
    linear-gradient(135deg, #081c19, #0f3f37 56%, #071512);
}
.section--soft { background: var(--soft); }
.section--video {
  background:
    linear-gradient(180deg, #f8f1e7, #f2e7d9);
}
.section__inner { width: min(1180px, 100%); margin: 0 auto; }
.narrow { width: min(860px, 100%); text-align: center; }
h2 {
  margin: 0 0 18px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(38px, 5vw, 62px);
  line-height: .98;
  font-weight: 600;
}
.section p {
  margin: 0;
  line-height: 1.82;
  color: var(--muted);
}
.section--dark p { color: rgba(255,250,243,.82); }

.quote-card {
  position: relative;
  margin-top: 34px;
  padding: 32px 28px;
  border-radius: 26px;
  background: rgba(255,255,255,.64);
  border: 1px solid rgba(198,157,89,.25);
  box-shadow: 0 16px 50px rgba(15, 31, 25, 0.08);
}
.quote-card__mark {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cormorant Garamond', serif;
  font-size: 88px;
  color: rgba(198,157,89,.54);
}
.quote-card strong { color: var(--emerald); }

.timer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}
.timer div {
  padding: 24px 18px;
  border-radius: 22px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(12px);
}
.timer strong {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(40px, 6vw, 64px);
  color: var(--gold-2);
  line-height: 1;
}
.timer span {
  display: block;
  margin-top: 8px;
  color: rgba(255,250,243,.8);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 11px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 34px;
}
.detail-card {
  padding: 30px;
  border-radius: 28px;
  background: rgba(255,255,255,.8);
  border: 1px solid rgba(198,157,89,.18);
  box-shadow: 0 18px 60px rgba(10, 31, 25, 0.08);
}
.detail-card__number {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(198,157,89,.2), rgba(11,63,56,.18));
  color: var(--emerald);
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  margin-bottom: 18px;
}
.detail-card h3 {
  margin: 0 0 12px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 34px;
}
.detail-card p { color: var(--muted); }

.split-grid,
.video-grid,
.place-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
}
.palette-card,
.video-card,
.place-card {
  border-radius: 32px;
  box-shadow: var(--shadow);
}
.palette-card {
  padding: 34px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(198,157,89,.25);
}
.palette-card__swatches {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.palette-card__swatches span {
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.24);
}
.palette-card p { color: var(--emerald); text-transform: uppercase; letter-spacing: .18em; font-size: 11px; }

.video-card {
  overflow: hidden;
  background: #000;
}
.video-card video {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}
.video-copy p { max-width: 500px; }

.place-address {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  color: var(--gold-2) !important;
  margin-bottom: 14px !important;
}
.place-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.place-card {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 30px;
  background:
    radial-gradient(circle at 30% 30%, rgba(198,157,89,.16), transparent 18%),
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.1);
}
.place-card__pin {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: radial-gradient(circle at 35% 30%, #f6df9e, #cc9a42 62%, #935f1f);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
  margin: 0 auto 18px;
}
.place-card__content { text-align: center; }
.place-card strong { display: block; font-family: 'Cormorant Garamond', serif; font-size: 42px; }
.place-card span, .place-card small { display: block; color: rgba(255,250,243,.8); }

.rsvp-form {
  margin-top: 34px;
  display: grid;
  gap: 16px;
  text-align: left;
}
.rsvp-form label {
  display: grid;
  gap: 9px;
  color: var(--emerald);
  font-weight: 500;
}
.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  border: 1px solid rgba(11,63,56,.15);
  border-radius: 18px;
  padding: 16px 18px;
  background: rgba(255,255,255,.86);
  color: var(--ink);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  border-color: rgba(198,157,89,.7);
  box-shadow: 0 0 0 4px rgba(198,157,89,.16);
  transform: translateY(-1px);
}
.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.phone-link {
  display: inline-block;
  margin-top: 22px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--emerald);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease;
}
.button:hover { transform: translateY(-2px); }
.button:disabled {
  opacity: .72;
  cursor: wait;
  transform: none;
}
.button--primary {
  background: linear-gradient(135deg, var(--gold), #d7b06f);
  color: #1a1a1a;
  box-shadow: 0 14px 30px rgba(198,157,89,.25);
}
.button--ghost {
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color: var(--paper);
  backdrop-filter: blur(12px);
}
.button--light {
  background: var(--paper);
  color: var(--emerald);
}
.button--outline-light {
  border-color: rgba(255,255,255,.24);
  color: var(--paper);
}
.button--full { width: 100%; }

.footer {
  padding: 52px 20px 68px;
  text-align: center;
  background: #081b18;
  color: rgba(255,250,243,.8);
}
.footer__monogram {
  font-family: 'Great Vibes', cursive;
  font-size: 54px;
  color: var(--gold-2);
  margin-bottom: 10px;
}
.footer p,
.footer small { margin: 0; }
.footer p { font-family: 'Cormorant Garamond', serif; font-size: 26px; color: var(--paper); }

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1);
}
.reveal.is-visible,
.reveal.is-immediate { opacity: 1; transform: translateY(0); }

.morph-card {
  position: fixed;
  z-index: 120;
  margin: 0;
  transform-origin: top left;
  will-change: transform, width, height, left, top, opacity;
  pointer-events: none;
}

@keyframes progressGrow { from { width: 0; } to { width: 100%; } }
@keyframes envelopeLift {
  0% { opacity: 0; transform: translateY(48px) scale(.94); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes flapOpen {
  0% { transform: rotateX(0deg); }
  100% { transform: rotateX(180deg); }
}
@keyframes inviteRise {
  0% { transform: translateX(-50%) translateY(28px); }
  100% { transform: translateX(-50%) translateY(-132px); }
}
@keyframes sealFade {
  to { opacity: 0; transform: translateX(-50%) scale(.5); }
}
@keyframes shineMove {
  0%, 100% { transform: translateX(-120%) rotate(20deg); }
  50% { transform: translateX(420%) rotate(20deg); }
}

@media (max-width: 1080px) {
  .hero__inner,
  .split-grid,
  .video-grid,
  .place-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .hero__copy { order: 1; }
  .hero__visual { order: 2; }
  .hero-composition { min-height: 700px; }
  .invite-sheet--hero { right: 0; left: 0; margin-inline: auto; top: -40px; }
  .card--photo { margin: 90px auto 0; }
  .floating-note--name { left: 8px; }
  .floating-note--name2 { left: 40px; }
  .video-copy p { max-width: none; }
}

@media (max-width: 760px) {
  .topbar {
    position: relative;
    padding: 0 0 20px;
    flex-direction: column;
    gap: 14px;
  }
  .menu {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 14px;
  }
  .hero {
    padding-top: 38px;
  }
  .hero__copy h1 { font-size: clamp(54px, 18vw, 86px); }
  .hero__lead { font-size: 15px; }
  .hero-composition { min-height: 560px; }
  .invite-sheet--hero {
    position: relative;
    top: 0;
    margin-bottom: -48px;
    width: min(100%, 360px);
  }
  .card--photo { margin-top: 0; }
  .floating-note--name,
  .floating-note--name2 {
    font-size: 28px;
    padding: 10px 16px;
  }
  .floating-note--name { left: 4px; bottom: 86px; }
  .floating-note--name2 { left: 18px; bottom: 22px; }
  .floating-note--rings { top: 86px; right: 16px; }
  .timer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section { padding: 88px 16px; }
  .scene-envelope { width: min(88vw, 360px); height: min(60vw, 250px); }
  .preloader__stage { min-height: 100svh; }
}

@media (max-width: 520px) {
  .invite-sheet__kicker { letter-spacing: .18em; font-size: 9px; }
  .invite-sheet h2 { font-size: 42px; }
  .invite-sheet p { font-size: 21px; }
  .detail-card { padding: 24px; }
  .button { width: 100%; }
  .hero__actions,
  .place-actions { flex-direction: column; }
  .video-card video { min-height: 360px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}


/* FIX: стабильный прелоудер без зависания */
.preloader {
  opacity: 1;
  visibility: visible;
}

.preloader.is-hidden {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.preloader__skip {
  position: relative;
  z-index: 20;
  margin-top: 2px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: 12px 22px;
  background: rgba(255,255,255,.08);
  color: var(--paper);
  cursor: pointer;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 10px;
  backdrop-filter: blur(12px);
  transition: transform .22s ease, background .22s ease;
}

.preloader__skip:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,.14);
}

.preloader.is-animating .scene-envelope {
  animation:
    envelopeLift .8s cubic-bezier(.18,.76,.22,1) .1s both,
    envelopeMoveDown .8s cubic-bezier(.2,.8,.2,1) 3.6s forwards;
}

.preloader.is-animating .scene-envelope__flap-outer,
.preloader.is-animating .scene-envelope__flap-inner {
  animation: flapOpenFixed .95s cubic-bezier(.2,.8,.2,1) 1s forwards !important;
}

.preloader.is-animating .scene-envelope__seal {
  animation: sealFade .45s ease .9s forwards !important;
}

.preloader.is-animating .scene-envelope__invite {
  animation: inviteFlyAndUnfold 2.7s cubic-bezier(.16,.84,.22,1) 1.55s forwards !important;
  transform-origin: center center;
}

.preloader.is-animating .preloader__text {
  animation: loaderTextOut .6s ease 3.3s forwards;
}

.preloader.is-animating .preloader__eyebrow,
.preloader.is-animating .preloader__line,
.preloader.is-animating .preloader__skip {
  animation: loaderTextOut .55s ease 3.2s forwards;
}

@keyframes flapOpenFixed {
  0% { transform: rotateX(0deg); opacity: 1; }
  100% { transform: rotateX(178deg); opacity: .92; }
}

@keyframes inviteFlyAndUnfold {
  0% {
    transform: translateX(-50%) translateY(28px) scale(.78) rotate(0deg);
    opacity: 1;
  }
  38% {
    transform: translateX(-50%) translateY(-150px) scale(1.08) rotate(-1.4deg);
    opacity: 1;
  }
  74% {
    transform: translateX(-50%) translateY(-190px) scale(1.65) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateX(-50%) translateY(-210px) scale(2.15) rotate(0deg);
    opacity: .96;
  }
}

@keyframes envelopeMoveDown {
  to {
    transform: translateY(110px) scale(.72);
    opacity: .45;
  }
}

@keyframes loaderTextOut {
  to {
    opacity: 0;
    transform: translateY(12px);
  }
}

.site {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1);
}

body:not(.is-loading) .site {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 520px) {
  @keyframes inviteFlyAndUnfold {
    0% {
      transform: translateX(-50%) translateY(28px) scale(.72) rotate(0deg);
      opacity: 1;
    }
    45% {
      transform: translateX(-50%) translateY(-120px) scale(.98) rotate(-1deg);
      opacity: 1;
    }
    100% {
      transform: translateX(-50%) translateY(-145px) scale(1.55) rotate(0deg);
      opacity: .96;
    }
  }
}


/* FINAL FIX: реалистичный прелоудер и кроссбраузерные правки */
html, body {
  width: 100%;
}

.hero,
.preloader__stage {
  min-height: 100vh;
  min-height: 100svh;
}

.menu,
.button--ghost,
.preloader__skip {
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

/* Верхний треугольник уходит назад и больше не перекрывает приглашение */
.preloader.is-animating .scene-envelope__flap-outer,
.preloader.is-animating .scene-envelope__flap-inner {
  z-index: 3 !important;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
}

.preloader.is-animating .scene-envelope__invite {
  z-index: 14 !important;
}

.scene-envelope__invite {
  will-change: transform, opacity;
}

.scene-envelope__flap-outer,
.scene-envelope__flap-inner {
  will-change: transform, opacity;
}

/* Более реалистичный переход: приглашение вылетает, приближается к экрану и растворяется в hero */
.preloader.is-animating .scene-envelope {
  animation:
    envelopeLift .75s cubic-bezier(.18,.76,.22,1) .05s both,
    envelopeSinkReal .9s cubic-bezier(.2,.8,.2,1) 3.75s forwards !important;
}

.preloader.is-animating .scene-envelope__flap-outer,
.preloader.is-animating .scene-envelope__flap-inner {
  animation: flapOpenReal 1.05s cubic-bezier(.18,.8,.22,1) .9s forwards !important;
}

.preloader.is-animating .scene-envelope__invite {
  animation: inviteToHeroReal 3.1s cubic-bezier(.16,.84,.18,1) 1.35s forwards !important;
}

.preloader.is-animating .preloader__text,
.preloader.is-animating .preloader__eyebrow,
.preloader.is-animating .preloader__line,
.preloader.is-animating .preloader__skip {
  animation: loaderContentOut .6s ease 3.45s forwards !important;
}

.preloader.is-hidden {
  transition: opacity .82s ease, visibility .82s ease !important;
}

/* Сайт появляется из того же приглашения, поэтому переход выглядит мягче */
.site {
  opacity: 0;
  transform: translateY(18px) scale(.985);
  transition: opacity .95s ease, transform .95s cubic-bezier(.2,.8,.2,1);
}

body:not(.is-loading) .site {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Лёгкая анимация конвертов на главной странице */
.hero-composition__photo {
  animation: photoBreath 7.5s ease-in-out infinite;
  transform-origin: center center;
}

.invite-sheet--hero {
  animation: invitationFloat 6.8s ease-in-out infinite;
}

.floating-note--name,
.floating-note--name2,
.floating-note--rings {
  animation: noteFloat 7.2s ease-in-out infinite;
}

.floating-note--name2 {
  animation-delay: .9s;
}

.floating-note--rings {
  animation-delay: 1.4s;
}

@keyframes flapOpenReal {
  0% {
    transform: rotateX(0deg);
    opacity: 1;
  }
  75% {
    transform: rotateX(168deg);
    opacity: .9;
  }
  100% {
    transform: rotateX(182deg);
    opacity: .12;
  }
}

@keyframes inviteToHeroReal {
  0% {
    transform: translateX(-50%) translateY(28px) scale(.78) rotate(0deg);
    opacity: 1;
    filter: blur(0);
  }
  25% {
    transform: translateX(-50%) translateY(-118px) scale(1.02) rotate(-1deg);
    opacity: 1;
    filter: blur(0);
  }
  55% {
    transform: translateX(-50%) translateY(-188px) scale(1.42) rotate(0deg);
    opacity: 1;
    filter: blur(0);
  }
  82% {
    transform: translateX(-50%) translateY(-215px) scale(2.35) rotate(0deg);
    opacity: .98;
    filter: blur(.2px);
  }
  100% {
    transform: translateX(-50%) translateY(-225px) scale(2.95) rotate(0deg);
    opacity: 0;
    filter: blur(6px);
  }
}

@keyframes envelopeSinkReal {
  to {
    transform: translateY(132px) scale(.68);
    opacity: .18;
  }
}

@keyframes loaderContentOut {
  to {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes photoBreath {
  0%, 100% {
    transform: translate3d(0,0,0) rotate(-.35deg) scale(1);
  }
  50% {
    transform: translate3d(0,-8px,0) rotate(.25deg) scale(1.012);
  }
}

@keyframes invitationFloat {
  0%, 100% {
    transform: translate3d(0,0,0) rotate(.4deg);
  }
  50% {
    transform: translate3d(0,-10px,0) rotate(-.25deg);
  }
}

@keyframes noteFloat {
  0%, 100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}

.admin-entry {
  display: inline-block;
  margin-top: 22px;
  color: rgba(255,250,243,.46);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.admin-entry:hover {
  color: var(--gold-2);
}

@media (max-width: 760px) {
  .preloader.is-animating .scene-envelope__invite {
    animation: inviteToHeroMobile 3.05s cubic-bezier(.16,.84,.18,1) 1.35s forwards !important;
  }
}

@keyframes inviteToHeroMobile {
  0% {
    transform: translateX(-50%) translateY(28px) scale(.72) rotate(0deg);
    opacity: 1;
    filter: blur(0);
  }
  36% {
    transform: translateX(-50%) translateY(-112px) scale(.98) rotate(-1deg);
    opacity: 1;
    filter: blur(0);
  }
  76% {
    transform: translateX(-50%) translateY(-145px) scale(1.7) rotate(0deg);
    opacity: .96;
    filter: blur(.2px);
  }
  100% {
    transform: translateX(-50%) translateY(-155px) scale(2.2) rotate(0deg);
    opacity: 0;
    filter: blur(5px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-composition__photo,
  .invite-sheet--hero,
  .floating-note--name,
  .floating-note--name2,
  .floating-note--rings {
    animation: none !important;
  }
}


/* UPDATE: первая страница — видео видно лучше, затемнение стало прозрачнее */
.hero__video {
  filter: grayscale(.38) contrast(1.02) brightness(.62) !important;
  transform: scale(1.025) !important;
}

.hero__video-overlay {
  background:
    radial-gradient(circle at 74% 34%, rgba(198,157,89,.12), transparent 20%),
    linear-gradient(90deg, rgba(5, 19, 17, .76) 0%, rgba(5, 19, 17, .52) 45%, rgba(5, 19, 17, .24) 100%),
    linear-gradient(180deg, rgba(5,19,17,.46), rgba(5,19,17,.08) 28%, rgba(5,19,17,.62) 100%) !important;
}

/* Анкета гостя */
.questionnaire-section {
  background:
    radial-gradient(circle at 12% 18%, rgba(11,63,56,.07), transparent 18%),
    radial-gradient(circle at 88% 78%, rgba(198,157,89,.12), transparent 24%),
    linear-gradient(180deg, var(--paper), #fbf4eb) !important;
}

.guest-questionnaire {
  padding: clamp(20px, 4vw, 34px);
  border-radius: 30px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(198,157,89,.2);
  box-shadow: 0 18px 60px rgba(10,31,25,.08);
}

.choice-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 12px;
}

.choice-fieldset legend {
  margin-bottom: 6px;
  color: var(--emerald);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.05;
  font-weight: 600;
}

.choice-line {
  display: grid !important;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 14px !important;
  padding: 13px 14px;
  border: 1px solid rgba(11,63,56,.13);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  color: var(--ink) !important;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.choice-line:hover {
  transform: translateY(-1px);
  border-color: rgba(198,157,89,.55);
  background: rgba(255,255,255,.94);
}

.choice-line input {
  width: 22px !important;
  height: 22px !important;
  margin: 0;
  accent-color: var(--emerald);
}

.choice-line span {
  line-height: 1.35;
  color: var(--ink);
  font-weight: 400;
}

@media (max-width: 760px) {
  .hero__video-overlay {
    background:
      linear-gradient(180deg, rgba(5,19,17,.48), rgba(5,19,17,.18) 32%, rgba(5,19,17,.68) 100%),
      linear-gradient(90deg, rgba(5,19,17,.72), rgba(5,19,17,.38)) !important;
  }

  .hero__video {
    filter: grayscale(.32) contrast(1) brightness(.66) !important;
  }
}


/* Блок Подарок — стилизованные лотерейные билеты */
.gift-tickets {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gift-ticket {
  position: relative;
  padding: 26px 18px;
  border-radius: 32px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(198,157,89,.25);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.gift-ticket::before,
.gift-ticket::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fbf4eb;
  transform: translateY(-50%);
  box-shadow: inset 0 0 0 1px rgba(198,157,89,.14);
}

.gift-ticket::before { left: -9px; }
.gift-ticket::after { right: -9px; }

.gift-ticket strong {
  display: block;
  margin: 10px 0 8px;
  color: var(--emerald);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 3vw, 34px);
  line-height: 1.05;
}

.gift-ticket small {
  display: block;
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.gift-ticket__label {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #f8efe4);
  border: 1px solid rgba(198,157,89,.22);
  color: var(--emerald);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 10px;
}

@media (max-width: 900px) {
  .gift-tickets {
    grid-template-columns: 1fr;
  }
}


/* UPDATE: блок Подарок — теперь это именно визуальные лотерейные билеты, а не просто текст */
.gift-tickets {
  display: none !important;
}

.lottery-card {
  position: relative;
  margin-top: 36px;
  padding: clamp(22px, 4vw, 34px);
  border-radius: 32px;
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(198,157,89,.25);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.lottery-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(198,157,89,.18);
  border-radius: 24px;
  pointer-events: none;
}

.lottery-card::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -120px;
  bottom: -140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198,157,89,.16), transparent 64%);
  pointer-events: none;
}

.lottery-stack {
  position: relative;
  min-height: 430px;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.lottery-ticket {
  position: absolute;
  width: min(620px, 92%);
  min-height: 158px;
  display: grid;
  grid-template-columns: 118px 1fr;
  overflow: hidden;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.97), rgba(248,239,228,.97));
  border: 1px solid rgba(198,157,89,.38);
  box-shadow: 0 24px 70px rgba(10,31,25,.16);
  transform-origin: center;
}

.lottery-ticket::before,
.lottery-ticket::after {
  content: "";
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fbf4eb;
  border: 1px solid rgba(198,157,89,.22);
  transform: translateY(-50%);
}

.lottery-ticket::before { left: -14px; }
.lottery-ticket::after { right: -14px; }

.lottery-ticket--one {
  z-index: 3;
  transform: translateY(-104px) rotate(-3deg);
}

.lottery-ticket--two {
  z-index: 2;
  transform: translateY(16px) rotate(2.4deg);
}

.lottery-ticket--three {
  z-index: 1;
  transform: translateY(132px) rotate(-1.2deg);
}

.lottery-ticket__side {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 18px 10px;
  color: var(--paper);
  background:
    radial-gradient(circle at 28% 22%, rgba(230,201,143,.24), transparent 30%),
    linear-gradient(180deg, #0b3f38, #092f2a);
  border-right: 1px dashed rgba(198,157,89,.72);
}

.lottery-ticket__side::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 12px;
  bottom: 12px;
  border-right: 2px dashed rgba(255,250,243,.5);
}

.lottery-ticket__side span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: rgba(255,250,243,.76);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 10px;
}

.lottery-ticket__side strong {
  font-family: 'Cormorant Garamond', serif;
  font-size: 30px;
  color: var(--gold-2);
  letter-spacing: .08em;
}

.lottery-ticket__main {
  position: relative;
  padding: 22px 26px 20px;
  text-align: left;
}

.lottery-ticket__main::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 14px;
  border: 1px solid rgba(198,157,89,.18);
  pointer-events: none;
}

.lottery-ticket__top,
.lottery-ticket__bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lottery-ticket__top span,
.lottery-ticket__top em,
.lottery-ticket__bottom small {
  color: var(--emerald);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 10px;
  font-style: normal;
  opacity: .72;
}

.lottery-ticket h3 {
  position: relative;
  z-index: 2;
  margin: 14px 0 6px;
  color: var(--emerald);
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 4.5vw, 46px);
  line-height: .95;
}

.lottery-ticket p {
  position: relative;
  z-index: 2;
  margin: 0;
  max-width: 360px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.lottery-ticket__barcode {
  width: 132px;
  height: 32px;
  margin-top: 16px;
  border-radius: 6px;
  opacity: .72;
  background:
    repeating-linear-gradient(
      90deg,
      var(--emerald) 0 2px,
      transparent 2px 5px,
      var(--emerald) 5px 8px,
      transparent 8px 12px
    );
}

.lottery-ticket__scratch {
  position: relative;
  z-index: 2;
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

.lottery-ticket__scratch span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff0b9, #d2a14b 60%, #9d6926);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.22);
}

.lottery-ticket__scratch span::before {
  content: "✦";
  color: #fff6d7;
  font-size: 16px;
}

.lottery-ticket__numbers {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.lottery-ticket__numbers b {
  display: grid;
  place-items: center;
  width: 42px;
  height: 34px;
  border-radius: 10px;
  background: rgba(11,63,56,.08);
  border: 1px solid rgba(198,157,89,.24);
  color: var(--emerald);
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
}

@media (max-width: 760px) {
  .lottery-card {
    padding: 18px 10px;
  }

  .lottery-stack {
    min-height: 620px;
  }

  .lottery-ticket {
    position: relative;
    width: 100%;
    min-height: 0;
    grid-template-columns: 82px 1fr;
    margin: 0;
  }

  .lottery-ticket--one,
  .lottery-ticket--two,
  .lottery-ticket--three {
    transform: none;
  }

  .lottery-stack {
    align-content: center;
    gap: 14px;
  }

  .lottery-ticket__main {
    padding: 18px 16px;
  }

  .lottery-ticket h3 {
    font-size: 30px;
  }

  .lottery-ticket p {
    font-size: 13px;
  }

  .lottery-ticket__top {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}


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


/* RESPONSIVE FINAL: адаптация под смартфоны, планшеты, ноутбуки, большие мониторы */
:root {
  --page-max: 1180px;
  --edge: clamp(16px, 4vw, 42px);
  --hero-min: 100vh;
  --hero-min: 100svh;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  width: 100%;
  min-width: 320px;
  overflow-x: hidden;
}

body, .site, .hero, .section, .footer {
  max-width: 100vw;
}

img, video, svg, canvas {
  max-width: 100%;
}

input, select, textarea, button {
  max-width: 100%;
  font-size: 16px;
}

.topbar {
  padding-left: max(var(--edge), env(safe-area-inset-left));
  padding-right: max(var(--edge), env(safe-area-inset-right));
}

.hero {
  min-height: var(--hero-min);
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

.section {
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

.section__inner,
.hero__inner {
  width: min(var(--page-max), 100%);
}

.hero__copy,
.hero__visual,
.video-card,
.card,
.lottery-card,
.place-card,
.palette-card {
  min-width: 0;
}

.hero__lead,
.section p,
.lottery-ticket p,
.detail-card p {
  overflow-wrap: anywhere;
}

/* Очень широкие мониторы */
@media (min-width: 1440px) {
  :root {
    --page-max: 1280px;
  }

  .hero__inner {
    gap: 86px;
  }

  .hero__copy h1 {
    font-size: clamp(92px, 7vw, 132px);
  }

  .card--photo {
    width: min(560px, 100%);
  }

  .section {
    padding-top: 128px;
    padding-bottom: 128px;
  }
}

@media (min-width: 1800px) {
  :root {
    --page-max: 1420px;
  }

  .hero__video {
    transform: scale(1.01) !important;
  }

  .hero__copy h1 {
    font-size: 146px;
  }

  .hero__lead {
    font-size: 18px;
  }

  .section h2,
  h2 {
    font-size: clamp(58px, 4vw, 76px);
  }
}

/* Ноутбуки и небольшие мониторы */
@media (max-width: 1280px) {
  .hero__inner {
    grid-template-columns: .95fr 1.05fr;
    gap: 42px;
  }

  .hero__copy h1 {
    font-size: clamp(58px, 8vw, 96px);
  }

  .hero-composition {
    min-height: 560px;
  }

  .card--photo {
    width: min(480px, 100%);
  }

  .invite-sheet--hero {
    width: min(390px, 92%);
  }
}

/* Планшеты */
@media (max-width: 1024px) {
  .topbar {
    align-items: center;
    gap: 14px;
  }

  .menu {
    max-width: calc(100vw - 160px);
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: flex-start;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .menu::-webkit-scrollbar {
    display: none;
  }

  .hero__inner,
  .split-grid,
  .video-grid,
  .place-grid,
  .detail-grid {
    grid-template-columns: 1fr !important;
  }

  .hero {
    padding-top: 112px;
  }

  .hero__copy {
    max-width: 760px;
  }

  .hero__visual {
    width: min(720px, 100%);
    margin: 0 auto;
  }

  .hero-composition {
    min-height: 690px;
  }

  .invite-sheet--hero {
    left: 50%;
    right: auto;
    top: 0;
    transform: translateX(-50%);
  }

  .card--photo {
    margin: 110px auto 0;
  }

  .video-card video,
  .story-video {
    min-height: 440px;
  }

  .lottery-stack {
    min-height: 470px;
  }

  .lottery-ticket {
    width: min(660px, 96%);
  }
}

/* Большие смартфоны */
@media (max-width: 760px) {
  :root {
    --edge: 16px;
  }

  .topbar {
    position: relative;
    padding: max(18px, env(safe-area-inset-top)) 0 22px;
  }

  .brand {
    font-size: 38px;
  }

  .menu {
    max-width: 100%;
    width: 100%;
    padding: 8px 10px;
    justify-content: flex-start;
    border-radius: 18px;
  }

  .menu a {
    flex: 0 0 auto;
    padding: 8px 2px;
    font-size: 10px;
    letter-spacing: .12em;
  }

  .hero {
    min-height: auto;
    padding: 22px 16px 72px;
  }

  .hero__copy {
    text-align: left;
  }

  .hero__copy h1 {
    font-size: clamp(52px, 17vw, 84px);
    line-height: .92;
  }

  .hero__lead {
    font-size: 15px;
    line-height: 1.65;
  }

  .hero__actions,
  .place-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
    min-height: 52px;
    padding-left: 18px;
    padding-right: 18px;
    text-align: center;
  }

  .hero-composition {
    min-height: auto;
    display: grid;
    gap: 18px;
    padding-top: 10px;
  }

  .invite-sheet--hero {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    margin: 0 auto -8px;
  }

  .card--photo {
    width: 100%;
    margin: 0 auto;
    border-radius: 26px;
  }

  .floating-note--name,
  .floating-note--name2,
  .floating-note--rings {
    display: none;
  }

  .scroll-down {
    display: none;
  }

  .section {
    padding-top: 76px;
    padding-bottom: 76px;
  }

  .narrow {
    width: 100%;
  }

  h2,
  .section h2 {
    font-size: clamp(34px, 11vw, 48px);
    line-height: 1.02;
  }

  .section p {
    font-size: 15px;
    line-height: 1.7;
  }

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

  .timer div {
    padding: 18px 10px;
  }

  .timer strong {
    font-size: clamp(38px, 13vw, 56px);
  }

  .timer span {
    font-size: 10px;
    letter-spacing: .12em;
  }

  .detail-grid {
    gap: 14px;
  }

  .detail-card {
    border-radius: 22px;
    padding: 22px;
  }

  .palette-card {
    border-radius: 24px;
    padding: 22px;
  }

  .palette-card__swatches {
    gap: 10px;
  }

  .video-card {
    border-radius: 24px;
  }

  .video-card video,
  .story-video {
    min-height: 0;
    aspect-ratio: 9 / 16;
    height: auto;
    max-height: 78vh;
    object-fit: cover;
  }

  .place-card {
    min-height: 260px;
    border-radius: 24px;
  }

  .rsvp-form,
  .guest-questionnaire {
    gap: 14px;
  }

  .guest-questionnaire {
    padding: 18px;
    border-radius: 24px;
  }

  .choice-fieldset legend {
    font-size: 28px;
  }

  .choice-line {
    grid-template-columns: 24px 1fr;
    padding: 12px;
    border-radius: 16px;
  }

  .choice-line input {
    width: 20px !important;
    height: 20px !important;
  }

  .rsvp-form input,
  .rsvp-form select,
  .rsvp-form textarea {
    border-radius: 16px;
    padding: 14px 15px;
  }

  .footer {
    padding-bottom: max(58px, env(safe-area-inset-bottom));
  }
}

/* Обычные смартфоны 360–430px */
@media (max-width: 520px) {
  body {
    min-width: 320px;
  }

  .hero {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero__copy h1 {
    font-size: clamp(50px, 18vw, 74px);
  }

  .eyebrow {
    font-size: 10px;
    letter-spacing: .18em;
  }

  .hero__lead {
    font-size: 14.5px;
  }

  .section {
    padding-left: 14px;
    padding-right: 14px;
  }

  .invite-sheet {
    padding: 20px 14px;
  }

  .invite-sheet h2 {
    font-size: 40px;
  }

  .invite-sheet p {
    font-size: 20px;
  }

  .quote-card {
    padding: 26px 18px;
    border-radius: 22px;
  }

  .timer {
    gap: 10px;
  }

  .timer div {
    border-radius: 18px;
  }

  .lottery-card {
    padding: 16px 10px;
    border-radius: 24px;
  }

  .lottery-card::before {
    inset: 8px;
    border-radius: 18px;
  }

  .lottery-stack {
    min-height: auto;
    display: grid;
    gap: 12px;
  }

  .lottery-ticket {
    position: relative;
    width: 100%;
    grid-template-columns: 72px 1fr;
    border-radius: 18px;
  }

  .lottery-ticket--one,
  .lottery-ticket--two,
  .lottery-ticket--three {
    transform: none;
  }

  .lottery-ticket__side {
    padding: 12px 6px;
  }

  .lottery-ticket__side strong {
    font-size: 22px;
  }

  .lottery-ticket__side span {
    font-size: 9px;
  }

  .lottery-ticket__main {
    padding: 16px 14px;
  }

  .lottery-ticket h3 {
    font-size: 28px;
  }

  .lottery-ticket p {
    font-size: 12.5px;
  }

  .lottery-ticket__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .lottery-ticket__barcode {
    width: 100px;
    height: 26px;
  }

  .lottery-ticket__scratch span {
    width: 34px;
    height: 34px;
  }

  .lottery-ticket__numbers b {
    width: 34px;
    height: 30px;
    font-size: 17px;
  }
}

/* Узкие смартфоны 320–359px */
@media (max-width: 359px) {
  .hero__copy h1 {
    font-size: 48px;
  }

  .brand {
    font-size: 34px;
  }

  .menu a {
    font-size: 9px;
  }

  .section {
    padding-left: 12px;
    padding-right: 12px;
  }

  h2,
  .section h2 {
    font-size: 32px;
  }

  .timer strong {
    font-size: 34px;
  }

  .lottery-ticket {
    grid-template-columns: 62px 1fr;
  }

  .lottery-ticket__main {
    padding: 14px 12px;
  }

  .lottery-ticket h3 {
    font-size: 25px;
  }
}

/* Альбомная ориентация на телефонах */
@media (max-height: 520px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-top: 18px;
  }

  .topbar {
    position: relative;
    padding-top: 0;
  }

  .hero__inner {
    grid-template-columns: 1fr 1fr !important;
    align-items: center;
  }

  .hero__copy h1 {
    font-size: clamp(42px, 9vw, 72px);
  }

  .hero__lead {
    max-height: 96px;
    overflow: auto;
  }

  .hero-composition {
    min-height: 420px;
  }

  .invite-sheet--hero {
    position: relative;
    transform: none;
    left: auto;
    top: auto;
  }

  .card--photo {
    margin-top: 10px;
  }
}

/* Touch devices: отключаем тяжелые hover-эффекты */
@media (hover: none) and (pointer: coarse) {
  .button:hover,
  .choice-line:hover {
    transform: none;
  }

  .card__shine {
    animation-duration: 8s;
  }
}


/* Оповещение после отправки анкеты — конверт как в прелоудере */
.send-envelope-toast {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 19, 17, .28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s ease, visibility .28s ease;
}

.send-envelope-toast.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.send-envelope-toast__card {
  position: relative;
  width: min(420px, 92vw);
  min-height: 330px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 22px;
  padding: 34px 24px 30px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 24%, rgba(198,157,89,.18), transparent 35%),
    linear-gradient(180deg, rgba(255,250,243,.96), rgba(246,238,228,.96));
  border: 1px solid rgba(198,157,89,.32);
  box-shadow: 0 40px 110px rgba(0,0,0,.34);
  overflow: hidden;
}

.send-envelope-toast__card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 24px;
  border: 1px solid rgba(198,157,89,.18);
  pointer-events: none;
}

.send-envelope-toast__icon {
  position: relative;
  width: 230px;
  height: 170px;
}

.toast-envelope {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 220px;
  height: 138px;
  transform: translateX(-50%) translateY(16px) scale(.9);
  transform-origin: center;
}

.send-envelope-toast.is-visible .toast-envelope {
  animation: toastEnvelopeAppear .55s cubic-bezier(.18,.8,.2,1) both;
}

.send-envelope-toast.is-success .toast-envelope {
  animation:
    toastEnvelopeAppear .24s cubic-bezier(.18,.8,.2,1) both,
    toastEnvelopeFlyAway .95s cubic-bezier(.18,.86,.25,1) .32s forwards;
}

.send-envelope-toast.is-sending .toast-envelope {
  animation:
    toastEnvelopeAppear .22s cubic-bezier(.18,.8,.2,1) both,
    toastEnvelopeSending 1.05s cubic-bezier(.18,.86,.25,1) .26s infinite;
}

.send-envelope-toast.is-error .toast-envelope {
  animation:
    toastEnvelopeAppear .45s cubic-bezier(.18,.8,.2,1) both,
    toastEnvelopeShake .46s ease .9s 2;
}

.toast-envelope__back,
.toast-envelope__flap,
.toast-envelope__left,
.toast-envelope__right,
.toast-envelope__front {
  position: absolute;
  inset: 0;
  border-radius: 14px;
}

.toast-envelope__back {
  background: linear-gradient(180deg, #0f6356, #0b3f38);
  box-shadow: 0 18px 48px rgba(8, 28, 23, .28);
}

.toast-envelope__letter {
  position: absolute;
  left: 24px;
  right: 24px;
  top: -34px;
  height: 118px;
  z-index: 3;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffdf9, #f7efe5);
  border: 1px solid rgba(198,157,89,.34);
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
}

.send-envelope-toast.is-visible .toast-envelope__letter {
  animation: toastLetterIn .45s cubic-bezier(.18,.82,.24,1) .12s both;
}

.toast-envelope__letter span {
  color: var(--emerald);
  font-family: 'Great Vibes', cursive;
  font-size: 36px;
}

.toast-envelope__flap {
  transform-origin: top center;
  clip-path: polygon(0 0, 50% 66%, 100% 0);
  background: linear-gradient(180deg, #116b5e, #08342d);
  z-index: 5;
}

.send-envelope-toast.is-visible .toast-envelope__flap {
  animation: toastFlapClose .46s cubic-bezier(.18,.82,.24,1) .25s forwards;
}

.toast-envelope__left {
  clip-path: polygon(0 0, 55% 50%, 0 100%);
  background: linear-gradient(180deg, #0f6255, #0b4d43);
  z-index: 6;
}

.toast-envelope__right {
  clip-path: polygon(100% 0, 45% 50%, 100% 100%);
  background: linear-gradient(180deg, #0d564b, #093d36);
  z-index: 6;
}

.toast-envelope__front {
  clip-path: polygon(0 100%, 50% 38%, 100% 100%);
  background: linear-gradient(180deg, #0c5b4f, #0a473f);
  z-index: 7;
}

.toast-envelope__seal {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 8;
  width: 42px;
  height: 42px;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff4d2;
  background: radial-gradient(circle at 35% 30%, #f8e4a2, #ce9738 58%, #a66b20 90%);
  box-shadow: 0 10px 22px rgba(0,0,0,.28);
}

.send-envelope-toast.is-error .toast-envelope__seal {
  background: radial-gradient(circle at 35% 30%, #ffd2d2, #b33434 58%, #731616 90%);
}

.send-envelope-toast__text {
  position: relative;
  z-index: 2;
  margin: 0;
  color: var(--emerald);
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1.05;
}

.send-envelope-toast.is-error .send-envelope-toast__text {
  color: #8f2222;
}

@keyframes toastEnvelopeAppear {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(34px) scale(.78);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(16px) scale(.9);
  }
}

@keyframes toastLetterIn {
  0% {
    transform: translateY(-52px) scale(.96);
    opacity: 0;
  }
  100% {
    transform: translateY(34px) scale(.96);
    opacity: 1;
  }
}

@keyframes toastFlapClose {
  0% {
    transform: rotateX(0deg);
    z-index: 2;
  }
  100% {
    transform: rotateX(180deg);
    z-index: 9;
  }
}

@keyframes toastEnvelopeFlyAway {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(16px) scale(.9) rotate(0deg);
  }
  45% {
    opacity: 1;
    transform: translateX(-30%) translateY(-48px) scale(.86) rotate(8deg);
  }
  100% {
    opacity: 0;
    transform: translateX(170%) translateY(-210px) scale(.58) rotate(18deg);
  }
}

@keyframes toastEnvelopeSending {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(16px) scale(.9) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: translateX(-42%) translateY(-20px) scale(.88) rotate(5deg);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(16px) scale(.9) rotate(0deg);
  }
}

@keyframes toastEnvelopeShake {
  0%, 100% {
    transform: translateX(-50%) translateY(16px) scale(.9);
  }
  25% {
    transform: translateX(calc(-50% - 10px)) translateY(16px) scale(.9) rotate(-2deg);
  }
  75% {
    transform: translateX(calc(-50% + 10px)) translateY(16px) scale(.9) rotate(2deg);
  }
}

@media (max-width: 520px) {
  .send-envelope-toast__card {
    min-height: 300px;
    border-radius: 26px;
  }

  .send-envelope-toast__icon {
    width: 200px;
    height: 150px;
  }

  .toast-envelope {
    width: 190px;
    height: 120px;
  }

  .toast-envelope__letter {
    left: 20px;
    right: 20px;
    height: 102px;
  }
}


/* Дополнительные гости в анкете */
.additional-guests {
  display: grid;
  gap: 14px;
}

.additional-guest-field {
  position: relative;
  display: grid;
  gap: 9px;
  padding: 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 95% 15%, rgba(198,157,89,.12), transparent 22%),
    rgba(255,255,255,.72);
  border: 1px solid rgba(198,157,89,.24);
}

.additional-guest-field__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--emerald);
  font-weight: 600;
}

.additional-guest-field__remove {
  border: 1px solid rgba(143,34,34,.18);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255,255,255,.72);
  color: #8f2222;
  cursor: pointer;
  font-size: 12px;
  transition: transform .2s ease, background .2s ease;
}

.additional-guest-field__remove:hover {
  transform: translateY(-1px);
  background: rgba(255,240,240,.92);
}

.button--guest-add {
  border-color: rgba(11,63,56,.18);
  background: rgba(255,255,255,.72);
  color: var(--emerald);
  box-shadow: none;
}

.button--guest-add::before {
  content: "+";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(11,63,56,.1);
  color: var(--emerald);
  font-weight: 700;
}

@media (max-width: 520px) {
  .additional-guest-field {
    padding: 14px;
    border-radius: 18px;
  }

  .additional-guest-field__top {
    align-items: flex-start;
    flex-direction: column;
  }

  .additional-guest-field__remove {
    width: 100%;
  }
}


/* Улучшение читаемости даты и времени в конверте на главной странице */
.hero .invite-sheet--hero p,
.hero .invite-sheet--hero small {
  color: #062a25 !important;
  text-shadow: 0 1px 0 rgba(255, 250, 243, .72);
}

.hero .invite-sheet--hero h2 {
  color: #0b3f38 !important;
}

.hero .invite-sheet--hero p:nth-of-type(2) {
  color: #7a541f !important;
  font-weight: 700;
}


