/* ==========================================================================
   Amanda XVIII — Old Hollywood debut invitation
   Fonts: Bodoni Moda, Cormorant Garamond, Jost, Pinyon Script (SIL OFL 1.1)
   ========================================================================== */
@font-face { font-family: "Bodoni Moda"; src: url("./fonts/bodoni-moda.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("./fonts/bodoni-moda-italic.woff2") format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("./fonts/cormorant-garamond.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("./fonts/cormorant-garamond-italic.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Jost"; src: url("./fonts/jost.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Pinyon Script"; src: url("./fonts/pinyon-script.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  color-scheme: dark;
  --ink: #0b0809;
  --velvet: #150c10;
  --plum: #22121a;
  --wine: #4a0f1c;
  --red: #b3192e;
  --red-deep: #7d0f20;
  --gold: #d8b46a;
  --gold-hi: #f6e3ae;
  --gold-lo: #9c7434;
  --champagne: #eadcc0;
  --ivory: #f8f1e4;
  --mist: #b7a898;
  --line: rgba(216, 180, 106, .3);
  --foil: linear-gradient(112deg, #fff3cc 0%, #e9c77e 20%, #a8772f 42%, #f5dd9c 60%, #b88a3e 80%, #f8e8b8 100%);
  --paper: linear-gradient(118deg, #fcf5e6 0%, #efe0c4 52%, #f7ebd3 100%);
  --display: "Bodoni Moda", "Didot", "Bodoni 72", "Bodoni MT", Georgia, serif;
  --serif: "Cormorant Garamond", "Cormorant", Garamond, Georgia, serif;
  --sans: "Jost", "Futura", "Century Gothic", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --vh: 1vh;
  --top: 0px;
  --sw: 100vw;
  --u: min(calc(var(--sw) / 100), calc(var(--vh) * .56));
  --pad-x: clamp(28px, calc(var(--u) * 8.5), 64px);
  --frame: 10px;
  --k: 1;
}
@supports (height: 1svh) { :root { --vh: 1svh; } }
/* On landscape screens the invitation becomes a vertical card in the middle of the screen. */
@media (min-aspect-ratio: 6/7) {
  :root { --sw: min(100vw, clamp(380px, calc(var(--vh) * 60), 600px)); }
}
/* Tablets held upright: enlarge the cards and controls a little. */
@media (min-width: 700px) and (max-aspect-ratio: 6/7) { :root { --k: 1.28; --frame: 14px; } }
.admin-bar { --top: 32px; }
@media (max-width: 782px) { .admin-bar { --top: 46px; } }

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-width: 280px; background: var(--ink); color: var(--ivory);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg, video { display: block; max-width: 100%; }
h1, h2, h3, p, figure, blockquote { margin: 0; }
h1, h2, h3 { font-weight: 400; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.cl-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.cl-skip:focus {
  z-index: 100001; position: fixed; top: 12px; left: 12px; width: auto; height: auto; margin: 0;
  padding: 12px 17px; clip: auto; clip-path: none; color: var(--ink); background: var(--ivory);
}

/* ---------- Shared type ---------- */
.kicker {
  margin: 0 0 calc(var(--u) * 2.6); padding-left: .34em;
  font: 500 clamp(10px, calc(var(--u) * 2.7), 12.5px)/1.65 var(--sans);
  letter-spacing: .34em; text-transform: uppercase; color: var(--gold);
}
.title {
  font: 400 clamp(34px, calc(var(--u) * 11.6), 80px)/1.04 var(--display);
  letter-spacing: -.012em; color: var(--ivory); text-wrap: balance;
}
.title em, .cover-title em, .cl-inspiration h2 em { font-style: italic; }
.title em, .foil, .cover-title em, .signature, .cl-inspiration h2 em {
  background: var(--foil); background-size: 220% 100%; background-position: 0 0;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  padding: 0 .08em; margin: 0 -.04em;
}
.title-xl { font-size: clamp(44px, calc(var(--u) * 15.5), 104px); }
.lead {
  margin-top: calc(var(--u) * 3.6); max-width: 30ch;
  font: italic 400 clamp(17px, calc(var(--u) * 5), 27px)/1.42 var(--serif);
  color: rgba(248, 241, 228, .9);
}
.body-text { max-width: 31ch; font: 400 clamp(15.5px, calc(var(--u) * 4.4), 21px)/1.45 var(--serif); color: rgba(248, 241, 228, .82); }
.meta {
  margin-top: calc(var(--u) * 3.8); padding-left: .26em;
  font: 400 clamp(10px, calc(var(--u) * 2.65), 12.5px)/1.9 var(--sans);
  letter-spacing: .26em; text-transform: uppercase; color: var(--mist);
}
.meta span { display: block; color: var(--champagne); }
.signature { font: 400 clamp(38px, calc(var(--u) * 12), 66px)/1.25 var(--script); margin-top: calc(var(--u) * 2); padding: .05em .4em .12em; }
.ornament { display: flex; align-items: center; gap: 10px; width: min(46%, 170px); margin: calc(var(--u) * 3.6) auto; }
.ornament i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); transform-origin: right; }
.ornament i:last-child { background: linear-gradient(90deg, var(--gold), transparent); transform-origin: left; }
.ornament b { width: 7px; height: 7px; flex: none; transform: rotate(45deg); border: 1px solid var(--gold-hi); background: var(--red); box-shadow: 0 0 12px rgba(216, 180, 106, .55); }
.icon { width: 17px; height: 17px; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: calc(50px * var(--k)); padding: 0 calc(28px * var(--k)); border: 1px solid transparent; border-radius: 999px;
  font: 500 calc(11.5px * var(--k))/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .35s, border-color .35s, color .35s;
}
.btn:active { transform: scale(.97); }
.btn-gold {
  color: #2b1b0c;
  background: linear-gradient(112deg, #fbecc0 0%, #dcb466 38%, #b5853a 68%, #f0d48d 100%);
  box-shadow: 0 14px 34px -14px rgba(216, 180, 106, .7), inset 0 1px 0 rgba(255, 255, 255, .65), inset 0 -1px 0 rgba(90, 55, 15, .35);
}
.btn-gold::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .7) 50%, transparent 70%);
  transform: translateX(-130%);
}
.btn-gold:hover::after { animation: sheen 1.2s var(--ease); }
.btn-gold:hover { box-shadow: 0 18px 40px -14px rgba(216, 180, 106, .9), inset 0 1px 0 rgba(255, 255, 255, .65); }
.btn-ghost { color: var(--champagne); border-color: rgba(216, 180, 106, .5); background: rgba(11, 8, 9, .45); }
.btn-ghost:hover { background: rgba(216, 180, 106, .14); border-color: var(--gold); color: var(--ivory); }
.btn-small { min-height: calc(42px * var(--k)); padding: 0 calc(18px * var(--k)); gap: 8px; font-size: calc(10.5px * var(--k)); letter-spacing: .2em; }
.btn-small .icon { width: 15px; height: 15px; }
@keyframes sheen { to { transform: translateX(130%); } }

/* ---------- Desktop surroundings ---------- */
.ambient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, rgba(11, 8, 9, .25), rgba(11, 8, 9, .85) 75%), url("./amanda/ambient.webp") center / cover no-repeat, var(--ink);
}
.ambient-side { display: none; }
@media (min-aspect-ratio: 6/7) and (min-width: 860px) {
  .ambient-side {
    display: block; position: absolute; top: 50%;
    font: 500 10.5px/1 var(--sans); letter-spacing: .55em; text-transform: uppercase; white-space: nowrap;
    color: rgba(234, 220, 192, .42); writing-mode: vertical-rl;
  }
  .ambient-left { left: calc((100vw - var(--sw)) / 4); transform: translate(-50%, -50%) rotate(180deg); }
  .ambient-right { right: calc((100vw - var(--sw)) / 4); transform: translate(50%, -50%); }
}

/* ---------- The page stack: one screen per page ---------- */
.pages {
  position: fixed; top: var(--top); right: 0; bottom: 0; left: 0; z-index: 1;
  overflow-x: hidden; overflow-y: auto;
  scroll-snap-type: y mandatory; overscroll-behavior: none;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; outline: none;
}
.pages::-webkit-scrollbar { display: none; }
.pages.no-snap { scroll-snap-type: none; }
.page {
  position: relative; display: flex; justify-content: center;
  height: 100%; scroll-snap-align: start; scroll-snap-stop: always;
}
.sheet { position: relative; isolation: isolate; width: var(--sw); height: 100%; overflow: hidden; background: var(--ink); }
@media (min-aspect-ratio: 6/7) { .sheet { box-shadow: 0 0 0 1px rgba(216, 180, 106, .14), 0 0 80px rgba(0, 0, 0, .7); } }
.page-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.page-photo { width: 100%; height: 100%; object-fit: cover; }
.page-photo-dim { opacity: .28; }
.shade { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.page-body {
  position: relative; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: max(64px, calc(var(--u) * 15)) var(--pad-x) max(46px, calc(var(--u) * 11));
}

/* Reveal-on-arrival. Pages animate in when they settle on screen. */
.cl-js .rv {
  opacity: 0; transform: translate3d(0, 24px, 0);
  transition: opacity .9s var(--ease), transform 1.25s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 105ms + 140ms);
}
.cl-js .page.is-active .rv { opacity: 1; transform: none; }
.cl-js .ornament.rv { transform: none; }
.cl-js .ornament.rv i { transform: scaleX(0); transition: transform 1.4s var(--ease-out) .5s; }
.cl-js .page.is-active .ornament.rv i { transform: scaleX(1); }
.cl-js .page.is-active .title em, .cl-js .page.is-active .foil { animation: foilSweep 2.6s var(--ease-io) .6s both; }
@keyframes foilSweep { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---------- Fixed chrome (frame, monogram, counter, dots) ---------- */
.chrome {
  position: fixed; top: var(--top); bottom: 0; left: calc(50% - var(--sw) / 2); z-index: 20;
  width: var(--sw); pointer-events: none;
  opacity: 0; transition: opacity 1.1s var(--ease) .4s;
}
.cl-opened .chrome, .cl-document:not(.cl-js) .chrome { opacity: 1; }
.chrome > a, .chrome > button, .chrome > nav { pointer-events: auto; }
.stage-frame {
  position: absolute; pointer-events: none;
  top: calc(var(--frame) + env(safe-area-inset-top)); bottom: calc(var(--frame) + env(safe-area-inset-bottom));
  left: calc(var(--frame) + env(safe-area-inset-left)); right: calc(var(--frame) + env(safe-area-inset-right));
  border: 1px solid rgba(216, 180, 106, .3);
}
.stage-frame::before { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(216, 180, 106, .1); }
.stage-frame i { position: absolute; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 8px rgba(216, 180, 106, .6); }
.stage-frame i:nth-child(1) { top: -4px; left: -4px; }
.stage-frame i:nth-child(2) { top: -4px; right: -4px; }
.stage-frame i:nth-child(3) { bottom: -4px; left: -4px; }
.stage-frame i:nth-child(4) { bottom: -4px; right: -4px; }
.chrome-mark { position: absolute; top: calc(20px + env(safe-area-inset-top)); left: calc(24px + env(safe-area-inset-left)); display: block; width: calc(34px * var(--k)); transition: transform .4s var(--ease); }
.chrome-mark:hover { transform: scale(1.06); }
.cl-monogram { display: block; width: 100%; }
.cl-monogram svg, .cl-monogram img { width: 100%; height: auto; }
.chrome-count {
  position: absolute; top: calc(30px + env(safe-area-inset-top)); right: calc(27px + env(safe-area-inset-right));
  display: flex; align-items: center; gap: 8px;
  font: 500 10px/1 var(--sans); letter-spacing: .24em; color: var(--mist);
}
.chrome-count #page-now { color: var(--gold-hi); }
.chrome-count i { width: 18px; height: 1px; background: rgba(216, 180, 106, .55); }
/* Page dots sit on the right frame line like beads on a thread. */
.dots {
  position: absolute; top: 50%; right: calc(var(--frame) + env(safe-area-inset-right) - 11px); transform: translateY(-50%);
  display: flex; flex-direction: column;
}
.dots a { position: relative; display: block; width: 22px; height: 24px; }
.dots a::before {
  content: ""; position: absolute; top: 50%; left: 50%; width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px;
  background: var(--ink); border: 1px solid rgba(216, 180, 106, .6); transform: rotate(45deg) scale(.8);
  transition: transform .5s var(--ease-out), background-color .5s, box-shadow .5s;
}
.dots a.is-current::before { background: var(--gold); border-color: var(--gold-hi); transform: rotate(45deg) scale(1.25); box-shadow: 0 0 12px rgba(216, 180, 106, .8); }
.chrome-music {
  position: absolute; left: calc(24px + env(safe-area-inset-left)); bottom: calc(24px + env(safe-area-inset-bottom));
  display: flex; align-items: flex-end; justify-content: center; gap: 2.5px;
  width: 38px; height: 38px; padding: 0 0 12px; border-radius: 50%;
  border: 1px solid rgba(216, 180, 106, .55); background: rgba(11, 8, 9, .6);
}
.chrome-music i { width: 2px; height: 4px; background: var(--gold); border-radius: 1px; transform-origin: bottom; }
.chrome-music.is-playing i { animation: eq 1s ease-in-out infinite alternate; }
.chrome-music.is-playing i:nth-child(2) { animation-delay: -.3s; }
.chrome-music.is-playing i:nth-child(3) { animation-delay: -.6s; }
.chrome-music.is-playing i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { from { height: 3px; } to { height: 13px; } }

/* ==========================================================================
   Opening: cover → the letter draws itself → iris through the letter
   ========================================================================== */
.opener { position: fixed; top: var(--top); right: 0; bottom: 0; left: 0; z-index: 100; overflow: hidden; color: var(--ivory); }
.cl-document:not(.cl-js) .opener { display: none; }
.opener.is-fading { opacity: 0; transition: opacity .65s var(--ease); pointer-events: none; }
.opener-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 50%, rgba(11, 8, 9, .35), rgba(11, 8, 9, .9) 75%), url("./amanda/ambient.webp") center / cover, var(--ink); }
.opener-stage { position: absolute; top: 0; bottom: 0; left: calc(50% - var(--sw) / 2); width: var(--sw); overflow: hidden; background: #0a0708; }
.opener-poster, .opener-video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.opener-poster { transform-origin: 50% 40%; animation: drift 22s var(--ease-io) infinite alternate; }
.opener-video { opacity: 0; transition: opacity .9s var(--ease); }
.opener.has-video .opener-video { opacity: 1; }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.1); } }
.opener-dim {
  position: absolute; top: 0; bottom: 0; left: calc(50% - var(--sw) / 2); width: var(--sw);
  background:
    radial-gradient(ellipse 75% 50% at 50% 46%, rgba(11, 8, 9, .2), rgba(11, 8, 9, .72) 72%, rgba(11, 8, 9, .9)),
    linear-gradient(180deg, rgba(11, 8, 9, .55), transparent 28%, transparent 62%, rgba(11, 8, 9, .9));
}
.opener-dim::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 70% 46% at 50% 44%, rgba(8, 5, 6, .55), rgba(8, 5, 6, .35)); opacity: 0; transition: opacity 1.4s var(--ease); }
.opener.is-playing .opener-dim::after { opacity: 1; }
.opener.is-revealing .opener-bg { opacity: 0; transition: opacity .05s linear .5s; }

/* Cover (before the guest opens the invitation) */
.opener-cover {
  position: absolute; top: 0; bottom: 0; left: calc(50% - var(--sw) / 2); width: var(--sw);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: calc(34px + env(safe-area-inset-top)) var(--pad-x) calc(30px + env(safe-area-inset-bottom));
  transition: opacity .75s var(--ease), transform 1s var(--ease);
}
.opener.is-playing .opener-cover { opacity: 0; transform: translateY(-16px); pointer-events: none; }
.cover-top {
  display: flex; justify-content: space-between; width: 100%; padding: 0 2px;
  font: 500 9.5px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: var(--champagne);
}
.cover-center { display: flex; flex-direction: column; align-items: center; margin: auto 0; padding-bottom: calc(var(--vh) * 6); }
.cover-title { font: 400 clamp(30px, calc(var(--u) * 9.6), 60px)/1.08 var(--display); letter-spacing: .005em; text-shadow: 0 6px 30px rgba(0, 0, 0, .7); }
.cover-title em { display: block; font-size: 1.24em; line-height: 1.12; text-shadow: none; filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .55)); }
.cover-sub { margin-bottom: calc(var(--u) * 7.5); font: italic 400 clamp(16px, calc(var(--u) * 4.7), 24px)/1.4 var(--serif); color: rgba(248, 241, 228, .88); }
.cover-hint { font: 500 9px/1 var(--sans); letter-spacing: .34em; text-transform: uppercase; color: rgba(183, 168, 152, .8); padding-left: .34em; }
.btn-open { min-height: 54px; padding: 0 32px; }
.btn-open::after { animation: sheen 3.4s var(--ease) 1.8s infinite; }
.opener[data-phase="closed"] .cover-center > *, .opener[data-phase="closed"] .cover-top, .opener[data-phase="closed"] .cover-hint { animation: rise 1.5s var(--ease-out) both; }
.opener[data-phase="closed"] .cover-top { animation-delay: .1s; }
.opener[data-phase="closed"] .cover-center > :nth-child(1) { animation-delay: .3s; }
.opener[data-phase="closed"] .cover-center > :nth-child(2) { animation-delay: .55s; }
.opener[data-phase="closed"] .cover-center > :nth-child(3) { animation-delay: .7s; }
.opener[data-phase="closed"] .cover-center > :nth-child(4) { animation-delay: .9s; }
.opener[data-phase="closed"] .cover-hint { animation-delay: 1.2s; }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 18px, 0); } to { opacity: 1; transform: none; } }

/* The letter */
.opener-reveal {
  position: absolute; top: 0; bottom: 0; left: calc(50% - var(--sw) / 2); width: var(--sw);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding-bottom: calc(var(--vh) * 3); pointer-events: none; visibility: hidden;
}
.opener.is-playing .opener-reveal { visibility: visible; }
.reveal-emblem { position: relative; width: min(calc(var(--sw) * .68), calc(var(--vh) * 46), 360px); will-change: transform; }
.reveal-emblem .emblem { position: relative; width: 100%; height: auto; overflow: visible; }
.reveal-glow, .reveal-rays { position: absolute; left: 50%; top: 56%; pointer-events: none; }
.reveal-glow {
  width: 150%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(246, 227, 174, .3), rgba(216, 180, 106, .1) 35%, transparent 65%);
  opacity: 0;
}
.reveal-rays {
  width: 260%; aspect-ratio: 1; margin: -130% 0 0 -130%; opacity: 0;
  background: repeating-conic-gradient(from 0deg, rgba(246, 227, 174, .16) 0deg .45deg, transparent .45deg 7.5deg);
  -webkit-mask: radial-gradient(circle, transparent 17%, #000 26%, rgba(0, 0, 0, .55) 42%, transparent 66%);
  mask: radial-gradient(circle, transparent 17%, #000 26%, rgba(0, 0, 0, .55) 42%, transparent 66%);
}
.reveal-name {
  display: flex; justify-content: center; margin-top: calc(var(--vh) * 3.2); padding-left: .55em;
  font: 500 clamp(17px, calc(var(--u) * 5.6), 30px)/1 var(--display); letter-spacing: .55em; text-transform: uppercase;
  color: var(--gold-hi);
}
.reveal-name span { display: inline-block; opacity: 0; }

/* Shared emblem pieces */
.emblem-intro .em-draw, .emblem-intro .em-outline path { stroke-dasharray: var(--len, 4000) var(--len, 4000); stroke-dashoffset: var(--len, 4000); }
.emblem-intro .em-fill, .emblem-intro .em-gem, .emblem-intro .em-spark, .emblem-intro .em-numeral { opacity: 0; }
.emblem .em-gem, .emblem .em-spark { transform-box: fill-box; transform-origin: center; }
.emblem .em-numeral text { font-family: var(--sans); font-weight: 500; }
.emblem .em-shine { transform: translateX(-60px); }
.emblem .em-frame, .emblem .em-ornaments, .emblem .em-numeral { transition: opacity .55s var(--ease); }

/* Timeline (ms after "Open the invitation") */
.opener.is-playing .em-arch { animation: draw 2.5s var(--ease-io) .2s both; }
.opener.is-playing .em-arch-inner { animation: draw 2.5s var(--ease-io) .45s both; }
.opener.is-playing .em-outline path { animation: draw 2.5s var(--ease-io) .6s both; }
.opener.is-playing .em-wings { animation: draw 1.5s var(--ease-io) 1.5s both; }
.opener.is-playing .em-base { animation: draw 1.3s var(--ease-io) 1.8s both; }
.opener.is-playing .em-rays { animation: draw 1.1s var(--ease-io) 2.5s both; }
.opener.is-playing .em-fill { animation: fillIn 1.3s var(--ease) 2.45s both; }
.opener.is-playing .em-gem { animation: pop 1s var(--ease-out) 2.6s both; }
.opener.is-playing .em-gem-low { animation-delay: 2.8s; }
.opener.is-playing .em-numeral { animation: fadeIn 1.1s var(--ease) 3.5s both; }
.opener.is-playing .em-spark { animation: twinkle 1.7s ease-in-out 2.9s 2 both; }
.opener.is-playing .em-spark-2 { animation-delay: 3.15s; }
.opener.is-playing .em-spark-3 { animation-delay: 3.35s; }
.opener.is-playing .em-spark-4 { animation-delay: 3.05s; }
.opener.is-playing .em-spark-5 { animation-delay: 3.5s; }
.opener.is-playing .em-shine { animation: shine 1.5s var(--ease-io) 3.25s both; }
.opener.is-playing .reveal-glow { animation: glow 2.4s var(--ease) 2.3s both; }
.opener.is-playing .reveal-rays { animation: raysIn 2.8s var(--ease-out) 1.1s both, spin 70s linear 1.1s infinite; }
.opener.is-playing .reveal-name span { animation: letterIn 1.15s var(--ease-out) both; animation-delay: calc(3s + var(--i) * 95ms); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fillIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes pop { 0% { opacity: 0; transform: scale(.2) rotate(-45deg); } 60% { opacity: 1; transform: scale(1.25); } 100% { opacity: 1; transform: none; } }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.3); } 45% { opacity: 1; transform: scale(1.15) rotate(20deg); } }
@keyframes shine { from { transform: translateX(-60px); } to { transform: translateX(470px); } }
@keyframes glow { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); } 55% { opacity: 1; } 100% { opacity: .75; transform: translate(-50%, -50%) scale(1); } }
@keyframes raysIn { from { opacity: 0; scale: .7; } to { opacity: 1; scale: 1; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes letterIn { from { opacity: 0; transform: translate3d(0, 12px, 0) scale(.92); } to { opacity: 1; transform: none; } }

/* Reveal: everything but the letter falls away; the page appears through it. */
.opener.is-revealing .reveal-glow { animation: glowOut .5s var(--ease) both; }
.opener.is-revealing .reveal-rays { animation: fadeOut .5s var(--ease) both, spin 70s linear 1.1s infinite; }
.opener.is-revealing .reveal-name { opacity: 0; transition: opacity .5s var(--ease); }
.opener.is-revealing .em-frame, .opener.is-revealing .em-ornaments { opacity: 0; }
.opener.is-revealing .em-numeral { animation: fadeOut .45s var(--ease) both; }
@keyframes glowOut { from { opacity: .75; transform: translate(-50%, -50%); } to { opacity: 0; transform: translate(-50%, -50%) scale(1.1); } }
.opener.is-revealing .em-fill { animation: fadeOut .7s var(--ease) .55s both; }
.opener.is-revealing .em-shine { visibility: hidden; }
.iris { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; overflow: visible; opacity: 0; visibility: hidden; }
.opener.is-revealing .iris { opacity: 1; visibility: visible; transition: opacity .45s var(--ease); }

.opener-skip {
  position: absolute; right: calc(50% - var(--sw) / 2 + 22px); bottom: calc(22px + env(safe-area-inset-bottom));
  min-height: 40px; padding: 0 16px; border: 1px solid rgba(234, 220, 192, .3); border-radius: 999px;
  background: rgba(11, 8, 9, .45); color: rgba(234, 220, 192, .85);
  font: 500 9.5px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase;
  opacity: 0; visibility: hidden; transition: opacity .6s var(--ease) 1s, visibility 0s 1s;
}
.opener.is-playing:not(.is-revealing) .opener-skip { opacity: 1; visibility: visible; }

/* ==========================================================================
   Pages
   ========================================================================== */
/* 1 · Welcome */
.hero-photo { object-position: 58% 22%; transform: scale(1.14); transform-origin: 60% 30%; transition: transform 8s var(--ease-out); }
.page-hero.is-active .hero-photo, .cl-document:not(.cl-js) .hero-photo { transform: scale(1); }
.shade-hero {
  background:
    linear-gradient(180deg, rgba(11, 8, 9, .62) 0%, rgba(11, 8, 9, 0) 16%, rgba(11, 8, 9, 0) 30%, rgba(11, 8, 9, .55) 46%, rgba(11, 8, 9, .9) 62%, rgba(11, 8, 9, .97) 78%, var(--ink) 100%);
}
.hero-body { justify-content: flex-end; padding-bottom: max(78px, calc(var(--u) * 21)); }
.hero-title { display: flex; flex-direction: column; align-items: center; }
.hero-name { display: block; font: italic 500 clamp(66px, calc(var(--u) * 25), 168px)/.95 var(--display); letter-spacing: -.02em; padding: .02em .1em .08em; }
.numeral {
  display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: calc(var(--u) * 1.2);
  font: 400 clamp(12px, calc(var(--u) * 3.5), 20px)/1 var(--sans); letter-spacing: .6em; color: var(--champagne);
}
.numeral span { padding-left: .6em; }
.numeral i { width: calc(var(--u) * 10); height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.numeral i:last-child { background: linear-gradient(90deg, var(--gold), transparent); }
.scroll-cue {
  position: absolute; left: 50%; bottom: calc(max(18px, calc(var(--u) * 4.6)) + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 9px; padding-left: .38em; text-decoration: none;
  font: 500 9px/1 var(--sans); letter-spacing: .38em; text-transform: uppercase; color: var(--mist);
}
.scroll-cue i { width: 1px; height: 30px; background: linear-gradient(var(--gold), transparent); transform-origin: top; animation: cue 2.6s var(--ease-io) infinite; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 1; } 55% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* A note */
.message-photo { object-position: 50% 30%; opacity: .32; }
.shade-soft { background: radial-gradient(ellipse at 50% 50%, rgba(11, 8, 9, .45), rgba(11, 8, 9, .9) 80%); }
.quote { max-width: 28ch; font: italic 400 clamp(19px, calc(var(--u) * 5.8), 30px)/1.45 var(--serif); color: var(--ivory); }

/* Deco backgrounds */
.deco { background: var(--velvet); }
.deco::before, .deco::after { content: ""; position: absolute; pointer-events: none; }
.deco-sunburst {
  background:
    radial-gradient(ellipse 120% 55% at 50% 108%, rgba(179, 25, 46, .42), transparent 62%),
    radial-gradient(ellipse 90% 50% at 50% -8%, rgba(216, 180, 106, .13), transparent 62%),
    var(--velvet);
}
.deco-sunburst::before {
  left: -40%; right: -40%; top: 10%; bottom: -30%;
  background: repeating-conic-gradient(from -90deg at 50% 100%, rgba(216, 180, 106, .11) 0deg .5deg, transparent .5deg 6deg);
  -webkit-mask: radial-gradient(circle at 50% 100%, #000 18%, transparent 72%); mask: radial-gradient(circle at 50% 100%, #000 18%, transparent 72%);
}
.deco-glow { background: radial-gradient(ellipse 85% 48% at 50% 42%, rgba(125, 15, 32, .4), transparent 70%), radial-gradient(ellipse 70% 35% at 50% 102%, rgba(216, 180, 106, .1), transparent), var(--ink); }
.deco-glow-low { background: radial-gradient(ellipse 100% 55% at 50% 100%, rgba(125, 15, 32, .45), transparent 70%), radial-gradient(ellipse 80% 40% at 50% 0%, rgba(216, 180, 106, .08), transparent), var(--velvet); }
.deco-sparkle { background: radial-gradient(ellipse 90% 60% at 50% 40%, rgba(74, 15, 28, .55), transparent 72%), var(--velvet); }
.deco-sparkle::before {
  inset: 0;
  background: radial-gradient(circle, rgba(246, 227, 174, .45) 0 .8px, transparent 1.4px) 0 0 / 34px 34px, radial-gradient(circle, rgba(246, 227, 174, .25) 0 .6px, transparent 1.2px) 17px 17px / 34px 34px;
  -webkit-mask: radial-gradient(ellipse at 50% 45%, transparent 30%, #000 85%); mask: radial-gradient(ellipse at 50% 45%, transparent 30%, #000 85%);
  opacity: .55;
}
.deco-lines::before { inset: 0; background: repeating-linear-gradient(90deg, transparent 0 46px, rgba(216, 180, 106, .05) 46px 47px); }

/* Save the date: a cinema ticket that flips over */
.ticket { position: relative; isolation: isolate; width: min(100%, calc(336px * var(--k))); margin: calc(var(--u) * 5.2) auto calc(var(--u) * 5); perspective: 1400px; }
.ticket-card {
  position: relative; display: block; width: 100%; height: clamp(150px, calc(var(--vh) * 26), calc(210px * var(--k)));
  padding: 0; border: 0; background: none; text-align: center;
  transform-style: preserve-3d; transition: transform 1.2s var(--ease-io);
}
.ticket.is-revealed .ticket-card { transform: rotateY(180deg); }
.ticket-face {
  position: absolute; inset: 0; display: flex; overflow: hidden; border-radius: 10px;
  color: #3d1119; background: var(--paper);
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  transition: visibility 0s .6s;
}
.ticket-face::before { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(156, 116, 52, .55); border-radius: 5px; pointer-events: none; }
/* Cinema-ticket notches, painted in the page colour behind the ticket. */
.ticket-face::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle 12px at 0 50%, #1b0f14 96%, transparent 100%), radial-gradient(circle 12px at 100% 50%, #1b0f14 96%, transparent 100%);
}
/* Swap faces at the half-turn too, for browsers with patchy backface support. */
.ticket-back, .ticket.is-revealed .ticket-front { visibility: hidden; }
.ticket.is-revealed .ticket-back { visibility: visible; }
.ticket::before { content: ""; position: absolute; left: 5%; right: 5%; top: 16%; bottom: -7%; z-index: -1; border-radius: 30px; background: rgba(0, 0, 0, .75); filter: blur(22px); pointer-events: none; }
.ticket-stub {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  width: 25%; border-right: 1.5px dashed rgba(61, 17, 25, .3);
}
.ticket-stub b, .ticket-stub small { writing-mode: vertical-rl; transform: rotate(180deg); font: 600 calc(10px * var(--k))/1 var(--sans); letter-spacing: .32em; text-transform: uppercase; color: var(--red-deep); }
.ticket-stub small { font-weight: 500; font-size: calc(8.5px * var(--k)); color: #9c7434; letter-spacing: .2em; }
.ticket-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 14px; }
.ticket-main small { font: 600 calc(9px * var(--k))/1 var(--sans); letter-spacing: .34em; text-transform: uppercase; color: #9c7434; padding-left: .34em; }
.ticket-main strong { margin-top: 8px; font: italic 500 clamp(30px, calc(var(--u) * 10), calc(44px * var(--k)))/1 var(--display); color: var(--red-deep); }
.ticket-main em { margin-top: 6px; padding-left: .5em; font: 500 calc(10px * var(--k))/1 var(--sans); font-style: normal; letter-spacing: .5em; color: #3d1119; }
.ticket-tap { margin-top: 12px; font: italic 500 calc(14px * var(--k))/1 var(--serif); color: #7a5a2a; animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .45; } }
.ticket-back { transform: rotateY(180deg); flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tb-month, .tb-year { font: 600 calc(11px * var(--k))/1 var(--sans); letter-spacing: .5em; text-transform: uppercase; color: var(--red-deep); padding-left: .5em; }
.tb-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; width: 84%; margin: 6px 0 8px; }
.tb-row > span { padding: 9px 0; border-block: 1px solid rgba(61, 17, 25, .35); font: 500 calc(9.5px * var(--k))/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: #3d1119; }
.tb-row strong { padding: 0 14px; font: 400 clamp(54px, calc(var(--vh) * 10), calc(76px * var(--k)))/.9 var(--display); color: var(--red-deep); }

.countdown { display: grid; grid-template-columns: repeat(4, 1fr); width: min(100%, calc(320px * var(--k))); }
.countdown div { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.countdown div + div::before { content: ""; position: absolute; left: 0; top: 8%; height: 58%; width: 1px; background: var(--line); }
.countdown b { display: block; min-width: 2.2ch; font: 400 clamp(26px, calc(var(--u) * 8.4), 42px)/1 var(--display); font-variant-numeric: lining-nums tabular-nums; color: var(--ivory); }
.countdown span { padding-left: .26em; font: 500 calc(8.5px * var(--k))/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--mist); }
.countdown b.tick { animation: tick .6s var(--ease-out); }
@keyframes tick { from { opacity: .35; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.cal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: calc(var(--u) * 5.5); }
@media (max-width: 389px) { .cal-links { gap: 8px; } .cal-links .btn-small { padding: 0 13px; gap: 6px; letter-spacing: .14em; } }

/* The venue */
.venue-photo { object-position: 50% 38%; }
.shade-venue { background: linear-gradient(180deg, rgba(11, 8, 9, .72) 0%, rgba(11, 8, 9, .08) 22%, rgba(11, 8, 9, .12) 42%, rgba(11, 8, 9, .82) 68%, var(--ink) 96%); }
.venue-body { justify-content: flex-end; padding-bottom: max(58px, calc(var(--u) * 16)); }
.venue-body .lead { margin-top: calc(var(--u) * 1.6); }
.venue-body .btn { margin-top: calc(var(--u) * 5.5); }
.venue-body .ornament { margin-bottom: calc(var(--u) * 1); }

/* Programme */
.program-list { list-style: none; width: min(100%, calc(360px * var(--k))); margin: calc(var(--u) * 6) 0 0; padding: 0; }
.program-list li { display: flex; align-items: baseline; gap: 10px; padding: calc(var(--u) * 2.4) 0; text-align: left; }
.program-list span { flex: none; min-width: 72px; font: 500 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.program-list i { flex: 1; border-bottom: 1px dotted rgba(216, 180, 106, .4); transform: translateY(-4px); }
.program-list strong { font: 400 clamp(17px, calc(var(--u) * 4.8), 22px)/1.25 var(--serif); color: var(--ivory); text-align: right; max-width: 62%; }

/* Dress code */
.attire-body .title { font-size: clamp(32px, calc(var(--u) * 10.4), 72px); }
.arch { position: relative; height: clamp(130px, calc(var(--vh) * 25), 340px); aspect-ratio: 7 / 10; margin: calc(var(--u) * 6.4) auto calc(var(--u) * 4.4); }
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 26%; border-radius: 999px 999px 4px 4px; }
.arch::before { content: ""; position: absolute; inset: -7px; border: 1px solid rgba(216, 180, 106, .65); border-radius: 999px 999px 6px 6px; pointer-events: none; }
.arch::after { content: ""; position: absolute; top: -12px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 10px rgba(216, 180, 106, .7); }
.palette { list-style: none; display: flex; justify-content: center; gap: clamp(18px, calc(var(--u) * 6.5), 34px); margin: calc(var(--u) * 4) 0 0; padding: 0; }
.palette li { display: flex; flex-direction: column; align-items: center; gap: 9px; padding-left: .24em; font: 500 calc(9px * var(--k))/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--mist); }
.swatch { display: block; width: clamp(28px, calc(var(--u) * 8.6), 42px); height: clamp(28px, calc(var(--u) * 8.6), 42px); border-radius: 50%; box-shadow: 0 0 0 1px rgba(216, 180, 106, .6), 0 0 0 4px var(--ink), 0 0 0 5px rgba(216, 180, 106, .22); }
.swatch.black { background: radial-gradient(circle at 34% 30%, #44444c, #0d0d11 70%); }
.swatch.gray { background: radial-gradient(circle at 34% 30%, #d0cfd5, #7d7c86 72%); }
.swatch.cream { background: radial-gradient(circle at 34% 30%, #fffbf2, #e5d2b2 72%); }
.red-note { margin: calc(var(--u) * 4) 0 calc(var(--u) * 4); font: italic 500 clamp(17px, calc(var(--u) * 5), 24px)/1.3 var(--serif); color: #f3a4ad; }

/* Wishlist */
.wish-grid { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: calc(var(--u) * 2.8); width: min(100%, calc(350px * var(--k))); margin: calc(var(--u) * 6) 0 calc(var(--u) * 1); padding: 0; }
.wish-grid li {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: clamp(82px, calc(var(--vh) * 13), calc(128px * var(--k))); padding: 16px 10px 14px;
  border: 1px solid rgba(216, 180, 106, .38); border-radius: 80px 80px 6px 6px;
  background: linear-gradient(180deg, rgba(216, 180, 106, .1), rgba(216, 180, 106, .015));
  font: 500 clamp(15.5px, calc(var(--u) * 4.4), calc(19px * var(--k)))/1.22 var(--serif); color: var(--ivory);
}
.wish-grid li span { font: italic 500 calc(13px * var(--k))/1 var(--display); color: var(--gold); letter-spacing: .08em; }
.wish-grid li:last-child:nth-child(odd) { grid-column: 1 / -1; border-radius: 6px; min-height: 64px; }

/* RSVP */
.rsvp-card {
  position: relative; width: min(100%, calc(372px * var(--k))); margin-top: calc(var(--u) * 4.6);
  padding: clamp(18px, calc(var(--u) * 5.4), 28px); text-align: left; border-radius: 16px;
  background: linear-gradient(160deg, rgba(40, 20, 28, .94), rgba(16, 10, 13, .96));
  border: 1px solid rgba(216, 180, 106, .38);
  box-shadow: 0 30px 60px -28px #000, inset 0 1px 0 rgba(255, 255, 255, .05);
}
.rsvp-card::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(216, 180, 106, .12); border-radius: 12px; pointer-events: none; }
.field label, .field-row label { display: block; font: 500 calc(9.5px * var(--k))/1.4 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
.field input {
  display: block; width: 100%; min-height: 44px; margin-top: 4px; padding: 8px 2px; border: 0; border-radius: 0;
  border-bottom: 1px solid rgba(216, 180, 106, .45); background: transparent; color: var(--ivory);
  font: 500 calc(19px * var(--k))/1.2 var(--serif); transition: border-color .3s, box-shadow .3s;
}
.field input::placeholder { color: rgba(183, 168, 152, .55); font-style: italic; font-weight: 400; }
.field input:focus { outline: none; border-bottom-color: var(--gold-hi); box-shadow: 0 1px 0 var(--gold-hi); }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; min-width: 0; margin: calc(var(--u) * 4.2) 0 calc(var(--u) * 3.6); padding: 0; border: 0; }
.choice-opt { position: relative; display: block; cursor: pointer; }
.choice-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice-opt span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  min-height: calc(66px * var(--k)); padding: 10px 6px; border: 1px solid rgba(216, 180, 106, .28); border-radius: 10px;
  font: italic 500 calc(16px * var(--k))/1.15 var(--serif); color: var(--champagne); text-align: center;
  transition: border-color .35s, background-color .35s, color .35s, box-shadow .35s;
}
.choice-opt i { position: relative; width: 14px; height: 14px; border: 1px solid rgba(216, 180, 106, .65); border-radius: 50%; }
.choice-opt i::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--gold); transform: scale(0); transition: transform .35s var(--ease-out); }
.choice-opt input:checked + span { border-color: var(--gold); background: linear-gradient(160deg, rgba(216, 180, 106, .22), rgba(216, 180, 106, .05)); color: var(--ivory); box-shadow: inset 0 0 0 1px rgba(216, 180, 106, .3); }
.choice-opt input:checked + span i::after { transform: scale(1); }
.choice-opt input:focus-visible + span { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: calc(var(--u) * 3.6); }
.cl-stepper { display: flex; align-items: center; flex: none; border: 1px solid rgba(216, 180, 106, .42); border-radius: 999px; }
.cl-stepper button { width: calc(40px * var(--k)); height: calc(40px * var(--k)); padding: 0; border: 0; background: transparent; color: var(--gold-hi); font: 300 21px/1 var(--sans); }
.cl-stepper button:disabled { opacity: .3; cursor: default; }
.cl-stepper input { width: calc(40px * var(--k)); height: calc(40px * var(--k)); padding: 0; border: 0; background: transparent; color: var(--ivory); text-align: center; font: 500 17px/1 var(--sans); -moz-appearance: textfield; appearance: textfield; }
.cl-stepper input::-webkit-inner-spin-button, .cl-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.voice-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 0 14px;
  border: 1px dashed rgba(216, 180, 106, .45); border-radius: 10px; background: transparent;
  color: var(--champagne); font: italic 500 calc(16px * var(--k))/1 var(--serif); text-align: left;
  transition: background-color .3s, border-color .3s;
}
.voice-btn:hover { background: rgba(216, 180, 106, .08); }
.voice-btn .icon { width: 19px; height: 19px; color: var(--gold); }
.voice-btn small { margin-left: auto; font: 500 8.5px/1 var(--sans); font-style: normal; letter-spacing: .22em; text-transform: uppercase; color: var(--mist); }
.voice-btn.is-recording { border-style: solid; border-color: #e0475b; background: rgba(179, 25, 46, .22); color: #fff; }
.voice-btn.is-recording .icon { color: #ff7d8d; animation: breathe 1s ease-in-out infinite; }
.voice-btn.is-recording small { display: none; }
.cl-voice-status, .cl-rsvp-feedback { margin: 8px 0 0; font: 400 12.5px/1.45 var(--sans); color: var(--mist); }
.cl-rsvp-feedback { color: #ff9eaa; }
.cl-rsvp-feedback:empty, .cl-voice-status:empty { display: none; }
#voice-preview audio { width: 100%; height: 38px; margin-top: 8px; }
#voice-remove { display: block; min-height: 34px; padding: 0; border: 0; background: none; color: var(--gold); font: 400 12px/1 var(--sans); text-decoration: underline; text-underline-offset: 3px; }
.send { width: 100%; margin-top: calc(var(--u) * 4.2); }
.cl-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* Receipt (after sending) */
.cl-success {
  position: relative; display: grid; justify-items: center; gap: 8px;
  width: min(100%, calc(352px * var(--k))); margin-top: calc(var(--u) * 4.6); padding: 26px 22px 24px;
  color: #3d1119; text-align: center; background: var(--paper); border-radius: 12px; overflow-wrap: anywhere;
  box-shadow: 0 30px 60px -26px #000;
}
.cl-success::before { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(156, 116, 52, .55); border-radius: 7px; pointer-events: none; }
.cl-success h3 { font: italic 500 clamp(24px, calc(var(--u) * 7), 32px)/1.1 var(--display); color: var(--red-deep); }
.cl-success p { font: 400 15px/1.45 var(--serif); }
.cl-success .cl-eyebrow { font: 600 9.5px/1.4 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: #9c7434; }
.cl-receipt-name { font: 500 22px/1.3 var(--display) !important; }
.cl-receipt-code { padding: 7px 12px; margin: 4px 0; border: 1px dashed rgba(125, 15, 32, .5); border-radius: 4px; font: 600 12.5px/1 var(--sans); letter-spacing: .14em; color: var(--red-deep); }
.cl-gold-button { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; padding: 0 20px; border-radius: 999px; background: var(--red-deep); color: var(--ivory); font: 500 10.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; }
.cl-receipt-download { color: var(--red-deep); font: 400 12.5px/1.4 var(--sans); }

/* Finale */
.finale-photo { object-position: 50% 62%; }
.shade-finale { background: radial-gradient(ellipse 85% 55% at 50% 44%, rgba(11, 8, 9, .62), rgba(11, 8, 9, .93) 78%), linear-gradient(180deg, rgba(11, 8, 9, .5), rgba(11, 8, 9, .2) 50%, rgba(11, 8, 9, .9)); }
.finale-body { padding-bottom: max(82px, calc(var(--u) * 20)); }
.finale-emblem { width: clamp(118px, calc(var(--vh) * 23), 230px); margin-bottom: calc(var(--u) * 3); }
.finale-emblem .emblem { width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 8px 30px rgba(216, 180, 106, .22)); }
.page-finale.is-active .em-shine { animation: shine 1.8s var(--ease-io) 1s both; }
.finale-body .lead { margin-top: calc(var(--u) * 2.4); }
.finale-foot {
  position: absolute; left: 0; right: 0; bottom: calc(max(22px, calc(var(--u) * 5.6)) + env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; padding: 0 60px;
}
.link-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 4px; border: 0; background: none; color: var(--mist); font: 500 9.5px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; text-decoration: none; }
.link-btn:hover { color: var(--gold-hi); }
.link-btn .icon { width: 15px; height: 15px; color: var(--gold); }

/* ---------- Outfit inspiration dialog ---------- */
.cl-inspiration {
  width: min(92vw, 500px); max-width: none; max-height: 88vh; max-height: 88svh; margin: auto; padding: 0; overflow: auto;
  border: 1px solid rgba(216, 180, 106, .42); border-radius: 18px; color: var(--ivory);
  background: linear-gradient(170deg, #1f1016, #0d090b); box-shadow: 0 40px 90px -20px #000;
  overscroll-behavior: contain;
}
.cl-inspiration[open] { animation: dialogIn .55s var(--ease-out); }
.cl-inspiration::backdrop { background: rgba(5, 3, 4, .8); }
@keyframes dialogIn { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
.cl-inspiration-inner { position: relative; padding: 30px 20px 26px; text-align: center; }
.cl-inspiration h2 { margin-bottom: 18px; font: 400 clamp(30px, 8vw, 40px)/1.05 var(--display); }
.cl-modal-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 1px solid rgba(216, 180, 106, .35); border-radius: 50%; background: transparent; color: var(--champagne); font: 300 22px/1 var(--sans); }
.cl-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 16px; }
.cl-tabs button { min-height: 38px; padding: 0 18px; border: 1px solid rgba(216, 180, 106, .4); border-radius: 999px; background: transparent; color: var(--champagne); font: 500 10px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; }
.cl-tabs button[aria-selected="true"] { background: var(--gold); border-color: var(--gold); color: #2b1b0c; }
.cl-outfits { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cl-outfits img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 120px 120px 6px 6px; }
.cl-inspiration .palette { margin-top: 20px; }

/* ---------- Phone held sideways ---------- */
.rotate-note { display: none; }
@media (orientation: landscape) and (max-height: 500px) and (hover: none) and (pointer: coarse) {
  html:not(.cl-typing) .rotate-note {
    position: fixed; inset: 0; z-index: 200; display: grid; place-content: center; justify-items: center; gap: 16px;
    background: var(--ink); color: var(--champagne); text-align: center;
    font: italic 400 19px/1.4 var(--serif);
  }
  .rotate-note svg { width: 46px; color: var(--gold); animation: turn 2.4s var(--ease-io) infinite; }
}
@keyframes turn { 0%, 20% { transform: rotate(90deg); } 60%, 100% { transform: rotate(0); } }

/* ---------- Shorter screens (small phones, browsers with tall toolbars) ---------- */
@media (max-height: 620px) {
  .page-body { padding-top: 58px; padding-bottom: 40px; }
  .hero-body { padding-bottom: 66px; }
  .lead { margin-top: calc(var(--u) * 3); }
  .attire-body .body-text { display: none; }
  .arch { height: calc(var(--vh) * 22); }
  .ticket { margin-block: 14px 14px; }
  .cal-links { margin-top: 14px; }
  .rsvp-body .meta { display: none; }
  .wish-grid li { min-height: 70px; padding-block: 10px; }
}
@media (max-height: 560px) {
  .chrome-count { display: none; }
  .scroll-cue span { display: none; }
  .choice-opt span { min-height: 52px; flex-direction: row; }
}

@media (prefers-reduced-motion: reduce) {
  .cl-js .rv, .cl-js .ornament.rv i { transition-duration: .01ms !important; transition-delay: 0s !important; transform: none !important; }
  .hero-photo { transition: none; transform: none; }
  .opener-poster, .scroll-cue i, .btn-open::after, .ticket-tap, .reveal-rays { animation: none !important; }
  .ticket-card { transition-duration: .01ms; }
}
