:root {
  --ivory: #f8f2e4;
  --ivory-2: #f1e7d0;
  --lapis: #14365c;
  --lapis-deep: #0c2340;
  --turq: #1f8a8a;
  --gold: #c9a24a;
  --gold-soft: #e3c983;
  --pomegranate: #9e2a2b;
  --ink: #2b2a33;
  --girih: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%23c9a24a' stroke-width='1'%3E%3Crect x='19' y='19' width='26' height='26'/%3E%3Crect x='19' y='19' width='26' height='26' transform='rotate(45 32 32)'/%3E%3Ccircle cx='32' cy='32' r='5'/%3E%3Cpath d='M0 0L13 13M64 0L51 13M0 64L13 51M64 64L51 51M32 0v6M32 64v-6M0 32h6M64 32h-6'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Cormorant Garamond", Georgia, serif;
  color: var(--ink);
  background: var(--ivory);
  font-size: 19px;
  line-height: 1.6;
  overflow-x: hidden;
}
body.locked { overflow: hidden; height: 100vh; }

html[data-lang="uz"] .ru, html[data-lang="ru"] .uz { display: none !important; }

button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ---------- COVER ---------- */
.cover {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  perspective: 1600px;
}
.door {
  position: absolute; top: 0; bottom: 0; width: 50.5%;
  background: var(--lapis-deep) 100%;
  background-size: 64px 64px, cover;
  transition: transform 1.6s cubic-bezier(.7,0,.2,1);
  box-shadow: inset 0 0 120px rgba(0,0,0,.45);
}
.door::after {
  content: ""; position: absolute; inset: 14px;
  border: 1px solid rgba(201,162,74,.55);
}
.door-left { left: 0; transform-origin: left center; }
.door-right { right: 0; transform-origin: right center; }
.door-left::after { right: 0; border-right: 0; }
.door-right::after { left: 0; border-left: 0; }
.door-arch {
  position: absolute; top: 12%; bottom: 12%; width: 70%;
  border: 2px solid rgba(201,162,74,.6);
  border-radius: 999px 999px 6px 6px / 260px 260px 6px 6px;
}
.door-left .door-arch { right: 0; border-right: 0; border-radius: 999px 0 0 6px / 260px 0 0 6px; }
.door-right .door-arch { left: 0; border-left: 0; border-radius: 0 999px 6px 0 / 0 260px 6px 0; }

.cover.open .door-left { transform: rotateY(-100deg); }
.cover.open .door-right { transform: rotateY(100deg); }
.cover.open .cover-content { opacity: 0; transform: scale(.9); }
.cover.gone { display: none; }

.cover-content {
  position: relative; z-index: 2; text-align: center; color: var(--ivory);
  padding: 24px; transition: opacity .6s, transform .6s;
}
.cover-kicker { letter-spacing: .32em; text-transform: uppercase; font-size: 13px; color: var(--gold-soft); margin-top: 14px; }
.cover-names {
  font-family: "Great Vibes", cursive; font-weight: 400;
  font-size: clamp(44px, 11vw, 80px); line-height: 1.15; margin: 8px 0 22px;
  color: #fff; text-shadow: 0 2px 20px rgba(0,0,0,.4);
}
.cover-names i, .names em { font-style: normal; color: var(--gold); }
.cover-langs { display: flex; gap: 10px; justify-content: center; margin-bottom: 28px; }
.lang-pick {
  padding: 6px 16px; border: 1px solid rgba(227,201,131,.5); border-radius: 30px;
  color: var(--gold-soft); font-size: 15px; letter-spacing: .05em; transition: .3s;
}
.lang-pick.active, .lang-pick:hover { background: var(--gold); color: var(--lapis-deep); border-color: var(--gold); }

.seal {
  width: 112px; height: 112px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #c4413f, var(--pomegranate) 60%, #6e1a1b);
  color: var(--gold-soft); font-size: 18px; letter-spacing: .08em;
  box-shadow: 0 0 0 6px rgba(158,42,43,.25), 0 10px 30px rgba(0,0,0,.45), inset 0 0 0 3px rgba(227,201,131,.45);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 14px rgba(158,42,43,.12), 0 10px 30px rgba(0,0,0,.45), inset 0 0 0 3px rgba(227,201,131,.45); } }

/* ---------- MEDALLION ---------- */
.medallion { width: 150px; height: 150px; margin: 0 auto; color: var(--gold); }
.medallion svg { width: 100%; height: 100%; animation: spin 80s linear infinite; }
.medallion.small { width: 110px; height: 110px; }
.medallion.tiny { width: 70px; height: 70px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- TOPBAR ---------- */
.topbar { position: fixed; top: 14px; right: 14px; z-index: 20; display: flex; gap: 8px; }
.lang-toggle, .music {
  height: 40px; padding: 0 14px; border-radius: 20px;
  background: rgba(20,54,92,.88); color: var(--ivory); backdrop-filter: blur(6px);
  border: 1px solid rgba(201,162,74,.5); font-size: 15px;
}
.lang-toggle span { margin: 0 6px; opacity: .4; }
.lang-toggle b { font-weight: 500; opacity: .55; }
html[data-lang="uz"] .lang-toggle b[data-l="uz"], html[data-lang="ru"] .lang-toggle b[data-l="ru"] { opacity: 1; color: var(--gold-soft); }
.music { width: 40px; padding: 0; font-size: 18px; }
.music.playing { animation: spin 4s linear infinite; color: var(--gold-soft); }

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 70px 16px 40px; position: relative;
  background:
    radial-gradient(ellipse at top, rgba(31,138,138,.10), transparent 60%),
    var(--girih) center / 64px 64px,
    var(--ivory);
  background-blend-mode: normal;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, var(--ivory) 30%, rgba(248,242,228,.6) 70%, rgba(248,242,228,.85));
}
.hero > * { position: relative; }
.bismillah { font-family: "Amiri", serif; font-size: 26px; color: var(--lapis); margin-bottom: 18px; direction: rtl; }

.arch {
  width: min(420px, 100%);
  padding: 10px;
  border: 2px solid var(--gold);
  border-radius: 220px 220px 10px 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,.4));
  box-shadow: 0 20px 60px rgba(20,54,92,.15);
}
.arch-inner {
  border: 1px solid rgba(201,162,74,.6);
  border-radius: 210px 210px 6px 6px;
  padding: 46px 22px 40px; text-align: center;
  background:
    linear-gradient(180deg, transparent 70%, rgba(31,138,138,.06)),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(201,162,74,.05) 22px 23px);
}
.kicker { margin-top: 16px; letter-spacing: .3em; text-transform: uppercase; font-size: 13px; color: var(--turq); }
.names {
  font-family: "Great Vibes", cursive; font-weight: 400; color: var(--lapis);
  font-size: clamp(48px, 13vw, 72px); line-height: 1.05; margin: 10px 0 14px;
}
.names span, .names em { display: block; }
.names em { font-size: .6em; margin: 4px 0; }
.hero-date { font-size: 20px; letter-spacing: .12em; color: var(--pomegranate); border-top: 1px solid rgba(201,162,74,.5); border-bottom: 1px solid rgba(201,162,74,.5); display: inline-block; padding: 4px 14px; }

.scroll-hint { margin-top: 30px; font-size: 13px; letter-spacing: .25em; text-transform: uppercase; color: var(--lapis); opacity: .7; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.scroll-hint i { width: 1px; height: 36px; background: linear-gradient(var(--gold), transparent); animation: drip 1.8s ease-in-out infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- BLOCKS ---------- */
.block { padding: 70px 16px; text-align: center; position: relative; }
.block > * { max-width: 560px; margin-left: auto; margin-right: auto; }
.tinted { background: linear-gradient(180deg, var(--ivory-2), var(--ivory)); }
.tinted::before, .tinted::after {
  content: ""; position: absolute; left: 0; right: 0; height: 14px;
  background:
    linear-gradient(135deg, var(--gold) 25%, transparent 25%) -7px 0 / 14px 14px,
    linear-gradient(225deg, var(--gold) 25%, transparent 25%) -7px 0 / 14px 14px;
  opacity: .35;
}
.tinted::before { top: 0; }
.tinted::after { bottom: 0; transform: rotate(180deg); }

.title {
  font-family: "Great Vibes", cursive; font-weight: 400; font-size: 46px; color: var(--lapis);
  margin-bottom: 22px; line-height: 1.2;
}
.title::after {
  content: ""; display: block; width: 120px; height: 12px; margin: 8px auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'%3E%3Cg fill='%23c9a24a'%3E%3Cpath d='M0 6h48' stroke='%23c9a24a'/%3E%3Cpath d='M72 6h48' stroke='%23c9a24a'/%3E%3Cpath d='M60 0l6 6-6 6-6-6z'/%3E%3Ccircle cx='50' cy='6' r='1.5'/%3E%3Ccircle cx='70' cy='6' r='1.5'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
.divider { width: 60px; height: 60px; margin-bottom: 10px !important; background: var(--girih) center / 60px 60px; opacity: .9; }
.lead { font-size: 21px; }
.lead.small { font-size: 18px; margin-top: 14px; }
.lead b { color: var(--pomegranate); font-weight: 600; }
.quote {
  margin-top: 32px !important; padding: 22px 20px; font-style: italic; font-size: 18px; color: var(--lapis);
  border-left: 2px solid var(--gold); border-right: 2px solid var(--gold);
  background: rgba(201,162,74,.07);
}
.quote small { display: block; margin-top: 8px; font-style: normal; font-size: 14px; letter-spacing: .1em; color: var(--turq); }

/* date */
.date-row { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 30px; }
.date-side { flex: 1; font-size: 17px; letter-spacing: .15em; text-transform: uppercase; color: var(--lapis); padding: 6px 0; border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); }
.date-big { font-size: 72px; line-height: 1; color: var(--pomegranate); font-weight: 500; }
.date-big small { display: block; font-size: 16px; letter-spacing: .2em; text-transform: uppercase; color: var(--turq); margin-top: 6px; }

.calendar {
  background: #fff; border: 1px solid rgba(201,162,74,.5); padding: 20px 16px; border-radius: 8px;
  box-shadow: 0 10px 30px rgba(20,54,92,.08);
}
.cal-head { font-size: 20px; color: var(--lapis); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid span { aspect-ratio: 1; display: grid; place-items: center; font-size: 17px; }
.cal-grid .wd { font-size: 13px; color: var(--turq); letter-spacing: .05em; aspect-ratio: auto; padding-bottom: 6px; }
.cal-grid .hit { position: relative; color: #fff; z-index: 0; }
.cal-grid .hit::before {
  content: "❤"; position: absolute; inset: 0; display: grid; place-items: center; z-index: -1;
  font-size: 38px; color: var(--pomegranate); animation: beat 1.6s ease-in-out infinite;
}
@keyframes beat { 0%,100% { transform: scale(1); } 15% { transform: scale(1.15); } 30% { transform: scale(1); } 45% { transform: scale(1.1); } }

/* countdown */
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.countdown div {
  background: var(--lapis); color: var(--ivory); padding: 18px 4px 12px;
  border-radius: 60px 60px 6px 6px; border: 1px solid var(--gold);
  box-shadow: inset 0 0 0 4px var(--lapis), inset 0 0 0 5px rgba(201,162,74,.5);
}
.countdown b { display: block; font-size: 34px; font-weight: 500; color: var(--gold-soft); line-height: 1.1; }
.countdown span { font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.cd-done { font-size: 26px; color: var(--pomegranate); }

/* timeline */
.timeline { list-style: none; text-align: left; position: relative; padding-left: 0; }
.timeline::before { content: ""; position: absolute; left: 84px; top: 8px; bottom: 8px; width: 1px; background: var(--gold); }
.timeline li { display: flex; gap: 34px; align-items: flex-start; padding: 12px 0; position: relative; }
.timeline li::before {
  content: ""; position: absolute; left: 79px; top: 22px; width: 11px; height: 11px;
  background: var(--ivory); border: 2px solid var(--pomegranate); transform: rotate(45deg);
}
.timeline time { width: 64px; flex-shrink: 0; text-align: right; font-size: 22px; color: var(--pomegranate); font-weight: 600; }
.timeline p { font-size: 19px; color: var(--lapis); padding-top: 2px; }

/* venue */
.venue-card {
  background: #fff; border: 1px solid rgba(201,162,74,.5); padding: 30px 20px;
  border-radius: 180px 180px 8px 8px; box-shadow: 0 10px 30px rgba(20,54,92,.08);
}
.venue-icon { width: 64px; height: 64px; margin: 10px auto 12px; color: var(--turq); }
.venue-card h4 { font-size: 26px; color: var(--lapis); font-weight: 600; }
.venue-card p { color: #555; margin-bottom: 20px; }

.btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.btn {
  display: inline-block; padding: 10px 22px; border: 1px solid var(--lapis); border-radius: 30px;
  color: var(--lapis); font-size: 16px; letter-spacing: .06em; transition: .3s;
}
.btn:hover, .btn.solid { background: var(--lapis); color: var(--ivory); }
.btn.solid:hover { background: var(--pomegranate); border-color: var(--pomegranate); }

.hosts { font-size: 24px; color: var(--pomegranate); font-weight: 500; }

/* footer */
.footer {
  padding: 60px 16px 70px; text-align: center; color: var(--ivory);
  background: linear-gradient(160deg, var(--lapis), var(--lapis-deep));
  /* background: var(--girih) center / 64px 64px, linear-gradient(160deg, var(--lapis), var(--lapis-deep)); */
}
.footer-names { font-family: "Great Vibes", cursive; font-size: 46px; color: var(--gold-soft); margin-top: 10px; }
.footer-text { letter-spacing: .15em; text-transform: uppercase; font-size: 14px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1s ease, transform 1s ease; }
.reveal.in { opacity: 1; transform: none; }

/* petals */
.petal {
  position: fixed; top: -20px; z-index: 5; pointer-events: none;
  width: 12px; height: 12px; border-radius: 12px 0; opacity: .7;
  animation: fall linear forwards;
}
@keyframes fall { to { transform: translate(var(--dx), 110vh) rotate(540deg); opacity: 0; } }

@media (max-width: 420px) {
  body { font-size: 18px; }
  .date-big { font-size: 58px; }
  .date-side { font-size: 14px; }
  .countdown b { font-size: 26px; }
  .countdown span { font-size: 12px; }
  .timeline::before { left: 70px; }
  .timeline li::before { left: 65px; }
  .timeline time { width: 52px; font-size: 19px; }
  .timeline li { gap: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
