/* «Ayna» flagship (2026-11-19): a xonça under crimson velvet in a candlelit room; a tap unties it, the velvet slides off
   and the bride's mirror stands between two lit candles (a film, AYNA_OPEN in inc/flagship-ayna.php); the view goes into
   the mirror's glow and comes out in a hall of ayna-kari mirror mosaic (the cover's loop, AYNA_HALL), the names on the
   dark floor of its aisle.
   assets/js/flagship-ayna.js sets on .ay-open: --cl/--ct the cover's top-left corner on screen, --cw/--ch its size,
   --mx/--my the mirror's glass on screen. Only transform and opacity animate. */

.ayna-body { margin: 0; background: #14060a; color: #f3e6cc; font: 400 20px/1.5 "Cormorant Garamond", Georgia, serif; -webkit-text-size-adjust: 100%; }
.ayna {
  --dk: #2a0a10; --dk-2: #4a1219; --dk-size: 48px 48px;
  --dk-img: radial-gradient(110% 55% at 50% 0%, rgba(255, 196, 110, .13), transparent 62%),
    radial-gradient(circle at 50% 50%, rgba(255, 220, 160, .07) 0 1.2px, transparent 1.6px) 0 0 / 22px 22px;
  --lt: #f4e9da;
  --lt-img: radial-gradient(90% 50% at 50% 0%, rgba(255, 228, 180, .55), transparent 70%), repeating-linear-gradient(0deg, rgba(120, 60, 40, .035) 0 1px, transparent 1px 5px);
  --iv: #f3e6cc; --iv-2: rgba(243, 230, 204, .78); --ink: #3a1418; --ink-2: rgba(58, 20, 24, .74); --rb: #7a1622;
  --gd: #e2b766; --gd-dk: #9a6a1c; --gd-ink: #2a1505; --nt: #14060a;
  --fd: "Cormorant Garamond", Georgia, serif; --fb: "Cormorant Garamond", Georgia, serif; --fs: "Great Vibes", "Cormorant Garamond", cursive;
  --mark: polygon(50% 0, 64% 36%, 100% 50%, 64% 64%, 50% 100%, 36% 64%, 0 50%, 36% 36%);
  font-variant-numeric: lining-nums;
  color: var(--iv);
}
.ayna .ip-h, .ayna .ip-ev-t, .ayna .inv-h { font-weight: 400; }
.ayna .ip-h { font-size: 38px; }
.ayna .ip-letter-text { font-size: 26px; }

/* ================= the cover: the mirror hall, the names on the dark aisle ================= */
.ay-cover { position: relative; height: 100svh; min-height: 600px; max-height: 1000px; overflow: hidden; background: #14060a; isolation: isolate; container-type: size; }
.ay-scene { position: absolute; inset: 0; transform-origin: 50% 32%; }
.ay-hall, .ay-film { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 0; }
.ay-film { opacity: 0; transition: opacity .9s ease; }
.ay-film.is-on { opacity: 1; }
/* the aisle darkens under the words, the vault keeps its glitter */
.ay-cover::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 62%; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 6, 10, 0), rgba(20, 6, 10, .62) 26%, rgba(20, 6, 10, .9) 54%, #14060a); }
.ay-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: var(--iv); }
.ay-intro { margin: 0 0 8px; max-width: 26ch; font: italic 400 20px/1.3 var(--fb); color: var(--iv-2); text-wrap: balance; text-shadow: 0 1px 12px rgba(0, 0, 0, .8); }
.ay-names { --ns: min(clamp(50px, 15vw, 72px), 7.4cqh); margin: 0; font: 400 var(--ns)/.98 var(--fs); color: #f0cf8a; overflow-wrap: anywhere;
  text-shadow: 0 0 18px rgba(255, 190, 90, .35), 0 2px 4px rgba(0, 0, 0, .7); }
.ay-names--m { --ns: min(clamp(44px, 13vw, 60px), 6.6cqh); }
.ay-names--l { --ns: min(clamp(38px, 11.4vw, 50px), 5.8cqh); }
.ay-names > span { display: block; }
.ay-and { font-size: .5em; line-height: 1; margin: .04em 0 .06em; color: var(--iv-2); }
.ay-rule { display: block; width: 160px; height: 14px; margin: 14px 0 10px; position: relative;
  background: linear-gradient(90deg, transparent, var(--gd) 30%, var(--gd) 43%, transparent 43% 57%, var(--gd) 57%, var(--gd) 70%, transparent) 0 50% / 100% 1px no-repeat; }
.ay-rule::after { content: ""; position: absolute; left: 50%; top: 0; width: 14px; height: 14px; margin-left: -7px; background: var(--gd); clip-path: var(--mark); }
.ay-date { margin: 0; font: 500 21px/1.3 var(--fb); letter-spacing: .22em; text-transform: uppercase; color: var(--iv); }
.ay-when { margin: 4px 0 0; font: 500 12px/1.6 var(--fu); letter-spacing: .2em; text-transform: uppercase; color: var(--gd); }
.ay-more { margin-top: 18px; display: inline-flex; flex-direction: column; align-items: center; gap: 6px; color: var(--gd); text-decoration: none;
  font: 500 11px/1 var(--fu); letter-spacing: .24em; text-transform: uppercase; }
.ay-more i { width: 1px; height: 26px; background: linear-gradient(var(--gd), transparent); }
.ay-cover.is-in .ay-more i { animation: ay-drip 2.4s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes ay-drip { 0%, 100% { transform: scaleY(.35); opacity: .5; } 50% { transform: scaleY(1); opacity: 1; } }
.js .ay-cover:not(.is-in) .ay-text > * { opacity: 0; }
.ayna:has(> .demo-bar, > .inv-music) .ay-text { padding-bottom: max(84px, calc(env(safe-area-inset-bottom) + 72px)); }
@media (max-height: 640px) { .ay-intro { display: none; } }
/* the hall is a film: no scroll cue, so the words sit low on the dark aisle (the vault and chandelier stay clear) */
.ay-more { display: none; }
/* a cover wider than the film (a short desktop window): the film fits the height and its sides melt into the dark.
   0.5625 = 9 / 16, the film's shape */
@container (aspect-ratio > 0.58) {
  .ay-hall, .ay-film { object-fit: contain; object-position: 50% 50%; --ay-b: calc((100cqw - 56.25cqh) / 2);
    -webkit-mask: linear-gradient(90deg, transparent var(--ay-b), #000 calc(var(--ay-b) + 56px), #000 calc(100% - var(--ay-b) - 56px), transparent calc(100% - var(--ay-b)));
    mask: linear-gradient(90deg, transparent var(--ay-b), #000 calc(var(--ay-b) + 56px), #000 calc(100% - var(--ay-b) - 56px), transparent calc(100% - var(--ay-b))); }
}

/* ================= opening: the xonça under velvet, the mirror under it ================= */
.ay-open { background: #14060a; }
.ay-open.is-play { cursor: default; }
.ay-reel { position: absolute; left: var(--cl, 0px); top: var(--ct, 0px); width: var(--cw, 100%); height: var(--ch, 100%); overflow: hidden; background: #14060a;
  transform-origin: var(--rmx, 50%) var(--rmy, 43%); }
.ay-reel-v, .ay-reel-end { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 50%; }
.ay-reel-end { opacity: 0; }
/* the candlelit room closes in at the edges, so the words over it always read */
.ay-vignette { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(20, 6, 10, .78), rgba(20, 6, 10, .25) 30%, transparent 46%, transparent 72%, rgba(20, 6, 10, .7)); }
.js .ay-open:not(.is-ready) .ay-reel { opacity: 0; }
/* the wish in the dark over the xonça */
.ay-wish { position: absolute; left: var(--cl, 0px); width: var(--cw, 100%); top: calc(var(--ct, 0px) + var(--ch, 100vh) * .24); margin: 0; padding: 0 22px;
  box-sizing: border-box; transform: translateY(-50%); pointer-events: none; z-index: 1; text-align: center;
  font: 400 clamp(46px, 13.5vw, 78px)/1.04 var(--fs); color: #f6e3b4; text-wrap: balance;
  text-shadow: 0 2px 3px rgba(20, 6, 10, .9), 0 0 26px rgba(20, 6, 10, .8), 0 0 50px rgba(255, 190, 90, .35); }
.js .ay-open:not(.is-ready) .ay-wish { opacity: 0; }
@media (max-height: 640px) { .ay-wish { top: calc(var(--ct, 0px) + var(--ch, 100vh) * .27); font-size: clamp(38px, 11vw, 56px); } }
/* candlelight breathing over the room while it waits */
.ay-glow { position: absolute; left: var(--cl, 0px); top: var(--ct, 0px); width: var(--cw, 100%); height: var(--ch, 100%); pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: radial-gradient(48% 30% at 50% 62%, rgba(255, 190, 110, .32), transparent 70%); }
.ay-open.is-idle .ay-glow { animation: ay-candle 3.4s ease-in-out infinite; }
@keyframes ay-candle { 0%, 100% { opacity: .35; } 30% { opacity: .7; } 55% { opacity: .45; } 78% { opacity: .8; } }
/* the mirror's light filling the screen as the view goes into it */
.ay-flood { position: absolute; inset: 0; opacity: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(70% 55% at var(--mx, 50%) var(--my, 45%), #fff6e2, rgba(255, 222, 160, .9) 38%, rgba(255, 190, 110, .45) 70%, rgba(255, 170, 90, 0)); }
.ay-open .fx-dust { left: var(--mx, 50%); top: var(--my, 45%); z-index: 1; }
.ay-open .fx-open-t, .ay-open .fx-open-foot { z-index: 2; }
.ay-open .fx-open-t::before, .ay-open .fx-open-foot::before { content: ""; position: absolute; inset: -30px -16px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(20, 6, 10, .55), transparent); }

/* the small cover (builder, cards) uses the hall's still: templates.css (.tpl-ayna) */

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