/* ==========================================================================
   Wedding Invite — shared styles
   ========================================================================== */

:root {
  --navy:        #345873;
  --navy-deep:   #23415a;
  --navy-soft:   #4e708c;
  --pill:        #8ca0b0;
  --pill-active: #5c7c96;
  --paper:       #eceef0;
  --cream:       #eae5da;
  --ink:         #2b2b2b;
  --line:        #b9c4cd;

  --container: 1180px;
  --radius: 14px;
  --shadow-soft: 0 10px 30px rgba(52, 88, 115, .10);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image: url("../assets/paper.webp");
  background-size: 700px 700px;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------- nav ---- */
.nav-toggle {
  position: fixed;
  top: 26px; right: 0;
  z-index: 60;
  border: 0; padding: 0; background: none; cursor: pointer;
  width: 108px;
  filter: drop-shadow(0 6px 14px rgba(35, 65, 90, .28));
  transition: transform .25s ease;
}
.nav-toggle:hover { transform: translateX(-4px); }
.nav-toggle img { width: 100%; }

.nav-menu {
  position: fixed;
  top: 96px; right: 24px;
  z-index: 59;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(52, 88, 115, .16);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(35, 65, 90, .22);
  padding: 10px;
  min-width: 210px;
  display: grid;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.nav-menu[data-open="true"] { opacity: 1; visibility: visible; transform: none; }
.nav-menu a {
  display: block;
  padding: 11px 16px;
  border-radius: 9px;
  color: var(--navy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 17px;
  letter-spacing: .04em;
  text-decoration: none;
}
.nav-menu a:hover, .nav-menu a[aria-current="page"] { background: rgba(52, 88, 115, .1); }

/* ---------------------------------------------------------- headings ---- */
.section-title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  color: var(--navy);
  font-size: clamp(34px, 4.2vw, 58px);
  letter-spacing: .01em;
  text-align: center;
  margin: 0;
}
.section-title + .rule { margin-top: 14px; }

.rule {
  width: 148px; height: 1px;
  background: var(--navy);
  opacity: .55;
  margin: 0 auto 46px;
}
.rule--wide { width: 290px; }

section { padding-block: clamp(56px, 7vw, 104px); }

/* ------------------------------------------------------------- hero ----- */
.hero { padding-top: clamp(70px, 9vw, 140px); padding-bottom: clamp(46px, 5vw, 70px); }

/* --------------------------------------------------------------------------
   The envelope is assembled from four layers so the flap can fold in 3D:
     env-top   the flap as drawn, folded back   (revealed once open)
     env-body  card + front pocket + addressee  (always visible)
     env-flap  the same flap, un-foreshortened and masked to the pocket
               opening — this is the piece that rotates
     env-seal  the wax seal, riding on top in both states
   The percentages come from tools/build-envelope-layers.py.
-------------------------------------------------------------------------- */
.envelope {
  position: relative;
  container-type: inline-size;
  width: min(690px, 92%);
  margin-inline: auto;
  aspect-ratio: 915 / 1019;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  perspective: 1600px;
  -webkit-tap-highlight-color: transparent;
}
.envelope > img { position: absolute; left: 0; width: 100%; }

.envelope > img.env__top {
  top: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity .45s ease .34s;
}
.envelope > img.env__body { top: 32.9735%; z-index: 2; }

.envelope > img.env__flap {
  top: 32.62%;
  height: 46.8106%;
  z-index: 4;
  transform-origin: 50% 0;
  transform: rotateX(0deg);
  backface-visibility: hidden;
  transition: transform .95s cubic-bezier(.62, .02, .22, 1);
  filter: drop-shadow(0 12px 16px rgba(35, 65, 90, .24));
}
.envelope > img.env__seal {
  top: 67.8116%;
  left: 41.6393%;
  width: 15.9563%;
  z-index: 5;
  transition: transform .5s ease;
}

.envelope[data-open="true"] .env__flap { transform: rotateX(-180deg); }
.envelope[data-open="true"] .env__top  { opacity: 1; }
.envelope[data-open="true"] .env__seal { transform: translateY(6%) scale(.96); }

.envelope:not([data-open="true"]):hover .env__seal { transform: scale(1.06); }

.envelope__hint {
  position: absolute;
  left: 50%;
  bottom: -2.6rem;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: clamp(12px, 1.1vw, 15px);
  color: var(--navy-soft);
  opacity: .85;
  transition: opacity .3s ease;
  animation: hintPulse 2.6s ease-in-out infinite;
}
.envelope__hint::after { content: "Click to open"; }
@media (hover: none) { .envelope__hint::after { content: "Tap to open"; } }
.envelope[data-open="true"] .envelope__hint { opacity: 0; animation: none; }

@keyframes hintPulse {
  0%, 100% { opacity: .45; }
  50%      { opacity: .95; }
}

/* The artwork ships with a blank card; these lines are the live couple names. */
.envelope__names {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  top: 48.4%;
  height: 19.5%;
  z-index: 3;
  opacity: 0;
  transition: opacity .4s ease .42s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  text-align: center;
  pointer-events: none;
}
.envelope__names b,
.envelope__names i {
  display: block;
  white-space: nowrap;
  line-height: 1;
}
.envelope__names b {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 500;
  color: #2c3f52;
  font-size: 4.4cqw;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.envelope__names i {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  color: #a4842f;
  font-size: 4.6cqw;
}
.envelope__names b:last-child { font-size: 4cqw; }
.envelope[data-open="true"] .envelope__names { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .env__flap, .env__top, .env__seal, .envelope__names { transition-duration: .01ms; }
  .envelope__hint { animation: none; }
}

/* ---------------------------------------------------------- gallery ----- */
.gallery { display: grid; gap: clamp(24px, 4vw, 54px); justify-items: center; }
.gallery img { width: min(1000px, 100%); }

.portraits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 64px);
  justify-items: center;
  width: min(860px, 100%);
  margin-inline: auto;
}
.portrait { margin: 0; text-align: center; }
.portrait img {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #dfe3e7;
  border: 14px solid #fdfdfb;
  border-bottom-width: 52px;
  box-shadow: 0 14px 30px rgba(52, 88, 115, .2);
  transform: rotate(-1.4deg);
}
.portrait:last-child img { transform: rotate(1.6deg); }
.portrait figcaption {
  margin-top: 18px;
  font-family: "Caveat", cursive;
  font-size: clamp(24px, 2.6vw, 36px);
  color: var(--navy);
}

@media (max-width: 560px) {
  .portraits { grid-template-columns: 1fr; }
}

.couple-plate {
  position: relative;
  width: min(560px, 88%);
  margin-inline: auto;
  display: grid;
  place-items: center;
  padding: 34px 46px;
  background: url("../assets/faq-card.webp") center/100% 100% no-repeat;
  filter: drop-shadow(0 8px 18px rgba(52, 88, 115, .16));
}
.couple-plate span {
  font-family: "Caveat", cursive;
  font-size: clamp(34px, 5vw, 62px);
  color: var(--navy);
  text-align: center;
  line-height: 1.1;
}

/* --------------------------------------------------------- timeline ----- */
.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 5vw, 74px) clamp(20px, 4vw, 60px);
  max-width: 980px;
  margin-inline: auto;
}
.timeline__item { text-align: center; }
.timeline__icon {
  --icon-h: clamp(76px, 8vw, 110px);
  height: var(--icon-h);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
/* explicit length, not 100% — percentage heights don't resolve reliably here */
.timeline__icon img, .timeline__icon svg {
  height: var(--icon-h);
  width: auto;
  max-width: 100%;
}
.timeline__icon svg { stroke: var(--navy); fill: none; stroke-width: 4; }
.timeline__time {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  color: var(--navy);
  font-size: clamp(17px, 1.7vw, 22px);
  letter-spacing: .02em;
}
.timeline__label {
  font-style: italic;
  color: var(--navy-soft);
  font-size: clamp(17px, 1.7vw, 22px);
}

/* ------------------------------------------------------ view details ---- */
.view-details { display: block; width: min(760px, 94%); margin: 0 auto; transition: transform .3s ease; }
.view-details:hover { transform: translateY(-6px) rotate(-.6deg); }

/* --------------------------------------------------- save the date ------ */
.savedate {
  position: relative;
  background: url("../assets/floral-band.webp") center/cover no-repeat;
  padding-block: clamp(60px, 8vw, 110px);
  margin-top: clamp(30px, 5vw, 70px);
}
.savedate__title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  color: var(--navy);
  font-size: clamp(30px, 3.6vw, 50px);
  text-align: center;
  margin: 0 0 6px;
  display: flex; align-items: center; justify-content: center; gap: 22px;
}
.savedate__title::before, .savedate__title::after {
  content: ""; height: 1px; width: clamp(40px, 8vw, 120px);
  background: var(--navy); opacity: .5;
}
.savedate__date {
  text-align: center;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: .05em;
  font-size: clamp(19px, 2.2vw, 32px);
  margin: 26px 0 34px;
  text-transform: uppercase;
}

.countdown {
  display: flex; justify-content: center; gap: clamp(12px, 1.8vw, 26px);
  flex-wrap: wrap;
}
.countdown__cell { text-align: center; }
.countdown__box {
  width: clamp(74px, 9vw, 128px);
  height: clamp(74px, 9vw, 128px);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, .55);
  display: grid; place-items: center;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  color: var(--navy);
  font-size: clamp(26px, 3.4vw, 50px);
}
.countdown__unit {
  margin-top: 10px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(12px, 1.2vw, 17px);
  letter-spacing: .14em;
  color: var(--navy);
}

/* -------------------------------------------------------- landscape ----- */
.landscape {
  background: url("../assets/landscape.webp") center top/cover no-repeat;
  padding-block: clamp(70px, 10vw, 150px);
  display: grid; place-items: center;
}
.landscape .envelope-link { width: min(560px, 84%); transition: transform .3s ease; }
.landscape .envelope-link:hover { transform: translateY(-8px) scale(1.015); }

/* ============================================================ DETAILS === */
.venue-lead {
  text-align: center;
  font-family: "Playfair Display", Georgia, serif;
  color: var(--navy);
  font-size: clamp(20px, 2.2vw, 30px);
  line-height: 1.35;
  margin: 0 auto 46px;
  max-width: 560px;
}

.meta-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 48px);
  margin-bottom: clamp(30px, 5vw, 60px);
}
.meta {
  display: flex; align-items: center; gap: 16px;
  color: var(--navy);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(16px, 1.45vw, 21px);
  line-height: 1.5;
}
.meta svg {
  flex: 0 0 auto;
  width: clamp(52px, 4.2vw, 62px);
  height: clamp(52px, 4.2vw, 62px);
  stroke: var(--navy); fill: none; stroke-width: 1.6;
}

/* --------------------------------------------------------- dresscode --- */
.dresscode { display: grid; justify-items: center; gap: 26px; }
.dresscode__icon {
  width: clamp(104px, 11vw, 150px);
  height: clamp(104px, 11vw, 150px);
}
.dresscode__icon svg {
  width: 100%; height: 100%;
  stroke: var(--navy); fill: none;
  stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round;
}
.dresscode__text {
  text-align: center;
  font-family: "Playfair Display", Georgia, serif;
  color: var(--navy);
  font-size: clamp(20px, 2.1vw, 30px);
  line-height: 1.4;
  max-width: 640px;
  margin: 0;
}

/* --------------------------------------------------------- registry ---- */
.registry-wrap { display: grid; place-items: center; }
.registry-wrap a { display: block; }
.registry-wrap img { width: min(620px, 92%); margin-inline: auto; }

/* -------------------------------------------------------------- faq ---- */
.faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 44px);
  max-width: 1000px;
  margin-inline: auto;
}
.faq__card {
  background: url("../assets/faq-card.webp") center/100% 100% no-repeat;
  padding: clamp(28px, 3.4vw, 46px) clamp(30px, 3.6vw, 52px);
  min-height: 230px;
  filter: drop-shadow(0 8px 16px rgba(52, 88, 115, .14));
}
.faq__q {
  font-family: "Caveat", cursive;
  font-weight: 700;
  color: var(--navy);
  font-size: clamp(22px, 2.1vw, 29px);
  margin: 0 0 10px;
}
.faq__a {
  font-family: "Caveat", cursive;
  color: #3a3a3a;
  font-size: clamp(19px, 1.8vw, 25px);
  margin: 0;
  line-height: 1.45;
}

/* =============================================================== RSVP === */
.rsvp-page { padding-bottom: 0; }

.field { margin-bottom: clamp(26px, 3vw, 42px); }

.field__label {
  display: block;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  color: var(--navy);
  font-size: clamp(19px, 1.9vw, 26px);
  margin-bottom: 16px;
}

.input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .5);
  padding: 26px 28px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(16px, 1.5vw, 21px);
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder { color: #8b8b8b; }
.input:focus {
  border-color: var(--navy);
  background: rgba(255, 255, 255, .8);
  box-shadow: 0 0 0 3px rgba(52, 88, 115, .13);
}

.options { display: grid; gap: 18px; }

.option {
  display: flex; align-items: center; gap: 18px;
  background: var(--pill);
  border-radius: var(--radius);
  padding: 26px 30px;
  cursor: pointer;
  position: relative;
  color: #fff;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(16px, 1.5vw, 21px);
  transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
  user-select: none;
}
.option:hover { background: #7d94a6; }
.option input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.option > span { pointer-events: none; }
.option__mark {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border: 2px solid rgba(255, 255, 255, .95);
  border-radius: 50%;
  display: grid; place-items: center;
}
.options--meal .option__mark { border-radius: 6px; }
.options--meal .option__mark::after { border-radius: 3px; }
.option__mark::after {
  content: "";
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  transform: scale(0);
  transition: transform .16s ease;
}
.option input:checked ~ .option__mark::after { transform: scale(1); }
.option:has(input:checked) {
  background: var(--pill-active);
  box-shadow: var(--shadow-soft);
}
.option input:focus-visible ~ .option__mark { box-shadow: 0 0 0 3px rgba(255, 255, 255, .6); }

.guest-block {
  border: 1px dashed rgba(52, 88, 115, .38);
  border-radius: 20px;
  padding: clamp(24px, 3vw, 40px);
  margin-bottom: clamp(24px, 3vw, 38px);
  background: rgba(255, 255, 255, .32);
  animation: rise .34s ease both;
}
.guest-block__title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  color: var(--navy);
  font-size: clamp(20px, 2vw, 28px);
  margin: 0 0 24px;
  display: flex; align-items: center; gap: 14px;
}
.guest-block__title::after {
  content: ""; flex: 1; height: 1px; background: rgba(52, 88, 115, .3);
}

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

[hidden] { display: none !important; }

.submit-wrap {
  background: url("../assets/landscape.webp") center top/cover no-repeat;
  margin-top: clamp(40px, 6vw, 80px);
  padding-block: clamp(60px, 8vw, 110px);
  display: grid; place-items: center; gap: 30px;
}
.submit-btn {
  border: 0; background: none; padding: 0; cursor: pointer;
  width: clamp(230px, 26vw, 340px);
  transition: transform .25s ease, filter .25s ease;
  filter: drop-shadow(0 10px 20px rgba(35, 65, 90, .28));
}
.submit-btn:hover:not(:disabled) { transform: translateY(-4px) scale(1.02); }
.submit-btn:disabled { opacity: .55; cursor: progress; }

.after-links { display: flex; gap: clamp(24px, 4vw, 56px); flex-wrap: wrap; justify-content: center; }
.after-links a {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--navy-deep);
  text-decoration: underline;
  text-underline-offset: 7px;
  font-size: clamp(16px, 1.6vw, 23px);
}

.form-note {
  text-align: center;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 17px;
  margin: 18px auto 0;
  max-width: 560px;
  min-height: 26px;
}
.form-note--error { color: #a3342f; }
.form-note--ok    { color: #2c6b46; }

.thanks {
  text-align: center;
  padding: clamp(40px, 6vw, 80px) 24px;
}
.thanks h2 {
  font-family: "Playfair Display", Georgia, serif;
  color: var(--navy);
  font-size: clamp(30px, 4vw, 52px);
  margin: 0 0 14px;
}
.thanks p { font-size: clamp(18px, 1.8vw, 24px); color: var(--navy-soft); margin: 0; }

/* ------------------------------------------------------------ states --- */
.is-loading { opacity: .35; }

.demo-banner {
  background: #fdf3d6;
  border-bottom: 1px solid #e6d18f;
  color: #6b551b;
  text-align: center;
  padding: 10px 20px;
  font-size: 15px;
  font-family: "Playfair Display", Georgia, serif;
}

/* -------------------------------------------------------- responsive --- */
@media (max-width: 900px) {
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meta-row { grid-template-columns: 1fr; }
  .faq { grid-template-columns: 1fr; }
  .nav-toggle { width: 84px; top: 16px; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .timeline { grid-template-columns: 1fr; }
  .option { padding: 20px 22px; }
  .input { padding: 20px 22px; }
}

/* ==========================================================================
   Splash screen — the landing page (index.html)
   --------------------------------------------------------------------------
   Composition is authored against the 1920x1000 Figma frame:

     splash-bg.jpg      full-bleed watercolour landscape
     copy               centred, first line ~32.5% down the frame
     splash-envelop.jpg 911x474 -> 47.45% of frame width, bottom-anchored

   --stage is the width of that 1920x1000 frame scaled to COVER the viewport,
   which is the same box `background-size: cover` paints into. Positioning
   everything as a fraction of --stage therefore keeps the copy and the
   envelope locked to the artwork behind them at any window size. The 190vw
   ceiling is the portrait escape hatch: without it the envelope would be
   wider than a phone screen.

   The three envelope frames are JPEGs on a white ground, so they are
   composited with mix-blend-mode: multiply — white drops to the backdrop
   while the navy paper, cream card and ivory wax seal all survive. A
   chroma-key would have punched holes straight through the seal and card.
   ========================================================================== */
.splash-page { overflow: hidden; }

.splash {
  --stage: min(max(100vw, 192vh), 190vw);

  position: relative;
  isolation: isolate;                 /* the blend root for the frames */
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  background: #e9eef2 url("../assets/splash-bg.jpg") center center / cover no-repeat;
  transition: opacity .65s ease, transform .65s ease;
}
.splash[data-state="leaving"] { opacity: 0; transform: scale(1.035); }

/* ---- copy -------------------------------------------------------------- */
.splash__copy {
  text-align: center;
  padding-inline: 3vw;
  margin-bottom: calc(var(--stage) * 0.046);
  color: #22405c;
  font-family: "Playfair Display", Georgia, serif;
  opacity: 0;
  transition: opacity .8s ease;
}
.splash[data-ready="true"] .splash__copy { opacity: 1; }
/* Once the envelope starts opening the invitation speaks for itself. */
.splash[data-ready="true"]:not([data-state="closed"]) .splash__copy { opacity: 0; }

.splash__line1,
.splash__line2 {
  margin: 0;
  font-size: calc(var(--stage) * 0.0265);
  line-height: 1.36;
  font-weight: 500;
  letter-spacing: .004em;
  text-wrap: balance;
}
.splash__line2 { font-weight: 400; }

/* ---- envelope ---------------------------------------------------------- */
/* The button box is the CLOSED footprint; the taller open frames are
   bottom-aligned inside it and overflow upward as the flap unfolds. */
.splash-env {
  position: relative;
  width: calc(var(--stage) * 0.4745);
  aspect-ratio: 911 / 474;
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
  transform-origin: 50% 100%;
  transition: transform .8s cubic-bezier(.4, 0, .2, 1);
  animation: splashFloat 5s ease-in-out infinite;
}

/* The open frames are 1019px tall against the closed frame's 474, so the
   whole group shrinks and lifts once it unfolds — otherwise the top of the
   card is clipped by the viewport. */
.splash:not([data-state="closed"]) .splash-env {
  animation: none;
  transform: translateY(calc(var(--stage) * -0.015)) scale(.86);
}

.splash-env__frame {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100%;
  height: auto;
  transform: translateX(-50%);
  filter: drop-shadow(0 16px 26px rgba(38, 68, 98, .20));
  opacity: 0;
  transition: opacity .5s ease;
  pointer-events: none;
}
.splash[data-state="closed"]  .splash-env__frame--closed,
.splash[data-state="open"]    .splash-env__frame--open,
.splash[data-state="out"]     .splash-env__frame--out,
.splash[data-state="leaving"] .splash-env__frame--out { opacity: 1; }

.splash[data-state="closed"] .splash-env:hover  { animation-play-state: paused; }
.splash[data-state="closed"] .splash-env:hover .splash-env__frame--closed,
.splash-env:focus-visible .splash-env__frame--closed { filter: brightness(1.03); }
.splash-env:focus-visible { outline: 2px solid #22405c; outline-offset: 10px; }

@keyframes splashFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

@media (prefers-reduced-motion: reduce) {
  .splash-env { animation: none; }
  .splash, .splash__copy, .splash-env__frame { transition-duration: .01ms; }
}

/* Narrow screens: the 1920x1000 frame is landscape, so the copy needs more
   gutter and a slightly smaller face to sit comfortably beside the envelope. */
@media (max-width: 700px) {
  .splash__copy {
    padding-inline: 6vw;
    margin-bottom: calc(var(--stage) * 0.055);
  }
  .splash__line1,
  .splash__line2 { font-size: calc(var(--stage) * 0.0243); }
}
