@font-face {
  font-family: 'Great Vibes';
  src: url('assets/great-vibes.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/cormorant-cyrillic.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/cormorant-latin.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/cormorant-italic-cyrillic.woff2') format('woff2');
  font-style: italic;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --cherry-deep: #3c1818;
  --cherry: #612825;
  --cherry-dark: #271111;
  --petal: #d5a29d;
  --cream: #fff2e8;
  --page: #3a1c29;
  --ink: #fff0e8;
  --ink-soft: #dec0ba;
  --paper-raised: #4a2333;
  --paper-accent: #ffd2b8;
  --paper-border: #b57d86;
  --paper-wash: #edbeab19;
  --paper-hover: #edbeab30;
  --paper-ribbon: #e9b9ac80;
  --field-fill: #553244;
  --reply-fill: #412131;
  --paper-button: #f1cbbd;
  --paper-button-ink: #4f1c2a;
  --paper-button-hover: #ffddd0;
  --scroll-thumb: #cf9a9873;
  --scroll-thumb-hover: #e0b0ada6;
  --metal: #efbe9e;
  --display: 'Cormorant Garamond', Georgia, serif;
  --body: system-ui, sans-serif;
  --viewport-height: 100vh;
  color-scheme: dark;
  scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent;
}

:root[data-theme="light"] {
  --page: #f3e4d5;
  --ink: #371b1a;
  --ink-soft: #674341;
  --paper-raised: #eed5c9;
  --paper-accent: #722639;
  --paper-border: #976267;
  --paper-wash: #fff4e55c;
  --paper-hover: #fff4e5cf;
  --paper-ribbon: #78363380;
  --field-fill: #fff9f3;
  --reply-fill: #f8e7dd;
  --paper-button: #e8bec0;
  --paper-button-ink: #522535;
  --paper-button-hover: #e3b0b4;
  --scroll-thumb: #190a0e66;
  --scroll-thumb-hover: #190a0e99;
  color-scheme: light;
}

@supports (height: 100dvh) {
  :root { --viewport-height: 100dvh; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; background: var(--cherry-dark); }
@supports selector(::-webkit-scrollbar) {
  html { scrollbar-width: auto; scrollbar-color: auto; }
  html::-webkit-scrollbar { width: 5px; height: 5px; }
  html::-webkit-scrollbar-track { background: transparent; }
  html::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 5px; }
  html::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); }
  html::-webkit-scrollbar-button { display: none; }
  html::-webkit-scrollbar-corner { background: transparent; }
}
body { position: relative; margin: 0; background: var(--page); color: var(--ink); font: 1rem/1.65 var(--body); }
:where(figure, p, h1, h2, h3) { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .28em; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; }
::selection { color: var(--cherry-dark); background: #e5b0ab; }

.envelope-covered { overflow: hidden; }
.envelope-covered > .invitation { visibility: hidden; }

.theme-toggle:not([hidden]) {
  position: fixed;
  z-index: 8;
  top: max(.75rem, env(safe-area-inset-top));
  right: max(.75rem, env(safe-area-inset-right));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--reply-fill) 78%, transparent);
  backdrop-filter: blur(6px);
  color: var(--ink);
  cursor: pointer;
}
.theme-toggle:hover { background: var(--reply-fill); }
.theme-toggle:focus-visible { outline: 2px solid currentColor; outline-offset: -4px; }
.theme-toggle svg {
  display: block;
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
:root[data-theme="dark"] .theme-moon,
:root[data-theme="light"] .theme-sun { display: none; }

.cover:not([hidden]) {
  --flap-shoulder: 28.5%;
  --flap-point: 59%;
  --cardstock-grain: url("data:image/webp;base64,UklGRlQEAABXRUJQVlA4IEgEAABwEACdASqAAIAAPolEnEulI6KhoRgJqKARCWlh/TYu7plrJOZVbqt34qwvg9QTjuLwrpq9gC10p+oeyi4w6ekzgmEUCfAwU0yq/DnqsQ7wIK7UYg5leYLDcsaT1s9sLqtAlmDQmN2YG+ydjg2DyBl3WJcftyjwXn2UwVvd0BMMXe3ZZLsMvh7k7c0SAAD+79pAsetIhB//3B+oP4gpUVlosGH+1F+4KjaoJgYDqlJ51OxLQ7TtJMyFpOMILCFT0vTBLZCpShbVA5wtdOF7dkbKJg8UPRuisvsb0KEeTyOHt4q+zNKZbUMCycvwzh6mDuGJi4xclz7biHkT8wa8AVgr1j64uBDmKMifxmlf3lVGJL7EQboYlWCG/ro/Cz/XUOSXib3XrDFVCGnuz7+BKoj6J4TE4zFXqj+2MQ77tpqirs7Fan5Mlc3exaSmVb06rE/pFh1Yp3NEyMSw3xA1fOjsDaytUM26QiPFdgKq5Uqv0zBpwIjf2xaKe34pC1gTcB16m97Mn6a/KTPI4j6TdPYX7BYXOWIoR6C3E+dsAq0ZenR/fMC/AdLhyYeedJLbeMYOiKZTacHMty1l74jmUl9XiwwH7La/JO0BsZauuAHxLPtNPDND7le1ySIlZ22W98MKfEwXeYB4iEE+s9OR1KhhYg7dZW6yqnhrZbjV9y3YksNgLrdSqQqAWXpSrcBZMcyELxrdJwc08HvDyFkS2cThtT8hJ66fNQWbcZm067wdOWmLmFEk1AAzLeu2Vrf+NDEctR7MwEGFTMpKDJ87bv7ZxTzL32tpwmullWgDwKFijrX7t/UQAG+ktNaExdaW3EnHyVqXC1IkCUtvVYBN9B3i66so2d93EkVMBuxgM1/SXa+UtiCXnMfc1flUcQLuxxwJZPGbdUuyqr0GszVmcDYkhS3ymygq1IBaZ161hCNjCddexfpVqqa0uzw2iArrqo49wfFSfsaLpoHhS1PSukBBmC/M04870CbkgHPBN8L+8mdmN21iUiZ36J8+A7AE6/NM8vvQGEniuvUb+OwrkpibgUQB9CDlmk58KFz6jN8V5x+fhuonKrZA/M1cC1k6X28oJ+90oKcOPksjXcIBvJJ5K/JEZf98VIpMhP2rmW36nFWaWeMZviBo6IMBnJA9L5+F+wR7Xhor2TVFfCjb5D52l2Bru5hsagRlqlO96JnXNONYw1VnquhknSFZAPUeDhlxXvmQWbdArbbZz9Tk+36fU8814aTDSG6KzQQJRJGxZYvqvxkHU1yEXPM++fPvwNL+C4JM2c6Zruf/vrg6oLU8YcJpHZ71rGYhFm1UEenoPfccMD66okylPI+vSLZieNqzmFw7RUEQNOgtk7Mm7ARERm+IT5kK8FurwL663E3LWfZa4NgmIXovFq5KPXcPnw9INPsNQjlEUf4QDW8z7z3C9QFSOjQHUpPTgPyWvDwOLHJEpmRsMAAA");
  position: fixed;
  z-index: 10;
  inset: 0 0 auto;
  height: var(--viewport-height);
  display: block;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at 52% 38%, #672625, #381014 62%, #21090e 100%);
  color: var(--cream);
  overscroll-behavior: contain;
  touch-action: pinch-zoom;
  user-select: none;
}

.envelope {
  position: absolute;
  top: 51%;
  left: 50%;
  width: max(102vw, calc(var(--viewport-height) * 1.62));
  aspect-ratio: 1.58;
  transform: translate(-50%, -50%) scale(var(--cover-scale, 1));
  isolation: isolate;
  perspective: 65rem;
}

.envelope-back {
  position: absolute;
  inset: 0;
  border-radius: .25rem;
  background:
    radial-gradient(ellipse at 48% 15%, #6e3126a0, #391313c7 68%, #1f0c0ce6),
    url('assets/envelope-cardstock.webp') center / cover,
    var(--cardstock-grain) center / 10rem;
  box-shadow: 0 1.4rem 3.25rem #17030a9c;
}

.envelope-flap {
  position: absolute;
  z-index: 4;
  inset: 0;
  transform: rotateX(var(--hinge, 0deg));
  transform-origin: center top;
  backface-visibility: hidden;
  filter: drop-shadow(0 10px 10px rgb(29 7 8 / .56)) drop-shadow(0 2px 1px #24090b);
}

.envelope-flap::before, .envelope-flap::after {
  position: absolute;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 100% var(--flap-shoulder), 54% calc(var(--flap-point) - 2%), 51.8% calc(var(--flap-point) - .5%), 50% var(--flap-point), 48.2% calc(var(--flap-point) - .5%), 46% calc(var(--flap-point) - 2%), 0 var(--flap-shoulder));
  content: '';
}

.envelope-flap::before {
  background:
    radial-gradient(ellipse at 43% 8%, #952b2e55, transparent 70%),
    linear-gradient(164deg, #771e24a0 4%, #5b151d7d 46%, #451218b8 100%),
    url('assets/envelope-cardstock.webp') center / cover,
    var(--cardstock-grain) center / 10rem;
}

.envelope-flap::after {
  background: linear-gradient(180deg, transparent 20%, #c1786f22 38%, #efc3a792 51%, transparent 55%);
  mask-image: linear-gradient(to bottom, transparent 42%, #000 51%);
  opacity: .55;
}

.envelope-pocket {
  position: absolute;
  z-index: 3;
  inset: 0;
  clip-path: polygon(0 var(--flap-shoulder), 50% calc(var(--flap-point) - 1%), 100% var(--flap-shoulder), 100% 100%, 0 100%);
  background:
    radial-gradient(ellipse at 48% 18%, #92303155, transparent 66%),
    linear-gradient(180deg, #7618235a 0%, #4b0e14a0 69%, #29090ddd 100%),
    url('assets/envelope-cardstock.webp') center / cover,
    var(--cardstock-grain) center / 10rem;
}

.envelope-pocket::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(#712a2690, #3b1013a3), url('assets/envelope-pocket.webp') center / 100% 100%;
  opacity: var(--pocket-detail, 0);
  content: '';
}

.envelope-letter {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 88%;
  min-height: 86%;
  padding: 2rem 1rem;
  transform: translate(-50%, calc(-50% + var(--letter-lift, 9svh))) rotate(var(--letter-turn, 3deg));
  opacity: 1;
  overflow: hidden;
  background:
    linear-gradient(128deg, #fff9e98a, #f0ccb41f),
    url('assets/envelope-letter.webp') center / cover;
  box-shadow: 0 1.15rem 2rem #2d0f1170, inset 0 0 0 1px #fff4de;
  color: var(--ink);
}

.envelope-letter::before {
  position: absolute;
  inset: .75rem;
  border: 1px solid #9f655a82;
  outline: 1px solid #fff5df;
  outline-offset: 3px;
  content: '';
}

.envelope-letter::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(159deg, #43211d71, transparent 62%);
  opacity: var(--flap-shade, 1);
  content: '';
}

.envelope-letter-copy { position: relative; z-index: 1; color: var(--cherry-deep); text-align: center; }
.letter-names { margin-bottom: .4rem; font: 600 clamp(3rem, 9vw, 5.1rem)/.95 var(--display); letter-spacing: -.025em; }

.envelope-button {
  position: absolute;
  z-index: 6;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: pinch-zoom;
  -webkit-tap-highlight-color: transparent;
}

.envelope-button:focus-visible { outline: 2px solid var(--cream); outline-offset: -9px; }
.is-opening .envelope-button { cursor: default; }

.seal {
  position: absolute;
  top: 54%;
  left: 50%;
  display: grid;
  place-items: center;
  width: clamp(7.5rem, max(16vw, 25svh), 20rem);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(-9deg);
  opacity: var(--controls-opacity, 1);
  transition: scale .22s ease;
}

.seal img {
  position: absolute;
  inset: 0;
  width: 100%;
  filter: sepia(.16) saturate(.85) drop-shadow(0 .38rem .34rem #21080c98);
}

.seal-mark {
  position: relative;
  color: #f2c1a3;
  font: 600 clamp(2rem, max(4.5vw, 6.3svh), 4.15rem)/1 var(--display);
  text-shadow: 0 1px #401515, 0 -1px #ffd9be60;
}

.envelope-recipient {
  position: absolute;
  top: 69%; left: 50%;
  transform: translateX(-50%);
  width: max-content; max-width: 84%;
  color: #d9ac75;
  font: 600 clamp(2.15rem, 5.3vw, 4.65rem)/1.02 var(--display);
  text-align: center;
  overflow-wrap: anywhere;
  text-shadow: -.035em -.035em #381015b8, .035em .055em #f4d0a566;
  opacity: var(--controls-opacity,1);
  pointer-events: none;
}

@media (hover: hover) { .envelope-button:hover .seal { scale: 1.045; } }

.open-arrows {
  position: absolute;
  bottom: max(9%, calc(env(safe-area-inset-bottom) + 1.5rem));
  left: 50%;
  display: grid;
  justify-items: center;
  gap: .1rem;
  padding: .8rem 1.15rem;
  transform: translateX(-50%);
  opacity: var(--controls-opacity, 1);
}

.open-arrows > span {
  width: 1.3rem;
  height: 1.3rem;
  border: solid #c09b83;
  border-width: 2.5px 0 0 2.5px;
  filter: drop-shadow(0 2px 3px #26040ccc);
  transform: rotate(45deg);
  animation: arrow-rise 1.5s ease-in-out infinite;
}

.open-arrows > span + span { animation-delay: .16s; }
@keyframes arrow-rise {
  0%, 100% { transform: translateY(.15rem) rotate(45deg); opacity: .72; }
  55% { transform: translateY(-.55rem) rotate(45deg); opacity: 1; }
}

.wedding-scene {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.cover > .wedding-scene { z-index: 2; }
.envelope-letter:has(.hero) > .envelope-letter-copy { display: none; }

.cover.scene-ready :is(.envelope, .seal, .envelope-recipient) { visibility: hidden; }
body > .wedding-scene {
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
}
.details-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.details-heading-row h2 { font-size: clamp(2.35rem, 8.5vw, 5.2rem); }
.wax-impression {
  position: relative;
  flex: none;
  width: clamp(5.6rem, 11vw, 9.5rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: url('assets/envelope-wax.webp') center / contain no-repeat;
  color: #8a4144;
  font: 600 clamp(1.7rem, 3.2vw, 2.8rem)/1 var(--display);
  text-shadow: 0 -1px 1px #22090f, 0 1px 1px #da8583;
  filter: drop-shadow(.18rem .45rem .25rem #18070b80);
}
.wax-impression.is-rendered { visibility: hidden; }
.hero-inner, .route-heading, .route-stops, .details-inner, .moments-title, .moments-photos {
  position: relative;
  z-index: 3;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: var(--viewport-height);
  overflow: clip;
  background: linear-gradient(115deg, #571b2166, #270c17bb), url('assets/envelope-cardstock.webp') center / 240% auto;
  color: var(--cream);
}

.hero::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: url('assets/rose-texture.webp') -23vw 3% / 78vw auto no-repeat,
    url('assets/rose-texture.webp') 65vw 88% / 68vw auto no-repeat;
  filter: drop-shadow(1.2rem 1.6rem .7rem #170309b3);
  content: '';
}
.hero.still-life-ready::before { visibility: hidden; }
.hero-paper-surface, .hero-still-life {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-paper-surface { z-index: 0; }
.hero:not(.still-life-ready) .hero-paper-surface { visibility: hidden; }
.hero-still-life { z-index: 4; }
.hero::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: radial-gradient(ellipse at 50% 54%, #24081163, transparent 75%);
  pointer-events: none;
  content: '';
}
.hero-inner {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: var(--viewport-height);
  max-width: 75rem;
  margin: 0 auto;
  padding: 2.2rem 1.5rem max(2.2rem, env(safe-area-inset-bottom));
}

.hero.is-emerging {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100vw;
  height: var(--viewport-height);
  transform-origin: 0 0;
  visibility: hidden;
  will-change: transform;
  pointer-events: none;
}

.hero-letter-print { position: absolute; pointer-events: none; }
.hero.is-emerging.has-letter-print .hero-letter { visibility: hidden; }

.soft-photo {
  position: relative;
  isolation: isolate;
  --edge-inset: 13%;
}

.soft-photo::before {
  position: absolute;
  z-index: -1;
  inset: 5%;
  background: var(--photo) center / cover;
  filter: blur(24px) saturate(.92);
  opacity: .57;
  content: '';
}

.soft-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--photo-position, center);
  mask-image: linear-gradient(90deg, transparent, #000 var(--edge-inset), #000 calc(100% - var(--edge-inset)), transparent),
              linear-gradient(180deg, transparent, #000 9%, #000 88%, transparent);
  mask-composite: intersect;
}

.hero-letter {
  position: relative;
  z-index: 3;
  width: min(100%, 42rem);
  margin: 0;
  padding: 0;
  text-align: center;
}
.hero-letter h1 {
  font: 500 clamp(4.35rem, 9vw, 6rem)/.9 var(--display);
  letter-spacing: -.035em;
}
.hero-letter h1 span { display: block; }
.hero-letter h1 em { display: block; margin: .1em 0 .16em; font-size: .43em; line-height: .85; color: #f2c9b7; font-weight: 400; }
.hero-letter h1:focus { outline: none; }
.letter-names em, .sign-off em { color: #783633; font-weight: 400; }
.hero-date { margin-top: 1.5rem; color: #f5d2b9; font: 500 1.45rem/1.3 var(--display); }
.hero-greeting { margin-top: 2.1rem; font: 500 2rem/1.1 var(--display); }
.hero-message { max-width: 31ch; margin: .8rem auto 0; color: #fff0e7; line-height: 1.6; }
.hero-links { display: flex; justify-content: center; flex-wrap: wrap; gap: .2rem 1.5rem; margin-top: 1.4rem; align-items: baseline; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: .8rem; font-weight: 600; }
.text-link:hover { color: #fad7b5; }
.hero-links .text-link:first-child { color: #ffdcba; }
.hero-links .hero-reply {
  padding-inline: 1.15rem;
  border: 1px solid #f5d2b955;
  border-radius: 999px;
  background: #e8bc9c19;
  text-decoration: none;
}

.day-route {
  position: relative;
  overflow: clip;
  padding: clamp(3.4rem, 9vw, 7.7rem) clamp(1.1rem, 6.25vw, 5.7rem) clamp(3.1rem, 9vw, 7rem);
  background:
    radial-gradient(ellipse at 50% 32%, #fff4e5bb, transparent 76%),
    linear-gradient(180deg, #f7e0d4b3, #f2d2c79e),
    url('assets/envelope-letter.webp') center / cover;
}

.route-heading { max-width: 56rem; margin-inline: auto; text-align: center; }

.route-heading h2 {
  font: 600 clamp(3rem, 7vw, 6rem)/.97 var(--display);
  letter-spacing: -.037em;
  text-wrap: balance;
}

.route-heading p { margin-top: .8rem; color: var(--ink-soft); }

.route-map {
  --route-channel: 0px;
  --route-row: clamp(10rem, 33svh, 15rem);
  position: relative;
  max-width: 58rem;
  /* The walkers stand above the path's first point, so reserve their height. */
  margin: clamp(6.3rem, 12vw, 7.4rem) auto 0;
}

.route-art {
  position: absolute;
  top: 0;
  left: 50%;
  width: 100%;
  height: 100%;
  overflow: visible;
  transform: translateX(-50%);
}

.route-track, .route-travelled {
  fill: none;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.route-track { stroke: #b27a72c9; stroke-width: 1.3px; }
.route-travelled { display: none; stroke: #722c37; stroke-width: 1.85px; }
.route-traveller { display: none; }
.route-tracking :is(.route-travelled, .route-traveller) { display: block; }

.route-stops {
  display: grid;
  grid-template-rows: repeat(3, minmax(var(--route-row), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.route-stop {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--route-channel) minmax(0, 1fr);
  align-items: center;
}

.route-stop h3 {
  justify-self: center;
  max-width: 100%;
  padding-inline: .4rem;
  color: #673039;
  font: 600 clamp(1.9rem, 4.7vw, 4.2rem)/.99 var(--display);
  letter-spacing: -.025em;
  text-align: center;
  text-wrap: balance;
  transition: opacity .4s ease, transform .4s ease, color .23s ease;
}

.route-stop:nth-child(even) h3 {
  grid-column: 3;
  justify-self: center;
  text-align: center;
}

.route-stop-reached h3 { color: #361318; }

@media (prefers-reduced-motion: no-preference) {
  .route-tracking .route-stop:not(.route-stop-reached) h3 {
    opacity: 0;
    transform: translateY(.55rem);
  }
}

.details {
  position: relative;
  overflow: clip;
  padding: clamp(3.1rem, 7vw, 6.75rem) clamp(1.25rem, 6.5vw, 5rem);
  background:
    linear-gradient(112deg, #341617a8, #4a1d1b9e 66%, #55241f9e),
    url('assets/envelope-cardstock.webp') center / 240% auto;
  color: var(--cream);
}

.details-inner { max-width: 70rem; margin: 0 auto; }
.details h2, .moments h2 {
  font-family: var(--display);
  font-size: clamp(3rem, 6.1vw, 5.2rem);
  font-weight: 600;
  line-height: .99;
  letter-spacing: -.025em;
}
.details-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.25rem, 6vw, 6rem); margin-top: 1.5rem; }
.details-item { padding-top: 1rem; border-top: 1px solid #d6a29285; }
.details-item h3 { color: #edc3b7; font: 600 1.18rem/1.4 var(--display); }
.details-value { margin: .45rem 0 .32rem; font: 600 clamp(2.2rem, 5.2vw, 3.55rem)/1 var(--display); }
.details-note { color: #f5d8ce; }
.map-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 1rem;
  padding: .45rem 1.05rem;
  border: 1px solid #e0a99798;
  border-radius: 2rem;
  background: #f1b2a515;
  text-decoration: none;
}
.map-link:hover { background: #f1b2a52b; }

.moments {
  overflow: clip;
  padding: clamp(3.3rem, 8vw, 7.2rem) clamp(1.25rem, 6.5vw, 5rem) 1rem;
  background: radial-gradient(ellipse at 63% 65%, #efd0cd, transparent 70%), var(--page);
}

.moments-title { max-width: 68rem; margin-inline: auto; }
.moments-title p { margin-top: .43rem; color: var(--ink-soft); }
.moments-photos {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: clamp(.4rem, 2vw, 2rem);
  max-width: 57rem;
  margin: 1.25rem auto 0;
}
.moments-photos .soft-photo { aspect-ratio: 4 / 4.95; --edge-inset: 10%; }
.moment-roses { margin-top: clamp(1.2rem, 5vw, 4.5rem); --photo: url('assets/roses.webp'); --photo-position: 52% 65%; }
.moment-ring { --photo: url('assets/ring.webp'); --photo-position: 50% 54%; }
.sign-off { padding: 2.6rem 1rem 3.4rem; background: var(--page); color: var(--ink-soft); text-align: center; }
.sign-off p:last-child { margin-top: .2rem; color: var(--ink); font: 600 2.5rem/1.2 var(--display); }

@media (max-width: 760px) {
  .hero-inner { padding: 1.6rem 1.25rem max(1.6rem, env(safe-area-inset-bottom)); }
  .hero-letter { width: 100%; }
  .hero-letter h1 { font-size: clamp(4.15rem, 18.7vw, 6rem); }
  .hero-date { margin-top: 1.25rem; }
  .hero-greeting { margin-top: 1.9rem; }
  .hero-links { margin-top: 1.15rem; gap: .2rem 1.25rem; }
  .hero-links .text-link { margin-top: 0; }
  .route-heading h2 { font-size: clamp(2.7rem, 10.8vw, 4.5rem); }
  .route-stop h3 { font-size: clamp(1.4rem, 6vw, 2rem); }

}

@media (max-aspect-ratio: 4 / 5) {
  .cover:not([hidden]) { --flap-shoulder: 33%; --flap-point: 56.5%; }
  .envelope { width: max(102vw, calc(var(--viewport-height) * .72)); aspect-ratio: .69; }
  .seal { top: 56%; width: clamp(5.5rem, 17svh, 10.8rem); }
  .seal-mark { font-size: clamp(1.75rem, 4svh, 2.85rem); }
}

@media (max-width: 460px) {
  .details-list { grid-template-columns: minmax(0, 1fr); }
  .moments { padding-inline: .85rem; }
  .moments-title { padding-inline: .4rem; }
}

@media (max-height: 500px) {
  .seal { width: clamp(3.55rem, 18vh, 5.3rem); }
  .open-arrows { bottom: 6%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .seal { transition: none; }
  .open-arrows > span { animation: none; }
}

[data-motion-text] {
  --ribbon-angle: -7deg;
  --ribbon-position: 72%;
  --ribbon-color: #78363380;
  --ribbon-wash: #c1807311;
  position: relative;
  isolation: isolate;
  overflow: clip;
}


.details {
  display: flex;
  flex-direction: column;
  gap: clamp(2.25rem, 4.8vw, 4rem);
  padding-bottom: clamp(1.45rem, 3.3vw, 2.8rem);
}

.moments {
  --ribbon-position: 69%;
  --ribbon-angle: -13deg;
  --ribbon-color: #9859567a;
  --ribbon-wash: #ad635815;
}

.sign-off {
  padding-bottom: 4.5rem;
}

.details-inner { width: 100%; }

.hero-inner, .details-inner, .moments-title, .moments-photos, .sign-off p {
  position: relative;
  z-index: 1;
}

.motion-ribbon {
  position: absolute;
  z-index: 0;
  top: var(--ribbon-position);
  right: -18vw;
  left: -18vw;
  overflow: hidden;
  transform: translateY(calc(var(--parallax-offset, 0px) * .8)) rotate(var(--ribbon-angle));
  border-block: 1px solid var(--ribbon-color);
  background: var(--ribbon-wash);
  color: var(--ribbon-color);
  pointer-events: none;
}

.motion-ribbon-track {
  display: flex;
  width: max-content;
  padding-block: .27em .33em;
  font: 600 clamp(1.25rem, 3.5vw, 2.55rem)/1.06 var(--display);
  white-space: nowrap;
  animation: ribbon-travel 34s linear infinite paused;
}

.motion-ribbon-words {
  display: flex;
  flex: none;
  justify-content: space-around;
  gap: 2.4em;
  min-width: 145vw;
  padding-inline: 1.2em;
}

@keyframes ribbon-travel { to { transform: translateX(-50%); } }

.hero .motion-ribbon {
  top: auto;
  bottom: clamp(.7rem, 3vw, 2.15rem);
  transform: translateY(calc(var(--parallax-offset, 0px) * .45));
  border: 0;
  background: none;
  color: #f5c4ac3f;
}
.hero.still-life-ready > .motion-ribbon { display: none; }

.hero .motion-ribbon-track {
  animation-duration: 62s;
  font-size: clamp(2.7rem, 7.1vw, 6rem);
  font-weight: 400;
  font-style: italic;
}

.details .motion-ribbon {
  position: relative;
  inset: auto;
  order: 1;
  align-self: center;
  width: calc(100% + 2 * clamp(1.25rem, 6.5vw, 5rem));
  margin-inline: calc(-1 * clamp(1.25rem, 6.5vw, 5rem));
  padding-top: .6rem;
  transform: none;
  border: 0;
  border-top: 1px solid #e8b6a039;
  background: none;
  color: #edbdab9f;
}

.details .motion-ribbon-track { font-size: 1.3rem; letter-spacing: .04em; animation-direction: reverse; }
.moments .motion-ribbon-track { font-size: clamp(1.45rem, 3.3vw, 2.35rem); font-style: italic; }

.sign-off .motion-ribbon {
  top: auto;
  bottom: 0;
  transform: none;
  border: 0;
  background: none;
  color: #a1625d78;
}

.sign-off .motion-ribbon-track { font-size: 1.15rem; letter-spacing: .07em; animation-direction: reverse; }

.moment-couple { translate: 0 calc(var(--parallax-offset, 0px) * -.2); }
.moment-roses { translate: 0 calc(var(--parallax-offset, 0px) * .52); }
.moment-ring { translate: 0 calc(var(--parallax-offset, 0px) * -.4); }

.motion-visible .motion-ribbon-track { animation-play-state: running; }
.envelope-covered .motion-ribbon-track { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  [data-motion-text] { --parallax-offset: 0px !important; }
  .motion-ribbon-track { animation: none; }
  .route-stop h3 { transition: none; }
  .route-tracking :is(.route-travelled, .route-traveller) { display: none; }
}

/* The 3D scene occupies page edges, leaving copy and the route unobstructed. */
.hero-inner, .route-heading, .route-stops, .details-inner, .moments-title, .moments-photos, .sign-off p { z-index: 3; }
[data-motion-text] { isolation: auto; }
.day-route { isolation: auto; }

.hero-inner { z-index: 3; }
.hero-letter { position: relative; z-index: 3; }

.moment-couple { grid-column: 1 / -1; width: min(100%, 38rem); justify-self: center; --photo: url('assets/lika-zhenya.webp'); --photo-position: center 42%; }
.moments, .sign-off { background-image: linear-gradient(#f8ebea99, #f8ebea99), url('assets/envelope-letter.webp'); background-size: auto, 180% auto; }
@media (max-height: 690px) {
  .hero-inner { padding-block: 1.15rem; }
  .hero-letter h1 { font-size: clamp(3.8rem, 17.5vw, 5rem); }
  .hero-greeting { margin-top: 1.3rem; }
  .hero-date { margin-top: 1rem; }
  .hero-links { margin-top: .75rem; }
}

/* The paper, flowers and copy keep the same layer order in every section. */
.paper-section, .dark-paper-section { position: relative; overflow: clip; }
.paper-section {
  background: linear-gradient(#f8ebea42, #f8ebea42), url('assets/envelope-letter.webp') center / 180% auto, #f5e6de;
  color: var(--ink);
  padding: clamp(4rem, 9vw, 7.5rem) 1.4rem;
}
.dark-paper-section {
  background: linear-gradient(125deg, #36101955, #230a15a1), url('assets/envelope-cardstock.webp') center / 240% auto, #4a1824;
  color: var(--cream);
  padding: clamp(4rem, 9vw, 7.5rem) 1.4rem;
}
.section-inner { position: relative; z-index: 3; width: min(100%, 66rem); margin-inline: auto; }
.section-inner h2 { font: 500 clamp(2.7rem, 6.6vw, 4.8rem)/.95 var(--display); letter-spacing: -.035em; text-wrap: balance; }
.section-lead { max-width: 35ch; margin: 1.1rem auto 0; line-height: 1.7; text-wrap: pretty; }
.date-inner { max-width: 42rem; text-align: center; }
.date-month { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 3rem auto 1.5rem; max-width: 28rem; font: 500 2rem/1.2 var(--display); }
.date-month span { font-size: 1.4rem; }
.calendar-days { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); max-width: 29rem; margin: 0 auto 2.1rem; border-block: 1px solid #8f514253; }
.calendar-days > div { position: relative; padding: 1.35rem .2rem; }
.calendar-days span { display: block; font-size: .8rem; }
.calendar-days b { display: block; margin-top: .35rem; font: 500 clamp(3.6rem, 11vw, 5.5rem)/1 var(--display); }
.calendar-chosen { color: #842d3c; }
.calendar-chosen::after { position: absolute; inset: .55rem .25rem; border: 1.5px solid #9b4b58; border-radius: 49% 52% 48% 46%; transform: rotate(-9deg); content: ''; }
.countdown { color: var(--ink-soft); }
#wedding-countdown { display: block; margin-top: .2rem; color: #783d44; font: 500 2.4rem/1.2 var(--display); }
.dress-inner { text-align: center; }
.dress-palette { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(.4rem, 1.9vw, 1.4rem); max-width: 45rem; margin: 3.6rem auto 2rem; }
.dress-swatch { width: 100%; aspect-ratio: .72; background: url('assets/envelope-letter.webp') center / 260px, var(--swatch); background-blend-mode: multiply; transform: rotate(var(--tilt)); border-radius: 2px; box-shadow: .35rem .7rem .9rem #36121d26; }
.dress-palette figcaption { position: relative; margin-top: 1.25rem; font-size: .9rem; line-height: 1.35; }
.dress-note { max-width: 48ch; margin: 2.2rem auto 0; color: var(--ink-soft); text-wrap: pretty; }
.wishes-inner { display: grid; grid-template-columns: .9fr 1fr; align-items: start; gap: clamp(2.5rem, 7vw, 6rem); }
.wishes-copy { padding-top: .25rem; }
.wishes-copy > div + div { margin-top: 2.6rem; }
.wishes-copy h3 { font: 500 2rem/1.15 var(--display); color: #f5cfb8; }
.wishes-copy p { margin-top: .75rem; max-width: 40ch; color: #f9e5dd; line-height: 1.8; }
.contacts-inner { text-align: center; }
.contact-name { display: block; width: fit-content; margin: 2rem auto .8rem; font: 500 4.5rem/1 var(--display); text-decoration: none; }
.contact-name span { display: block; margin-top: .7rem; font: 1rem/1.5 var(--body); text-decoration: underline; text-underline-offset: .3em; }
.contact-note { margin: 1.4rem auto 0; max-width: 35ch; color: var(--ink-soft); }
.reply-inner {
  max-width: 46rem;
  padding: clamp(1.4rem, 4vw, 3rem);
  border: 1px solid #f4d0c750;
  border-radius: 16px;
  background: linear-gradient(135deg, #86455938, #35101c99);
  backdrop-filter: blur(18px) saturate(.85);
  -webkit-backdrop-filter: blur(18px) saturate(.85);
}
.reply-inner h2, .reply-inner > .section-lead { text-align: center; }
#guest-form { margin-top: 3rem; }
#guest-form > label, #guest-company > label { display: block; margin: 1.8rem 0 .45rem; }
#guest-form :is(input:not([type=radio]), textarea), #reply-message {
  width: 100%;
  min-height: 50px;
  padding: .75rem 1rem;
  border: 0;
  border-radius: 1rem;
  outline-offset: 3px;
  background: var(--field-fill);
  color: var(--ink);
  font: inherit;
}
#guest-form textarea, #reply-message { resize: vertical; }
#guest-form :is(input,textarea):focus-visible, #reply-message:focus-visible { outline: 2px solid #eab9a3; }
#guest-form .field-hint { margin: .5rem 0 0; color: #e6c4bd; font-size: .85rem; line-height: 1.55; }
.attendance-options { margin: 1.9rem 0 1rem; padding: 0; border: 0; }
.attendance-options legend { padding: 0; margin-bottom: .65rem; }
.attendance-options label { display: flex; align-items: center; gap: .8rem; min-height: 44px; cursor: pointer; }
.attendance-options input { width: 18px; height: 18px; margin: 0; accent-color: #e9bea8; }
.action-link { display: inline-flex; justify-content: center; align-items: center; gap: .75rem; min-height: 52px; padding: .8rem 1.4rem; border: 0; border-radius: 999px; background: #f3d8c5; color: #4f1c2a; font: 600 1.05rem/1.3 var(--body); text-decoration: none; cursor: pointer; }
.action-link:hover { background: #ffead8; }
.action-link:focus-visible, button.text-link:focus-visible { outline: 2px solid #fff0dc; outline-offset: 5px; }
#guest-form > .action-link { width: 100%; margin-top: 2rem; }
.form-note { margin-top: .9rem; color: #e8c9c2; font-size: .85rem; line-height: 1.6; }
.reply-preview { margin-top: 2.8rem; padding-top: 2rem; border-top: 1px solid #e6b5ad80; }
.reply-preview h3 { margin-bottom: 1rem; font: 500 2rem/1.2 var(--display); }
#reply-message { padding: 1rem; font-size: .93rem; line-height: 1.65; }
.reply-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.3rem; margin-top: 1.1rem; }
button.text-link { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: .3em; cursor: pointer; }
.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; }
@media (max-width: 600px) {
  .paper-section, .dark-paper-section { padding-inline: 1.25rem; }
  .date-month { margin-top: 2.2rem; }
  .dress-palette { gap: .5rem; margin-top: 2.8rem; }
  .dress-palette figcaption { font-size: .74rem; }
  .wishes-inner { grid-template-columns: 1fr; gap: 2rem; }
  .wishes-copy > div:last-child { padding-inline-end: 22vw; }
  .reply-actions > .action-link { width: 100%; }
}

.action-link svg, .contact-name svg { flex: none; display: inline-block; width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.6; vertical-align: middle; }

/* Give moving type its own strip, clear of copy at every viewport width. */
:is(.paper-section, .dark-paper-section) > .motion-ribbon {
  position: relative;
  inset: auto;
  width: calc(100% + 2.8rem);
  margin: 3.2rem -1.4rem -1.6rem;
  transform: rotate(-2deg);
}
.dark-paper-section > .motion-ribbon { color: #ebbbab73; border-color: #ebbbab40; }

/* Calligraphy carries the invitation; practical details keep a reading face. */
:root { --handwriting: 'Great Vibes', 'Cormorant Garamond', cursive; }
.hero-letter h1 { font: 400 clamp(5.2rem, 10vw, 7rem)/1.04 var(--handwriting); letter-spacing: 0; }
.hero-letter h1 em { margin: -.02em 0 .04em; font: 400 .34em/1 var(--handwriting); }
.hero-greeting { font: 400 2.6rem/1.2 var(--handwriting); margin-top: 1.6rem; }
.hero-message { max-width: 29ch; font-size: 1.0625rem; line-height: 1.7; text-wrap: pretty; }
.section-inner h2, .route-heading h2, .details h2, .moments h2 {
  font: 400 clamp(3.2rem, 7vw, 5rem)/1.18 var(--handwriting);
  letter-spacing: 0; padding-block: .1em;
}
.contact-name { font-family: var(--handwriting); font-size: 5rem; line-height: 1.2; }
.sign-off p:last-child { font-family: var(--handwriting); font-size: 3.6rem; line-height: 1.3; }
.section-lead, .dress-note, .wishes-copy p, .contact-note { font-size: 1.0625rem; line-height: 1.75; }
:is(.paper-section,.moments,.sign-off,.day-route) {
  background: url('assets/paper-color-2k.jpg?v=32') center / var(--paper-grain-size, 1024px) auto, var(--page);
  background-blend-mode: multiply;
}
:is(.dark-paper-section,.details,.hero) {
  background: url('assets/paper-height-2k.jpg?v=32') center / var(--paper-grain-size, 1024px) auto,
    url('assets/paper-color-2k.jpg?v=32') center / var(--paper-grain-size, 1024px) auto, var(--section-paper, var(--paper-raised));
  background-blend-mode: soft-light, multiply;
}
.hero { --section-paper: #622238; }
:is(.dark-paper-section, .details) { color: var(--ink); }
:is(.paper-section, .moments, .day-route) .motion-ribbon { color: var(--paper-ribbon); border-color: var(--paper-ribbon); }
.sign-off .motion-ribbon, .details .motion-ribbon, .dark-paper-section > .motion-ribbon { color: var(--paper-ribbon); }
.dark-paper-section > .motion-ribbon { border-color: var(--paper-ribbon); }
.route-track { stroke: var(--paper-border); }
.route-travelled { stroke: var(--paper-accent); }
:root[data-theme="dark"] .route-traveller svg { filter: drop-shadow(0 0 1px #e6bca580); }
.route-stop h3, .route-stop-reached h3, .sign-off p em { color: var(--ink); }
.details-item { border-color: var(--paper-border); }
.details-item h3, .wishes-copy h3 { color: var(--paper-accent); }
.details-note, .wishes-copy p { color: var(--ink-soft); }
.map-link { border-color: var(--paper-border); background: var(--paper-wash); }
.map-link:hover { background: var(--paper-hover); }
.details-inner, .wishes-inner { z-index: auto; }
.details .map-link { display: flex; width: fit-content; margin-inline-start: auto; }
.calendar-days { border-color: var(--paper-border); }
.calendar-chosen, #wedding-countdown { color: var(--paper-accent); }
.calendar-chosen::after { border-color: var(--paper-border); }
.reply-inner { background: color-mix(in srgb, var(--reply-fill) 90%, transparent); border-color: var(--paper-border); }
.reply-preview { border-color: var(--paper-border); }
#guest-form .field-hint, .form-note { color: var(--ink-soft); }
.attendance-options input { accent-color: var(--paper-accent); }
#guest-form :is(input,textarea):focus-visible, #reply-message:focus-visible,
.action-link:focus-visible, button.text-link:focus-visible { outline-color: var(--paper-accent); }
.action-link { color: var(--paper-button-ink); background: var(--paper-button); }
.action-link:hover { background: var(--paper-button-hover); }
.hero::after { background: radial-gradient(ellipse at 50% 49%, #2109149c, #21091420 75%); }
.hero { isolation: isolate; }
.hero.still-life-ready:not(.is-emerging) { overflow: visible; z-index: 1; }
.dress-palette figcaption { font-size: .9rem; }
.calendar-days span, #guest-form .field-hint, .form-note { font-size: .9rem; }
.dress-palette { gap: 1.1rem; }
.dress-swatch { background-image: url('assets/paper-color-2k.jpg?v=32'); background-size: var(--paper-grain-size, 1024px) auto; }
@media (max-width:600px) {
  .hero::before {
    background-position: -36vw 0, 72vw 93%;
    background-size: 64vw auto, 62vw auto;
  }
  .hero-letter h1 { font-size: clamp(4.8rem, 23vw, 6rem); }
  .hero-inner { padding-inline: 1.6rem; }
  .hero-links { gap: 0 1.2rem; }
  .wedding-date { padding-block-start: clamp(5.5rem, 28vw, 8rem); }
  .dress-palette { grid-template-columns: repeat(3,1fr); max-width: 27rem; gap: 1.8rem 1.4rem; }
  .dress-swatch { aspect-ratio: .8; }
  .dress-palette figcaption { margin-top: .85rem; }
  .section-inner h2, .route-heading h2, .details h2, .moments h2 { font-size: clamp(3rem, 12vw, 4rem); }
}
@media (max-height:690px) {
  .hero-letter h1 { font-size: clamp(4.2rem, 20vw, 5.2rem); }
  .hero-greeting { font-size: 2.2rem; margin-top: 1rem; }
  .hero-date { margin-top: .8rem; }
  .hero-links { margin-top: .4rem; }
}

.loading-date { margin-bottom:2.4rem; font:500 1rem/1.5 var(--display); letter-spacing:.1em; }
.loading-names { max-width:90vw; font:400 clamp(3.6rem,13vw,6rem)/1.2 var(--handwriting); }
.loading-names span { font-size:.58em; padding-inline:.05em; }
.loading-caption { margin-top:1.75rem; font:500 1.4rem/1.4 var(--display); }
.loading-progress { width:min(64vw,280px); height:3px; margin-top:1.1rem; overflow:hidden; background:#d5a28b39; border-radius:3px; }
.loading-progress > span { display:block; width:100%; height:100%; border-radius:inherit; background:#d6a88f; transform:scaleX(var(--loaded,0)); transform-origin:left; transition:transform .24s ease-out; }
.loading-percent { margin-top:.55rem; font:500 1.15rem/1.4 var(--display); font-variant-numeric:tabular-nums; color:#d5ada0; }
.loading-signature {
  position: absolute;
  top: 54%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(5deg);
  font: 600 clamp(2.1rem, 5.2svh, 3.8rem)/1 var(--display);
  color: #e7c2ac;
}
.loading-seal-mark {
  position: absolute;
  inset: 0 auto auto 0;
  width: 512px;
  height: 512px;
  transform-origin: 0 0;
  pointer-events: none;
}
.seal-aligned:not(.loading-error) .loading-signature { opacity: 0; }
@media (max-aspect-ratio: 4 / 5) {
  .loading-signature { top: 56%; }
}
@media (max-height: 500px) {
  #loading-screen { padding-bottom: 1.15rem; }
}

/* The path may stretch; its people and milestones live in an unscaled layer. */
.route-signposts { position:absolute; inset:0; pointer-events:none; }
.route-signpost { position:absolute; display:block; width:12px; height:12px; border:1.2px solid var(--paper-border); background:var(--page); border-radius:50%; transform:translate(-50%,-50%); }
.route-signpost-reached { background:var(--paper-accent); border-color:var(--paper-accent); }
.route-traveller { position:absolute; left:50%; top:0; z-index:4; width:clamp(4.5rem,7vw,5.5rem); aspect-ratio:84/96; transform:translate(-50%,-100%); pointer-events:none; }
.route-traveller svg { display:block; width:100%; height:100%; overflow:visible; filter:drop-shadow(1px 2px 1.5px #44213124); }
.route-traveller .groom { transform:translateY(calc(var(--bounce,0px) * -1)); }
.route-traveller .bride { transform-origin:57px 94px; transform:translateY(calc(var(--bounce,0px) * -.7)) scale(.86); }
.route-traveller .leg-front { transform:rotate(var(--stride,0deg)); }
.route-traveller .leg-back { transform:rotate(calc(var(--stride,0deg) * -1)); }
.groom-leg.leg-front { transform-origin:20px 64px; }
.groom-leg.leg-back { transform-origin:29px 64px; }
.bride-leg.leg-front { transform-origin:53px 79px; }
.bride-leg.leg-back { transform-origin:61px 79px; }
.bride-veil { transform:rotate(calc(var(--stride,0deg) * .12)); transform-origin:57px 22px; }
@media (prefers-reduced-motion:reduce) {
  .loading-progress > span { transition:none; }
  .route-tracking .route-traveller { display:none; }
}

/* A softly defocused desktop remains behind the sharp, floating envelope. */
.desk-scene { position:absolute; inset:-7px; width:calc(100% + 14px); height:calc(100% + 14px); z-index:0; filter:blur(3px); pointer-events:none; }
.cover.desk-ready { background:#38271e; }
.loading-caption { font-size:clamp(1.45rem,6vw,1.8rem); margin-top:1.5rem; }
.wedding-date .text-link { display:inline-flex; align-items:center; justify-content:center; min-height:48px; margin-top:1.4rem; padding:.75rem 1.2rem; border:1px solid var(--paper-border); background:var(--paper-wash); text-decoration:none; }
.wedding-date .text-link:hover { color:var(--paper-accent); background:var(--paper-hover); }
@media (prefers-reduced-motion:no-preference) {
  .reveal-item:not(.is-visible) { opacity:0; transform:translateY(12px); }
  .reveal-item.is-visible { animation:paper-appear .6s cubic-bezier(.2,.7,.2,1) var(--reveal-delay,0ms) both; }
  .ink-reveal.is-visible { transform:none; animation:ink-write 1.25s cubic-bezier(.25,.1,.3,1) var(--reveal-delay,0ms) both; }
  .route-stop-reached h3 { animation:ink-write 1.1s ease-out both; }
}
@keyframes paper-appear { from {opacity:0;transform:translateY(12px)} to {opacity:1;transform:translateY(0)} }
@keyframes ink-write {
  0% {mask-image:linear-gradient(90deg,#000 49%,transparent 51%);mask-size:230% 100%;mask-position:100% 0;mask-repeat:no-repeat;opacity:1}
  99% {mask-image:linear-gradient(90deg,#000 49%,transparent 51%);mask-size:230% 100%;mask-position:0 0;mask-repeat:no-repeat;opacity:1}
  100% {mask-image:none;opacity:1}
}

/* Turn the objects without competing with their entry animation or parallax. */
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .dress-swatch, .soft-photo img, .soft-photo::before { transition:transform .65s cubic-bezier(.16,1,.3,1),filter .65s ease; }
  .dress-palette figure:hover .dress-swatch {
    transform:perspective(700px) rotateX(-7deg) rotateY(21deg) rotateZ(calc(var(--tilt) * -1)) scale(1.045);
  }
  .soft-photo:hover img, .soft-photo:hover::before {
    transform:perspective(900px) rotateX(4deg) rotateY(-12deg) rotateZ(3deg) scale(1.035);
  }
}
.date-month .calendar-month-label { font-size:inherit; }
.calendar-days > .calendar-reel { position:absolute; inset:0; padding:0; overflow:hidden; pointer-events:none; }
.calendar-reel[hidden] { display:none; }
.calendar-strip { display:flex; width:max-content; }
.calendar-strip-day { flex:none; padding:1.35rem .2rem; }
.calendar-strip-wedding { color:var(--paper-accent); }
.calendar-days.is-counting > div:not(.calendar-reel) > span,
.calendar-days.is-counting > div:not(.calendar-reel) > b { visibility:hidden; }
.calendar-days.is-counting .calendar-chosen::after { z-index:1; }
.calendar-days.is-counting .calendar-strip { will-change:transform; }

@media (max-width: 600px) {
  :root { --paper-grain-size: 640px; }
}

#loading-screen.loading-error { place-content: center; padding: 2rem; }
.loading-error :is(.loading-progress, .loading-percent, .loading-seal-mark) { display: none; }
.loading-error .loading-signature { position: static; transform: none; grid-row: 1; }
.loading-error .loading-caption { max-width: 22ch; }
.loading-error-message { max-width: 27ch; margin: .8rem auto 0; font: 500 1.2rem/1.45 var(--display); }
.loading-retry { pointer-events: auto; margin: 1.5rem auto 0; padding: .8rem 1.2rem; min-height: 48px; color: #f2d6c6; border: 1px solid #d5a28b; background: transparent; font: 600 1.2rem/1.2 var(--display); cursor: pointer; }
.loading-retry:hover { background: #d5a28b24; }
.loading-retry:focus-visible { outline: 2px solid #f2d6c6; outline-offset: 4px; }
