/*
 * Template "Syar'i Hijau Emas" (Pernikahan): a syar'i Islamic wedding without photos of people.
 * Colors from the variant (x-inv.head): --inv-primary (titles, buttons, silhouettes), --inv-accent
 * (gold: ornaments, lines), --inv-background (ivory paper), --inv-text, --inv-deep (the dark
 * panels: cover, countdown, verse, closing) and --inv-soft (a pale tint for light panels).
 */

:root {
    --inv-primary: #0f5a43;
    --inv-accent: #c9a55a;
    --inv-background: #f7f3e8;
    --inv-text: #1c2a24;
    --inv-deep: #0a3b2d;
    --inv-soft: #e4ece2;
    --inv-radius: 14px;

    --sy-col: min(100vw, 460px);
    --sy-label: 'Cinzel', 'Times New Roman', serif;
    --sy-serif: 'Cormorant Garamond', 'Times New Roman', serif;
    --sy-script: 'Pinyon Script', 'Brush Script MT', cursive;
    --sy-text: 'Lora', Georgia, serif;
    --sy-mono: 'DM Mono', ui-monospace, 'Courier New', monospace;
    --sy-arabic: 'Amiri', 'Traditional Arabic', serif;

    --sy-cream: #f6eedb;
    --sy-gold-light: color-mix(in srgb, var(--inv-accent) 62%, #fff6dc);
    --sy-muted: color-mix(in srgb, var(--inv-text) 74%, var(--inv-background));
    --sy-line: color-mix(in srgb, var(--inv-accent) 60%, transparent);
    --sy-paper: color-mix(in srgb, #fff 62%, var(--inv-background));
    --sy-shadow: 0 18px 38px -24px color-mix(in srgb, var(--inv-deep) 60%, transparent);

    /* an eight-point star lattice: stars of two squares joined by straight bars (used as a mask, tinted by CSS) */
    --sy-lattice: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60' fill='none' stroke='black' stroke-width='.9'%3E%3Cg id='s'%3E%3Cpath d='M19.4 19.4h21.2v21.2H19.4Z'/%3E%3Cpath d='M30 15 45 30 30 45 15 30Z'/%3E%3Ccircle cx='30' cy='30' r='3'/%3E%3C/g%3E%3Cuse href='%23s' x='-30' y='-30'/%3E%3Cuse href='%23s' x='30' y='-30'/%3E%3Cuse href='%23s' x='-30' y='30'/%3E%3Cuse href='%23s' x='30' y='30'/%3E%3Cpath d='M30 0v15M30 45v15M0 30h15M45 30h15M10.6 10.6l8.8 8.8M49.4 10.6l-8.8 8.8M10.6 49.4l8.8-8.8M49.4 49.4l-8.8-8.8'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
p, h1, h2, h3, figure, blockquote, ol, ul { margin: 0; }
a { color: inherit; }
img { max-width: 100%; }

body.sy-body {
    min-height: 100vh;
    color: var(--inv-text);
    font-family: var(--sy-text);
    font-size: 15px;
    line-height: 1.7;
    font-variant-numeric: lining-nums;
    -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(70vw 60vh at 50% 0%, color-mix(in srgb, var(--inv-primary) 55%, transparent), transparent 70%),
        var(--inv-deep);
    background-attachment: fixed;
}
/* the gold lattice backdrop on wide screens, behind the column */
body.sy-body::before {
    content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background: var(--inv-accent); opacity: .16;
    -webkit-mask: var(--sy-lattice) center / 60px 60px repeat; mask: var(--sy-lattice) center / 60px 60px repeat;
}

.sy-preview {
    position: fixed; top: 0; left: 50%; z-index: 60; transform: translateX(-50%);
    padding: .3rem .9rem; border-radius: 0 0 10px 10px; white-space: nowrap;
    background: var(--inv-accent); color: var(--inv-deep); font: 600 .7rem/1.4 var(--sy-text);
}

/* ---------- shared pieces ---------- */
.sy-kicker {
    font-family: var(--sy-label); font-size: .72rem; font-weight: 500; letter-spacing: .26em; text-transform: uppercase;
    color: var(--inv-primary);
}
.sy-script { font-family: var(--sy-script); font-weight: 400; line-height: 1.15; color: var(--inv-primary); }
.sy-star { display: block; color: var(--inv-accent); }
.sy-icon { display: block; width: 1.15rem; height: 1.15rem; flex: none; }

.sy-divider { display: flex; align-items: center; justify-content: center; gap: .6rem; max-width: 16rem; margin: 1.6rem auto; color: var(--inv-accent); }
.sy-divider__line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--sy-line), transparent); }
.sy-divider__mark { flex: none; width: 4.5rem; height: 1.25rem; }
.sy-divider--title { margin: .5rem auto 0; max-width: 13rem; }

.sy-chip {
    display: inline-flex; align-items: center; gap: .45rem; margin-top: 1rem;
    padding: .45rem 1.05rem; border-radius: 999px; text-decoration: none;
    font: 600 .82rem/1.2 var(--sy-text); color: var(--inv-primary);
    background: var(--sy-paper);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-accent) 70%, transparent);
}
.sy-chip .sy-icon { width: 1rem; height: 1rem; }

.sy-card {
    position: relative; padding: 1.5rem 1.25rem; border-radius: 18px; text-align: left;
    background: var(--sy-paper);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-accent) 45%, transparent), inset 0 0 0 5px var(--sy-paper), inset 0 0 0 6px color-mix(in srgb, var(--inv-accent) 22%, transparent), var(--sy-shadow);
}
.sy-lead { max-width: 31ch; margin: 0 auto 1.5rem; color: var(--sy-muted); font-size: .94rem; }

/* the arch outline stretches over its frame */
.sy-arch { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; color: var(--inv-accent); }

/* arabesque corners: mirrored with scale, swaying gently with rotate */
.sy-corner {
    position: absolute; z-index: 1; width: 6.6rem; height: 6.6rem; color: var(--inv-accent); pointer-events: none;
    will-change: transform; animation: sy-sway 7s ease-in-out infinite alternate;
}
.sy-corner--tl { top: .55rem; left: .55rem; }
.sy-corner--tr { top: .55rem; right: .55rem; scale: -1 1; animation-delay: -2s; }
.sy-corner--bl { bottom: .55rem; left: .55rem; scale: 1 -1; animation-delay: -4s; }
.sy-corner--br { bottom: .55rem; right: .55rem; scale: -1 -1; animation-delay: -6s; }
.sy-corner--section { width: 4.6rem; height: 4.6rem; opacity: .75; }

/* hanging lanterns sway from the top of their chain */
.sy-lantern {
    display: block; color: var(--inv-accent); transform-origin: 50% 0;
    will-change: transform; animation: sy-swing 5.5s ease-in-out infinite alternate;
    filter: drop-shadow(0 0 9px color-mix(in srgb, var(--inv-accent) 45%, transparent));
}
.sy-lantern__glow { fill: var(--inv-accent); opacity: .1; stroke: none; }
.sy-lantern__body { fill: color-mix(in srgb, var(--inv-deep) 65%, var(--inv-accent)); fill-opacity: .55; }
.sy-lantern__window { fill: #ffe6a6; fill-opacity: .9; }

@keyframes sy-sway { from { rotate: -1.6deg; } to { rotate: 1.6deg; } }
@keyframes sy-swing { from { rotate: -4deg; } to { rotate: 4deg; } }
@keyframes sy-turn { to { rotate: 360deg; } }
@keyframes sy-pulse { 0%, 100% { opacity: .5; scale: 1; } 50% { opacity: .9; scale: 1.06; } }

/* ---------- dark panels ---------- */
.sy-dark {
    --sy-ink: var(--sy-cream);
    --sy-ink-muted: color-mix(in srgb, var(--sy-cream) 80%, transparent);
    position: relative; isolation: isolate; color: var(--sy-ink);
    background:
        radial-gradient(90% 55% at 50% 0%, color-mix(in srgb, var(--inv-primary) 70%, transparent), transparent 75%),
        var(--inv-deep);
}
.sy-dark::after {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: var(--inv-accent); opacity: .13;
    -webkit-mask: var(--sy-lattice) center top / 60px 60px repeat; mask: var(--sy-lattice) center top / 60px 60px repeat;
}
.sy-dark .sy-kicker { color: var(--inv-accent); }
.sy-dark .sy-script { color: var(--sy-gold-light); }
.sy-dark .sy-title__text { color: var(--sy-cream); }

/* ---------- cover ---------- */
.sy-cover {
    position: fixed; top: 0; bottom: 0; left: 50%; z-index: 30; width: var(--sy-col); transform: translateX(-50%);
    overflow: hidden auto; overscroll-behavior: contain;
}
.sy-cover::after { opacity: .16; }
.sy-cover__bg {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: radial-gradient(60% 40% at 50% 46%, color-mix(in srgb, var(--inv-accent) 22%, transparent), transparent 75%);
}
.sy-cover__lantern { position: absolute; top: 0; z-index: 1; width: 2.3rem; height: 6.7rem; }
.sy-cover__lantern--left { left: 24%; }
.sy-cover__lantern--right { right: 24%; height: 5.4rem; width: 1.85rem; animation-delay: -2.4s; }

.sy-cover__inner {
    position: relative; z-index: 2; min-height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: calc(4.4rem + env(safe-area-inset-top)) 1.6rem calc(2.4rem + env(safe-area-inset-bottom));
    text-align: center;
}
.sy-cover__frame {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: .4rem;
    width: 100%; max-width: 20.5rem; padding: 4.6rem 1.4rem 2.2rem;
}
.sy-cover__arch { color: var(--inv-accent); }
.sy-cover__frame::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    clip-path: polygon(0 100%, 0 34%, 4% 24%, 14% 15.5%, 30% 7.5%, 50% .8%, 70% 7.5%, 86% 15.5%, 96% 24%, 100% 34%, 100% 100%);
    background: linear-gradient(180deg, color-mix(in srgb, var(--inv-primary) 40%, transparent), color-mix(in srgb, var(--inv-deep) 40%, transparent));
}
.sy-cover__moon { width: 1.4rem; height: 1.4rem; margin-bottom: .2rem; color: var(--inv-accent); }
.sy-cover__the { font: 500 .74rem/1.5 var(--sy-label); letter-spacing: .3em; text-transform: uppercase; color: var(--inv-accent); }

.sy-medallion { position: relative; display: grid; place-items: center; width: 6.6rem; height: 6.6rem; margin: .6rem 0 .3rem; }
.sy-medallion__star { position: absolute; inset: 0; width: 100%; height: 100%; animation: sy-turn 90s linear infinite; }
.sy-medallion__letters {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .12rem;
    width: 3.7rem; height: 3.7rem; border-radius: 50%;
    background: var(--inv-deep); box-shadow: 0 0 0 1px var(--inv-accent);
    font: 600 1.1rem/1 var(--sy-label); color: var(--sy-cream); letter-spacing: .02em;
}
.sy-medallion__letters i { font: 400 1.2rem/1 var(--sy-script); color: var(--inv-accent); font-style: normal; }

.sy-cover__names { display: flex; flex-direction: column; align-items: center; font-size: clamp(2.7rem, 12vw, 3.4rem); line-height: 1.05; }
.sy-cover__amp { font-size: .62em; color: var(--inv-accent); margin: -.1em 0; }
.sy-cover__date { margin-top: .5rem; font: 500 .8rem/1.5 var(--sy-label); letter-spacing: .16em; text-transform: uppercase; color: var(--sy-gold-light); }
.sy-cover__quote { max-width: 28ch; margin-top: .4rem; font: italic 500 1.02rem/1.45 var(--sy-serif); color: var(--sy-ink-muted); }

.sy-guest {
    position: relative; width: min(100%, 17rem); margin-top: 1.5rem; padding: .85rem 1.2rem .95rem;
    border: 1px solid var(--sy-line); border-radius: 4px;
    background: color-mix(in srgb, var(--inv-deep) 55%, transparent);
    outline: 1px solid color-mix(in srgb, var(--inv-accent) 30%, transparent); outline-offset: 3px;
}
.sy-guest__label { font: 500 .66rem/1.4 var(--sy-label); letter-spacing: .24em; text-transform: uppercase; color: var(--inv-accent); }
.sy-guest__name { display: block; margin-top: .15rem; font: 600 1.35rem/1.3 var(--sy-serif); color: var(--sy-cream); overflow-wrap: anywhere; }

.sy-open {
    margin-top: 1.4rem; padding: .85rem 1.8rem; gap: .55rem;
    font: 600 .82rem/1 var(--sy-label); letter-spacing: .14em; text-transform: uppercase;
    background: linear-gradient(135deg, var(--sy-gold-light), var(--inv-accent) 55%, color-mix(in srgb, var(--inv-accent) 75%, #000));
    color: var(--inv-deep);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--inv-accent) 20%, transparent), 0 12px 26px -12px #000;
}
.sy-open__icon { width: 1.15rem; height: 1.15rem; }
.sy-open:hover { filter: brightness(1.06); }

.sy-cover--leave { transition: opacity .9s ease, transform 1s cubic-bezier(.6, 0, .3, 1); }
.sy-cover--gone { opacity: 0; transform: translateX(-50%) translateY(-5%); }

/* ---------- page ---------- */
.sy-page {
    position: relative; width: var(--sy-col); min-height: 100vh; margin: 0 auto; overflow: hidden;
    background: var(--inv-background);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--inv-accent) 35%, transparent), 0 0 90px -10px rgb(0 0 0 / .55);
}
.sy-main { position: relative; }
.sy-section { position: relative; padding: 4.5rem 1.5rem; text-align: center; }
.sy-paper { background: linear-gradient(180deg, color-mix(in srgb, var(--inv-soft) 55%, var(--inv-background)), var(--inv-background)); }
.sy-paper::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: var(--inv-primary); opacity: .05;
    -webkit-mask: var(--sy-lattice) center / 60px 60px repeat; mask: var(--sy-lattice) center / 60px 60px repeat;
}
.sy-paper > * { position: relative; }
.sy-paper > .sy-corner { position: absolute; }

.sy-title { display: grid; justify-items: center; gap: .4rem; margin-bottom: 2.1rem; }
.sy-title__star { width: 1.9rem; height: 1.9rem; margin-bottom: .15rem; }
.sy-title__text { font: 600 2.2rem/1.15 var(--sy-serif); color: var(--inv-primary); }

/* ---------- opening ---------- */
.sy-opening { padding-top: 4.2rem; }
.sy-basmalah {
    position: relative; display: grid; place-items: center;
    width: min(100%, 19rem); margin: 0 auto 1.6rem; padding: 4rem 1rem 1.6rem;
}
.sy-basmalah::before {
    content: ''; position: absolute; inset: 15% 0 0; z-index: -1; border-radius: 50%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--inv-accent) 22%, transparent), transparent);
}
.sy-basmalah__star { position: absolute; top: 1.1rem; left: 50%; width: 1.7rem; height: 1.7rem; margin-left: -.85rem; }
.sy-arabic { font-family: var(--sy-arabic); font-size: clamp(1.9rem, 8.4vw, 2.45rem); line-height: 1.9; color: var(--inv-primary); }
.sy-opening__greeting { font: italic 500 1.3rem/1.4 var(--sy-serif); color: var(--inv-primary); }
.sy-opening__message { max-width: 33ch; margin: 0 auto; color: var(--sy-muted); }

.sy-verse {
    margin: 2.8rem auto 0; padding: 2.8rem 1.6rem 1.9rem; max-width: 23rem; border-radius: 8px;
    box-shadow: inset 0 0 0 1px var(--inv-accent), inset 0 0 0 6px var(--inv-deep), inset 0 0 0 7px color-mix(in srgb, var(--inv-accent) 55%, transparent), var(--sy-shadow);
}
.sy-verse__rosette { position: absolute; width: .55rem; height: .55rem; rotate: 45deg; background: var(--inv-accent); }
.sy-verse__rosette--tl { top: 14px; left: 14px; }
.sy-verse__rosette--tr { top: 14px; right: 14px; }
.sy-verse__rosette--bl { bottom: 14px; left: 14px; }
.sy-verse__rosette--br { bottom: 14px; right: 14px; }
.sy-verse__star {
    position: absolute; top: -1.3rem; left: 50%; width: 2.6rem; height: 2.6rem; margin-left: -1.3rem;
    padding: .3rem; border-radius: 50%; background: var(--inv-deep); box-shadow: 0 0 0 1px var(--inv-accent);
}
.sy-verse blockquote { font: italic 500 1.16rem/1.6 var(--sy-serif); color: var(--sy-cream); }
.sy-verse figcaption { margin-top: 1rem; font: 500 .72rem/1.4 var(--sy-label); letter-spacing: .2em; text-transform: uppercase; color: var(--inv-accent); }

/* ---------- couple ---------- */
.sy-person { display: grid; justify-items: center; }
.sy-niche { position: relative; width: min(64%, 13rem); aspect-ratio: 3 / 4.1; margin-bottom: 1.8rem; color: var(--inv-accent); }
.sy-niche__inside {
    position: absolute; inset: 5px; overflow: hidden;
    clip-path: polygon(0 100%, 0 34%, 4% 24%, 14% 15.5%, 30% 7.5%, 50% .8%, 70% 7.5%, 86% 15.5%, 96% 24%, 100% 34%, 100% 100%);
    background:
        radial-gradient(70% 45% at 50% 30%, color-mix(in srgb, #fff 70%, transparent), transparent 75%),
        linear-gradient(180deg, color-mix(in srgb, var(--inv-soft) 85%, #fff), color-mix(in srgb, var(--inv-accent) 22%, var(--inv-soft)));
}
.sy-niche__lantern { position: absolute; top: 0; left: 50%; width: 1.5rem; height: 4.4rem; margin-left: -.75rem; }
.sy-niche__inside .sy-figure { position: absolute; bottom: 0; left: 50%; width: 74%; translate: -50% 0; }
.sy-niche__initial {
    position: absolute; bottom: -1.15rem; left: 50%; display: grid; place-items: center;
    width: 2.5rem; height: 2.5rem; margin-left: -1.25rem; border-radius: 50%;
    background: var(--inv-deep); box-shadow: 0 0 0 1px var(--inv-accent), 0 0 0 4px var(--inv-background), 0 0 0 5px var(--sy-line);
    font: 600 1.05rem/1 var(--sy-label); color: var(--sy-cream);
}
.sy-figure { display: block; overflow: visible; }
.sy-figure__fill { fill: var(--inv-primary); }
.sy-figure__cap { fill: var(--inv-deep); }
.sy-figure__line { fill: none; stroke: var(--inv-accent); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.sy-figure__line circle { fill: var(--inv-accent); stroke: none; }
.sy-figure--bride .sy-figure__fill { fill: color-mix(in srgb, var(--inv-primary) 82%, var(--inv-accent)); }

.sy-person__label { font-size: .64rem; margin-bottom: .1rem; }
.sy-person__nick { font-size: 2.9rem; }
.sy-person__name { margin-top: .1rem; font: 600 1.45rem/1.25 var(--sy-serif); color: var(--inv-text); }
.sy-person__parents { max-width: 30ch; margin-top: .55rem; font-size: .9rem; color: var(--sy-muted); }
.sy-person__parents span { display: block; font-size: .78rem; font-style: italic; }

.sy-amp { display: flex; align-items: center; gap: .9rem; max-width: 15rem; margin: 2.2rem auto; color: var(--inv-accent); }
.sy-amp__badge { position: relative; display: grid; place-items: center; width: 4.4rem; height: 4.4rem; flex: none; }
.sy-amp__star { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .45; }
.sy-amp__badge .sy-script {
    position: relative; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%;
    background: var(--inv-background); box-shadow: 0 0 0 1px var(--sy-line);
    font-size: 1.9rem; line-height: 1; color: var(--inv-primary); padding-top: .2rem;
}

/* ---------- countdown ---------- */
.sy-band { padding-top: 5.5rem; }
.sy-band__lantern { position: absolute; top: 0; width: 1.8rem; height: 5.3rem; }
.sy-band__lantern--left { left: 9%; }
.sy-band__lantern--right { right: 9%; height: 4.3rem; width: 1.5rem; animation-delay: -3s; }

.sy-datecard { position: relative; display: grid; justify-items: center; width: 9.6rem; margin: 0 auto 2rem; padding: 2.9rem .5rem 1.2rem; }
.sy-datecard__day, .sy-datecard__month { font: 500 .7rem/1.4 var(--sy-label); letter-spacing: .2em; text-transform: uppercase; color: var(--inv-accent); }
.sy-datecard__num { font: 500 3.1rem/1.1 var(--sy-label); color: var(--sy-gold-light); margin: .1rem 0; }

.inv-countdown { gap: .5rem; }
.inv-countdown__item {
    flex: 1; min-width: 0; max-width: 5.1rem; padding: 1.1rem .2rem .65rem;
    border-radius: 50% 50% 10px 10px / 30px 30px 10px 10px;
    background: color-mix(in srgb, #fff 6%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-accent) 60%, transparent);
}
.inv-countdown__value { font: 500 1.6rem/1.2 var(--sy-label); color: var(--sy-gold-light); }
.inv-countdown__label { margin-top: .15rem; font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.inv-countdown__actions { margin-top: 1.5rem; }
.inv-countdown__actions .inv-button { padding: .6rem 1.05rem; font-size: .78rem; }
.inv-countdown__done { font: italic 500 1.2rem var(--sy-serif); }

/* ---------- buttons ---------- */
.inv-button {
    background: var(--inv-primary); color: #fff; font: 600 .86rem/1.2 var(--sy-text); letter-spacing: .02em;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-accent) 55%, transparent), 0 10px 20px -14px var(--inv-deep);
}
.inv-button--outline {
    background: var(--sy-paper); color: var(--inv-primary);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-primary) 45%, transparent);
}
.sy-dark .inv-button { background: var(--inv-accent); color: var(--inv-deep); box-shadow: 0 10px 20px -12px #000; }
.sy-dark .inv-button--outline { background: transparent; color: var(--sy-cream); box-shadow: inset 0 0 0 1px var(--sy-line); }

/* ---------- events (pattern W): rounded cards with a deep header band over faint star rosettes ---------- */
.sy-events { overflow: hidden; }
.sy-events > .sy-events__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.sy-events__rosette { position: absolute; display: block; width: 78%; aspect-ratio: 1; color: var(--inv-primary); opacity: .07; --inv-parallax: 50px; }
.sy-events__rosette .sy-star { width: 100%; height: 100%; color: inherit; }
.sy-events__rosette--a { top: 6%; right: -30%; }
.sy-events__rosette--b { bottom: 4%; left: -34%; width: 92%; color: var(--inv-accent); opacity: .12; }
html.inv-anim .sy-events__rosette .sy-star { animation: sy-turn 160s linear infinite; }
html.inv-anim .sy-events__rosette--b .sy-star { animation-direction: reverse; }

.sy-events__list { display: grid; gap: 1.8rem; }
.sy-wcard {
    position: relative; overflow: hidden; border-radius: 2.2rem; text-align: center;
    background: color-mix(in srgb, var(--sy-paper) 94%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-accent) 55%, transparent), var(--sy-shadow);
}
.sy-wcard__band {
    padding: 1.3rem 1.2rem 0; border-radius: 2.2rem 2.2rem 1.2rem 1.2rem;
    border-bottom: 2px solid var(--inv-accent);
}
.sy-wcard__no { font-size: .64rem; }
.sy-wcard__name { margin: .15rem 0 .55rem; font: 600 2rem/1.15 var(--sy-serif); color: var(--sy-cream); overflow-wrap: anywhere; }
.sy-wcard__mosque { display: block; width: 58%; height: auto; margin: 0 auto; color: var(--inv-accent); opacity: .55; }
.sy-mosque__door { fill: var(--inv-deep); }
.sy-wcard__seal {
    position: relative; z-index: 2; display: grid; place-items: center; width: 3.3rem; height: 3.3rem; margin: -1.65rem auto .7rem;
    border-radius: 50%; background: var(--sy-paper);
    box-shadow: inset 0 0 0 1.5px var(--inv-accent), 0 0 0 4px color-mix(in srgb, var(--sy-paper) 85%, transparent), var(--sy-shadow);
}
.sy-wcard__star { width: 2rem; height: 2rem; }
.sy-wcard__body { display: grid; justify-items: center; gap: .55rem; padding: 0 1.25rem 1.6rem; }
.sy-wcard__body .sy-icon { flex: none; width: 1.1rem; height: 1.1rem; color: var(--inv-accent); }
.sy-wcard__time, .sy-wcard__date, .sy-wcard__dress { display: inline-flex; align-items: center; gap: .45rem; min-width: 0; overflow-wrap: anywhere; }
.sy-wcard__time {
    padding: .32rem 1rem; border-radius: 999px; background: var(--inv-primary); color: #fff;
    font: 600 .98rem/1.3 var(--sy-text); letter-spacing: .02em;
}
.sy-wcard__time .sy-icon { color: var(--sy-gold-light); }
.sy-wcard__date { font: 600 1.02rem/1.4 var(--sy-text); color: var(--inv-text); }
.sy-wcard__place {
    display: grid; justify-items: center; gap: .1rem; width: 100%; margin-top: .3rem; padding: .85rem .9rem;
    border-radius: 1.3rem; border: 1px dashed var(--sy-line);
    background: color-mix(in srgb, var(--inv-soft) 55%, transparent);
}
.sy-wcard__place .sy-icon { width: 1.25rem; height: 1.25rem; margin-bottom: .15rem; }
.sy-wcard__venue { font: 600 1.18rem/1.35 var(--sy-serif); color: var(--inv-primary); overflow-wrap: anywhere; }
.sy-wcard__address { font-size: .88rem; line-height: 1.5; color: var(--sy-muted); overflow-wrap: anywhere; }
.sy-wcard__dress { padding: .25rem .85rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--sy-line); font-size: .88rem; }
.sy-wcard__dress em { font-style: normal; font-weight: 600; color: var(--inv-primary); }
.sy-wcard .inv-maps { width: 100%; margin-top: .6rem; }
.inv-maps { margin-top: 1.3rem; text-align: center; }
.inv-maps .inv-button { padding: .7rem 1.4rem; }

/* ---------- love story: zig-zag timeline, line in the center ---------- */
.sy-story { padding-left: 1rem; padding-right: 1rem; }
.sy-timeline { position: relative; display: grid; gap: 1.6rem; padding: .4rem 0; list-style: none; }
.sy-timeline::before {
    content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; margin-left: -.5px;
    background: linear-gradient(transparent, var(--sy-line) 5%, var(--sy-line) 95%, transparent);
}
/* text | ornament | date; the flipped moments swap the two sides */
.sy-moment { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 2.1rem minmax(0, 1fr); column-gap: .45rem; align-items: start; }
.sy-moment__text { grid-column: 1; grid-row: 1; text-align: right; }
.sy-moment__dot { grid-column: 2; grid-row: 1; }
.sy-moment__aside { grid-column: 3; grid-row: 1; display: grid; justify-items: start; gap: .3rem; padding-top: .2rem; text-align: left; }
.sy-moment--flip .sy-moment__text { grid-column: 3; text-align: left; }
.sy-moment--flip .sy-moment__aside { grid-column: 1; justify-items: end; text-align: right; }
.sy-moment__dot {
    justify-self: center; display: grid; place-items: center; margin-top: .2rem;
    width: 1.65rem; height: 1.65rem; rotate: 45deg; border-radius: 4px;
    background: var(--inv-deep); color: var(--inv-accent);
    box-shadow: 0 0 0 1px var(--inv-accent), 0 0 0 4px var(--inv-background);
}
.sy-moment__dot .sy-icon { width: .85rem; height: .85rem; rotate: -45deg; }
.sy-moment__title { font: 700 1.22rem/1.2 var(--sy-serif); color: var(--inv-primary); overflow-wrap: anywhere; }
/* a dotted gold rule that starts at the line side */
.sy-moment__rule {
    display: block; width: 72%; height: 0; margin: .45rem 0 .45rem auto;
    border-top: 1.5px dotted color-mix(in srgb, var(--inv-accent) 85%, transparent);
}
.sy-moment--flip .sy-moment__rule { margin-left: 0; margin-right: auto; }
.sy-moment__story { font-size: .84rem; line-height: 1.5; color: var(--sy-muted); overflow-wrap: anywhere; }
.sy-moment__star { width: 1.35rem; height: 1.35rem; opacity: .9; }
.sy-moment__date {
    font: 600 1rem/1.3 var(--sy-label); letter-spacing: .06em; overflow-wrap: anywhere;
    color: color-mix(in srgb, var(--inv-accent) 72%, var(--inv-text));
}

/* ---------- live ---------- */
.sy-live__card { display: grid; justify-items: center; gap: .6rem; text-align: center; }
.sy-live__icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--inv-deep); color: var(--inv-accent); }
.sy-live__icon .sy-icon { width: 1.5rem; height: 1.5rem; }
.sy-live__badge { display: inline-flex; align-items: center; gap: .45rem; font: 500 .72rem/1.4 var(--sy-label); letter-spacing: .18em; text-transform: uppercase; color: var(--inv-primary); }
.sy-live__badge span { width: .5rem; height: .5rem; border-radius: 50%; background: #d64545; box-shadow: 0 0 0 4px color-mix(in srgb, #d64545 22%, transparent); animation: sy-pulse 2s ease-in-out infinite; }
.sy-live__note { font-size: .86rem; color: var(--sy-muted); }

/* ---------- gift: accounts as bank cards ---------- */
.sy-giftbox { display: grid; gap: 1rem; }
.inv-gift__account + .inv-gift__account { margin-top: 0; }
/* the accounts: two compact cards per row; an odd last card spans the row */
.inv-gift__accounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.inv-gift__account:last-child:nth-child(odd) { grid-column: 1 / -1; }
.inv-gift__account:not(.inv-gift__address) {
    position: relative; isolation: isolate; overflow: hidden; min-width: 0; margin: 0;
    display: flex; flex-direction: column; align-items: flex-start;
    padding: .8rem .8rem .85rem; border-radius: 12px; text-align: left; color: var(--sy-cream);
    background:
        radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--inv-accent) 28%, transparent), transparent 55%),
        linear-gradient(135deg, var(--inv-primary), var(--inv-deep) 72%);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-accent) 55%, transparent), 0 16px 28px -20px #000;
}
/* the chip */
.inv-gift__account:not(.inv-gift__address)::before {
    content: ''; display: block; order: 1; width: 1.7rem; height: 1.3rem; margin-top: .55rem; border-radius: 4px;
    background:
        linear-gradient(90deg, transparent 31%, rgb(0 0 0 / .22) 32% 34%, transparent 35% 65%, rgb(0 0 0 / .22) 66% 68%, transparent 69%),
        linear-gradient(transparent 46%, rgb(0 0 0 / .22) 47% 53%, transparent 54%),
        linear-gradient(135deg, #f6e3a8, var(--inv-accent) 55%, color-mix(in srgb, var(--inv-accent) 70%, #000));
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / .15);
}
/* a faint star lattice on the card */
.inv-gift__account:not(.inv-gift__address)::after {
    content: ''; position: absolute; right: -2rem; bottom: -2.5rem; z-index: -1; width: 8rem; height: 8rem;
    background: var(--inv-accent); opacity: .22;
    -webkit-mask: var(--sy-lattice) center / 36px 36px repeat, radial-gradient(closest-side, #000 40%, transparent);
    -webkit-mask-composite: source-in;
    mask: var(--sy-lattice) center / 36px 36px repeat intersect, radial-gradient(closest-side, #000 40%, transparent);
}
.inv-gift__account:not(.inv-gift__address) .inv-gift__bank {
    order: 0; margin: 0; min-height: 1.5rem; max-width: 100%; display: flex; align-items: center; overflow-wrap: anywhere;
    font: 600 .7rem/1.2 var(--sy-label); letter-spacing: .1em; text-transform: uppercase; color: var(--sy-gold-light);
}
.inv-gift__account:not(.inv-gift__address) .inv-gift__logo { height: 1.5rem; padding: .2rem .45rem; border-radius: .35rem; }
.inv-gift__account:not(.inv-gift__address) .inv-gift__logo img { max-width: 5.5rem; }
.inv-gift__account:not(.inv-gift__address) .inv-gift__number {
    order: 2; max-width: 100%; margin: .55rem 0 0; font: 500 .98rem/1.3 var(--sy-mono); letter-spacing: .04em; color: var(--sy-cream);
    text-shadow: 0 1px 0 rgb(0 0 0 / .35); overflow-wrap: anywhere;
}
.inv-gift__account:not(.inv-gift__address) .inv-gift__holder {
    order: 3; max-width: 100%; margin: .2rem 0 0; font: 500 .6rem/1.35 var(--sy-label); letter-spacing: .1em; text-transform: uppercase;
    color: var(--sy-ink-muted, #f6eedbcc); overflow-wrap: anywhere;
}
.inv-gift__account:not(.inv-gift__address) .inv-button {
    order: 4; margin-top: .65rem; padding: .35rem .7rem; font-size: .65rem;
    background: color-mix(in srgb, #fff 12%, transparent); color: var(--sy-cream);
    box-shadow: inset 0 0 0 1px var(--sy-line);
}
.inv-gift__address {
    padding: 1.4rem 1.2rem; border-radius: 16px; text-align: center; background: var(--sy-paper);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-accent) 45%, transparent), var(--sy-shadow);
}
.inv-gift__address .inv-gift__bank { margin: 0 0 .4rem; font: 500 .74rem/1.4 var(--sy-label); letter-spacing: .2em; text-transform: uppercase; color: var(--inv-primary); }
.inv-gift__address .inv-gift__holder { margin: 0 0 .2rem; font: 600 1.15rem/1.3 var(--sy-serif); }
.inv-gift__address p { margin: 0 0 .9rem; font-size: .9rem; color: var(--sy-muted); }

/* ---------- forms & wishes ---------- */
.sy-form .inv-form label, .sy-form .inv-form__choices legend { font-weight: 600; font-size: .85rem; }
.sy-form .inv-form input:not([type=radio]):not([type=checkbox]), .sy-form .inv-form select, .sy-form .inv-form textarea {
    border: 1px solid color-mix(in srgb, var(--inv-accent) 50%, transparent); border-radius: 10px;
    background: #fff; color: var(--inv-text); padding: .7rem .85rem;
}
.sy-form .inv-form input:focus, .sy-form .inv-form select:focus, .sy-form .inv-form textarea:focus {
    outline: none; border-color: var(--inv-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--inv-primary) 16%, transparent);
}
.sy-form .inv-form .inv-button[type=submit] { width: 100%; padding: .85rem 1rem; }
.inv-rsvp__deadline { margin: 0 0 .9rem; font-size: .84rem; color: var(--sy-muted); text-align: center; }
.inv-form__notice { background: color-mix(in srgb, var(--inv-soft) 80%, transparent); }
/* about three wishes fit in the scroll box */
.inv-wishes { --inv-wishes-height: 20rem; }
.inv-wishes:not(.inv-wishes--paged) .inv-wishes__list {
    padding: .5rem .45rem .5rem .35rem; border-radius: 12px;
    background: color-mix(in srgb, var(--inv-soft) 45%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--inv-accent) 22%, transparent);
}
.inv-wish {
    padding: .65rem .8rem; background: #fff; border-radius: 4px 12px 12px 12px;
    box-shadow: inset 3px 0 0 var(--inv-accent), inset 0 0 0 1px color-mix(in srgb, var(--inv-accent) 28%, transparent);
}
.inv-wish__name { font: 600 1rem/1.3 var(--sy-serif); color: var(--inv-primary); }
.inv-wish__message { font-size: .88rem; line-height: 1.45; }
.inv-wish__time { font-size: .7rem; }

/* ---------- closing ---------- */
.sy-closing { padding-bottom: 2.5rem; }
.sy-scene { position: relative; width: min(78%, 17rem); aspect-ratio: 3 / 3.5; margin: 0 auto 2rem; }
.sy-scene::before {
    content: ''; position: absolute; inset: 4px; z-index: -1;
    clip-path: polygon(0 100%, 0 34%, 4% 24%, 14% 15.5%, 30% 7.5%, 50% .8%, 70% 7.5%, 86% 15.5%, 96% 24%, 100% 34%, 100% 100%);
    background: radial-gradient(70% 50% at 50% 35%, color-mix(in srgb, var(--inv-accent) 26%, transparent), transparent 80%), color-mix(in srgb, var(--inv-deep) 70%, #000);
}
.sy-scene__moon { position: absolute; top: 15%; left: 50%; width: 1.9rem; height: 1.9rem; margin-left: -.95rem; color: var(--sy-gold-light); }
.sy-scene__lantern { position: absolute; top: 15%; width: 1.4rem; height: 4.1rem; }
.sy-scene__lantern--left { left: 17%; }
.sy-scene__lantern--right { right: 17%; animation-delay: -2.7s; }
.sy-scene__pair { position: absolute; left: 50%; bottom: 4px; display: flex; align-items: flex-end; width: 74%; translate: -50% 0; }
.sy-scene__pair .sy-figure { width: 50%; margin: 0 -3%; }
.sy-scene__pair .sy-figure--bride { width: 47%; }
.sy-scene .sy-figure__fill { fill: color-mix(in srgb, var(--inv-accent) 82%, #fff); }
.sy-scene .sy-figure--bride .sy-figure__fill { fill: var(--inv-accent); }
.sy-scene .sy-figure__cap { fill: var(--inv-deep); }
.sy-scene .sy-figure__line { stroke: var(--inv-deep); }
.sy-scene .sy-figure__line circle { fill: var(--inv-deep); }
.sy-scene__ground { position: absolute; left: 4px; right: 4px; bottom: 4px; height: 1px; background: var(--inv-accent); }

.sy-closing__message { max-width: 32ch; margin: 0 auto; color: var(--sy-ink-muted); }
.sy-closing__sign { margin-bottom: .2rem; }
.sy-closing__names { font-size: clamp(2.6rem, 11vw, 3.2rem); }

/* ---------- footer, nav, music ---------- */
/* the dark footer fills the rest of a short page and keeps its content above the bottom menu */
.sy-page { display: flex; flex-direction: column; }
.sy-foot { flex: 1; display: grid; align-content: start; justify-items: center; padding: .5rem 1rem calc(5.5rem + env(safe-area-inset-bottom)); }
.sy-foot .sy-branding.inv-branding { padding-bottom: .5rem; }
.sy-foot::after { opacity: .08; }
.sy-foot__star { width: 2rem; height: 2rem; opacity: .8; }
.sy-branding { color: var(--sy-ink-muted); opacity: 1; }
.inv-checkin { color: #1a1a1a; }

.sy-nav {
    --inv-nav-bg: color-mix(in srgb, var(--inv-deep) 92%, transparent);
    --inv-nav-text: color-mix(in srgb, var(--sy-cream) 78%, transparent);
    --inv-nav-active: var(--inv-accent);
    border-color: color-mix(in srgb, var(--inv-accent) 45%, transparent);
    font-family: var(--sy-text);
}
.sy-nav .inv-nav__item.is-active { color: var(--inv-deep); font-weight: 600; }

/* the music button stays inside the column */
.sy-body .inv-music { right: max(1rem, calc(50vw - 230px + 1rem)); }
.inv-music__button { background: var(--inv-deep); color: var(--inv-accent); box-shadow: 0 0 0 1px var(--inv-accent), 0 0 0 4px color-mix(in srgb, var(--inv-background) 70%, transparent), 0 8px 18px -8px #000; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .sy-corner, .sy-lantern, .sy-medallion__star, .sy-live__badge span { animation: none; }
    .sy-cover--leave { transition: opacity .3s ease; }
}

/* ---------- motion (data-reveal-sections="blur"): sections come into focus, the event cards one after another,
   the big rosettes behind the events drift (data-parallax), the title divider opens and each card's seal turns in ---------- */
@keyframes sy-open { from { transform: scaleX(.2); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sy-seal { from { transform: rotate(-90deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
html.inv-anim .sy-title.is-revealed .sy-divider--title { animation: sy-open 1.1s .4s cubic-bezier(.2, .7, .2, 1) both; }
html.inv-anim .sy-wcard.is-revealed .sy-wcard__seal { animation: sy-seal 1s .45s cubic-bezier(.34, 1.3, .64, 1) both; }
@media (prefers-reduced-motion: reduce) {
    html.inv-anim .sy-title.is-revealed .sy-divider--title, html.inv-anim .sy-wcard.is-revealed .sy-wcard__seal,
    html.inv-anim .sy-events__rosette .sy-star { animation: none; }
}

/* ---------- fit: the whole cover (names, date, guest, button) fits one phone screen ---------- */
.sy-cover__inner {
    min-height: 100svh; justify-content: space-evenly;
    padding: calc(clamp(2.6rem, 8svh, 4.4rem) + env(safe-area-inset-top)) 1.6rem calc(clamp(1.9rem, 4.5svh, 2.6rem) + env(safe-area-inset-bottom));
}
.sy-cover__frame { gap: clamp(.2rem, .7svh, .4rem); padding: clamp(3rem, 8.5svh, 4.6rem) 1.4rem clamp(1.1rem, 3svh, 2.2rem); }
.sy-medallion { width: clamp(4.4rem, 12svh, 6.6rem); height: clamp(4.4rem, 12svh, 6.6rem); margin: clamp(.15rem, 1svh, .6rem) 0 .2rem; }
.sy-medallion__letters { width: 56%; height: 56%; }
.sy-cover__names { font-size: min(clamp(2.7rem, 12vw, 3.4rem), 7svh); }
.sy-cover__quote { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.sy-guest { margin-top: clamp(.7rem, 2.4svh, 1.5rem); }
.sy-open { margin-top: clamp(.8rem, 2.4svh, 1.4rem); }
@media (max-height: 760px) {
    .sy-cover__quote { -webkit-line-clamp: 6; font-size: .95rem; }
    .sy-cover__lantern--left { height: 5.4rem; width: 1.85rem; }
    .sy-cover__lantern--right { height: 4.4rem; width: 1.5rem; }
    .sy-corner { width: 5rem; height: 5rem; }
    .sy-guest { padding: .6rem 1rem .7rem; }
    .sy-guest__name { font-size: 1.2rem; }
    .sy-cover__frame { padding-top: clamp(2.8rem, 7.5svh, 4.6rem); }
    .sy-medallion { width: 11svh; height: 11svh; }
}
@media (max-height: 660px) {
    .sy-cover__quote { -webkit-line-clamp: 6; font-size: .88rem; margin-top: .15rem; }
    .sy-cover__date { margin-top: .2rem; }
    .sy-cover__moon { width: 1.1rem; height: 1.1rem; margin: 0; }
    .sy-open { padding: .75rem 1.5rem; }
    .sy-corner { width: 4rem; height: 4rem; }
    .sy-cover__inner { padding-top: calc(2.4rem + env(safe-area-inset-top)); }
}

/* ---------- fit: the page ends close under the names; the star stays right below them ---------- */
.sy-closing { padding-bottom: 1.25rem; }
.sy-foot { padding: 0 1rem calc(.5rem + env(safe-area-inset-bottom)); }
