/* ==========================================================================
   Josefine & Johannes — Save the Date
   Pure CSS3 · 100dvh Single-Viewport · GPU-Only Animations
   ========================================================================== */

:root {
  /* Required Palette */
  --navy: #1B314E;
  --navy-soft: rgba(27, 49, 78, 0.78);
  --navy-muted: rgba(27, 49, 78, 0.55);
  --sage: #9AA892;
  --sage-deep: #6E8068;
  --peach: #F59467;
  --peach-soft: rgba(245, 148, 103, 0.22);
  --ivory: #F4EFE6;
  --ivory-card: rgba(244, 239, 230, 0.76);

  /* Typography */
  --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--ivory);
  color: var(--navy);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.sr-only-svg {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ==========================================================================
   Envelope Intro Overlay (Click-to-Open · Silky GPU-Only 3D Reveal)
   ========================================================================== */
.envelope-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 40px);
  background:
    radial-gradient(circle at 18% 18%, rgba(245, 148, 103, 0.2) 0%, rgba(245, 148, 103, 0) 46%),
    radial-gradient(circle at 82% 82%, rgba(154, 168, 146, 0.26) 0%, rgba(154, 168, 146, 0) 48%),
    linear-gradient(155deg, #F8F4EC 0%, #F4EFE6 52%, #EDE5D7 100%);
  cursor: pointer;
  user-select: none;
  outline: none;
  opacity: 1;
  will-change: opacity;
  transition: opacity 0.65s cubic-bezier(0.33, 1, 0.68, 1) 1.05s;
}

.envelope-intro__frame {
  position: absolute;
  inset: clamp(8px, 1.5dvh, 20px);
  border: 1px solid rgba(27, 49, 78, 0.14);
  border-radius: 4px;
  pointer-events: none;
}

.envelope-intro__frame::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(154, 168, 146, 0.25);
  border-radius: 2px;
}

.envelope-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 3dvh, 28px);
  will-change: transform, opacity;
  transition:
    transform 0.72s cubic-bezier(0.32, 0.08, 0.24, 1) 0.98s,
    opacity 0.6s ease 1.02s;
}

.envelope-scene {
  position: relative;
  width: min(86vw, 450px);
  aspect-ratio: 440 / 300;
  perspective: 1500px;
}

.envelope {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  filter: drop-shadow(0 20px 36px rgba(27, 49, 78, 0.15));
}

.envelope__svg {
  display: block;
  width: 100%;
  height: 100%;
}

.envelope__back,
.envelope__front {
  position: absolute;
  inset: 0;
  border-radius: 5px;
  overflow: hidden;
}

.envelope__back {
  z-index: 1;
}

.envelope__card {
  position: absolute;
  left: 6.5%;
  right: 6.5%;
  top: 8%;
  bottom: 10%;
  z-index: 2;
  padding: 8px;
  background: linear-gradient(180deg, #FCF9F4 0%, #F4EFE6 100%);
  border: 1px solid rgba(27, 49, 78, 0.16);
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(27, 49, 78, 0.08);
  will-change: transform;
  transition: transform 0.62s cubic-bezier(0.22, 1, 0.36, 1) 0.56s;
}

.envelope__card-border {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(154, 168, 146, 0.42);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 11%;
  gap: 4px;
}

.envelope__card-eyebrow {
  font-size: clamp(0.48rem, 1.35vw, 0.62rem);
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--peach);
}

.envelope__card-names {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 4.1vw, 1.8rem);
  font-weight: 500;
  line-height: 1.05;
  color: var(--navy);
}

.envelope__card-date {
  font-family: var(--font-serif);
  font-size: clamp(0.75rem, 2.2vw, 0.96rem);
  letter-spacing: 0.06em;
  color: var(--navy-soft);
}

.envelope__front {
  z-index: 3;
}

.envelope__flap-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 58.66%;
  z-index: 4;
  transform-origin: top center;
  transform-style: preserve-3d;
  will-change: transform;
  transition:
    transform 0.74s cubic-bezier(0.37, 0, 0.2, 1) 0.16s,
    z-index 0s linear 0.48s;
}

.envelope__flap-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.envelope__flap-face--back {
  transform: rotateX(180deg);
}

.wax-seal {
  position: absolute;
  left: 50%;
  top: 54%;
  z-index: 5;
  width: clamp(74px, 21%, 96px);
  aspect-ratio: 1 / 1;
  transform: translate3d(-50%, -50%, 2px) scale(1);
  will-change: transform, opacity;
  transition:
    opacity 0.3s ease-out 0s,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1) 0s;
}

.envelope-intro:not(.is-opening):hover .wax-seal,
.envelope-intro:not(.is-opening):focus-visible .wax-seal {
  transform: translate3d(-50%, -50%, 2px) scale(1.05);
}

.wax-seal__svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Silky 4-Stage Opening Choreography */
.envelope-intro.is-opening {
  opacity: 0;
  pointer-events: none;
}

.envelope-intro.is-opening .wax-seal {
  opacity: 0;
  transform: translate3d(-50%, -50%, 2px) scale(1.1);
}

.envelope-intro.is-opening .envelope__flap-wrap {
  transform: rotateX(178deg);
  z-index: 1;
}

.envelope-intro.is-opening .envelope__card {
  transform: translate3d(0, -34%, 0);
}

.envelope-intro.is-opening .envelope-stage {
  transform: translate3d(0, 10dvh, 0) scale(0.96);
  opacity: 0;
}

.envelope-intro.is-done {
  display: none;
  pointer-events: none;
}

/* Subtle zoom-in reveal on the underlying invitation */
body.intro-active .invitation-viewport {
  transform: scale(0.98);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.96s;
  will-change: transform;
}

body.intro-revealing .invitation-viewport {
  transform: scale(1);
}

/* ==========================================================================
   Main Single-Viewport Canvas
   ========================================================================== */
.invitation-viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2.2dvh, 30px) clamp(14px, 3vw, 44px);
  isolation: isolate;
}

/* Warm Summer Botanical Background Gradient */
.bg-atmosphere {
  position: absolute;
  inset: 0;
  z-index: -4;
  background:
    radial-gradient(circle at 12% 14%, rgba(245, 148, 103, 0.24) 0%, rgba(245, 148, 103, 0) 44%),
    radial-gradient(circle at 88% 84%, rgba(154, 168, 146, 0.28) 0%, rgba(154, 168, 146, 0) 46%),
    radial-gradient(circle at 86% 16%, rgba(242, 207, 141, 0.22) 0%, rgba(242, 207, 141, 0) 40%),
    radial-gradient(circle at 14% 86%, rgba(245, 148, 103, 0.16) 0%, rgba(245, 148, 103, 0) 42%),
    linear-gradient(155deg, #F8F4EC 0%, #F4EFE6 52%, #EFE7DA 100%);
}

/* ==========================================================================
   Subtle Aegidienkirche Engraving Watermark (Static)
   ========================================================================== */
.church-watermark {
  position: absolute;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  overflow: hidden;
  -webkit-mask-image: radial-gradient(
    ellipse 86% 78% at 50% 56%,
    rgba(0, 0, 0, 1) 35%,
    rgba(0, 0, 0, 0.5) 68%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: radial-gradient(
    ellipse 86% 78% at 50% 56%,
    rgba(0, 0, 0, 1) 35%,
    rgba(0, 0, 0, 0.5) 68%,
    rgba(0, 0, 0, 0) 100%
  );
}

.church-watermark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 35% bottom;
  mix-blend-mode: multiply;
  opacity: 0.12;
  filter: contrast(1.06);
  user-select: none;
}

/* ==========================================================================
   Fine Stationery Inner Frame & Corner Botanicals
   ========================================================================== */
.stationery-frame {
  position: absolute;
  inset: clamp(8px, 1.5dvh, 20px);
  z-index: -1;
  border: 1px solid rgba(27, 49, 78, 0.14);
  border-radius: 4px;
  pointer-events: none;
}

.stationery-frame::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(154, 168, 146, 0.25);
  border-radius: 2px;
}

.corner-floral {
  position: absolute;
  z-index: -2;
  width: clamp(108px, 22vw, 240px);
  height: auto;
  pointer-events: none;
  opacity: 0.88;
}

.corner-floral--tl {
  top: -6px;
  left: -6px;
}

.corner-floral--br {
  right: -6px;
  bottom: -6px;
}

/* ==========================================================================
   Compact Language Switcher (DE / EN / PL)
   ========================================================================== */
.lang-switcher {
  position: absolute;
  top: clamp(16px, 2.5dvh, 30px);
  right: clamp(16px, 2.6vw, 32px);
  z-index: 20;
  font-family: var(--font-sans);
}

.lang-switcher__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px 5px 8px;
  background: rgba(244, 239, 230, 0.88);
  color: var(--navy);
  border: 1px solid rgba(27, 49, 78, 0.22);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.lang-switcher__toggle:hover,
.lang-switcher__toggle:focus-visible {
  background: var(--ivory);
  border-color: rgba(27, 49, 78, 0.45);
  outline: none;
}

.lang-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 12px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 0.5px rgba(27, 49, 78, 0.18);
  flex-shrink: 0;
}

.lang-flag svg {
  display: block;
  width: 100%;
  height: 100%;
}

.lang-code {
  min-width: 1.5em;
  text-align: center;
}

.lang-chevron {
  color: var(--navy-soft);
  transition: transform 0.2s ease;
}

.lang-switcher__toggle[aria-expanded="true"] .lang-chevron {
  transform: rotate(180deg);
}

.lang-switcher__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 122px;
  list-style: none;
  padding: 4px;
  background: rgba(248, 244, 236, 0.97);
  border: 1px solid rgba(27, 49, 78, 0.18);
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(27, 49, 78, 0.12);
  transform-origin: top right;
  animation: langMenuFade 0.16s ease-out;
}

.lang-switcher__menu[hidden] {
  display: none;
}

@keyframes langMenuFade {
  from {
    opacity: 0;
    transform: translate3d(0, -4px, 0) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  background: transparent;
  color: var(--navy);
  border: none;
  border-radius: 7px;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-option:hover,
.lang-option:focus-visible {
  background: rgba(154, 168, 146, 0.2);
  outline: none;
}

.lang-option.is-active {
  background: rgba(245, 148, 103, 0.18);
  font-weight: 600;
  color: var(--navy);
}

/* ==========================================================================
   Floating Summer Petals (10 Lightweight GPU-Only SVG Elements)
   ========================================================================== */
.petals-layer {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -8%;
  width: clamp(10px, 1.3vw, 17px);
  height: auto;
  opacity: 0;
  will-change: transform, opacity;
  animation-name: petalDrift;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

.petal--1  { left: 6%;  animation-duration: 17s; animation-delay: -2s;  }
.petal--2  { left: 16%; animation-duration: 21s; animation-delay: -9s;  }
.petal--3  { left: 27%; animation-duration: 19s; animation-delay: -5s;  }
.petal--4  { left: 38%; animation-duration: 23s; animation-delay: -14s; }
.petal--5  { left: 51%; animation-duration: 18s; animation-delay: -7s;  }
.petal--6  { left: 62%; animation-duration: 22s; animation-delay: -11s; }
.petal--7  { left: 73%; animation-duration: 20s; animation-delay: -3s;  }
.petal--8  { left: 84%; animation-duration: 16s; animation-delay: -12s; }
.petal--9  { left: 92%; animation-duration: 24s; animation-delay: -6s;  }
.petal--10 { left: 45%; animation-duration: 25s; animation-delay: -18s; }

@keyframes petalDrift {
  0% {
    transform: translate3d(0, -5dvh, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.55;
  }
  50% {
    transform: translate3d(28px, 50dvh, 0) rotate(170deg);
    opacity: 0.48;
  }
  90% {
    opacity: 0.42;
  }
  100% {
    transform: translate3d(-16px, 108dvh, 0) rotate(340deg);
    opacity: 0;
  }
}

/* ==========================================================================
   Main Content Layout — Mobile First (Compact Vertical Stack)
   ========================================================================== */
.invitation-grid {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1120px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.35dvh, 16px);
  text-align: center;
}

.heading-block--desktop {
  display: none;
}

.heading-block--mobile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2px, 0.4dvh, 5px);
}

.eyebrow {
  font-size: clamp(0.62rem, 1.4dvh, 0.82rem);
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--peach);
  padding-left: 0.34em;
}

.couple-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.85rem, min(5dvh, 8.5vw), 3.85rem);
  line-height: 1.02;
  letter-spacing: 0.015em;
  color: var(--navy);
}

.couple-title .ampersand {
  font-style: italic;
  font-weight: 400;
  color: var(--peach);
  padding: 0 0.04em;
}

.subtitle {
  font-size: clamp(0.7rem, 1.45dvh, 0.92rem);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy-soft);
}

/* ==========================================================================
   Gothic Stone Arch & Couple Photo Stage
   ========================================================================== */
.arch-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 1;
  min-height: 0;
}

.arch-wrapper {
  position: relative;
  aspect-ratio: 420 / 530;
  /* Carefully scaled so mobile 375x667 & 390x844 always fit with zero scroll */
  height: clamp(190px, 42.5dvh, 380px);
  max-width: min(76vw, 310px);
}

/* Inner photo container matched exactly to the SVG arch opening:
   x: 74..346 / 420 -> left: 17.62%, width: 64.76%
   y: 56..465 / 530 -> top: 10.57%, height: 77.17% */
.arch-photo-mask {
  position: absolute;
  left: 17.62%;
  top: 10.57%;
  width: 64.76%;
  height: 77.17%;
  overflow: hidden;
  clip-path: url(#gothic-arch-clip);
  background-color: #2A2E35;
}

.couple-photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  /* Centered gracefully on Josefine & Johannes; slight scale frames faces larger and crops out the far-right guest hand */
  object-position: 47% 40%;
  transform: scale(1.16);
  transform-origin: 45% 42%;
  user-select: none;
}

.arch-svg {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  pointer-events: none;
}

/* Gentle Summer Breeze Sway on Botanical Groups (GPU transform only) */
.sway-corner-tl {
  transform-origin: 0px 0px;
  animation: gentleSway 7.5s ease-in-out infinite alternate;
}

.sway-corner-br {
  transform-origin: 260px 260px;
  animation: gentleSway 8.5s ease-in-out infinite alternate-reverse;
}

.sway-arch-top {
  transform-origin: 110px 64px;
  animation: subtleLeafSway 6.2s ease-in-out infinite alternate;
}

.sway-arch-right {
  transform-origin: 364px 160px;
  animation: subtleLeafSway 5.8s ease-in-out infinite alternate-reverse;
}

.sway-arch-bl {
  transform-origin: 50px 468px;
  animation: subtleLeafSway 6.8s ease-in-out infinite alternate;
}

.sway-arch-br {
  transform-origin: 350px 482px;
  animation: subtleLeafSway 7.2s ease-in-out infinite alternate-reverse;
}

@keyframes gentleSway {
  0%   { transform: rotate(-1.5deg); }
  100% { transform: rotate(1.5deg); }
}

@keyframes subtleLeafSway {
  0%   { transform: rotate(-1.2deg); }
  100% { transform: rotate(1.2deg); }
}

/* ==========================================================================
   Hidden Black Cat Easter Egg Interactivity (Peeking Behind Stone Arch)
   ========================================================================== */
.black-cat {
  pointer-events: auto;
  cursor: pointer;
  outline: none;
}

.cat-peek {
  transform-origin: 378px 425px;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.cat-ear-right {
  transform-origin: 394px 384px;
}

.cat-tail {
  transform-origin: 376px 452px;
}

.cat-eyes {
  transform-origin: 388.5px 391.8px;
}

.cat-heart {
  opacity: 0;
  transform-origin: 393px 368px;
  transform: translate3d(0, 6px, 0) scale(0.6);
  pointer-events: none;
}

/* Peek out a little further on hover, keyboard focus, or tap */
.black-cat:hover .cat-peek,
.black-cat:focus-visible .cat-peek,
.black-cat.is-petted .cat-peek {
  transform: translate3d(7px, -1px, 0) rotate(2.5deg);
}

.black-cat:hover .cat-tail,
.black-cat:focus-visible .cat-tail,
.black-cat.is-petted .cat-tail {
  animation: catTailWag 0.9s ease-in-out 2;
}

.black-cat:hover .cat-ear-right,
.black-cat:focus-visible .cat-ear-right,
.black-cat.is-petted .cat-ear-right {
  animation: catEarTwitch 0.55s ease-in-out 1;
}

.black-cat.is-petted .cat-eyes {
  animation: catHappyBlink 0.45s ease-in-out 1;
}

.black-cat.is-petted .cat-heart {
  animation: catHeartFloat 1.25s ease-out 1;
}

@keyframes catTailWag {
  0%, 100% { transform: rotate(0deg); }
  25%      { transform: rotate(9deg); }
  75%      { transform: rotate(-7deg); }
}

@keyframes catEarTwitch {
  0%, 100% { transform: rotate(0deg); }
  30%      { transform: rotate(11deg); }
  60%      { transform: rotate(-4deg); }
  80%      { transform: rotate(6deg); }
}

@keyframes catHappyBlink {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(0.12); }
}

@keyframes catHeartFloat {
  0% {
    opacity: 0;
    transform: translate3d(0, 6px, 0) scale(0.6);
  }
  25% {
    opacity: 0.95;
    transform: translate3d(0, -4px, 0) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: translate3d(0, -18px, 0) scale(0.9);
  }
}

/* ==========================================================================
   Editorial Info Column (Date, Countdown, Note)
   ========================================================================== */
.details-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 1.35dvh, 18px);
  max-width: min(92vw, 460px);
}

.floral-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(70%, 240px);
}

.floral-divider__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(154, 168, 146, 0.75), transparent);
}

.floral-divider__icon {
  width: clamp(26px, 4dvh, 36px);
  height: auto;
  flex-shrink: 0;
}

.date-location {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45em;
  font-family: var(--font-serif);
  font-size: clamp(1.18rem, 2.5dvh, 1.72rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--navy);
}

.dot-sep {
  color: var(--peach);
  font-weight: 600;
}

/* Live Countdown */
.countdown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 1.2vw, 10px);
  padding: clamp(6px, 1.1dvh, 12px) clamp(10px, 2.2vw, 20px);
  background: var(--ivory-card);
  border: 1px solid rgba(27, 49, 78, 0.13);
  border-radius: 10px;
}

.countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: clamp(44px, 11vw, 68px);
}

.countdown__value {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3.1dvh, 2.15rem);
  font-weight: 600;
  line-height: 1.05;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.countdown__label {
  margin-top: 2px;
  font-size: clamp(0.54rem, 1.05dvh, 0.68rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage-deep);
}

.countdown__sep {
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 2.4dvh, 1.6rem);
  color: var(--peach);
  opacity: 0.85;
  transform: translateY(-0.22em);
}

/* Note Text */
.note-text {
  font-size: clamp(0.72rem, 1.48dvh, 0.92rem);
  line-height: 1.5;
  font-weight: 400;
  color: var(--navy-soft);
  max-width: 39ch;
  text-wrap: balance;
}

/* ==========================================================================
   Desktop Balanced Two-Column Stationery Layout
   ========================================================================== */
@media (min-width: 860px) and (min-height: 520px) {
  .invitation-grid {
    display: grid;
    grid-template-columns: auto minmax(340px, 490px);
    align-items: center;
    justify-content: center;
    gap: clamp(32px, 5vw, 76px);
    padding: 0 clamp(12px, 2vw, 28px);
  }

  .heading-block--mobile {
    display: none;
  }

  .heading-block--desktop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(6px, 1dvh, 12px);
  }

  .arch-wrapper {
    height: min(74dvh, 42vw / 0.7924, 620px);
    max-width: none;
  }

  .details-column {
    gap: clamp(14px, 2.3dvh, 24px);
    max-width: 490px;
  }

  .couple-title {
    font-size: clamp(2.8rem, 5.4vw, 4.15rem);
  }

  .subtitle {
    font-size: clamp(0.8rem, 1.1vw, 0.95rem);
  }

  .date-location {
    font-size: clamp(1.45rem, 2vw, 1.85rem);
  }

  .countdown {
    padding: 14px 22px;
    gap: 10px;
  }

  .countdown__item {
    min-width: 68px;
  }

  .countdown__value {
    font-size: clamp(1.85rem, 2.8vw, 2.3rem);
  }

  .countdown__label {
    font-size: 0.68rem;
  }

  .note-text {
    font-size: clamp(0.86rem, 1.15vw, 0.96rem);
    line-height: 1.62;
    max-width: 41ch;
  }
}

/* Ultra-compact mobile screens (e.g., short viewports < 620px height) */
@media (max-width: 859px) and (max-height: 620px) {
  .arch-wrapper {
    height: 37dvh;
  }
  .invitation-grid,
  .details-column {
    gap: 5px;
  }
  .note-text {
    font-size: 0.68rem;
    line-height: 1.38;
  }
}

/* ==========================================================================
   Accessibility: Respect Prefers-Reduced-Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .petal,
  .sway-corner-tl,
  .sway-corner-br,
  .sway-arch-top,
  .sway-arch-right,
  .sway-arch-bl,
  .sway-arch-br,
  .black-cat:hover .cat-peek,
  .black-cat:focus-visible .cat-peek,
  .black-cat.is-petted .cat-peek,
  .black-cat:hover .cat-tail,
  .black-cat:hover .cat-ear-right,
  .black-cat.is-petted .cat-tail,
  .black-cat.is-petted .cat-ear-right,
  .black-cat.is-petted .cat-eyes,
  .black-cat.is-petted .cat-heart,
  .lang-switcher__menu {
    animation: none !important;
    transition: none !important;
  }

  .petal {
    display: none;
  }

  /* Reduced motion: gentle fade-out only, no 3D flap rotation or zoom */
  .envelope-intro {
    transition: opacity 0.45s ease 0s !important;
  }

  .envelope-stage,
  .envelope-scene,
  .envelope__flap-wrap,
  .envelope__card,
  .wax-seal,
  body.intro-active .invitation-viewport {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }

  .envelope-intro.is-opening .wax-seal {
    transform: translate3d(-50%, -50%, 2px) !important;
    opacity: 1 !important;
  }

  .envelope-intro.is-opening .envelope-stage {
    opacity: 1 !important;
  }
}
