/* Safarnama: a destination wedding as a journey (invites/templates/safar.html).
   Gate (pull up the window shade -> clouds part -> arrival stamp -> scroll flies through the window)
   -> boarding pass (tear the stub) -> travel card (scratch the silver) + departure board (split flaps)
   -> passport pages (visa stamps) -> luggage tags -> itinerary -> postcard (flip, stick the stamp). */

:root {
  --sky: #cfe3f2;
  --sky-2: #e9f2f9;
  --navy: #24476b;
  --navy-2: #152d48;
  --maroon: #8a1f2b;
  --paper: #fffaf2;
  --paper-2: #f4ead8;
  --kraft: #cfa76d;
  --kraft-2: #b98d52;
  --ink: #1d2c40;
  --ink-soft: #5a6a7e;
  --line: rgba(36, 71, 107, .2);
  --red: #b3262e;
  --blue: #2a4f9c;
  --green: #2c7a56;
  --amber: #ffd25a;
  --gold: #e3a44d;
  --backdrop: #0f1d31;

  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --f-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --f-names: "Italiana", "Cormorant Garamond", Georgia, serif;
  --f-serif: "Cormorant Garamond", Georgia, serif;
  --f-hand: "Caveat", "Segoe Print", cursive;
  --f-deva: "Tiro Devanagari Hindi", "Noto Serif Devanagari", serif;
  --ease: cubic-bezier(.22, 1, .36, 1);

  --fx-music-bg: #24476b;
  --fx-music-ring: #cfe3f2;
  --fx-music-ink: #ffffff;
  --fx-bg: #fffaf2;
}

html { scroll-behavior: smooth; }
html.shut { overflow: hidden; }
body {
  /* paper with a faint map grid */
  background:
    radial-gradient(rgba(36, 71, 107, .09) 1px, transparent 1.3px) 0 0 / 22px 22px,
    linear-gradient(180deg, var(--sky-2), var(--paper) 30%);
  background-color: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--f-sans);
}
a { color: inherit; }
main, .foot { position: relative; z-index: 1; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.route__plane, .map__plane { opacity: 0; transition: opacity .3s; }
.route__plane.flying, .map__plane.flying { opacity: 1; }
.to .pass__anon, .to .cabin__line { display: none; }
:focus-visible { outline: 2px solid var(--maroon); outline-offset: 4px; }

/* =================================================================== GATE */

.gate { position: relative; height: 270svh; }
.gate__pin { position: sticky; top: 0; height: 100svh; overflow: hidden; background: var(--backdrop); }
html:not(.js) .gate { height: auto; }
html:not(.js) .gate__pin { position: relative; height: auto; min-height: 100svh; }
html:not(.js) :is(.gate__scene, .gate__hint, .gate__tap, .gate__skip, .gate__stamp) { display: none; }

/* ---------- beyond the window: dusk over the lake palace (aerial.mp4 plays over it), then the names ---------- */
.gate__inside {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 56px 16px 34svh;
}
html:not(.js) .gate__inside { position: relative; min-height: 100svh; }
.hero__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.dusk {
  position: absolute; inset: 0;
  --pw: clamp(440px, min(118vw, 58svh), 1000px);
  background: linear-gradient(180deg, #0c1a33 0%, #1d3159 30%, #4b4c78 52%, #a8687c 68%, #ee9d68 79.5%, #f7c27e 80%, #1d2a4a 80.1%, #101a31 100%);
}
.dusk__stars {
  position: absolute; inset: 0 0 45% 0;
  background:
    radial-gradient(1.2px 1.2px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 28% 8%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 44% 22%, #fff, transparent), radial-gradient(1px 1px at 63% 12%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 78% 26%, #fff, transparent), radial-gradient(1px 1px at 90% 9%, #fff, transparent),
    radial-gradient(1px 1px at 6% 40%, #fff, transparent), radial-gradient(1.3px 1.3px at 86% 44%, #fff, transparent),
    radial-gradient(1px 1px at 52% 4%, #fff, transparent), radial-gradient(1px 1px at 35% 36%, #fff, transparent);
  opacity: .8; animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle { to { opacity: .35; } }
.dusk .palace {
  position: absolute; left: 50%; bottom: calc(20% - var(--pw) * .125); width: var(--pw); translate: -50% 0;
  color: #0d1730;
}
.palace { display: block; width: 100%; height: auto; overflow: visible; }
.palace__body, .palace__reflect { fill: currentColor; }
.palace__reflect { opacity: .22; filter: blur(1.5px); }
.palace__lit { fill: var(--lit, #ffcf7a); }
.palace--dusk { --lit: #ffc56a; }
.palace--dusk .palace__lit { filter: drop-shadow(0 0 2px #ffae42); animation: lights 3.2s ease-in-out infinite alternate; }
@keyframes lights { to { opacity: .72; } }
.dusk__water {
  position: absolute; left: 0; right: 0; top: 80%; bottom: 0;
  background:
    radial-gradient(40% 30% at 50% 0%, rgba(255, 190, 110, .35), transparent 70%),
    repeating-linear-gradient(180deg, transparent 0 7px, rgba(255, 196, 120, .12) 7px 8px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
  animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: 0 0, 0 48px; } }
.hero__bg::after {               /* scrim so the names read over sky or video */
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: radial-gradient(90% 55% at 50% 40%, rgba(10, 20, 40, .55), transparent 75%),
              linear-gradient(180deg, rgba(10, 20, 40, .35), transparent 30%, transparent 70%, rgba(10, 20, 40, .45));
}
.hero__bg .loop { z-index: 1; }

.hero {
  position: relative; z-index: 2; width: 100%; max-width: 640px;
  display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--paper);
  opacity: var(--reveal, 1);
  transform: translateY(calc((1 - var(--reveal, 1)) * 40px)) scale(calc(.92 + var(--reveal, 1) * .08));
}
.hero__kicker {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px;
  border: 1px solid rgba(207, 227, 242, .5); border-radius: 999px; background: rgba(15, 29, 49, .35);
  font: 500 11px/1 var(--f-mono); letter-spacing: .24em; text-transform: uppercase; color: var(--sky);
}
.hero__kicker svg { width: 14px; height: 14px; fill: currentColor; rotate: 90deg; }
.hero__lead { margin-top: 20px; max-width: 22em; text-wrap: balance; font: italic 400 clamp(18px, 4.8vw, 22px)/1.4 var(--f-serif); color: rgba(255, 250, 242, .88); }
.hero__names { margin: 10px 0 0; font: 400 clamp(44px, min(12.4vw, 8.4svh), 80px)/1.04 var(--f-names); letter-spacing: .01em; text-shadow: 0 2px 24px rgba(5, 12, 28, .6); }
.hero__name { display: block; }
.hero__amp { display: block; font: italic 400 .5em/1.3 var(--f-serif); color: var(--gold); }
.hero__route { width: min(300px, 74vw); height: auto; margin: 10px 0 6px; overflow: visible; }
.route__line { fill: none; stroke: rgba(207, 227, 242, .75); stroke-width: 1.6; stroke-dasharray: 1 6; stroke-linecap: round; }
.hero__route circle { fill: var(--gold); }
.route__plane { fill: #fff; }
.hero__date {
  font: 500 clamp(12px, 3.3vw, 14px)/1.5 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: #fff;
  padding: 8px 0; border-top: 1px solid rgba(207, 227, 242, .35); border-bottom: 1px solid rgba(207, 227, 242, .35);
}
.hero__venue { margin-top: 10px; font-size: 16px; color: rgba(255, 250, 242, .85); }
.hero__tag { margin-top: 18px; font: italic 400 19px/1.4 var(--f-serif); color: var(--sky); }
@media (max-height: 720px) {
  .hero__names { font-size: clamp(38px, 10.5vw, 64px); }
  .hero__lead { margin-top: 14px; font-size: 17px; }
  .hero__tag { display: none; }
}

/* ---------- the cabin: seat-side wall with the window, scaled about the pane by JS ---------- */
.gate__scene { position: absolute; inset: 0; z-index: 4; will-change: transform, opacity; }
.cabin {
  position: absolute; inset: 0; overflow: hidden; container-type: size;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3.2cqh;
  padding-bottom: 9cqh;
  background:
    radial-gradient(70% 45% at 50% 50%, rgba(255, 255, 255, .6), transparent 70%),
    linear-gradient(90deg, #c4beb3 0%, #e4e0d8 16%, #f1eee8 50%, #e4e0d8 84%, #c4beb3 100%);
}
.cabin::before {                 /* panel seams of the wall lining */
  content: ""; position: absolute; inset: 0 7%; pointer-events: none;
  border-left: 1px solid rgba(0, 0, 0, .07); border-right: 1px solid rgba(0, 0, 0, .07);
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, .6), inset -1px 0 0 rgba(255, 255, 255, .6);
}
@media (min-aspect-ratio: 3/4) {
  .cabin {
    inset: auto; left: 50%; top: 50%; translate: -50% -50%;
    height: min(92svh, calc(94vw * 16 / 9)); aspect-ratio: 9 / 16;
    border-radius: 22px;
    box-shadow: 0 0 0 100vmax var(--backdrop), 0 30px 80px rgba(0, 0, 0, .6);
  }
}

/* overhead panel: reading lights, seat number, the seat-belt sign that lights up on landing */
.cabin__psu {
  position: absolute; left: 0; right: 0; top: 0; height: max(56px, 7cqh);
  display: flex; align-items: center; justify-content: center; gap: 14px;
  background: linear-gradient(180deg, #bdb6aa, #d6d0c5 70%, #cbc4b8);
  border-radius: 0 0 50% 50% / 0 0 22px 22px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .12), inset 0 -2px 0 rgba(255, 255, 255, .5);
}
.cabin__psu i { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #f8f6f0, #a9a296 70%); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .3); }
.cabin__seat { font: 600 11px/1 var(--f-mono); letter-spacing: .12em; color: #5b564d; padding: 4px 6px; border: 1px solid rgba(0, 0, 0, .15); border-radius: 4px; }
.cabin__belt {
  position: relative; width: 30px; height: 18px; border-radius: 4px; background: #8d877c;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35); transition: background .3s, box-shadow .3s;
}
.cabin__belt::before {           /* a little seat-belt glyph */
  content: ""; position: absolute; left: 7px; right: 7px; top: 7px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .35);
}
.gate.stamped .cabin__belt { background: #ffcf6a; box-shadow: 0 0 12px rgba(255, 190, 80, .9), inset 0 1px 1px rgba(255, 255, 255, .6); }
.gate.stamped .cabin__belt::before { background: #6b4a10; }

.cabin__head { position: relative; text-align: center; color: var(--navy); margin-top: 4cqh; }
.cabin__kicker { font: 400 clamp(22px, 6.4cqw, 30px)/1.3 var(--f-deva); color: var(--navy); }
.cabin__to, .cabin__line { margin-top: 4px; font: 500 clamp(10px, 2.9cqw, 12px)/1.5 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: #5b6878; }
.cabin__to { color: var(--maroon); }

/* the window: a moulded frame, a bevelled recess, the pane, the shade */
.win {
  position: relative; flex: none;
  width: min(70cqw, 52cqh * .7); aspect-ratio: .7;
  border-radius: 46% / 32%;
  background: linear-gradient(160deg, #fdfcf9, #e2ddd4 60%, #d3cdc2);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .06),
    inset 0 2px 2px rgba(255, 255, 255, .95), inset 0 -4px 8px rgba(0, 0, 0, .12),
    0 18px 30px -14px rgba(40, 40, 60, .45), 0 0 0 10px rgba(255, 255, 255, .22);
}
.win::before {                   /* the recess between frame and pane */
  content: ""; position: absolute; inset: 5.5%; border-radius: 44% / 31%;
  background: linear-gradient(180deg, #b9b2a6, #e9e5de);
  box-shadow: inset 0 6px 12px rgba(0, 0, 0, .35), inset 0 -2px 3px rgba(255, 255, 255, .7);
}
.win__pane {
  position: absolute; inset: 10%; border-radius: 42% / 30%; overflow: hidden;
  background: #9cc2e0; isolation: isolate;
  box-shadow: 0 0 0 2px #a49c8f;
}
.win__view { position: absolute; inset: 0; container-type: size; background: linear-gradient(180deg, #7fb0d8 0%, #b8d3e6 30%, #f6d7a4 58%, #f5b277 70%, #e98d5e 75%); }
.win__sun {
  position: absolute; left: 50%; top: 62%; width: 90cqw; aspect-ratio: 1; translate: -50% -50%;
  background: radial-gradient(circle, #fff7df 0 6%, rgba(255, 220, 150, .9) 10%, rgba(255, 190, 110, .35) 32%, transparent 62%);
}
.win__view .palace { position: absolute; left: 50%; bottom: calc(25.4% - 14.5cqw); width: 116cqw; translate: -50% 0; color: #6f4636; --lit: #ffe0a0; }
.win__view .palace__body { opacity: .82; }
.win__view .palace__lit { opacity: .55; }
.win__lake {
  position: absolute; left: 0; right: 0; bottom: 0; height: 25.4%;
  background:
    repeating-linear-gradient(180deg, transparent 0 5px, rgba(255, 240, 200, .35) 5px 6px),
    linear-gradient(180deg, #e6a26c, #b8765a 50%, #8a5a4c);
  animation: shimmer 5s linear infinite;
}
.win__clouds { position: absolute; inset: 0; }
.cloud {
  position: absolute; left: 0; top: var(--y); width: calc(58cqw * var(--s)); aspect-ratio: 2.6;
  background:
    radial-gradient(closest-side, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0)) 10% 70% / 46% 70% no-repeat,
    radial-gradient(closest-side, rgba(255, 255, 255, .98), rgba(255, 255, 255, 0)) 42% 30% / 50% 95% no-repeat,
    radial-gradient(closest-side, rgba(255, 250, 240, .95), rgba(255, 255, 255, 0)) 78% 60% / 46% 80% no-repeat,
    radial-gradient(closest-side, rgba(255, 244, 230, .8), rgba(255, 255, 255, 0)) 50% 85% / 95% 45% no-repeat;
  filter: blur(1px); opacity: .9;
  animation: drift var(--d) linear var(--delay) infinite;
}
@keyframes drift { from { transform: translateX(110cqw); } to { transform: translateX(-120cqw); } }
.win__film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1s ease; }
.win__film.playing { opacity: 1; }
.win__film.playing ~ .bank { opacity: 0; }

/* cloud banks that part as the shade lifts */
.bank {
  position: absolute; top: 18%; width: 120%; height: 70%;
  background:
    radial-gradient(closest-side, #fff, rgba(255, 255, 255, 0)) 20% 40% / 60% 60% no-repeat,
    radial-gradient(closest-side, #fffaf2, rgba(255, 255, 255, 0)) 60% 25% / 70% 55% no-repeat,
    radial-gradient(closest-side, #fff, rgba(255, 255, 255, 0)) 40% 70% / 90% 50% no-repeat,
    radial-gradient(closest-side, rgba(255, 246, 232, .95), rgba(255, 255, 255, 0)) 70% 80% / 70% 45% no-repeat;
  filter: blur(2px);
  transition: translate 2.8s cubic-bezier(.3, .6, .2, 1), opacity 1s;
}
.bank--l { left: -62%; translate: calc(var(--lift, 0) * -18%) 0; }
.bank--r { right: -62%; translate: calc(var(--lift, 0) * 18%) 0; }
.gate[data-phase="lifting"] .bank { transition: none; }
.gate.settling .cabin__glow { transition: opacity .7s ease; }
.gate:not([data-phase="idle"]):not([data-phase="lifting"]) .bank--l { translate: -70% 0; }
.gate:not([data-phase="idle"]):not([data-phase="lifting"]) .bank--r { translate: 70% 0; }

.win__glass {                   /* reflections on the acrylic and the inner shadow of the pane */
  position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  background: linear-gradient(115deg, rgba(255, 255, 255, .28), transparent 30%, transparent 58%, rgba(255, 255, 255, .12) 66%, transparent 74%);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .2), inset 0 8px 18px rgba(0, 0, 0, .3);
}
.shade {
  position: absolute; inset: -2px; z-index: 3;
  transform: translateY(calc(var(--lift, 0) * -91%));
  background:
    repeating-linear-gradient(180deg, rgba(0, 0, 0, .028) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #f6f3ed, #e6e1d8 80%, #dcd6cb);
  box-shadow: 0 8px 12px rgba(0, 0, 0, .22);
}
.gate.settling .shade { transition: transform .7s cubic-bezier(.3, .8, .25, 1); }
.shade__grip {
  position: absolute; left: 0; right: 0; bottom: 0; height: 10%;
  background: linear-gradient(180deg, #ece7de, #cfc8bb);
  border-top: 1px solid rgba(0, 0, 0, .1);
}
.shade__grip::after {           /* finger groove */
  content: ""; position: absolute; left: 50%; top: 32%; width: 34%; height: 30%; translate: -50% 0;
  border-radius: 999px; background: linear-gradient(180deg, #a59d90, #c9c2b6);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .35), 0 1px 0 rgba(255, 255, 255, .7);
}
.gate[data-phase="idle"] .shade { animation: tease 3.4s ease-in-out 1.2s infinite; }
@keyframes tease { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(-7%); } 88% { transform: translateY(0); } 93% { transform: translateY(-3%); } }

/* golden light spills onto the wall as the shade lifts */
.cabin__glow {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: soft-light;
  background: radial-gradient(48% 34% at 50% 50%, rgba(255, 170, 70, .95), rgba(255, 190, 110, .35) 55%, transparent 80%);
  opacity: var(--lift, 0);
}
.cabin__sill {
  position: absolute; left: -4%; right: -4%; bottom: 0; height: 14cqh;
  background: linear-gradient(180deg, #ece8e0, #d1cbc0 40%, #c2bbaf);
  border-radius: 50% 50% 0 0 / 40px 40px 0 0;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .8), 0 -10px 24px rgba(0, 0, 0, .1);
}

/* ---------- the arrival stamp, thumped onto the screen ---------- */
.gate__stamp {
  position: absolute; left: 50%; top: 58%; z-index: 6; width: min(52vw, 230px, 30svh); aspect-ratio: 1;
  translate: -22% -42%; rotate: -13deg; pointer-events: none; opacity: 0;
  mix-blend-mode: multiply; color: var(--red);
}
@media (min-aspect-ratio: 3/4) { .gate__stamp { width: min(26svh, 230px); translate: -20% -45%; } }
.gate__stamp svg { display: block; width: 100%; height: 100%; overflow: visible; }
.st__o, .st__i { fill: none; stroke: currentColor; }
.st__o { stroke-width: 5; }
.st__i { stroke-width: 1.6; }
.st__ring { font: 600 15.5px var(--f-mono); letter-spacing: .14em; fill: currentColor; }
.st__date { font: 700 27px var(--f-sans); letter-spacing: .02em; fill: currentColor; text-anchor: middle; }
.st__small { font: 600 12px var(--f-mono); letter-spacing: .3em; fill: currentColor; text-anchor: middle; }
.gate.stamped .gate__stamp { opacity: .94; animation: thump .6s cubic-bezier(.2, .8, .3, 1) both; }
.gate__stamp svg { opacity: calc(1 - var(--p, 0) * 6); }
.gate.stamped.instant .gate__stamp { animation: none; }
@keyframes thump {
  0% { opacity: 0; scale: 2.4; filter: blur(4px); }
  55% { opacity: .95; scale: .93; filter: blur(0); }
  72% { scale: 1.03; }
  100% { opacity: .94; scale: 1; filter: drop-shadow(0 0 1px rgba(179, 38, 46, .45)); }
}
.gate.thud .cabin { animation: jolt .38s ease-out; }
@keyframes jolt { 20% { transform: translate(1px, 3px); } 45% { transform: translate(-2px, -1px); } 70% { transform: translate(1px, 1px); } }

/* ---------- hints, tap target, skip ---------- */
.gate__hint {
  position: absolute; left: 50%; bottom: 5.5%; translate: -50% 0; z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: min(86%, 30em); text-align: center; pointer-events: none; color: var(--navy);
  transition: opacity .5s;
}
@media (min-aspect-ratio: 3/4) { .gate__hint { bottom: calc(4% + 2svh); } }
.hint__line { font: 600 12px/1.6 var(--f-mono); letter-spacing: .28em; text-indent: .28em; text-transform: uppercase; }
.hint__sub { font: italic 400 17px/1.3 var(--f-serif); color: var(--ink-soft); }
.hint__arrows { display: flex; flex-direction: column; align-items: center; margin-bottom: 4px; }
.hint__arrows i {
  width: 12px; height: 12px; border-left: 2px solid currentColor; border-top: 2px solid currentColor; rotate: 45deg; margin-top: -3px;
  animation: up 1.5s ease-in-out infinite;
}
.hint__arrows i:nth-child(2) { animation-delay: .15s; opacity: .5; }
@keyframes up { 0%, 100% { translate: 0 4px; opacity: .3; } 50% { translate: 0 -3px; opacity: 1; } }
.gate:not([data-phase="idle"]) .gate__hint--lift { opacity: 0; }
.gate__hint--enter { opacity: 0; }
.gate[data-phase="open"] .gate__hint--enter { opacity: clamp(0, calc(1 - var(--p, 0) * 10), 1); transition: none; }
.gate[data-phase="open"] .gate__hint--enter > * { animation: fadeIn .9s ease 1.4s both; }
.gate.instant .gate__hint--enter > * { animation-delay: 0s; }
@keyframes fadeIn { from { opacity: 0; } }
.gate__chev {
  width: 13px; height: 13px; margin-top: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: 45deg;
  animation: chev 1.6s ease-in-out infinite;
}
.gate.nudge .gate__chev { animation-duration: .8s; }
@keyframes chev { 0%, 100% { translate: 0 -3px; opacity: .5; } 50% { translate: 0 4px; opacity: 1; } }
.gate__tap {
  position: absolute; inset: 0; z-index: 5; width: 100%; height: 100%;
  border: 0; padding: 0; background: none; cursor: grab; -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none;
}
.gate:not([data-phase="open"]) .gate__tap { touch-action: none; }
.gate[data-phase="lifting"] .gate__tap { cursor: grabbing; }
.gate[data-phase="open"] .gate__tap { cursor: pointer; }
.gate__tap:focus-visible { outline: 3px solid var(--maroon); outline-offset: -12px; }
.gate.is-through .gate__tap, .gate.is-through .gate__skip { display: none; }
.gate__skip {
  position: absolute; right: 14px; top: max(14px, env(safe-area-inset-top)); z-index: 7;
  font: 500 11px/1 var(--f-mono); letter-spacing: .2em; text-transform: uppercase;
  color: var(--navy); background: rgba(255, 255, 255, .55); border: 1px solid rgba(36, 71, 107, .3);
  border-radius: 999px; padding: 9px 14px; cursor: pointer;
}
@media (min-aspect-ratio: 3/4) { .gate__skip { color: var(--sky); background: rgba(255, 255, 255, .06); border-color: rgba(207, 227, 242, .3); } }
.gate[data-phase="open"] .gate__skip { opacity: 0; pointer-events: none; }

/* reduced motion: no zoom; the cabin simply fades once open */
.gate.is-flat { height: 100svh; }
.gate.is-flat .gate__scene, .gate.is-flat .gate__stamp { opacity: 0; transition: opacity .4s; pointer-events: none; }
.gate.is-flat :is(.gate__hint, .gate__tap, .gate__skip) { display: none; }

/* =================================================================== SECTIONS */

.sec { position: relative; max-width: 680px; margin: 0 auto; padding: 92px 16px; text-align: center; }
.sec + .sec::before {            /* a dotted flight path between sections, with a plane heading down */
  content: ""; position: absolute; top: -34px; left: 50%; height: 68px; translate: -50% 0;
  border-left: 2px dotted rgba(36, 71, 107, .35);
}
.sec + .sec::after {
  content: ""; position: absolute; top: 0; left: 50%; width: 22px; height: 22px; translate: -50% -50%; rotate: 180deg;
  background: var(--navy);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 16v-2l-8-5V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5V9l-8 5v2l8-2.5V19l-2 1.5V22l3.5-1 3.5 1v-1.5L13 19v-5.5l8 2.5z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.sec__label { font: 600 12px/1.5 var(--f-mono); letter-spacing: .26em; text-transform: uppercase; color: var(--maroon); }
.sec__title { margin: 8px 0 14px; font: 400 clamp(36px, 10vw, 54px)/1.1 var(--f-names); color: var(--navy); }
.sec__lead { max-width: 25em; text-wrap: balance; margin: 0 auto; font: italic 400 clamp(19px, 5vw, 22px)/1.45 var(--f-serif); color: var(--ink-soft); }
.sec__note { margin: 34px auto 0; max-width: 26em; font: italic 400 20px/1.45 var(--f-serif); color: var(--ink-soft); }

/* shared ink stamp look */
.inked { mix-blend-mode: multiply; filter: url(#ink); }

/* ---------- boarding pass: tear off the stub ---------- */
.pass {
  position: relative; display: flex; flex-direction: column; max-width: 420px; margin: 34px auto 0; text-align: left;
  filter: drop-shadow(0 22px 26px rgba(36, 71, 107, .2)) drop-shadow(0 2px 3px rgba(36, 71, 107, .12));
}
.pass__main, .pass__stub { position: relative; background: #fff; }
.pass__main {
  border-radius: 16px 16px 0 0; overflow: hidden;
  -webkit-mask: radial-gradient(circle at 0 100%, transparent 12px, #000 12.5px) left / 51% 100% no-repeat,
                radial-gradient(circle at 100% 100%, transparent 12px, #000 12.5px) right / 51% 100% no-repeat;
  mask: radial-gradient(circle at 0 100%, transparent 12px, #000 12.5px) left / 51% 100% no-repeat,
        radial-gradient(circle at 100% 100%, transparent 12px, #000 12.5px) right / 51% 100% no-repeat;
}
.pass__head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 18px;
  background: linear-gradient(90deg, var(--navy), #2f5d8a);
  font: 600 11px/1 var(--f-mono); letter-spacing: .22em; text-transform: uppercase; color: #fff;
  box-shadow: inset 0 -4px 0 var(--sky);
}
.pass__head span:first-child { font: 400 20px/1 var(--f-names); letter-spacing: .08em; text-transform: none; }
.pass__body { padding: 16px 18px 22px; }
.pass small, .pp small, .board small {
  display: block; font: 500 9.5px/1.5 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft);
}
.pass__field b { display: block; font: 600 15px/1.3 var(--f-sans); color: var(--navy); overflow-wrap: anywhere; }
.pass__guest { font-size: 22px !important; }
.pass__route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 14px 0 16px; }
.pass__route p:last-child { text-align: right; }
.pass__code { display: block; font: 700 46px/1 var(--f-sans); letter-spacing: -.02em; color: var(--navy); }
.pass__route span { font-size: 13px; color: var(--ink-soft); }
.pass__plane { width: 64px; height: 26px; fill: var(--maroon); rotate: 90deg; scale: .7; }
.pass__route > svg { width: 26px; height: 26px; }
.pass__route { position: relative; }
.pass__route::before {           /* dotted path behind the plane */
  content: ""; position: absolute; left: 32%; right: 32%; top: 50%; border-top: 2px dotted rgba(36, 71, 107, .35); z-index: -1;
}
.pass__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 10px; padding-top: 14px; border-top: 1px dashed var(--line); }
.pass__ok {
  position: absolute; right: 14px; top: 54px; padding: 7px 11px; text-align: center;
  border: 3px double var(--green); border-radius: 8px; color: var(--green); rotate: -9deg; opacity: 0;
  mix-blend-mode: multiply; filter: url(#inkLite);
}
.pass__ok span { display: block; font: 700 19px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; }
.pass__ok small { color: inherit; margin-top: 3px; }
.pass.torn .pass__ok { animation: stampIn .55s cubic-bezier(.2, .8, .3, 1) .45s both; }
@keyframes stampIn { 0% { opacity: 0; scale: 2.2; } 60% { opacity: .9; scale: .94; } 100% { opacity: .9; scale: 1; } }

.pass__stub {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 20px 18px 18px; border-radius: 0 0 16px 16px;
  -webkit-mask: radial-gradient(circle at 0 0, transparent 12px, #000 12.5px) left / 51% 100% no-repeat,
                radial-gradient(circle at 100% 0, transparent 12px, #000 12.5px) right / 51% 100% no-repeat;
  mask: radial-gradient(circle at 0 0, transparent 12px, #000 12.5px) left / 51% 100% no-repeat,
        radial-gradient(circle at 100% 0, transparent 12px, #000 12.5px) right / 51% 100% no-repeat;
  transform-origin: 0 0;
  transform: translateY(calc(var(--pull, 0) * 10px)) rotate(calc(var(--pull, 0) * 2.5deg));
  transition: transform .5s var(--ease);
}
.pass.pulling .pass__stub { transition: none; }
.pass__stub::before {            /* the perforation */
  content: ""; position: absolute; left: 16px; right: 16px; top: 0; border-top: 2px dashed rgba(36, 71, 107, .3);
}
.pass__admit { grid-column: 1 / -1; font: 600 11px/1 var(--f-mono); letter-spacing: .3em; text-transform: uppercase; color: var(--maroon); }
.barcode { grid-column: 1 / -1; display: flex; gap: 2px; height: 42px; margin-top: 4px; overflow: hidden; }
.barcode i { flex: none; width: calc(var(--w) * 1.5px); background: var(--ink); }
.barcode i:nth-child(even) { background: transparent; }
.pass__tear {
  position: absolute; inset: 0; z-index: 2; border: 0; padding: 0; background: none; cursor: grab;
  touch-action: none; -webkit-tap-highlight-color: transparent;
}
.pass__tear::after {             /* scissors on the dotted line */
  content: "✂"; position: absolute; left: 22px; top: 4px; font-size: 16px; line-height: 1; color: var(--navy); opacity: .7;
  animation: snip 2.4s ease-in-out infinite;
}
@keyframes snip { 0%, 100% { translate: 0 0; } 50% { translate: 24px 0; } }
.pass.torn .pass__stub { transform: translate(8px, 22px) rotate(3.5deg); transition: transform .9s cubic-bezier(.3, 1.5, .5, 1); }
.pass.torn .pass__stub::before { border-top-style: dotted; opacity: .5; }
.pass.torn .pass__tear { pointer-events: none; }
.pass.torn .pass__tear::after { display: none; }
.pass__hint { margin-top: 18px; font: italic 400 18px/1.4 var(--f-serif); color: var(--ink-soft); }
.pass.torn ~ .pass__hint { display: none; }
.pass__kept { margin-top: 44px; font: italic 400 20px/1.4 var(--f-serif); color: var(--navy); animation: rise .8s var(--ease); }
@keyframes rise { from { opacity: 0; translate: 0 12px; } }
@media (min-width: 700px) {
  .pass { flex-direction: row; max-width: 640px; }
  .pass__main { flex: 1; border-radius: 16px 0 0 16px;
    -webkit-mask: radial-gradient(circle at 100% 0, transparent 12px, #000 12.5px) top / 100% 51% no-repeat,
                  radial-gradient(circle at 100% 100%, transparent 12px, #000 12.5px) bottom / 100% 51% no-repeat;
    mask: radial-gradient(circle at 100% 0, transparent 12px, #000 12.5px) top / 100% 51% no-repeat,
          radial-gradient(circle at 100% 100%, transparent 12px, #000 12.5px) bottom / 100% 51% no-repeat; }
  .pass__stub { width: 190px; grid-template-columns: 1fr; align-content: start; border-radius: 0 16px 16px 0; padding: 18px;
    -webkit-mask: radial-gradient(circle at 0 0, transparent 12px, #000 12.5px) top / 100% 51% no-repeat,
                  radial-gradient(circle at 0 100%, transparent 12px, #000 12.5px) bottom / 100% 51% no-repeat;
    mask: radial-gradient(circle at 0 0, transparent 12px, #000 12.5px) top / 100% 51% no-repeat,
          radial-gradient(circle at 0 100%, transparent 12px, #000 12.5px) bottom / 100% 51% no-repeat;
    transform-origin: 0 100%;
    transform: translateX(calc(var(--pull, 0) * 10px)) rotate(calc(var(--pull, 0) * 2.5deg)); }
  .pass__stub::before { left: 0; right: auto; top: 16px; bottom: 16px; border-top: 0; border-left: 2px dashed rgba(36, 71, 107, .3); }
  .pass__tear::after { left: -10px; top: 20px; rotate: 90deg; animation-name: snipV; }
  @keyframes snipV { 0%, 100% { translate: 0 0; } 50% { translate: 0 30px; } }
  .pass.torn .pass__stub { transform: translate(34px, 8px) rotate(5deg); }
  .pass__ok { top: 58px; right: 24px; }
  .pass__tear::after { left: 4px; top: 22px; }
}

/* ---------- save the date: the silver travel card ---------- */
.sec--date .scratch { max-width: 380px; margin: 26px auto 0; border-radius: 16px; }
.sec--date .scratch__foil { border-radius: 16px; box-shadow: 0 14px 28px -14px rgba(36, 71, 107, .55); }
.tcard {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr auto auto;
  height: 220px; padding: 16px 18px; border-radius: 16px; text-align: left; overflow: hidden;
  background:
    radial-gradient(rgba(36, 71, 107, .08) 1px, transparent 1.3px) 0 0 / 14px 14px,
    linear-gradient(135deg, #e7f1f9, var(--sky) 55%, #b9d3e8);
  box-shadow: inset 0 0 0 1px rgba(36, 71, 107, .15);
}
.tcard::after {                  /* holographic strip */
  content: ""; position: absolute; right: 18px; top: 50%; width: 40px; height: 30px; translate: 0 -50%; border-radius: 6px;
  background: linear-gradient(135deg, #f3d38a, #e8b85d 40%, #f7e2a8 60%, #d7a24a);
  box-shadow: inset 0 0 0 1px rgba(120, 80, 20, .3);
}
.tcard__brand { display: inline-flex; align-items: center; gap: 6px; font: 600 10.5px/1 var(--f-mono); letter-spacing: .22em; text-transform: uppercase; color: var(--navy); }
.tcard__brand svg { width: 14px; height: 14px; fill: var(--maroon); rotate: 45deg; }
.tcard__wd { justify-self: end; font: 600 10.5px/1 var(--f-mono); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); }
.tcard__day { grid-column: 1 / -1; align-self: center; font: 400 96px/.9 var(--f-names); color: var(--navy); }
.tcard__my { grid-column: 1 / -1; font: 600 15px/1.2 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--maroon); }
.tcard__foot { grid-column: 1 / -1; margin-top: 8px; font: 500 11px/1 var(--f-mono); letter-spacing: .2em; color: var(--ink-soft); }
.scratch.done .tcard__day { animation: pop .7s var(--ease); }
@keyframes pop { 0% { scale: .7; } 60% { scale: 1.08; } 100% { scale: 1; } }
.scratch__btn { font-family: var(--f-mono); color: var(--navy); }
.scratch__hint { margin-top: 16px; font: italic 400 18px/1.4 var(--f-serif); color: var(--ink-soft); }
.sec--date.revealed .scratch__hint { visibility: hidden; }

/* ---------- the departure board: split-flap letters ---------- */
.board {
  max-width: 420px; margin: 30px auto 0; padding: 16px 16px 20px; border-radius: 16px; text-align: left;
  background: linear-gradient(180deg, #17202d, #0d141e);
  box-shadow: 0 24px 40px -22px rgba(13, 20, 30, .8), inset 0 1px 0 rgba(255, 255, 255, .08);
  color: var(--amber);
}
.board__head {
  display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 210, 90, .18);
  font: 600 12px/1 var(--f-mono); letter-spacing: .3em; text-transform: uppercase;
}
.board__head span:first-child::before { content: "✈"; margin-right: 10px; }
.board__clock { font-variant-numeric: tabular-nums; letter-spacing: .1em; color: #fff; }
.board__row { display: grid; grid-template-columns: 62px 1fr; align-items: center; gap: 10px; padding: 4px 0; }
.flaps { display: flex; flex-wrap: wrap; gap: 3px; min-height: 26px; font: 600 15px/26px var(--f-mono); }
.flaps__label { font: 500 9.5px/1 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 210, 90, .6); }
.flaps--status { --amber: #7ee0a1; color: #7ee0a1; }

/* one flap: static upper/lower halves + two leaves that fold over */
.fc {
  --cw: 19px; --ch: 26px; --fs: 15px;
  position: relative; display: inline-block; flex: none; width: var(--cw); height: var(--ch);
  perspective: 160px; font: 600 var(--fs)/var(--ch) var(--f-mono); text-align: center; color: var(--amber);
}
.fc > i { position: absolute; left: 0; right: 0; height: 50%; overflow: hidden; font-style: normal; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.fc > i > s { display: block; height: var(--ch); line-height: var(--ch); text-decoration: none; }
.fc .u, .fc .fu { top: 0; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #2a3546, #222c3b); }
.fc .l, .fc .fl { bottom: 0; border-radius: 0 0 3px 3px; background: linear-gradient(180deg, #1c2533, #222c3b); }
.fc .l > s, .fc .fl > s { margin-top: calc(var(--ch) / -2); }
.fc .fu { z-index: 2; transform-origin: 50% 100%; }
.fc .fl { z-index: 2; transform-origin: 50% 0; transform: rotateX(90deg); }
.fc::after { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - .5px); height: 1px; z-index: 3; background: rgba(0, 0, 0, .7); }
.fc.go .fu { animation: flapU var(--fd, .22s) ease-in forwards; }
.fc.go .fl { animation: flapL var(--fd, .22s) ease-out var(--fd, .22s) forwards; }
.fc.fast { --fd: .05s; }
@keyframes flapU { to { transform: rotateX(-90deg); } }
@keyframes flapL { from { transform: rotateX(90deg); } to { transform: rotateX(0); } }

/* the countdown, flap style */
.board .count { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255, 210, 90, .18); }
.board .count > span {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px;
  font: 500 9.5px/1 var(--f-mono); letter-spacing: .22em; text-transform: uppercase; color: rgba(255, 210, 90, .6);
}
.board .count b[data-u] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
html:not(.js) .board .count b[data-u] { position: static; width: auto; height: auto; clip-path: none; font: 600 28px/1.2 var(--f-mono); color: var(--amber); }
.count .flapset { display: flex; gap: 3px; order: -1; }
.count .fc { --cw: clamp(26px, 8vw, 36px); --ch: clamp(38px, 11vw, 50px); --fs: clamp(22px, 6.6vw, 30px); color: #fff; }
.count__done { margin-top: 16px; font: 600 14px/1.4 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); text-align: center; }

/* ---------- families: passport pages with visa stamps ---------- */
.passports { display: grid; gap: 14px; margin-top: 32px; }
.passports__amp { font: 400 46px/1 var(--f-names); color: var(--maroon); }
.pp {
  position: relative; padding: 14px 16px 12px; text-align: left; border-radius: 8px; overflow: hidden;
  background:
    repeating-radial-gradient(circle at 0 0, transparent 0 11px, rgba(36, 71, 107, .055) 11px 12px),
    repeating-radial-gradient(circle at 100% 100%, transparent 0 13px, rgba(138, 31, 43, .045) 13px 14px),
    linear-gradient(180deg, #fdf8ee, #f2e8d4);
  box-shadow: 0 0 0 6px var(--maroon), 0 0 0 7px #6e1520, 0 26px 40px -24px rgba(60, 20, 20, .55);
}
.pp__head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 8px;
  border-bottom: 1px solid rgba(138, 31, 43, .25);
  font: 600 10.5px/1 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--maroon);
}
.pp__head span[lang] { font: 400 17px/1 var(--f-deva); letter-spacing: 0; }
.pp__body { display: grid; grid-template-columns: 88px 1fr; gap: 14px; margin-top: 14px; }
.pp__photo {
  display: grid; place-items: center; height: 112px; border-radius: 6px;
  background:
    repeating-radial-gradient(circle at 50% 120%, transparent 0 5px, rgba(36, 71, 107, .07) 5px 6px),
    linear-gradient(180deg, var(--sky-2), var(--sky));
  box-shadow: inset 0 0 0 1px rgba(36, 71, 107, .2);
}
.pp__photo span { font: 400 62px/1 var(--f-names); color: var(--navy); }
.pp__fields p { margin-bottom: 6px; font: 600 14px/1.25 var(--f-sans); color: var(--ink); }
.pp__name { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--line); font: 600 27px/1.1 var(--f-hand); color: var(--navy); }
.pp__name::before { content: "Signature"; display: block; font: 500 9px/1.6 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.visa {
  display: block; position: relative; margin: 14px 0 6px auto; max-width: 92%; padding: 10px 14px 9px; text-align: left;
  color: var(--blue); background: none; border: 2.5px solid currentColor; border-radius: 10px; cursor: pointer;
  box-shadow: inset 0 0 0 2px #fbf5e9, inset 0 0 0 3.5px currentColor;
  rotate: -3.5deg; mix-blend-mode: multiply; -webkit-tap-highlight-color: transparent;
}
.visa--green { color: var(--green); rotate: 2.5deg; margin: 14px auto 6px 0; }
.visa > span { display: block; filter: url(#inkLite); }
.visa__top { font: 700 11px/1.4 var(--f-mono); letter-spacing: .22em; text-transform: uppercase; }
.visa__who { margin: 3px 0; font: 700 16px/1.3 var(--f-sans); }
.visa__foot { font: 500 10px/1.4 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.pp__seal {
  position: absolute; right: 12px; top: 52px; width: 74px; height: 74px; display: grid; place-items: center; text-align: center;
  border-radius: 50%; border: 2px solid var(--red); box-shadow: inset 0 0 0 4px #fbf5e9, inset 0 0 0 5.5px var(--red);
  font: 700 8.5px/1.3 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--red);
  rotate: 16deg; opacity: .75; mix-blend-mode: multiply; filter: url(#inkLite); pointer-events: none;
}
.pp__mrz {
  margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); overflow: hidden; white-space: nowrap;
  font: 500 11px/1.5 var(--f-mono); letter-spacing: .1em; color: #46566a;
}
html.js .sec--families .visa, html.js .sec--families .pp__seal { opacity: 0; }
.sec--families.in .visa { animation: stampIn .5s cubic-bezier(.2, .8, .3, 1) calc(.7s + var(--i, 0) * .7s) both; }
.sec--families.in .pp__seal { animation: sealIn .5s cubic-bezier(.2, .8, .3, 1) calc(1s + var(--i, 0) * .7s) both; }
.visa.again { animation: stampIn .45s cubic-bezier(.2, .8, .3, 1) both !important; }
@keyframes sealIn { 0% { opacity: 0; scale: 2; } 60% { opacity: .75; scale: .94; } 100% { opacity: .75; scale: 1; } }
@media (min-width: 760px) {
  .passports {          /* an open passport: two facing pages on a maroon cover */
    grid-template-columns: 1fr 1fr; gap: 0; padding: 10px; border-radius: 16px; max-width: 760px; margin: 32px auto 0;
    background: linear-gradient(90deg, #761a25, var(--maroon) 50%, #761a25);
    box-shadow: 0 30px 50px -28px rgba(60, 20, 20, .6);
  }
  .sec--families { max-width: 820px; }
  .passports__amp { display: none; }
  .pp { box-shadow: none; border-radius: 6px 0 0 6px; }
  .pp + .pp { border-radius: 0 6px 6px 0; }
  .pp:first-of-type::after { content: ""; position: absolute; top: 0; bottom: 0; right: 0; width: 26px; background: linear-gradient(90deg, transparent, rgba(80, 50, 20, .14)); pointer-events: none; }
  .pp + .passports__amp + .pp::before, .pp:last-of-type::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 26px; background: linear-gradient(270deg, transparent, rgba(80, 50, 20, .14)); pointer-events: none; }
}

/* ---------- travel companions: luggage tags ---------- */
.rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; margin-top: 30px; }
@media (min-width: 700px) { .rail { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tag {
  position: relative; display: block; padding: 34px 0 0; border: 0; background: none; cursor: pointer; text-align: left;
  transform-origin: 50% 0; -webkit-tap-highlight-color: transparent;
}
.tag::before {                   /* string from the hook down through the eyelet */
  content: ""; position: absolute; left: 50%; top: 0; width: 2px; height: 58px; margin-left: -1px; z-index: 0;
  background: repeating-linear-gradient(180deg, #7a5a33 0 3px, #9c7646 3px 6px);
}
.tag::after {                    /* the hook */
  content: ""; position: absolute; left: 50%; top: -4px; width: 10px; height: 10px; translate: -50% 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e9d6a4, #9a7b3c 70%); box-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
.tag__card {
  position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 184px; padding: 46px 14px 26px;
  background:
    repeating-linear-gradient(97deg, rgba(90, 60, 20, .05) 0 1px, transparent 1px 5px),
    linear-gradient(180deg, #d8b47c, var(--kraft) 60%, #c39b60);
  clip-path: polygon(24% 0, 76% 0, 100% 15%, 100% 100%, 0 100%, 0 15%);
  -webkit-mask: radial-gradient(circle at 50% 24px, transparent 6px, #000 6.5px);
  mask: radial-gradient(circle at 50% 24px, transparent 6px, #000 6.5px);
  color: #33240f; filter: drop-shadow(0 10px 10px rgba(80, 50, 20, .25));
}
.tag__card::before {             /* eyelet ring */
  content: ""; position: absolute; left: 50%; top: 24px; width: 22px; height: 22px; translate: -50% -50%; border-radius: 50%;
  border: 4px solid #f1e3c2; box-shadow: 0 0 0 1px rgba(90, 60, 20, .3), inset 0 0 0 1px rgba(90, 60, 20, .3);
}
.tag__card::after {              /* colour band: navy for the groom's side, maroon for the bride's */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; background: var(--band, var(--navy));
}
.tag--b { --band: var(--maroon); }
.tag__label { font: 600 9px/1.4 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: rgba(51, 36, 15, .7); }
.tag__name { margin: 8px 0 6px; padding-bottom: 6px; border-bottom: 1px dashed rgba(51, 36, 15, .35); font: 600 clamp(24px, 6.6vw, 28px)/1.05 var(--f-hand); color: #1e2c45; overflow-wrap: anywhere; }
.tag__rel { font: 600 11px/1.4 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; }
.tag__side { margin-top: auto; padding-top: 8px; font: 500 12.5px/1.2 var(--f-sans); color: rgba(51, 36, 15, .8); }
.sec--tags.in .tag, .tag.again { animation: swing 2.6s cubic-bezier(.3, .4, .4, 1) calc(.3s + var(--i, 0) * .18s) both; }
.sec--tags.in .tag--b { animation-name: swing2; }
.tag.again { animation-delay: 0s !important; }
@keyframes swing { 0% { rotate: 0deg; } 15% { rotate: 9deg; } 35% { rotate: -6deg; } 55% { rotate: 3.5deg; } 75% { rotate: -1.5deg; } 100% { rotate: 0deg; } }
@keyframes swing2 { 0% { rotate: 0deg; } 15% { rotate: -9deg; } 35% { rotate: 6deg; } 55% { rotate: -3.5deg; } 75% { rotate: 1.5deg; } 100% { rotate: 0deg; } }

/* ---------- events: the itinerary ---------- */
.itin {
  max-width: 540px; margin: 30px auto 0; text-align: left; overflow: hidden;
  background: #fff; border-radius: 18px; border: 1px solid var(--line);
  box-shadow: 0 26px 44px -26px rgba(36, 71, 107, .45);
}
.itin__map { position: relative; background: linear-gradient(180deg, var(--sky), var(--sky-2)); }
.itin__map svg { display: block; width: 100%; height: auto; }
.map__land { fill: rgba(36, 71, 107, .1); }
.map__route { fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-dasharray: 1 7; stroke-linecap: round; }
.map__dot { fill: var(--navy); }
.map__pin { fill: var(--maroon); }
.map__lbl { font: 600 9px var(--f-mono); letter-spacing: .2em; fill: var(--navy); text-anchor: middle; }
.map__plane { fill: var(--navy); }
.leg { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 16px; padding: 22px 18px 24px; }
.leg + .leg { border-top: 1px dashed var(--line); }
.leg__date {
  align-self: start; display: flex; flex-direction: column; align-items: center; padding: 9px 0 8px; border-radius: 12px;
  background: var(--navy); color: #fff; box-shadow: inset 0 -5px 0 var(--maroon);
}
.leg__date span { font: 600 10px/1.3 var(--f-mono); letter-spacing: .2em; }
.leg__date b { font: 700 30px/1.1 var(--f-sans); }
.leg__hi { font: 400 20px/1.4 var(--f-deva); color: var(--maroon); }
.leg__name { margin: 0; font: 400 34px/1.1 var(--f-names); color: var(--navy); }
.leg__when { margin-top: 6px; font: 600 12px/1.5 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.leg__gate { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); }
.leg__gate dt { font: 600 10px/1.9 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--maroon); }
.leg__gate dd { margin: 0; font-size: 16px; line-height: 1.45; }
.leg__note { margin-top: 12px; font: italic 400 19px/1.45 var(--f-serif); color: var(--ink-soft); }
.leg__dress { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.leg__dress span { width: 100%; font: 600 10px/1.6 var(--f-mono); letter-spacing: .2em; text-transform: uppercase; color: var(--maroon); }
.leg__dress em { font-style: normal; font-size: 14px; padding: 2px 11px; border: 1px solid var(--line); border-radius: 999px; }
.leg__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0 -86px; }
@media (min-width: 480px) { .leg__actions { margin-left: 0; } }
.btn {
  display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px;
  font: 600 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
  color: var(--navy); border: 1.5px solid var(--navy); border-radius: 999px; background: transparent;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: rgba(36, 71, 107, .07); }
.btn:active { transform: scale(.96); }
.btn--solid { background: var(--maroon); border-color: var(--maroon); color: #fff; }
.btn--solid:hover { background: #701822; }

/* gallery + hashtag */
.gallery { columns: 2 160px; column-gap: 12px; margin-top: 26px; }
.gallery img { display: block; width: 100%; margin-bottom: 12px; padding: 8px 8px 26px; background: #fff; box-shadow: 0 10px 20px -12px rgba(36, 71, 107, .5); break-inside: avoid; }
.gallery img:nth-child(odd) { rotate: -1.5deg; }
.gallery img:nth-child(even) { rotate: 1.2deg; }
.hashtag { display: inline-block; margin-top: 14px; padding: 10px 22px; border: 2px dashed var(--navy); border-radius: 999px; font: 600 clamp(20px, 6vw, 28px)/1.2 var(--f-mono); color: var(--navy); }

/* ---------- closing: the postcard ---------- */
.card { position: relative; width: min(100%, 470px); aspect-ratio: 3 / 2; margin: 28px auto 0; perspective: 1400px; container-type: inline-size; }
.card__inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 1.1s cubic-bezier(.3, .9, .3, 1); }
.card[data-side="back"] .card__inner { transform: rotateY(180deg); }
.card__face {
  position: absolute; inset: 0; overflow: hidden; border-radius: 10px;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 24px 40px -20px rgba(36, 71, 107, .5), 0 2px 4px rgba(36, 71, 107, .15);
}
.card__front {
  display: flex; flex-direction: column; align-items: center; padding-top: 7cqw;
  background:
    radial-gradient(60% 50% at 50% 74%, rgba(255, 214, 140, .9), transparent 70%),
    linear-gradient(180deg, #2c4c7a 0%, #6d6f99 32%, #d98a7c 58%, #f6b874 72%, #1e2d4c 72.5%, #142038 100%);
  border: 7px solid #fffaf2; color: #fffaf2; text-align: center;
}
.card__greet { font: 600 7cqw/1 var(--f-hand); color: #fff3d9; rotate: -4deg; }
.card__city {
  margin-top: 1cqw; font: 700 min(19cqw, calc(150cqw / var(--len, 6)))/1 var(--f-sans); letter-spacing: -.01em; text-transform: uppercase;
  background: linear-gradient(180deg, #fffbe9 20%, #ffd27a 60%, #f39a52);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(3px 3px 0 var(--navy-2)) drop-shadow(0 6px 10px rgba(10, 20, 40, .35));
}
.card__front .palace { position: absolute; left: 50%; bottom: calc(28% - 8cqw); width: 64cqw; translate: -50% 0; color: #13203b; --lit: #ffcf7a; }
.card__front .palace__reflect { opacity: .18; }
.card__greet, .card__city { position: relative; z-index: 1; }
.card__sub { position: absolute; left: 0; right: 0; bottom: 7%; font: 600 2.8cqw/1 var(--f-mono); letter-spacing: .26em; text-transform: uppercase; color: rgba(255, 243, 217, .85); }
.card__back {
  transform: rotateY(180deg); display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; padding: 5cqw 4cqw 4cqw; text-align: left;
  border: 7px solid transparent;
  background:
    linear-gradient(#fffdf8, #fffdf8) padding-box,
    repeating-linear-gradient(135deg, var(--red) 0 12px, #fffdf8 12px 18px, var(--navy) 18px 30px, #fffdf8 30px 36px) border-box;
}
.card__note { padding-right: 3cqw; display: flex; flex-direction: column; justify-content: center; }
.card__hand { font: 600 clamp(20px, 6.4cqw, 30px)/1.12 var(--f-hand); color: var(--navy); rotate: -3deg; }
.card__sign { margin-top: 3cqw; font: 500 clamp(16px, 4.6cqw, 22px)/1.15 var(--f-hand); color: var(--maroon); rotate: -2deg; }
.card__addr { position: relative; padding-left: 3.5cqw; border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: flex-end; gap: 1.6cqw; }
.card__slot {
  position: absolute; right: 0; top: 0; width: 15.5cqw; height: 18.5cqw;
  display: grid; place-items: center; text-align: center; border: 1.5px dashed rgba(36, 71, 107, .35); border-radius: 2px;
  font: 500 1.8cqw/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft);
}
.card__slot.stuck > span:not(.stamp) { display: none; }
.card__line { padding-bottom: 1cqw; border-bottom: 1px solid var(--line); font: 600 clamp(14px, 4.4cqw, 20px)/1.1 var(--f-hand); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__postmark { position: absolute; right: 7cqw; top: 6cqw; width: 34cqw; opacity: 0; pointer-events: none; color: #2a2f3c; mix-blend-mode: multiply; }
.card__postmark svg { display: block; width: 100%; height: auto; overflow: visible; }
.card__postmark circle, .card__postmark path { fill: none; stroke: currentColor; stroke-width: 1.6; }
.card__postmark text { font: 700 11px var(--f-mono); letter-spacing: .1em; fill: currentColor; text-anchor: middle; }
.card__postmark .pm__d { font-size: 8.5px; }
.card.posted .card__postmark { animation: sealIn .5s cubic-bezier(.2, .8, .3, 1) .15s both; }
.card__flip { position: absolute; inset: 0; z-index: 3; border: 0; background: none; cursor: pointer; border-radius: 10px; -webkit-tap-highlight-color: transparent; }
.card__flip:focus-visible { outline-offset: 6px; }

/* the stamp: perforated edges, the palace in miniature */
.stamp {
  position: relative; display: inline-flex; flex-direction: column; justify-content: space-between; margin: 26px auto 0;
  width: 78px; height: 94px; padding: 9px; border: 0; cursor: pointer; background: #fffdf8; color: var(--navy);
  -webkit-mask: linear-gradient(#000 0 0) center / calc(100% - 8px) calc(100% - 8px) no-repeat, radial-gradient(circle 3.4px, transparent 96%, #000) -4px -4px / 8px 8px;
  mask: linear-gradient(#000 0 0) center / calc(100% - 8px) calc(100% - 8px) no-repeat, radial-gradient(circle 3.4px, transparent 96%, #000) -4px -4px / 8px 8px;
  filter: drop-shadow(0 6px 8px rgba(36, 71, 107, .35));
  animation: stampAsk 1.8s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.stamp[hidden] { display: none !important; }
.stamp:focus-visible { outline: none; filter: drop-shadow(0 0 2px var(--maroon)) drop-shadow(0 0 4px var(--maroon)); }
@keyframes stampAsk { 0%, 100% { rotate: -4deg; translate: 0 0; } 50% { rotate: 3deg; translate: 0 -4px; } }
.stamp__art {
  position: absolute; inset: 9px; overflow: hidden;
  background: linear-gradient(180deg, #3a5c8e, #c98580 62%, #f3b574 70%, #1d2b48 70.5%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5);
}
.stamp__art .palace { position: absolute; left: 50%; bottom: 29%; width: 200%; translate: -50% 0; color: #131f38; --lit: #ffcf7a; }
.stamp__val, .stamp__txt { position: relative; z-index: 1; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.stamp__val { align-self: flex-end; padding: 2px 3px 0 0; font: 700 11px/1 var(--f-mono); }
.stamp__txt { padding: 0 0 3px 3px; font: 600 6.5px/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; }
.card__slot .stamp { position: absolute; inset: -1px; width: auto; height: auto; margin: 0; padding: 7%; animation: none; rotate: 4deg; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); cursor: default; }
.card__slot .stamp__art { inset: 7%; }
.card__slot .stamp__val { font-size: 2.2cqw; }
.card__slot .stamp__txt { font-size: 1.2cqw; }
.card__hint { margin-top: 16px; font: italic 400 18px/1.4 var(--f-serif); color: var(--ink-soft); }
.card__done { margin-top: 26px; font: 600 clamp(26px, 7vw, 32px)/1.2 var(--f-hand); color: var(--maroon); animation: rise .8s var(--ease); }
.card__done small { display: block; margin-top: 4px; font: italic 400 19px/1.4 var(--f-serif); color: var(--ink-soft); }
.close__line { max-width: 22em; text-wrap: balance; margin: 34px auto 0; font: italic 400 clamp(21px, 5.4vw, 26px)/1.45 var(--f-serif); color: var(--ink); }
.up {
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 30px;
  font: 600 11px/1 var(--f-mono); letter-spacing: .26em; text-transform: uppercase; text-decoration: none; color: var(--navy);
}
.up::before { content: ""; width: 0; height: 36px; border-left: 2px dotted var(--navy); }

/* ---------- footer ---------- */
.foot {
  padding: 50px 16px calc(42px + env(safe-area-inset-bottom)); text-align: center; color: #e3eef7;
  background: radial-gradient(70% 60% at 50% 0%, #2f5d8a, transparent 70%), var(--navy-2);
  border-top: 8px solid transparent;
  border-image: repeating-linear-gradient(135deg, var(--red) 0 14px, #fffaf2 14px 20px, var(--sky) 20px 34px, #fffaf2 34px 40px) 8;
}
.foot__flight { display: inline-flex; align-items: center; gap: 8px; font: 600 11px/1 var(--f-mono); letter-spacing: .28em; color: var(--sky); }
.foot__flight svg { width: 14px; height: 14px; fill: currentColor; rotate: 90deg; }
.foot__names { margin-top: 14px; font: 400 clamp(38px, 10vw, 52px)/1.1 var(--f-names); color: #fff; }
.foot__names span { font: italic 400 .6em var(--f-serif); color: var(--gold); }
.foot__date { margin-top: 6px; font: 500 12px/1 var(--f-mono); letter-spacing: .24em; text-transform: uppercase; color: var(--sky); }
.foot__wish { margin-top: 18px; font: 400 20px/1.4 var(--f-deva); color: var(--gold); }
.foot__cal { margin-top: 18px; font-size: 16px; }
.foot__music { margin-top: 18px; font: italic 400 15px/1.4 var(--f-serif); color: rgba(227, 238, 247, .6); }
.foot__credit { margin-top: 12px; font: 500 10px/1.6 var(--f-mono); letter-spacing: .18em; text-transform: uppercase; color: rgba(227, 238, 247, .6); }
.foot a { color: inherit; text-underline-offset: 3px; }

/* =================================================================== OG CARD (?og, 1200x630) */

html.og .ogcard {
  align-items: center; justify-content: center;
  background: linear-gradient(180deg, #9cc4e4, var(--sky) 55%, #e9f2f9);
}
.og__sky { position: absolute; inset: 0; container-type: size; }
.og__sky .cloud { animation: none; width: calc(36cqw * var(--s)); opacity: .85; }
.og__sky .cloud:nth-child(1) { transform: translate(-6cqw, 4cqh); }
.og__sky .cloud:nth-child(2) { transform: translate(70cqw, -6cqh); }
.og__sky .cloud:nth-child(3) { transform: translate(80cqw, 22cqh); }
.og__sky .cloud:nth-child(4) { transform: translate(4cqw, 30cqh); }
.og__sky .cloud:nth-child(5) { transform: translate(38cqw, 58cqh); }
.og__pass {
  position: relative; display: flex; width: 1040px; height: 430px; rotate: -2deg;
  filter: drop-shadow(0 30px 40px rgba(20, 45, 72, .35));
}
.og__main {
  flex: 1; display: flex; flex-direction: column; background: #fff; border-radius: 22px 0 0 22px; overflow: hidden;
  -webkit-mask: radial-gradient(circle at 100% 0, transparent 18px, #000 18.5px) top / 100% 51% no-repeat, radial-gradient(circle at 100% 100%, transparent 18px, #000 18.5px) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle at 100% 0, transparent 18px, #000 18.5px) top / 100% 51% no-repeat, radial-gradient(circle at 100% 100%, transparent 18px, #000 18.5px) bottom / 100% 51% no-repeat;
}
.og__head {
  display: flex; justify-content: space-between; align-items: center; padding: 20px 34px;
  background: linear-gradient(90deg, var(--navy), #2f5d8a); box-shadow: inset 0 -6px 0 var(--sky);
  font: 600 18px/1 var(--f-mono); letter-spacing: .24em; text-transform: uppercase; color: #fff;
}
.og__head span:first-child { font: 400 32px/1 var(--f-names); letter-spacing: .06em; text-transform: none; }
.og__head span:last-child { margin-right: 170px; }
.og__names { margin: 34px 34px 0; font: 400 96px/1 var(--f-names); color: var(--navy); white-space: nowrap; }
.og__names span { font: italic 400 .55em var(--f-serif); color: var(--maroon); }
.og__row { display: flex; align-items: center; gap: 22px; margin: auto 34px 34px; padding-top: 22px; border-top: 2px dashed var(--line); }
.og__row small { display: block; font: 600 14px/1.4 var(--f-mono); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-soft); }
.og__row b { display: block; font: 700 52px/1 var(--f-sans); color: var(--navy); }
.og__plane { width: 40px; height: 40px; fill: var(--maroon); rotate: 90deg; }
.og__when { margin-left: auto; text-align: right; }
.og__when b { font: 600 26px/1.3 var(--f-sans); }
.og__when span { font-size: 20px; color: var(--ink-soft); }
.og__stub {
  width: 220px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 34px 26px; background: #fff;
  border-radius: 0 22px 22px 0; border-left: 3px dashed rgba(36, 71, 107, .3);
  -webkit-mask: radial-gradient(circle at 0 0, transparent 18px, #000 18.5px) top / 100% 51% no-repeat, radial-gradient(circle at 0 100%, transparent 18px, #000 18.5px) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle at 0 0, transparent 18px, #000 18.5px) top / 100% 51% no-repeat, radial-gradient(circle at 0 100%, transparent 18px, #000 18.5px) bottom / 100% 51% no-repeat;
}
.og__stub p { font: 600 16px/1 var(--f-mono); letter-spacing: .3em; text-transform: uppercase; color: var(--maroon); }
.og__stub b { font: 700 30px/1 var(--f-mono); color: var(--navy); letter-spacing: .06em; }
.og__bar { height: 190px; width: 150px; flex-direction: column; gap: 3px; }
.og__bar i { width: 100% !important; height: calc(var(--w) * 2px); }
.og__stamp { position: absolute; right: 190px; top: -64px; width: 200px; height: 200px; rotate: -14deg; color: var(--red); mix-blend-mode: multiply; opacity: .9; }
.og__stamp svg { width: 100%; height: 100%; overflow: visible; }

/* =================================================================== MOTION */

@media (prefers-reduced-motion: reduce) {
  .cloud, .bank { display: none; }
}
