@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600;700&family=Montserrat:wght@300;400;500;600&display=swap");

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-weight: 500;
  color: #161616;
  background: #f8f5f0;
}

img,
video {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* ENVELOPE INTRO — REAL ASSETS VERSION */

body.is-locked {
  overflow: hidden;
}

.envelope-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(rgba(225, 213, 193, 0.74), rgba(211, 196, 172, 0.78)),
    url("assets/envelope-paper-light.png");
  background-size: cover;
  background-position: center;
  perspective: 1900px;
  isolation: isolate;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}

.envelope-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  background:
    radial-gradient(circle at center, transparent 0 42%, rgba(48, 34, 16, 0.11) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), transparent 18%, transparent 82%, rgba(58, 43, 25, 0.12));
}

.envelope-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 13;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(61, 44, 22, 0.10), transparent 12%, transparent 88%, rgba(61, 44, 22, 0.10)),
    linear-gradient(180deg, rgba(61, 44, 22, 0.07), transparent 16%, transparent 82%, rgba(61, 44, 22, 0.08));
  mix-blend-mode: multiply;
  opacity: 0.62;
}

.envelope-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-paper {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    url("assets/envelope-paper-main.png");
  background-size: cover;
  background-position: center;
  filter: saturate(0.95) contrast(1.03);
}

.envelope-flap {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition:
    transform 1.28s cubic-bezier(0.72, 0, 0.18, 1),
    opacity 0.88s ease,
    filter 0.88s ease;
  will-change: transform, opacity;
}

.envelope-flap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 42%),
    radial-gradient(circle at center, transparent 0 52%, rgba(80, 58, 32, 0.06) 100%);
}

.envelope-flap-top {
  top: 0;
  height: 64%;
  z-index: 4;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 34%),
    url("assets/envelope-paper-main.png");
  box-shadow:
    0 18px 38px rgba(74, 54, 29, 0.18),
    inset 0 -1px 0 rgba(255, 255, 255, 0.20);
}

.envelope-flap-top::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 2px;
  height: 62%;
  background: linear-gradient(180deg, transparent, rgba(76, 57, 33, 0.17));
  transform: translateX(-50%);
  opacity: 0.58;
}

.envelope-flap-left {
  z-index: 2;
  width: 50%;
  height: 100%;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  background-image:
    linear-gradient(120deg, rgba(255, 255, 255, 0.10), transparent 38%),
    url("assets/envelope-paper-dark.png");
  box-shadow:
    inset -26px 0 38px rgba(83, 60, 32, 0.13);
}

.envelope-flap-left::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 0 48.6%, rgba(69, 51, 29, 0.13) 49.8%, rgba(255, 255, 255, 0.08) 50.7%, transparent 52% 100%);
  opacity: 0.66;
}

.envelope-flap-right {
  z-index: 2;
  left: 50%;
  width: 50%;
  height: 100%;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
  background-image:
    linear-gradient(240deg, rgba(255, 255, 255, 0.10), transparent 38%),
    url("assets/envelope-paper-dark.png");
  box-shadow:
    inset 26px 0 38px rgba(83, 60, 32, 0.13);
}

.envelope-flap-right::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(225deg, transparent 0 48.6%, rgba(69, 51, 29, 0.13) 49.8%, rgba(255, 255, 255, 0.08) 50.7%, transparent 52% 100%);
  opacity: 0.66;
}

.envelope-flap-bottom {
  z-index: 5;
  top: auto;
  bottom: 0;
  height: 50%;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
  background-image:
    linear-gradient(0deg, rgba(255, 255, 255, 0.16), transparent 52%),
    url("assets/envelope-paper-light.png");
  box-shadow:
    0 -15px 30px rgba(80, 59, 32, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.envelope-flap-bottom::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -1px;
  width: 2px;
  height: 76%;
  background: linear-gradient(0deg, transparent, rgba(76, 57, 33, 0.14));
  transform: translateX(-50%);
  opacity: 0.46;
}

.envelope-content {
  position: relative;
  z-index: 8;
  width: min(640px, calc(100% - 40px));
  min-height: 560px;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 3.4vh, 34px);
  text-align: center;
  transform: translateY(8px);
  transition:
    opacity 0.55s ease,
    transform 0.85s ease,
    filter 0.55s ease;
}

.envelope-title {
  margin: 0;
  max-width: none;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 5vw, 74px);
  line-height: 0.88;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: -0.05em;
  color: #141414;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18);
}

.wax-seal {
  position: relative;
  width: 174px;
  height: 174px;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 18px 28px rgba(64, 15, 25, 0.28));
  transition:
    transform 0.25s ease,
    filter 0.25s ease,
    opacity 0.35s ease;
  -webkit-tap-highlight-color: transparent;
}

.wax-seal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("assets/wax-seal.png") center / contain no-repeat;
  mix-blend-mode: multiply;
}

.wax-seal::after {
  content: "";
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(105, 10, 36, 0.10), rgba(105, 10, 36, 0.03) 62%, transparent 72%);
  pointer-events: none;
}

.wax-seal:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 24px 34px rgba(64, 15, 25, 0.32));
}

.wax-seal:active {
  transform: scale(0.98);
}

.wax-seal span {
  position: relative;
  z-index: 2;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 29px;
  line-height: 1;
  font-weight: 500;
  color: #e1c4a5;
  text-shadow:
    0 1px 1px rgba(55, 8, 20, 0.42),
    0 0 10px rgba(70, 8, 22, 0.20);
  transform: translateY(2px);
  pointer-events: none;
}

.envelope-note {
  margin: 0;
  max-width: 448px;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.62;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #1f1b18;
}

.envelope-screen.is-opening .envelope-flap-top {
  transform: rotateX(84deg) translateY(-42%);
  opacity: 0.62;
  filter: brightness(1.03);
}

.envelope-screen.is-opening .envelope-flap-left {
  transform: translateX(-42%);
  opacity: 0.28;
}

.envelope-screen.is-opening .envelope-flap-right {
  transform: translateX(42%);
  opacity: 0.28;
}

.envelope-screen.is-opening .envelope-flap-bottom {
  transform: translateY(34%);
  opacity: 0.34;
}

.envelope-screen.is-opening .envelope-content {
  opacity: 0;
  transform: translateY(-26px) scale(0.985);
  filter: blur(0.4px);
}

.envelope-screen.is-opening .wax-seal {
  transform: scale(0.55);
  opacity: 0;
}

/* HERO */

.hero {
  position: relative;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 24px;
  max-width: 760px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(58px, 8vw, 108px);
  line-height: 0.9;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.couple-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.couple-title .amp {
  font-size: 0.44em;
  line-height: 0.75;
  font-weight: 400;
  opacity: 0.95;
}

.hero-date {
  margin: 30px 0 0;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: clamp(18px, 2.2vw, 27px);
  font-weight: 500;
  letter-spacing: 0.08em;
}

.scroll-down {
  position: absolute;
  z-index: 2;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  text-decoration: none;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 34px;
  font-weight: 400;
  animation: bounce 1.8s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translate(-50%, 0);
  }

  50% {
    transform: translate(-50%, 10px);
  }
}

/* GENERAL */

.section {
  padding: 110px 24px;
}

.small-title {
  margin: 0 0 18px;
  font-family: "Montserrat", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  font-size: 12px;
  font-weight: 500;
  color: #6f7865;
  text-align: center;
}

.section h2 {
  margin: 0 0 24px;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 5vw, 66px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
}

.section h3 {
  margin: 0 0 14px;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 600;
}

.section p {
  margin: 0 auto;
  max-width: 680px;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* PROGRAM */

.program {
  background: #ede6dc;
  text-align: center;
}

.timeline {
  max-width: 860px;
  margin: 62px auto 0;
}

.timeline-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 36px;
  align-items: start;
  padding: 44px 0;
  border-bottom: 1px solid rgba(22, 22, 22, 0.14);
  text-align: left;
}

.timeline-item:first-child {
  padding-top: 18px;
}

.timeline-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.timeline-item span {
  width: 78px;
  height: 78px;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(111, 120, 101, 0.45);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #5f6957;
}

.timeline-content h3 {
  margin: 0 0 14px;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 43px;
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #111;
}

.timeline-content p {
  margin: 0;
  max-width: none;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #1f1f1f;
}

.map-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
  min-height: 44px;
  padding: 0 24px;
  border: 1px solid rgba(22, 22, 22, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  color: #161616;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 13px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: 0.25s ease;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.04);
}

.map-button:hover {
  background: #161616;
  border-color: #161616;
  color: #fff;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
}

/* DRESS CODE */

.dress-code {
  text-align: center;
  background: #fff;
}

.dress-code p {
  max-width: 720px;
  margin-bottom: 56px;
}

.dress-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px;
  max-width: 1000px;
  margin: 0 auto;
}

.dress-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  background: #f3f3f3;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.05);
}

/* WISHES */

.wishes {
  margin: 0;
  max-width: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 420px));
  justify-content: center;
  gap: 24px;
  background-image:
    linear-gradient(rgba(248, 245, 240, 0.45), rgba(248, 245, 240, 0.54)),
    url("assets/rings.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.wishes-heading {
  grid-column: 1 / -1;
  text-align: center;
}

.wish-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 32px;
  padding: 42px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.07);
}

.wish-card-wide {
  grid-column: 1 / -1;
  width: min(420px, 100%);
  justify-self: center;
}

.wish-card h3 {
  margin: 0 0 18px;
  font-size: 36px;
  font-weight: 600;
}

.wish-card p {
  margin: 0;
  max-width: none;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* RSVP */

.rsvp-section {
  background: #dfe4d6;
}

.rsvp-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 36px;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.08);
}

.rsvp-card h2,
.rsvp-card .rsvp-text {
  text-align: center;
}

.rsvp-text {
  max-width: 480px;
  margin-bottom: 34px !important;
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
}

.rsvp-form {
  margin-top: 34px;
}

.rsvp-form label {
  display: block;
  margin-bottom: 22px;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  font-weight: 500;
  color: #2b2b2b;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  margin-top: 10px;
  padding: 16px 18px;
  border: 1px solid #d8d1c8;
  border-radius: 18px;
  background: #fbfaf8;
  color: #161616;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 400;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  border-color: #6f7865;
  box-shadow: 0 0 0 4px rgba(111, 120, 101, 0.08);
  background: #fff;
}

.rsvp-form textarea {
  min-height: 120px;
  resize: vertical;
}

.rsvp-form button {
  width: 100%;
  min-height: 54px;
  margin-top: 8px;
  border: 1px solid #161616;
  border-radius: 999px;
  background: #161616;
  color: #fff;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: 0.25s ease;
}

.rsvp-form button:hover {
  background: #6f7865;
  border-color: #6f7865;
}

/* FINAL */

.final {
  text-align: center;
  background: #f8f5f0;
  padding-top: 120px;
  padding-bottom: 120px;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 18px;
  max-width: 640px;
  margin: 34px auto 54px;
}

.countdown-item {
  padding: 24px 14px;
  border: 1px solid rgba(111, 120, 101, 0.22);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.04);
}

.countdown-item span {
  display: block;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 46px;
  line-height: 1;
  font-weight: 600;
  color: #161616;
}

.countdown-item p {
  margin: 10px 0 0;
  max-width: none;
  font-family: "Montserrat", Arial, sans-serif;
  font-size: 12px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6f7865;
}

.final h2 {
  margin-bottom: 22px;
}

.final-names {
  max-width: none;
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif !important;
  font-size: 28px !important;
  line-height: 1.2 !important;
  font-weight: 500 !important;
}

/* ANIMATION */

.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* TABLET */

@media (max-width: 1024px) {
  .envelope-title {
    font-size: clamp(42px, 7vw, 68px);
  }

  .dress-grid {
    gap: 22px;
  }

  .section {
    padding-left: 22px;
    padding-right: 22px;
  }
}

/* MOBILE */

@media (max-width: 800px) {
  .envelope-screen {
    min-height: 100svh;
  }

  .envelope-content {
    width: min(390px, calc(100% - 34px));
    min-height: 100svh;
    padding: 92px 0 64px;
    gap: 24px;
    transform: translateY(0);
  }

  .envelope-title {
    font-size: clamp(38px, 12vw, 58px);
    line-height: 0.9;
    letter-spacing: -0.052em;
  }

  .wax-seal {
    width: clamp(132px, 38vw, 150px);
    height: clamp(132px, 38vw, 150px);
  }

  .wax-seal span {
    font-size: clamp(22px, 6.2vw, 25px);
  }

  .envelope-note {
    max-width: 310px;
    font-size: 12px;
    line-height: 1.6;
    letter-spacing: 0.025em;
  }

  .envelope-flap-top {
    height: 62%;
  }

  .envelope-flap-bottom {
    height: 52%;
  }

  .hero {
    height: 100svh;
    min-height: 640px;
  }

  .hero-content {
    padding: 20px;
  }

  .hero h1 {
    font-size: clamp(54px, 17vw, 82px);
    font-weight: 500;
  }

  .hero-date {
    margin-top: 26px;
    font-size: 16px;
    font-weight: 500;
  }

  .scroll-down {
    bottom: 22px;
    font-size: 30px;
  }

  .section {
    padding: 78px 18px;
  }

  .small-title {
    margin-bottom: 14px;
    font-size: 11px;
    letter-spacing: 0.26em;
  }

  .section h2 {
    font-size: clamp(38px, 12vw, 54px);
    font-weight: 600;
  }

  .section h3 {
    font-size: 30px;
  }

  .section p {
    font-size: 16px;
    line-height: 1.7;
  }

  .timeline {
    margin-top: 46px;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 34px 0;
    text-align: center;
  }

  .timeline-item:first-child {
    padding-top: 10px;
  }

  .timeline-item span {
    width: 66px;
    height: 66px;
    margin: 0 auto;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
  }

  .timeline-content h3 {
    font-size: 32px;
    line-height: 1.05;
    font-weight: 600;
    text-align: center;
  }

  .timeline-content p {
    font-size: 16px;
    line-height: 1.7;
    font-weight: 400;
    text-align: center;
  }

  .map-button {
    min-height: 44px;
    padding: 0 22px;
  }

  .dress-code p {
    margin-bottom: 38px;
  }

  .dress-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    max-width: 420px;
  }

  .dress-grid img {
    border-radius: 14px;
  }

  .wishes {
    grid-template-columns: 1fr;
    gap: 18px;
    background-position: center;
  }

  .wish-card,
  .wish-card-wide {
    width: 100%;
    grid-column: auto;
    padding: 32px 24px;
    border-radius: 28px;
  }

  .wish-card h3 {
    font-size: 31px;
    font-weight: 600;
  }

  .wish-card p {
    font-size: 16px;
    line-height: 1.7;
    font-weight: 400;
  }

  .rsvp-card {
    padding: 38px 22px;
    border-radius: 28px;
  }

  .rsvp-form {
    margin-top: 28px;
  }

  .rsvp-form label {
    margin-bottom: 20px;
    font-size: 13px;
  }

  .rsvp-form input,
  .rsvp-form select,
  .rsvp-form textarea {
    margin-top: 9px;
    padding: 15px 16px;
    border-radius: 16px;
    font-size: 16px;
  }

  .rsvp-form button {
    min-height: 54px;
  }

  .final {
    padding-top: 86px;
    padding-bottom: 88px;
  }

  .countdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 30px auto 48px;
  }

  .countdown-item {
    padding: 22px 12px;
    border-radius: 24px;
  }

  .countdown-item span {
    font-size: 40px;
  }

  .countdown-item p {
    font-size: 11px;
  }

  .final-names {
    font-size: 25px !important;
  }
}

/* SMALL MOBILE */

@media (max-width: 420px) {
  .envelope-content {
    width: calc(100% - 28px);
    padding-top: 78px;
    padding-bottom: 56px;
  }

  .envelope-title {
    font-size: clamp(36px, 12.4vw, 50px);
  }

  .envelope-note {
    max-width: 286px;
    font-size: 11.5px;
  }

  .section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .rsvp-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .wish-card {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .envelope-flap,
  .envelope-content,
  .wax-seal,
  .fade-in,
  .scroll-down {
    transition: none !important;
    animation: none !important;
  }
}
/* ENVELOPE FINAL TUNING — paste at the very end of style.css */

/* чуть мягче общий тон, чтобы бумага не была слишком белой снизу */
.envelope-screen {
  background:
    linear-gradient(rgba(218, 204, 181, 0.62), rgba(207, 191, 166, 0.70)),
    url("assets/envelope-paper-light.png");
  background-size: cover;
  background-position: center;
}

/* делаем центральную бумагу теплее и дороже */
.envelope-paper {
  filter: saturate(0.92) contrast(1.04) brightness(0.97);
}

/* боковые клапаны чуть светлее, чтобы не выглядели тяжелыми пятнами */
.envelope-flap-left,
.envelope-flap-right {
  opacity: 0.92;
  filter: brightness(1.03) saturate(0.92);
}

/* нижний клапан меньше выбивается белым */
.envelope-flap-bottom {
  filter: brightness(0.94) saturate(0.92);
}

/* заголовок чуть ниже и компактнее */
.envelope-content {
  transform: translateY(18px);
  gap: 28px;
}

.envelope-title {
  font-size: clamp(42px, 4.7vw, 70px);
  line-height: 0.88;
}

/* печать была визуально маленькая из-за прозрачных полей PNG — увеличиваем контейнер */
.wax-seal {
  width: 228px;
  height: 228px;
  margin-top: -4px;
  margin-bottom: -2px;
  filter: drop-shadow(0 19px 27px rgba(64, 15, 25, 0.30));
}

.wax-seal span {
  font-size: 31px;
  color: #e4c7a9;
}

/* нижний текст немного ближе к печати */
.envelope-note {
  margin-top: -4px;
  max-width: 460px;
  font-size: 14px;
  line-height: 1.58;
}

/* раскрытие сохраняем плавным */
.envelope-screen.is-opening .envelope-content {
  transform: translateY(-22px) scale(0.985);
}

/* mobile tuning */
@media (max-width: 800px) {
  .envelope-content {
    transform: translateY(0);
    gap: 23px;
  }

  .envelope-title {
    font-size: clamp(36px, 11.4vw, 56px);
  }

  .wax-seal {
    width: clamp(176px, 50vw, 206px);
    height: clamp(176px, 50vw, 206px);
    margin-top: -2px;
    margin-bottom: -4px;
  }

  .wax-seal span {
    font-size: clamp(24px, 7vw, 29px);
  }

  .envelope-note {
    max-width: 315px;
    font-size: 12px;
    line-height: 1.58;
  }
}

@media (max-width: 420px) {
  .wax-seal {
    width: clamp(164px, 52vw, 188px);
    height: clamp(164px, 52vw, 188px);
  }

  .wax-seal span {
    font-size: clamp(23px, 7vw, 27px);
  }
}
