/* «Vağzalı» flagship (2026-11-18): a Qarabağ carpet hung across a courtyard doorway; a tap parts it down the middle and
   its halves swing back like doors onto the courtyard, where the couple dance (a looping film, or the drawn courtyard
   until it exists). The carpet's weave comes from flagship-xali.css (loaded before this file: .xl-cp and its layers);
   this file hangs it, splits it and dresses the cover and the sections.
   assets/js/flagship-vagzali.js sets on .vg-open: --ox/--oy the cover's middle, --cl/--ct its top-left corner on screen,
   --cw/--ch its size, --P the perspective. Only transform and opacity animate. */

.vagzali-body { margin: 0; background: #2a0c10; color: #3a1a12; font: 400 20px/1.5 "Cormorant Garamond", Georgia, serif; -webkit-text-size-adjust: 100%; }
.vagzali {
  --dk: #5a1219; --dk-2: #1c2550; --dk-size: 64px 64px;
  --dk-img: radial-gradient(120% 60% at 50% 0%, rgba(255, 200, 130, .12), transparent 60%);
  --lt: #f5ead8;
  --lt-img: radial-gradient(90% 50% at 50% 0%, rgba(255, 236, 200, .7), transparent 70%), repeating-linear-gradient(0deg, rgba(150, 100, 60, .045) 0 1px, transparent 1px 5px);
  --iv: #f6ecd9; --iv-2: rgba(246, 236, 217, .8); --ink: #3a1a12; --ink-2: rgba(58, 26, 18, .74); --rb: #8e1b22;
  --gd: #e4b456; --gd-dk: #9a6a1c; --gd-ink: #2a1505; --nt: #2a0c10;
  --fd: "Cormorant Garamond", Georgia, serif; --fb: "Cormorant Garamond", Georgia, serif; --fs: "Great Vibes", "Cormorant Garamond", cursive;
  font-variant-numeric: lining-nums;
  color: var(--iv); /* the dark sheets read ivory; the light ones set their ink (flagship-sections.css) */
}
.vagzali .ip-h, .vagzali .ip-ev-t, .vagzali .inv-h { font-weight: 400; }
.vagzali .ip-h { font-size: 38px; }
.vagzali .ip-letter-text { font-size: 26px; }

/* ================= the cover: the courtyard, the names on its stone floor ================= */
.vg-cover { position: relative; height: 100svh; min-height: 600px; max-height: 1000px; overflow: hidden; background: #ecd2ae; isolation: isolate; }
.vg-scene { position: absolute; inset: 0; transform-origin: 50% 40%; }
.vg-scene-art, .vg-film { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vg-film { object-fit: cover; object-position: 50% 30%; opacity: 0; transition: opacity .8s ease; }
.vg-film.is-on { opacity: 1; }
/* the floor fades to cream stone under the words */
.vg-cover::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 52%; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(245, 234, 216, 0), rgba(245, 234, 216, .78) 34%, #f5ead8 62%); }
.vg-text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0 24px max(30px, calc(env(safe-area-inset-bottom) + 18px));
  display: flex; flex-direction: column; align-items: center; text-align: center; color: #3a1a12; }
.vg-intro { margin: 0 0 6px; max-width: 26ch; font: italic 400 20px/1.3 var(--fb); color: #6b3a26; text-wrap: balance; }
.vg-names { --ns: clamp(54px, 17vw, 76px); margin: 0; font: 400 var(--ns)/.98 var(--fs); color: #7d1620; overflow-wrap: anywhere;
  text-shadow: 0 1px 0 rgba(255, 248, 235, .8); }
.vg-names--m { --ns: clamp(46px, 14.5vw, 64px); }
.vg-names--l { --ns: clamp(40px, 12.4vw, 54px); }
.vg-names > span { display: block; }
.vg-and { font-size: .52em; line-height: 1; margin: .02em 0 .04em; color: #b07a2a; }
.vg-rule { display: block; width: 150px; height: 13px; margin: 14px 0 10px;
  background: linear-gradient(90deg, transparent, #b07a2a 30%, #b07a2a 44%, transparent 44% 56%, #b07a2a 56%, #b07a2a 70%, transparent) 0 50% / 100% 1px no-repeat; position: relative; }
.vg-rule::after { content: ""; position: absolute; left: 50%; top: 0; width: 13px; height: 13px; margin-left: -6.5px; background: #8e1b22; clip-path: var(--mark); }
.vg-date { margin: 0; font: 500 21px/1.3 var(--fb); letter-spacing: .22em; text-transform: uppercase; color: #3a1a12; }
.vg-when { margin: 4px 0 0; font: 500 12px/1.6 var(--fu); letter-spacing: .2em; text-transform: uppercase; color: #8a5a3a; }
.vg-more { margin-top: 18px; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; color: #8e1b22; text-decoration: none;
  font: 500 11px/1 var(--fu); letter-spacing: .24em; text-transform: uppercase; }
.vg-more i { width: 1px; height: 26px; background: linear-gradient(#8e1b22, transparent); }
.vg-cover.is-in .vg-more i { animation: vg-drip 2.4s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes vg-drip { 0%, 100% { transform: scaleY(.35); opacity: .5; } 50% { transform: scaleY(1); opacity: 1; } }
.js .vg-cover:not(.is-in) .vg-text > * { opacity: 0; }
/* the demo bar and the music button float at the foot of the screen: the words stand clear of them */
.vagzali:has(> .demo-bar, > .inv-music) .vg-text { padding-bottom: max(84px, calc(env(safe-area-inset-bottom) + 72px)); }
@media (max-height: 640px) { .vg-intro { display: none; } .vg-more { display: none; } }
/* with the film the couple dance in the top half: the intro goes up into the sky, the names come down onto the rug,
   a size smaller, and the cream rises only over the rug */
.vg-cover.has-film .vg-film { object-position: 50% 0; }
.vg-cover.has-film::after { height: 44%; }
.vg-cover.has-film .vg-text { top: 0; justify-content: flex-end; }
.vg-cover.has-film .vg-intro { position: absolute; left: 24px; right: 24px; top: max(22px, calc(env(safe-area-inset-top) + 14px)); margin: 0 auto;
  color: #4a2416; text-shadow: 0 0 12px rgba(255, 244, 222, .95), 0 0 3px rgba(255, 244, 222, .9); }
.vg-cover.has-film .vg-names { --ns: min(clamp(44px, 12.6vw, 62px), 6.6cqh); }
.vg-cover.has-film .vg-names--m { --ns: min(clamp(40px, 11.4vw, 54px), 6cqh); }
.vg-cover.has-film .vg-names--l { --ns: min(clamp(34px, 10vw, 46px), 5.2cqh); }
.vg-cover.has-film .vg-rule { margin: 10px 0 8px; }
.vg-cover.has-film .vg-more { display: none; }
/* a cover wider than the film (a short desktop window): the film fits the height, its sides melt into warm sand, and
   the drawn courtyard steps away once the film runs, so it never shows beside it. 0.5641 = 704 / 1248, the film's shape */
.vg-cover.has-film { container-type: size; }
.vg-scene:has(.vg-film.is-on) .vg-scene-art { opacity: 0; transition: opacity .8s ease; }
@container (aspect-ratio > 0.58) {
  .vg-film { object-fit: contain; --vg-b: calc((100cqw - 56.41cqh) / 2);
    -webkit-mask: linear-gradient(90deg, transparent var(--vg-b), #000 calc(var(--vg-b) + 56px), #000 calc(100% - var(--vg-b) - 56px), transparent calc(100% - var(--vg-b)));
    mask: linear-gradient(90deg, transparent var(--vg-b), #000 calc(var(--vg-b) + 56px), #000 calc(100% - var(--vg-b) - 56px), transparent calc(100% - var(--vg-b))); }
}

/* ================= opening: the carpet in the doorway ================= */
.vg-open { background: #2a0c10; }
.vg-open.is-play { background: transparent; }
.vg-door { position: absolute; left: var(--cl, 0px); top: var(--ct, 0px); width: var(--cw, 100%); height: var(--ch, 100%); transform-style: preserve-3d; }
.vg-half { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.vg-half--l { clip-path: inset(0 50% 0 0); transform-origin: 0 50%; }
.vg-half--r { clip-path: inset(0 0 0 50%); transform-origin: 100% 50%; }
.vg-sway { position: absolute; inset: 0; transform-origin: 50% 0; }
.vg-half--l .vg-sway { transform-origin: 25% 0; }
.vg-half--r .vg-sway { transform-origin: 75% 0; }
.vg-half .xl-carpet { position: absolute; inset: 0; }
/* a carpet hung up: lit from the top, the folds of its weight lower down */
.vg-half .xl-pile { background:
  linear-gradient(180deg, rgba(255, 214, 160, .14), transparent 30%, rgba(0, 0, 0, .1) 80%, rgba(0, 0, 0, .3)),
  repeating-linear-gradient(90deg, transparent 0 14%, rgba(0, 0, 0, .06) 18%, transparent 22% 30%),
  repeating-linear-gradient(0deg, rgba(0, 0, 0, .07) 0 1px, transparent 1px 3px),
  repeating-linear-gradient(90deg, rgba(0, 0, 0, .05) 0 1px, transparent 1px 3px); }
/* the initials woven in the medallion's ivory heart */
.vg-mono { position: absolute; left: 21%; right: 21%; top: 33%; bottom: 33%; margin: 0; container-type: size;
  display: flex; align-items: center; justify-content: center; }
.vg-mono-in { display: flex; align-items: center; justify-content: center; gap: 4cqw; font: 400 min(60cqh, 34cqw)/1 var(--fs); color: #1c2550; }
.vg-mono .vg-amp { font: italic 400 .45em/1 var(--fb); color: #a8282d; }
/* the bound edge along the seam: indigo binding, ivory stitches */
.vg-edge { position: absolute; top: 0; bottom: 0; width: max(5px, calc(var(--cw, 400px) * .016));
  background: repeating-linear-gradient(0deg, #efe3c8 0 2px, transparent 2px 7px) 50% 0 / 1px 100% no-repeat, #1c2550; }
.vg-half--l .vg-edge { left: calc(50% - max(5px, calc(var(--cw, 400px) * .016))); box-shadow: 3px 0 6px rgba(0, 0, 0, .35); }
.vg-half--r .vg-edge { left: 50%; box-shadow: -3px 0 6px rgba(0, 0, 0, .35); }
/* the half darkens as it swings away from the light */
.vg-shade { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.vg-half--l .vg-shade { background: linear-gradient(90deg, rgba(20, 4, 4, .75), rgba(20, 4, 4, .2) 50%, transparent 50%); }
.vg-half--r .vg-shade { background: linear-gradient(270deg, rgba(20, 4, 4, .75), rgba(20, 4, 4, .2) 50%, transparent 50%); }
/* the brass rod it hangs from */
.vg-rod { position: absolute; left: -2%; right: -2%; top: 0; height: 9px; border-radius: 5px; transform: translateZ(2px);
  background: linear-gradient(#f6dc9c, #b8873a 45%, #6b4410); box-shadow: 0 3px 8px rgba(0, 0, 0, .5); }
/* light from the courtyard through the seam, and the flood when the halves part */
.vg-seam { position: absolute; left: var(--ox, 50%); top: var(--ct, 0px); width: 0; height: var(--ch, 100%); pointer-events: none; }
.vg-seam::before { content: ""; position: absolute; left: -16px; top: 0; bottom: 0; width: 32px; opacity: .55; mix-blend-mode: screen;
  background: linear-gradient(90deg, transparent, rgba(255, 210, 140, .5) 40%, rgba(255, 244, 214, .95) 50%, rgba(255, 210, 140, .5) 60%, transparent);
  -webkit-mask: linear-gradient(transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(transparent, #000 12%, #000 88%, transparent); }
.vg-open.is-idle .vg-seam::before { animation: vg-leak 4.2s ease-in-out infinite; }
@keyframes vg-leak { 0%, 100% { opacity: .35; } 50% { opacity: .75; } }
.vg-flood { position: absolute; inset: 0; opacity: 0; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(60% 50% at var(--ox, 50%) 45%, rgba(255, 246, 222, .95), rgba(255, 214, 150, .55) 45%, transparent 75%); }
/* the idle draft: each half sways a little on the rod, so the seam breathes */
.vg-open.is-idle .vg-half--l .vg-sway { animation: vg-sway-l 6.5s ease-in-out infinite alternate; }
.vg-open.is-idle .vg-half--r .vg-sway { animation: vg-sway-r 7.3s ease-in-out infinite alternate; }
@keyframes vg-sway-l { from { transform: rotate(0deg); } to { transform: rotate(.35deg); } }
@keyframes vg-sway-r { from { transform: rotate(0deg); } to { transform: rotate(-.35deg); } }
.vg-open .fx-dust { left: var(--ox, 50%); top: 46%; }
.vg-open .fx-open-t { color: #f6ecd9; }
.vg-open .fx-open-t, .vg-open .fx-open-foot { z-index: 2; }
/* the words over the carpet sit on a soft shadow so they read over any part of the weave */
.vg-open .fx-open-t::before, .vg-open .fx-open-foot::before { content: ""; position: absolute; inset: -30px -16px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(30, 6, 8, .55), transparent); }

/* ================= opening, filmed (VAGZALI_DOOR): the carpet's still, the wish across it; the tap plays the film ================= */
.vg-reel { position: absolute; left: var(--cl, 0px); top: var(--ct, 0px); width: var(--cw, 100%); height: var(--ch, 100%); overflow: hidden; background: #2a0c10; }
.vg-reel-v { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 45%; }
/* the reel waits a breath away and settles in, as the drawn carpet does */
.vg-open--film:not(.is-ready) .vg-reel { opacity: 0; }
/* «Xoşbəxt olun!» across the carpet: two copies, each clipped to one half, so the words part on the seam */
.vg-wish { position: absolute; left: var(--cl, 0px); width: var(--cw, 100%); top: calc(var(--ct, 0px) + var(--ch, 100vh) * .4); margin: 0; padding: 0 18px;
  box-sizing: border-box; transform: translateY(-50%); pointer-events: none; z-index: 1; }
.vg-wish-h { display: block; text-align: center; font: 400 clamp(52px, 15.5vw, 92px)/1.02 var(--fs); color: #fbf0d8; text-wrap: balance;
  text-shadow: 0 2px 3px rgba(30, 6, 8, .85), 0 0 24px rgba(30, 6, 8, .75), 0 0 46px rgba(255, 196, 110, .35); }
.vg-wish-h--l { position: relative; clip-path: inset(-40% 50% -40% -10%); }
.vg-wish-h--r { position: absolute; inset: 0 18px; clip-path: inset(-40% -10% -40% 50%); }
.js .vg-open--film:not(.is-ready) .vg-wish { opacity: 0; }
.vg-open--film .vg-flood { z-index: 1; }

/* the small cover (builder, cards) */
.vgc .vg-scene-art { position: absolute; inset: 0; width: 100%; height: 100%; }

@media (prefers-reduced-motion: reduce) {
  .vg-open.is-idle .vg-sway, .vg-open.is-idle .vg-seam::before, .vg-cover.is-in .vg-more i { animation: none !important; }
}
