/* ==========================================================================
   Swan template — blush paper, wax seals, a rose arch and two swans.
   Mobile-first single column (max 480px), like the other templates.
   ========================================================================== */

/* Italianno's capital A only, mapped to both Latin A and Cyrillic А (fonts/OFL-Italianno.txt).
   Built with fontTools from Italianno-Regular.ttf: subset to those two code points, renamed per the OFL. */
@font-face {
    font-family: 'Swan Capital A';
    src: url('fonts/swan-capital-a.woff2') format('woff2');
    unicode-range: U+0041, U+0410;
    size-adjust: 135%;   /* Italianno's A is 0.58 em tall; Great Vibes capitals are ~0.78 em */
    font-display: swap;
}

:root {
    --paper: #f7e6e5;
    --paper-deep: #f0d9d8;
    --band: #fbf0ef;
    --ink: #6b4a48;
    --ink-soft: #9a7c78;
    --mauve: #8d6661;
    --gold: #a9844f;
    --gold-soft: #c4a575;
    --wine: #741f2f;
    --wine-deep: #5a1623;
    --line: #cdb0ab;
    /* Great Vibes draws the capital A (Cyrillic А and Latin A alike) rounded, which readers here take
       for a lowercase a ("алихан"). 'Swan Capital A' (above) supplies a pointed one for just those letters. */
    --script: 'Swan Capital A', 'Great Vibes', 'Cormorant Garamond', cursive;
    --serif: 'Cormorant Garamond', 'Times New Roman', serif;
    --col: 480px;
    --side: max(0px, calc((100vw - var(--col)) / 2));
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .28 0 0 0 0 .28 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    background: #ecd5d5;
    color: var(--ink);
    font-family: var(--serif);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.is-locked { overflow: hidden; height: 100%; }

img { max-width: 100%; }
.script { font-family: var(--script); font-weight: 400; }

/* Guest hydration: event sections hidden by default; JS reveals them */
[data-event] { display: none; }

/* ---------- Language switcher ---------- */
.lang-switcher {
    position: fixed;
    top: calc(12px + env(safe-area-inset-top));
    right: calc(var(--side) + 12px);
    z-index: 1100;
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(255, 249, 248, 0.72);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(116, 31, 47, 0.12);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

body.lang-tucked .lang-switcher {
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
}

.lang-btn {
    border: 0;
    background: transparent;
    color: var(--wine);
    font: 600 11px/1 var(--serif);
    letter-spacing: 0.1em;
    padding: 7px 9px;
    border-radius: 999px;
    cursor: pointer;
}

.lang-btn.active { background: var(--wine); color: #fff; }

/* ==========================================================================
   Envelope intro
   ========================================================================== */
.envelope {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    background: #e7cccd;
    cursor: pointer;
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.9s ease, visibility 0.9s ease;
}

.envelope:focus-visible { outline: none; }

.env-stage {
    position: relative;
    width: 100%;
    max-width: var(--col);
    height: 100%;
    overflow: hidden;
    perspective: 1300px;
    background: #f3dcdc;
}

/* warm light that pours out between the flaps */
.env-light {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 34% 26% at 50% 50%, #fffaf0 0%, rgba(255, 236, 205, 0.95) 40%, rgba(255, 214, 178, 0) 100%),
        radial-gradient(ellipse 80% 60% at 50% 50%, #ffe7cc 0%, #f6cfc0 55%, #efd3d3 100%);
    opacity: 0.35;
    transition: opacity 1.2s ease;
}

.env-flap {
    position: absolute;
    inset: 0;
    transition: transform 1.5s cubic-bezier(0.55, 0.05, 0.25, 1);
    will-change: transform;
    backface-visibility: hidden;
}

.env-paper {
    position: absolute;
    inset: 0;
    /* stretched to the box on purpose: the embossed motifs are laid out relative
       to the corner-to-centre seams, so the texture must map 1:1 onto the flaps */
    background: #f3dadc url('/swan/envelope-paper.jpg') center / 100% 100% no-repeat;
}

.env-paper::after {
    content: '';
    position: absolute;
    inset: 0;
}

.env-flap--left { transform-origin: 0 50%; }
.env-flap--left .env-paper { clip-path: polygon(0 0, 50.6% 50%, 0 100%); }
.env-flap--left .env-paper::after { background: linear-gradient(to right, rgba(255, 255, 255, 0.05), rgba(120, 66, 70, 0.08)); }

.env-flap--right { transform-origin: 100% 50%; }
.env-flap--right .env-paper { clip-path: polygon(100% 0, 100% 100%, 49.4% 50%); }
.env-flap--right .env-paper::after { background: linear-gradient(to left, rgba(255, 255, 255, 0.04), rgba(120, 66, 70, 0.09)); }

.env-flap--bottom {
    transform-origin: 50% 100%;
    filter: drop-shadow(0 -1px 2px rgba(120, 66, 70, 0.2));
}
.env-flap--bottom .env-paper { clip-path: polygon(0 100%, 50% 49.6%, 100% 100%); }
.env-flap--bottom .env-paper::after { background: linear-gradient(to top, rgba(255, 255, 255, 0.07), rgba(120, 66, 70, 0.06)); }

.env-flap--top {
    transform-origin: 50% 0;
    filter: drop-shadow(0 2px 3px rgba(120, 66, 70, 0.26));
}
.env-flap--top .env-paper { clip-path: polygon(0 0, 100% 0, 50% 50.6%); }
.env-flap--top .env-paper::after { background: linear-gradient(to bottom, rgba(255, 255, 255, 0.16), rgba(120, 66, 70, 0.05)); }

.env-seal {
    position: absolute;
    left: 50%;
    top: 50%;
    width: clamp(92px, 25vw, 124px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    z-index: 3;
    filter: drop-shadow(0 6px 8px rgba(70, 18, 28, 0.38));
    transition: transform 0.9s cubic-bezier(0.3, 0.7, 0.2, 1), opacity 0.7s ease, filter 0.5s ease;
}

.env-seal img { width: 100%; height: 100%; display: block; }

/* Personal links: the guest's name written above the seal, like ink on a paper envelope */
.env-guest {
    position: absolute;
    left: 50%;
    bottom: calc(50% + clamp(62px, 16vw, 82px));
    z-index: 3;
    width: min(82%, 360px);
    margin: 0;
    transform: translateX(-50%);
    font: 400 clamp(32px, 10vw, 46px) / 1.15 var(--script);
    color: var(--mauve);
    text-align: center;
    overflow-wrap: anywhere;
    animation: env-guest-in 1.1s ease;
    transition: opacity 0.6s ease, transform 0.9s ease;
}

@keyframes env-guest-in {
    from { opacity: 0; transform: translate(-50%, 6px); }
}

.envelope.is-opening .env-guest { opacity: 0; transform: translate(-50%, -14px); }

.env-seal-initials {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0 4%;
    font: 400 clamp(23px, 6.4vw, 31px) / 1 var(--script);
    color: #f4cfd5;
    text-shadow: 0 -1px 0 rgba(50, 0, 12, 0.6), 0 1px 0 rgba(255, 214, 222, 0.28);
    white-space: nowrap;
    letter-spacing: -0.02em;
}

.env-hint {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(50% + clamp(62px, 16vw, 82px));
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font: 500 11px/1 var(--serif);
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(120, 76, 78, 0.72);
    transition: opacity 0.4s ease;
    animation: hint-float 2.6s ease-in-out infinite;
}

@keyframes hint-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* opening sequence (classes added by swan-engine.js) */
.envelope.is-pressed .env-seal {
    transform: translate(-50%, -50%) scale(1.07);
    filter: drop-shadow(0 0 18px rgba(255, 176, 102, 0.95)) drop-shadow(0 0 4px rgba(255, 210, 160, 0.9));
}

.envelope.is-pressed .env-hint { opacity: 0; }

.envelope.is-opening .env-light { opacity: 1; }
.envelope.is-opening .env-flap--left { transform: rotateY(-62deg); }
.envelope.is-opening .env-flap--right { transform: rotateY(62deg); }
.envelope.is-opening .env-flap--top { transform: rotateX(68deg); }
.envelope.is-opening .env-flap--bottom { transform: rotateX(-68deg); }
.envelope.is-opening .env-seal {
    transform: translate(-50%, -64%) scale(1.12);
    opacity: 0;
    transition-delay: 0.25s;
}

.envelope.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }

/* ==========================================================================
   Page column
   ========================================================================== */
.app {
    position: relative;
    max-width: var(--col);
    margin: 0 auto;
    min-height: 100vh;
    background-color: var(--paper);
    background-image: var(--grain);
    box-shadow: 0 0 40px rgba(116, 31, 47, 0.18);
    overflow: hidden;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    height: 100vh;
    height: 100svh;
    min-height: 560px;
    max-height: 1100px;
    overflow: hidden;
    background: #f3e2de;
}

.hero-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
    transform: scale(1.08);
    transform-origin: 50% 72%;
    transition: transform 7s cubic-bezier(0.2, 0.6, 0.2, 1);
}

body.is-open .hero-art { transform: scale(1); }

/* Dissolve the scene into the page: the same paper + grain as .app, faded in from the top,
   so no edge shows where the hero ends */
.hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 16%;
    background: var(--grain), var(--paper);
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000);
    mask-image: linear-gradient(to bottom, transparent, #000);
    pointer-events: none;
}

.hero-content { position: absolute; inset: 0; text-align: center; pointer-events: none; }

.hero-eyebrow,
.hero-date,
.hero-names,
.scroll-hint {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    opacity: 0;
    filter: blur(8px);
    transform: translateY(10px);
    transition: opacity 1.4s ease, filter 1.4s ease, transform 1.4s ease;
}

body.is-open .hero-eyebrow,
body.is-open .hero-date,
body.is-open .hero-names,
body.is-open .scroll-hint { opacity: 1; filter: none; transform: none; }

body.is-open .hero-eyebrow { transition-delay: 0.35s; }
body.is-open .hero-date { transition-delay: 0.6s; }
body.is-open .hero-names { transition-delay: 0.9s; }
body.is-open .scroll-hint { transition-delay: 1.6s; }

.hero-eyebrow {
    top: 22.6%;
    font-size: min(8vw, 3.7svh, 36px);
    color: #8d6661;
}

.hero-date {
    top: 28.2%;
    font: 500 min(5.4vw, 2.5svh, 23px) / 1 var(--serif);
    letter-spacing: 0.08em;
    color: #6e5350;
}

.hero-names {
    top: 33.6%;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: min(16vw, 7.6svh, 74px);
    line-height: 1.04;
    background: linear-gradient(180deg, #bc9662 0%, #9a7340 55%, #86612f 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* background-clip: text only paints inside the box, so swashes rising above the first line
       (Ж, J, the tall A) came out cut. The vertical padding gives them room; the negative
       margin keeps the names where they were. */
    padding: 0.2em 12px;
    margin-top: -0.2em;
}

.hero-names .name { display: block; padding: 0 0.12em; }

.hero-amp {
    display: block;
    font-size: 0.46em;
    line-height: 1.1;
    margin: 0.02em 0 0.06em;
}

.scroll-hint {
    top: 61.2%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #8d6661;
    text-decoration: none;
    font-size: min(5.6vw, 2.7svh, 25px);
    pointer-events: auto;
}

.chevron {
    display: block;
    width: 11px;
    height: 11px;
    border-right: 1.3px solid currentColor;
    border-bottom: 1.3px solid currentColor;
    transform: rotate(45deg);
}

.scroll-hint .chevron { animation: chevron-bob 1.8s ease-in-out infinite; }
.chevron--up { transform: rotate(-135deg); }

@keyframes chevron-bob {
    0%, 100% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(5px) rotate(45deg); }
}

/* ---------- Sections & torn paper bands ---------- */
.section {
    position: relative;
    padding: 56px 28px;
    text-align: center;
}

.band {
    position: relative;
    margin: 34px 0;
    padding: 46px 26px 50px;
    text-align: center;
    background-color: var(--band);
    background-image: var(--grain);
}

.band::before,
.band::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 26px;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    pointer-events: none;
}

.band::before {
    top: -25px;
    background-image: url('/swan/torn-top.svg');
    filter: drop-shadow(0 -1.5px 1.5px rgba(150, 96, 96, 0.16));
}

.band::after {
    bottom: -25px;
    background-image: url('/swan/torn-bottom.svg');
    filter: drop-shadow(0 2px 2px rgba(150, 96, 96, 0.14));
}

.section-title {
    font-size: 36px;
    line-height: 1.2;
    color: var(--mauve);
}

.lead {
    font: 400 19px/1.5 var(--serif);
    color: var(--ink);
    max-width: 340px;
    margin: 8px auto 0;
}

/* ---------- Invitation / Bismillah ---------- */
.invite { padding-top: 64px; padding-bottom: 40px; }

.corner {
    position: absolute;
    top: -64px;
    width: 48%;
    max-width: 236px;
    pointer-events: none;
    z-index: 2;
    /* the bouquet is cropped flat at its top edge; fade that edge in so it grows out of
       the hero's roses instead of cutting across them with a line */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 35%);
    mask-image: linear-gradient(to bottom, transparent 0, #000 35%);
}

.corner--left { left: -14px; }
.corner--right { right: -14px; transform: scaleX(-1); }

.bismillah {
    position: relative;
    z-index: 3;
    margin: 64px 0 22px;
    font: 400 27px/1.6 'Amiri', 'Noto Naskh Arabic', serif;
    color: #5f4341;
}

.intro-lines {
    font-size: 36px;
    line-height: 1.18;
    color: var(--mauve);
}

.welcome-h {
    margin-top: 24px;
    font: 500 21px/1.3 var(--serif);
    letter-spacing: 0.02em;
    color: var(--ink);
}

.table-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    margin-top: 22px;
    padding: 10px 22px;
    border: 1px solid rgba(169, 132, 79, 0.55);
    border-radius: 999px;
    background: rgba(255, 250, 249, 0.7);
}

.table-badge-label {
    font: 600 12px/1 var(--serif);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.table-badge-number { font: 600 24px/1 var(--serif); color: var(--gold); }

/* ---------- Per-guest event sections ---------- */
.event { padding-top: 24px; padding-bottom: 24px; }

.event-meta {
    display: grid;
    gap: 10px;
    max-width: 320px;
    margin: 14px auto 0;
}

.event-meta > div {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 14px;
    align-items: baseline;
    text-align: left;
}

.event-meta dt {
    text-align: right;
    font: 600 12px/1.3 var(--serif);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.event-meta dd { font: 500 18px/1.3 var(--serif); color: var(--ink); }

/* ---------- Countdown ---------- */
.countdown-band { padding-top: 40px; padding-bottom: 40px; }

.countdown {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 4px;
    margin-top: 14px;
}

.cd-unit { min-width: 60px; }
.cd-unit:first-child { min-width: 74px; }

.cd-num {
    position: relative;
    height: 1.18em;
    overflow: hidden;
    font: 500 42px/1.18 var(--serif);
    font-variant-numeric: lining-nums tabular-nums;
    color: var(--gold);
}

.cd-num span {
    position: absolute;
    left: 0;
    right: 0;
    transition: transform 0.7s cubic-bezier(0.3, 0.7, 0.2, 1), opacity 0.7s ease;
}

.cd-num span.is-entering { transform: translateY(75%); opacity: 0; }
.cd-num span.is-leaving { transform: translateY(-75%); opacity: 0; }

.cd-sep {
    font: 500 34px/1.4 var(--serif);
    color: var(--gold-soft);
}

.cd-unit p {
    margin-top: 4px;
    font: 400 15px/1.2 var(--serif);
    color: var(--ink-soft);
}

.countdown-done { margin-top: 12px; font-size: 34px; color: var(--wine); }

/* ---------- Schedule ---------- */
.schedule { padding-top: 40px; }

.flourished {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.flourish {
    width: 58px;
    height: 18px;
    flex: none;
    color: var(--gold);
}

.flourish--mirror { transform: scaleX(-1); }

.timeline {
    position: relative;
    max-width: 340px;
    margin: 26px auto 0;
}

.tl-list { list-style: none; position: relative; }

.tl-list::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 30px;
    bottom: 30px;
    width: 1px;
    margin-left: -0.5px;
    background: linear-gradient(to bottom, rgba(155, 124, 120, 0), var(--line) 8%, var(--line) 92%, rgba(155, 124, 120, 0));
}

.tl-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 36px 1fr;
    align-items: center;
    min-height: 66px;
    opacity: 0.38;
    transition: opacity 0.6s ease;
}

.tl-item.is-passed { opacity: 1; }

.tl-time {
    text-align: right;
    padding-right: 14px;
    font: 500 23px/1 var(--serif);
    font-variant-numeric: lining-nums;
    color: var(--ink);
}

.tl-mark {
    justify-self: center;
    width: 7px;
    height: 7px;
    background: var(--ink-soft);
    transform: rotate(45deg);
}

.tl-label {
    text-align: left;
    padding-left: 14px;
    font: 500 18px/1.2 var(--serif);
    color: var(--ink);
}

.tl-sub {
    display: block;
    margin-top: 2px;
    font: italic 400 15px/1.2 var(--serif);
    color: var(--ink-soft);
}

.tl-rose {
    position: absolute;
    left: 50%;
    top: 0;
    z-index: 2;
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
    pointer-events: none;
    filter: drop-shadow(0 3px 4px rgba(120, 60, 60, 0.28));
    transform: translateY(var(--rose-y, 33px)) rotate(var(--rose-r, 0deg));
    will-change: transform;
}

/* ---------- Location ---------- */
.location { padding-top: 46px; }

.petals {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.petal {
    position: absolute;
    top: -40px;
    width: 18px;
    height: 24px;
    background: url('/standart/rose_petals.png') center / contain no-repeat;
    filter: sepia(0.55) saturate(0.85) hue-rotate(-12deg) brightness(1.06);
    opacity: 0;
    animation: petal-fall var(--dur, 12s) linear var(--delay, 0s) infinite;
}

.petal:nth-child(even) { background-image: url('/standart/rose_petals2.png'); }

@keyframes petal-fall {
    0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0deg); }
    8% { opacity: 0.85; }
    50% { transform: translate3d(var(--sway, 30px), calc(var(--fall, 900px) * 0.5), 0) rotate(calc(var(--spin, 200deg) * 0.5)); }
    92% { opacity: 0.75; }
    100% { opacity: 0; transform: translate3d(calc(var(--sway, 30px) * -0.4), var(--fall, 900px), 0) rotate(var(--spin, 200deg)); }
}

.divider {
    display: block;
    width: 86px;
    height: 15px;
    margin: 2px auto 14px;
    color: var(--gold);
}

.venue-name {
    font: 600 22px/1.25 var(--serif);
    letter-spacing: 0.02em;
    color: var(--ink);
}

.venue-address {
    max-width: 320px;
    margin: 6px auto 0;
    font: 400 17px/1.45 var(--serif);
    color: var(--ink-soft);
}

.venue-sketch {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 20px auto 0;
    mix-blend-mode: multiply;
}

.map-frame {
    position: relative;
    max-width: 380px;
    margin: 40px auto 0;
    padding: 8px;
    border: 1px solid rgba(169, 132, 79, 0.55);
    border-radius: 16px;
    background: #fdf7f5;
    box-shadow: 0 8px 22px rgba(140, 88, 88, 0.14);
}

.map-frame iframe {
    display: block;
    width: 100%;
    height: 270px;
    border: 0;
    border-radius: 10px;
    background: #efe4e2;
}

.filigree {
    position: absolute;
    left: 50%;
    width: 150px;
    height: 27px;
    padding: 0 8px;
    color: var(--gold);
    background: var(--band);
    transform: translateX(-50%);
}

.filigree--top { top: -14px; }
.filigree--bottom { bottom: -14px; transform: translateX(-50%) scaleY(-1); }

.btn-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 34px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid var(--wine);
    border-radius: 999px;
    background: var(--wine);
    color: #fff;
    font: 600 14px/1 var(--serif);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.btn:active { transform: scale(0.97); }
.btn svg { width: 16px; height: 16px; fill: currentColor; flex: none; }

.btn--ghost { background: transparent; color: var(--wine); }
.btn--solid { width: 100%; padding: 15px 20px; font-size: 15px; }
.btn[disabled] { opacity: 0.6; cursor: default; }

/* ---------- Dress code & gifts ---------- */
.notes { padding-top: 64px; padding-bottom: 70px; }

.vine {
    position: absolute;
    width: 66%;
    max-width: 320px;
    pointer-events: none;
}

.vine--top { top: -20px; right: -8px; }
.vine--bottom { bottom: -20px; left: -8px; transform: rotate(180deg); }

.notes .section-title { position: relative; z-index: 1; }

.note-text {
    position: relative;
    z-index: 1;
    max-width: 300px;
    margin: 6px auto 30px;
    font: 400 18px/1.5 var(--serif);
    color: var(--ink);
}

.note-text:last-child { margin-bottom: 0; }

/* ---------- RSVP ---------- */
.rsvp { padding-top: 46px; padding-bottom: 36px; }

.rsvp-seal {
    position: relative;
    display: block;
    width: 128px;
    height: 128px;
    margin: 26px auto 6px;
    border: 0;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.rsvp-seal img {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 7px 9px rgba(80, 18, 30, 0.36));
    animation: seal-breathe 3.4s ease-in-out infinite;
}

@keyframes seal-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.045); }
}

.rsvp-seal-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 10px;
    font: 600 23px/1 var(--serif);
    letter-spacing: 0.1em;
    color: #f4cfd5;
    text-shadow: 0 -1px 0 rgba(50, 0, 12, 0.6), 0 1px 0 rgba(255, 214, 222, 0.25);
    pointer-events: none;
}

.rsvp-seal-orn {
    position: absolute;
    left: 50%;
    top: 58%;
    width: 46px;
    height: 8px;
    color: #eab8c1;
    transform: translateX(-50%);
    pointer-events: none;
}

.rsvp-seal.is-tapped img { animation: seal-pop 0.5s ease; }

@keyframes seal-pop {
    0% { transform: scale(1); }
    40% { transform: scale(0.9); }
    100% { transform: scale(1.06); }
}

.rsvp-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: var(--mauve);
}

.rsvp-cta .script { font-size: 24px; }
.rsvp-cta .chevron { width: 10px; height: 10px; }

/* ---------- Closing ---------- */
.closing { padding-top: 26px; padding-bottom: 0; }

.closing-names {
    margin-top: 6px;
    font: 500 24px/1.3 var(--serif);
    letter-spacing: 0.03em;
    color: var(--ink);
}

.closing-families {
    margin-top: 6px;
    font: italic 400 18px/1.4 var(--serif);
    color: var(--ink-soft);
}

.closing-art {
    display: block;
    width: calc(100% + 56px);
    max-width: none;
    margin: 18px -28px 0;
    -webkit-mask-image: radial-gradient(ellipse 62% 64% at 50% 52%, #000 52%, transparent 100%);
    mask-image: radial-gradient(ellipse 62% 64% at 50% 52%, #000 52%, transparent 100%);
}

.footer {
    padding: 10px 0 calc(36px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.footer-logo img { display: block; height: 44px; width: auto; opacity: 0.85; }

.footer-icons { display: flex; gap: 12px; }

.footer-icons a {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(116, 31, 47, 0.35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wine);
}

.footer-icons svg { width: 17px; height: 17px; fill: currentColor; }

/* ==========================================================================
   RSVP modal
   ========================================================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(66, 26, 34, 0.46);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.modal-card {
    position: relative;
    width: 100%;
    max-width: var(--col);
    max-height: 92vh;
    max-height: 92svh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 34px 24px calc(28px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    background: #fbf1f3 var(--grain);
    box-shadow: 0 -12px 40px rgba(80, 30, 40, 0.25);
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal.is-open .modal-backdrop { opacity: 1; }
.modal.is-open .modal-card { transform: none; }

@media (min-width: 560px) and (min-height: 720px) {
    .modal { align-items: center; }
    .modal-card { border-radius: 22px; }
}

.modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 40px;
    height: 40px;
    border: 0;
    background: none;
    font: 300 32px/1 var(--serif);
    color: var(--ink-soft);
    cursor: pointer;
}

.modal-title {
    text-align: center;
    font: 500 25px/1.2 var(--serif);
    color: var(--ink);
}

.modal-sub {
    margin: 6px 0 22px;
    text-align: center;
    font: italic 400 16px/1.4 var(--serif);
    color: var(--ink-soft);
}

.modal-sub:empty { display: none; }

.form-group { margin-bottom: 18px; text-align: left; }

.form-group > label:not(.radio),
.form-label {
    display: block;
    margin-bottom: 7px;
    font: 500 17px/1.2 var(--serif);
    color: var(--ink);
}

.modal input[type="text"],
.modal select,
.modal textarea {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #e3c6cd;
    border-radius: 10px;
    background: #fffafb;
    color: var(--ink);
    font: 400 17px/1.3 var(--serif);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal select {
    background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
    background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
    background-size: 5px 5px;
    background-repeat: no-repeat;
}

.modal textarea { resize: vertical; min-height: 84px; }

.modal input[type="text"]:focus,
.modal select:focus,
.modal textarea:focus {
    border-color: #b56a79;
    box-shadow: 0 0 0 3px rgba(116, 31, 47, 0.1);
}

.radio {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
    font: 400 17px/1.2 var(--serif);
    color: var(--ink);
    cursor: pointer;
}

.radio input {
    -webkit-appearance: none;
    appearance: none;
    flex: none;
    display: grid;
    place-content: center;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 1.5px solid #c9a1aa;
    border-radius: 50%;
    background: #fffafb;
    cursor: pointer;
}

.radio input::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--wine);
    transform: scale(0);
    transition: transform 0.2s ease;
}

.radio input:checked { border-color: var(--wine); }
.radio input:checked::before { transform: scale(1); }
.radio input:focus-visible { outline: 2px solid rgba(116, 31, 47, 0.3); outline-offset: 2px; }

.rsvp-success { padding: 18px 0 8px; text-align: center; }
.rsvp-success .script { font-size: 48px; line-height: 1.1; color: var(--wine); }
.rsvp-success p:last-child { margin-top: 8px; font: 400 18px/1.45 var(--serif); }

/* ==========================================================================
   Music button (icon classes are toggled by shared/core.js)
   ========================================================================== */
.music-btn {
    position: fixed;
    right: calc(var(--side) + 16px);
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 900;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #93394a, var(--wine) 55%, var(--wine-deep));
    box-shadow: 0 6px 16px rgba(90, 20, 32, 0.38);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.6);
    pointer-events: none;
    transition: opacity 0.5s ease 1.2s, transform 0.5s ease 1.2s;
}

body.is-open .music-btn { opacity: 1; transform: none; pointer-events: auto; }

#play-icon { position: relative; display: block; width: 14px; height: 14px; }

#play-icon.fa-play::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 0;
    border-left: 12px solid #fff;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
}

#play-icon.fa-pause::before,
#play-icon.fa-pause::after {
    content: '';
    position: absolute;
    top: 0;
    width: 4px;
    height: 14px;
    border-radius: 1px;
    background: #fff;
}

#play-icon.fa-pause::before { left: 2px; }
#play-icon.fa-pause::after { right: 2px; }

/* ==========================================================================
   Scroll reveal (shared/core.js initFadeIn toggles .visible)
   ========================================================================== */
.fade-in {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(16px);
    transition: opacity 1.1s ease, filter 1.1s ease, transform 1.1s ease;
}

.fade-in.visible { opacity: 1; filter: none; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .fade-in,
    .hero-eyebrow, .hero-date, .hero-names, .scroll-hint { opacity: 1; filter: none; transform: none; transition: none; }
    .hero-art { transition: none; transform: none; }
    .petal, .env-hint, .env-guest, .scroll-hint .chevron, .rsvp-seal img { animation: none; }
    .petal { display: none; }
}
