html:root, :root {
  color-scheme: light;
  --bg: #efe8da;
  --panel: rgba(250, 246, 238, .86);
  --ink: #7a5c45;
  --ink-soft: #86695a;
  --line: rgba(179, 146, 99, .45);
  --tint: rgba(179, 146, 99, .12);
  --tint-2: rgba(179, 146, 99, .18);
  --field: rgba(255, 255, 255, .72);
  --gold: #9c7a47;
  --champagne: #b39263;
  --taupe: #8a6f5a;
  --taupe-dark: #7a5c45;
  --dark: #9c7a47;
  --error: #a3313a;
  --font-script: "Great Vibes", "Snell Roundhand", "Brush Script MT", cursive;
  --font-display: "Forum", "Trajan Pro", "Times New Roman", Georgia, serif;
  --font-ui: "Montserrat", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0; color: var(--ink);
  font-family: var(--font-display); font-size: 17px; line-height: 1.45;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
main:focus { outline: none; }
[hidden] { display: none !important; }

/* Blurred page background */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }
.bg__img { position: absolute; inset: 0; background: url("assets/img/satin.jpg") center / cover no-repeat; filter: blur(1.5px); transform: scale(1.04); }
.bg__wash { position: absolute; inset: 0; background: rgba(247, 238, 222, .28); }
.pearls { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .28; }
.divider { display: block; width: min(260px, 80%); height: 24px; margin: 6px auto; }
.invite__addr .line { display: block; }
.invite__addr { margin-bottom: 1.3em; }

.up { text-transform: uppercase; letter-spacing: .05em; line-height: 1.45; }
.h2 { font-weight: 400; text-transform: uppercase; letter-spacing: .05em; font-size: clamp(26px, 7.4vw, 31px); line-height: 1.25; margin-bottom: 26px; position: relative; }
.h2--script { font-family: var(--font-script); text-transform: none; letter-spacing: 0; white-space: nowrap; font-size: clamp(30px, calc((100vw - 96px) / 7.8), 50px); line-height: 1.15; }

/* Hero */
.hero {
  position: relative; display: grid; place-items: center;
  min-height: 100vh; min-height: min(100svh, 900px);
  padding: 48px 20px 150px;
}
.arch {
  position: relative; width: min(78vw, 340px); min-height: min(560px, 66vh);
  border-radius: 999px; padding: 56px 22px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; text-align: center;
  background: rgba(250, 246, 238, .6);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  box-shadow: 0 20px 60px -30px rgba(122, 92, 69, .45);
}
.names { position: relative; display: flex; flex-direction: column; align-items: center; font-weight: 400; }
.name { position: relative; z-index: 1; font-family: var(--font-script); font-size: clamp(46px, 13.5vw, 64px); line-height: 1.1; color: var(--ink); animation: nameIn 1.6s ease both; }
.amp + .name { animation-delay: .5s; }
.amp { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-family: var(--font-script); font-size: clamp(120px, 36vw, 170px); line-height: 1; color: var(--ink-soft); opacity: .22; z-index: 0; }
.hero__sub { font-size: 20px; text-transform: uppercase; letter-spacing: .06em; line-height: 1.4; max-width: 9em; }
@keyframes nameIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Column (beige panel with side notches) */
.column {
  position: relative; z-index: 2;
  width: calc(100% - 40px); max-width: 460px; margin: -110px auto 0;
  padding: 140px 28px 200px;
  background: var(--panel); border-radius: 9999px;
  text-align: center;
}
.block { padding: 34px 0; }
.block:first-child { padding-top: 0; }
.block .up + .up { margin-top: 1.1em; }

/* Calendar */
.cal { max-width: 340px; margin: 0 auto; }
.cal__head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 6px 18px; font-size: 24px; text-transform: uppercase; letter-spacing: .08em; -webkit-text-stroke: .5px var(--ink); }
.cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal__dow { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); padding-bottom: 8px; }
.cal__day { position: relative; aspect-ratio: 1; display: grid; place-items: center; font-size: 19px; }
.cal__num { position: relative; z-index: 1; font-variant-numeric: lining-nums; }
.cal__day.is-wed { z-index: 2; }
.cal__heart { position: absolute; left: 50%; top: 50%; width: 142%; height: 142%; margin: -71% 0 0 -71%; overflow: visible; color: var(--champagne); animation: beat 2.6s ease-in-out infinite; pointer-events: none; }
.cal__heart path { stroke-width: 1.6; }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.start { display: flex; justify-content: space-between; align-items: center; margin: 30px auto 0; max-width: 340px; padding: 18px 24px; background: var(--tint); border-radius: 14px; border-left: 4px solid var(--dark); text-transform: uppercase; letter-spacing: .05em; font-size: 20px; }
.start strong { font-weight: 400; font-size: 27px; letter-spacing: .04em; font-variant-numeric: lining-nums; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 32px auto 0; max-width: 340px; }
.cd { min-width: 0; }
.cd__n { display: block; font-size: clamp(30px, 9vw, 40px); line-height: 1.1; font-variant-numeric: tabular-nums lining-nums; }
.cd__l { display: block; margin-top: 4px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.cd__done { margin-top: 28px; }

/* Programme */
.timeline { max-width: 320px; margin: 0 auto; }
.timeline li { padding: 20px 0; border-bottom: 1px solid var(--line); }
.timeline li:first-child { border-top: 1px solid var(--line); }
.tl__time { display: block; font-size: 32px; line-height: 1.1; font-variant-numeric: lining-nums; }
.tl__title { display: block; margin-top: 6px; text-transform: uppercase; letter-spacing: .05em; font-size: 19px; }

/* Venue card */
.block--venue { padding-inline: 0; }
.vcard {
  position: relative; overflow: hidden; border-radius: 22px; border: 1px solid var(--champagne);
  background: linear-gradient(rgba(250, 246, 238, .45), rgba(250, 246, 238, .3)), url("assets/img/paper-floral.jpg") center / cover no-repeat, #f4ecdd;
  box-shadow: inset 0 0 0 4px rgba(250, 246, 238, .55), inset 0 0 0 5px rgba(179, 146, 99, .35), inset 0 8px 28px rgba(122, 92, 69, .12);
}
.vcard__top { position: relative; z-index: 2; padding: 26px 16px 0; text-align: center; }
.vcard .h2 { margin-bottom: 10px; }
.venue__name { font-size: clamp(28px, 8.4vw, 34px); letter-spacing: .14em; line-height: 1.15; }
.venue__type { font-size: 12.5px; letter-spacing: .34em; color: var(--ink-soft); margin-top: 8px; }
.vrule { display: block; width: 180px; height: 24px; margin: 12px auto 4px; }
.venue__city { font-size: 16px; letter-spacing: .12em; line-height: 1.45; color: var(--ink); margin-top: 4px; }
.venue__addr { margin: 2px 0 20px; font-family: var(--font-ui); font-size: clamp(12.5px, 3.75vw, 14.5px); text-wrap: balance; color: var(--ink-soft); }
.vcard__art { position: relative; z-index: 1; display: flex; justify-content: flex-end; margin-top: -6px; }
.vcard__art img { display: block; width: 82%; height: auto; margin-right: -1px; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 18%); mask-image: linear-gradient(to right, transparent 0, #000 18%); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 32px; border: 0; border-radius: 999px;
  background: linear-gradient(135deg, #b39263, #98763f); color: #fff; text-shadow: 0 1px 1px rgba(80, 55, 25, .3); text-decoration: none; cursor: pointer;
  font-family: var(--font-display); font-size: 17px; text-transform: uppercase; letter-spacing: .06em;
  box-shadow: 0 12px 26px -12px rgba(115, 85, 55, .7); transition: transform .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline-color: var(--dark); outline-offset: 4px; }
.btn--taupe { background: var(--taupe); box-shadow: 0 12px 26px -12px rgba(122, 92, 69, .6); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .75; cursor: progress; transform: none; }
.host__line { font-size: clamp(22px, 6vw, 26px); }
.hosts__contacts { margin-top: 22px; }
.contact__name { display: block; font-size: 14px; color: var(--ink-soft); }
.contact__tel { font-size: 24px; text-decoration: none; display: inline-block; padding: 6px 0; }

/* RSVP */
.rsvp { text-align: left; padding-bottom: 0; }
.rsvp .h2 { text-align: center; margin-bottom: 14px; }
.rsvp__ask { text-align: center; font-size: 19px; color: var(--ink-soft); }
.rsvp form, .rsvp__deadline { font-family: var(--font-ui); }
.rsvp__deadline { text-align: center; color: var(--ink-soft); font-size: 14px; margin: 14px 0 26px; }
.field { margin-bottom: 20px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend, .lbl { display: block; font: 500 14px/1.4 var(--font-ui); color: var(--ink); margin-bottom: 8px; padding: 0; }
.opt { font-weight: 300; color: var(--ink-soft); }
input[type="text"], input[type="tel"], textarea {
  width: 100%; font: 400 16px/1.4 var(--font-ui); color: var(--ink);
  background: var(--field); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; min-height: 52px; appearance: none; transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; min-height: 104px; }
input::placeholder, textarea::placeholder { color: #a99a8f; }
input:focus, textarea:focus { outline: none; border-color: var(--taupe-dark); box-shadow: 0 0 0 3px rgba(145, 126, 114, .25); }
[aria-invalid="true"] { border-color: var(--error) !important; }
.err { color: var(--error); font-size: 13px; margin-top: 6px; }
.err:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.choices { display: grid; gap: 10px; }
.choices legend { margin-bottom: 10px; }
.choice { position: relative; display: block; margin: 0 !important; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice__box { display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 12px 16px; font: 400 15px/1.35 var(--font-ui); color: var(--ink); border: 1.5px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, .28); transition: background-color .2s, border-color .2s; }
.choice__dot { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--taupe); position: relative; }
.choice__dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--taupe-dark); transform: scale(0); transition: transform .18s; }
.choice input:checked + .choice__box { background: rgba(255, 255, 255, .5); border: 2px solid var(--taupe-dark); padding: 11.5px 15.5px; }
.choice input:checked + .choice__box .choice__dot { border-color: var(--taupe-dark); }
.choice input:checked + .choice__box .choice__dot::after { transform: scale(1); }
.choice input:focus-visible + .choice__box { outline: 2px solid var(--ink); outline-offset: 3px; }

.reveal-box { animation: nameIn .4s ease both; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--field); overflow: hidden; }
.stepper button { width: 52px; height: 52px; border: 0; background: transparent; font: 400 24px/1 var(--font-ui); color: var(--ink); cursor: pointer; }
.stepper button:hover { background: var(--tint); }
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper output { min-width: 56px; text-align: center; font: 500 20px var(--font-ui); font-variant-numeric: tabular-nums; }

.form-error { color: var(--error); background: rgba(255, 255, 255, .6); border: 1px solid #d9a9ad; border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 16px; }
.spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.is-loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.success { text-align: center; padding: 10px 0 30px; }
.success:focus { outline: none; }
.success .h2 { margin-bottom: 14px; }
.success p { font-family: var(--font-display); font-size: 19px; text-transform: uppercase; letter-spacing: .04em; line-height: 1.45; }
.rsvp .btn { font-family: var(--font-display); }

/* Final photo */
.final { position: relative; width: calc(100% - 40px); max-width: 440px; margin: 48px auto 0; border-radius: 22px; overflow: hidden; aspect-ratio: 9 / 16; border: 1px solid var(--champagne); box-shadow: inset 0 0 0 4px rgba(250, 246, 238, .5); background: #f4ecdd; }
.final img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.final::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 48%, rgba(122, 92, 69, .10), rgba(122, 92, 69, 0) 55%), radial-gradient(ellipse at 50% 50%, rgba(250, 246, 238, 0) 55%, rgba(179, 146, 99, .16) 100%); }
.final__top { position: absolute; z-index: 1; left: 0; right: 0; top: 7%; display: flex; flex-direction: column; align-items: center; padding: 0 14px; text-align: center; }
.final__bottom { position: absolute; z-index: 1; left: 0; right: 0; top: 67%; display: flex; flex-direction: column; align-items: center; padding: 0 14px; text-align: center; }
.final__note { font-size: clamp(12px, 3.4vw, 14px); letter-spacing: .14em; color: var(--ink-soft); margin-top: 14px; }
.final__text { font-size: clamp(22px, 6.4vw, 28px); letter-spacing: .1em; color: var(--ink); }
.final__names { font-family: var(--font-script); font-size: clamp(44px, 13vw, 60px); line-height: 1.15; margin-top: 8px; color: var(--ink); text-wrap: balance; }
.final__div { margin-top: 0; }
.final__date { font-size: 20px; letter-spacing: .22em; color: var(--ink-soft); margin-top: 2px; }
.amp2 { font-size: .7em; opacity: .7; }
.footer { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

/* Petals */
.petals { position: fixed; inset: 0; z-index: 6; overflow: hidden; pointer-events: none; }
.petal { position: absolute; top: -70px; width: var(--s, 30px); height: auto; opacity: .95; filter: drop-shadow(0 2px 3px rgba(122, 92, 69, .25)); animation: fall var(--dur, 22s) linear var(--delay, 0s) infinite; will-change: transform; }
@keyframes fall {
  0% { transform: translate3d(0, -10vh, 0) rotate(var(--r0, 0deg)); }
  50% { transform: translate3d(var(--sway, 40px), 60vh, 0) rotate(calc(var(--r0, 0deg) + 160deg)); }
  100% { transform: translate3d(calc(var(--sway, 40px) * -0.6), 118vh, 0) rotate(calc(var(--r0, 0deg) + 340deg)); }
}
.p1 { left: 6%;  --s: 34px; --dur: 24s; --delay: -3s;  --sway: 50px;  --r0: 20deg; }
.p2 { left: 22%; --s: 24px; --dur: 30s; --delay: -14s; --sway: -40px; --r0: 90deg; }
.p3 { left: 38%; --s: 30px; --dur: 26s; --delay: -8s;  --sway: 60px;  --r0: 200deg; }
.p4 { left: 55%; --s: 22px; --dur: 34s; --delay: -20s; --sway: -50px; --r0: 300deg; }
.p5 { left: 70%; --s: 36px; --dur: 28s; --delay: -1s;  --sway: 40px;  --r0: 140deg; }
.p6 { left: 84%; --s: 26px; --dur: 32s; --delay: -11s; --sway: -60px; --r0: 60deg; }
.p7 { left: 93%; --s: 20px; --dur: 36s; --delay: -25s; --sway: -30px; --r0: 250deg; }

/* Music button */
.music {
  position: fixed; z-index: 20; width: 52px; height: 52px; border-radius: 50%; border: 0; padding: 0;
  right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  display: grid; place-items: center; background: #faf6ee; color: var(--ink); cursor: pointer;
  box-shadow: 0 8px 24px -6px rgba(122, 92, 69, .5); -webkit-tap-highlight-color: transparent;
}
.music svg { transition: opacity .2s; opacity: .7; }
.music.is-playing svg { opacity: 1; animation: spin 6s linear infinite; }
.music.is-playing { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 8px 24px -6px rgba(122, 92, 69, .5), 0 0 0 0 rgba(122, 92, 69, .2); } 50% { box-shadow: 0 8px 24px -6px rgba(122, 92, 69, .5), 0 0 0 9px rgba(122, 92, 69, 0); } }

/* Synthesized Kazakh letters in script font */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kz-u, .kz-g, .kz-q { position: relative; display: inline-block; }
.kz-u::after { content: ""; position: absolute; left: -6%; right: -22%; height: .07em; min-height: 2px; background: currentColor; border-radius: 1px; top: .93em; transform: rotate(-8deg); }
.kz-g::after { content: ""; position: absolute; left: -12%; width: 70%; height: .05em; min-height: 1.5px; background: currentColor; border-radius: 1px; top: .5em; transform: rotate(-6deg); }
.kz-q::after { content: ""; position: absolute; left: 62%; width: .05em; min-width: 1.5px; height: .3em; background: currentColor; border-radius: 1px; top: .72em; transform: rotate(14deg); }
.kz-q--cap::after { top: .84em; left: 58%; height: .34em; }
.kz-A { font-family: "Parisienne", "Great Vibes", cursive; font-size: 1.05em; }

/* Opening screen */
.intro {
  display: none; position: fixed; inset: 0; z-index: 100; place-items: center; padding: 20px;
  background: var(--bg);
  transition: opacity .9s ease, visibility .9s; overflow-y: auto;
}
.intro::before { content: ""; position: absolute; inset: 0; background: url("assets/img/satin.jpg") center / cover no-repeat; filter: blur(1.5px); transform: scale(1.04); }
.intro::after { content: ""; position: absolute; inset: 0; background: rgba(247, 238, 222, .3); }
.intro .arch { z-index: 1; }
.js .intro { display: grid; }
.intro.is-open { opacity: 0; visibility: hidden; pointer-events: none; }
.intro .arch { z-index: 1; min-height: min(520px, 76vh); gap: 26px; padding: 40px 18px; margin: auto; }

html.intro-active, html.intro-active body { overflow: hidden; }
.js.intro-active .petals { opacity: 0; }

@media (min-width: 560px) {
  .column { padding-bottom: 270px; margin-top: -140px; }
  .hero { padding-bottom: 180px; }
}
@media (max-width: 380px) {
  .column { width: calc(100% - 32px); padding-inline: 22px; }
  .h2--script { font-size: clamp(28px, calc((100vw - 76px) / 7.8), 50px); }
  .final { width: calc(100% - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .petals { display: none; }
  .cal__heart, .name, .reveal-box, .music.is-playing, .music.is-playing svg { animation: none !important; }
  .intro { transition-duration: .01ms; }
}


