/* ==========================================================================
   Fluturaș - a delicate christening: pastel butterflies fluttering through the page, one resting on
   every title, a few around the child's photo; the scroll's breeze nudges them sideways
   Palette: --inv-primary (ink accent), --inv-accent (wing tint), --inv-bg, --inv-text
   script.js sets --gust (px) on .fl-breeze while the page scrolls
   ========================================================================== */

.fluturas {
    --fl-ink-soft: color-mix(in srgb, var(--inv-text) 70%, var(--inv-bg));
    --fl-tint: color-mix(in srgb, var(--inv-accent) 45%, var(--inv-bg));
    --fl-card: color-mix(in srgb, var(--inv-surface) 82%, transparent);
    --kit-radius: 16px;
    --kit-field-bg: var(--inv-surface);
    --kit-field-border: color-mix(in srgb, var(--inv-primary) 24%, transparent);
    font-family: var(--inv-font-body);
    font-weight: 300;
    font-size: 1.03rem;
    line-height: 1.7;
    background: linear-gradient(180deg, var(--fl-tint), var(--inv-bg) 70vh) no-repeat, var(--inv-bg);
    overflow-x: clip;
}
.fluturas h1, .fluturas h2, .fluturas h3 { font-family: var(--inv-font-heading); font-weight: 400; line-height: 1.15; }
/* zero specificity, so the template's own heading classes can set their spacing */
:where(.fluturas) :is(h1, h2, h3) { margin: 0; }
:where(.fluturas) p { margin: 0 0 .9em; }
.fluturas a { color: var(--inv-primary); }
.fl-kicker { font-size: .74rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--inv-primary); margin: 0 0 10px; }
.fl-role { font-size: .72rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--fl-ink-soft); margin: 0 0 4px; }
.fl-names { font-family: var(--inv-font-heading); font-size: 1.35rem; margin: 0; }

/* ---------- Butterflies ---------- */
.fl-butterfly { display: block; overflow: visible; }
.fl-tone-1 { --wing: var(--inv-accent); --wing-2: color-mix(in srgb, var(--inv-accent) 60%, var(--inv-primary)); }
.fl-tone-2 { --wing: color-mix(in srgb, var(--inv-accent) 55%, #FFD7A8); --wing-2: color-mix(in srgb, var(--inv-primary) 45%, #F4A97C); }
.fl-tone-3 { --wing: color-mix(in srgb, var(--inv-accent) 55%, #F7C6E0); --wing-2: color-mix(in srgb, var(--inv-primary) 50%, #D58AB8); }
.fl-wing-up { fill: var(--wing); }
.fl-wing-down { fill: var(--wing-2); }
.fl-wing-up, .fl-wing-down { stroke: color-mix(in srgb, var(--inv-text) 25%, transparent); stroke-width: .8; }
.fl-wing-pattern { fill: color-mix(in srgb, white 45%, transparent); }
.fl-wing-dot { fill: color-mix(in srgb, white 80%, transparent); }
.fl-body { fill: color-mix(in srgb, var(--inv-text) 80%, var(--inv-primary)); }
.fl-antenna { fill: none; stroke: color-mix(in srgb, var(--inv-text) 70%, var(--inv-primary)); stroke-width: 1.2; stroke-linecap: round; }
.fl-wing { transform-box: view-box; transform-origin: 50px 40px; animation: fl-flap .32s ease-in-out infinite alternate; }
.fl-butterfly--rest .fl-wing { animation: fl-rest 3.6s ease-in-out infinite; }
@keyframes fl-flap { from { transform: scaleX(1); } to { transform: scaleX(.18); } }
@keyframes fl-rest { 0%, 70%, 100% { transform: scaleX(1); } 78%, 92% { transform: scaleX(.35); } 85% { transform: scaleX(.95); } }
.fl-air { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.fl-breeze { position: absolute; inset: 0 -15%; transform: translateX(calc(var(--gust, 0) * 1px)); transition: transform 1.8s cubic-bezier(.2, .7, .2, 1); }
.fl-flight { position: absolute; left: -60px; top: var(--y); width: calc(34px - var(--i) * 2px); opacity: .85; animation: fl-fly var(--d) linear infinite; animation-delay: calc(var(--i) * -5.5s); }
.fl-flight .fl-butterfly { animation: fl-bob 2.4s ease-in-out infinite alternate; }
@keyframes fl-fly {
    0% { transform: translate(0, 0) rotate(70deg); }
    25% { transform: translate(30vw, -8vh) rotate(85deg); }
    50% { transform: translate(60vw, 6vh) rotate(100deg); }
    75% { transform: translate(90vw, -6vh) rotate(80deg); }
    100% { transform: translate(130vw, 2vh) rotate(90deg); }
}
@keyframes fl-bob { from { translate: 0 -6px; } to { translate: 0 6px; } }
.fl-hero, .fl-main, .fl-footer { position: relative; z-index: 1; }
/* The hero sits above the page so its sticky navigation stays on top of the sections */
.fl-hero { z-index: 2; }

/* ---------- Titles ---------- */
.fl-title { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 auto clamp(26px, 4vw, 44px); text-align: center; }
.fl-title h2 { position: relative; font-size: clamp(2rem, 6vw, 2.9rem); font-weight: 700; }
.fl-title-butterfly { position: absolute; right: -30px; top: -26px; width: 36px; transform: rotate(18deg); }

/* ---------- Navigation ---------- */
.fl-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 6; display: flex; justify-content: center; padding: 18px; }
.fl-nav .kit-nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 24px; }
.fl-nav a { text-decoration: none; font-size: .8rem; font-weight: 400; letter-spacing: .08em; color: var(--inv-text); padding: 6px 0; border-bottom: 1px solid transparent; }
.fl-nav a:hover, .fl-nav a.is-current { color: var(--inv-primary); border-bottom-color: var(--inv-primary); }
.fl-nav .kit-nav-brand { font-family: var(--inv-font-heading); font-weight: 700; font-size: 1.5rem; letter-spacing: 0; color: var(--inv-primary); margin-right: auto; border: 0; line-height: 1; }
.fl-nav.is-stuck { justify-content: space-between; align-items: center; padding: 6px clamp(16px, 4vw, 40px); background: color-mix(in srgb, var(--inv-bg) 90%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.fluturas .kit-to-top { border-radius: 50%; background: var(--inv-surface); color: var(--inv-primary); border: 1px solid var(--kit-field-border); }
@media (max-width: 899px) {
    .fl-nav { justify-content: flex-end; padding: 12px; }
    .fl-nav .kit-nav-toggle { width: 46px; height: 46px; border-radius: 50%; background: var(--fl-card); color: var(--inv-primary); border: 1px solid var(--kit-field-border); font-size: 1.2rem; }
    .fl-nav .kit-nav-links { display: none; }
    .fl-nav.is-open .kit-nav-links {
        display: flex; flex-direction: column; gap: 12px; position: absolute; top: 66px; left: 12px; right: 12px;
        padding: 24px; border-radius: 22px; background: var(--inv-surface); box-shadow: 0 20px 40px -24px color-mix(in srgb, var(--inv-text) 50%, transparent);
    }
    .fl-nav.is-stuck { padding: 6px 12px; }
}

/* ---------- Hero ---------- */
.fl-hero { min-height: 100vh; min-height: 100svh; display: grid; align-items: center; padding: 80px 16px 40px; }
.fl-hero-grid { display: grid; gap: 10px; width: min(1080px, 100%); margin: 0 auto; justify-items: center; text-align: center; }
.fl-hero-art { position: relative; width: min(300px, 64vw); aspect-ratio: 1; }
.fl-hero-butterfly { position: absolute; left: 10%; top: 14%; width: 80%; filter: drop-shadow(0 18px 24px color-mix(in srgb, var(--inv-primary) 30%, transparent)); animation: fl-hover 4s ease-in-out infinite alternate; }
.fl-hero-butterfly .fl-wing { animation-duration: .6s; }
.fl-hero-butterfly--2 { left: 72%; top: 0; width: 26%; animation-duration: 3s; rotate: 24deg; }
.fl-hero-butterfly--3 { left: 0; top: 70%; width: 22%; animation-duration: 3.4s; rotate: -18deg; }
@keyframes fl-hover { from { transform: translateY(-8px); } to { transform: translateY(8px); } }
.fluturas .fl-name { font-family: var(--inv-font-heading); font-weight: 700; font-size: clamp(4rem, 16vw, 8rem); line-height: .95; color: var(--inv-primary); overflow-wrap: anywhere; margin: 0 0 14px; }
.fl-hero-date { font-family: var(--inv-font-heading); font-size: 1.35rem; margin: 0; }
.fl-hero-place { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--fl-ink-soft); margin: 4px 0 0; }
.fluturas .fl-subtitle { max-width: 38ch; margin: 20px auto 0; color: var(--fl-ink-soft); font-size: 1.08rem; }
@media (min-width: 900px) {
    .fl-hero-grid { grid-template-columns: .8fr 1.2fr; align-items: center; text-align: left; justify-items: start; gap: 40px; }
    .fl-hero-art { width: min(380px, 100%); justify-self: center; }
    .fluturas .fl-subtitle { margin-left: 0; }
}

/* ---------- Sections ---------- */
.fl-main { width: min(1080px, 100%); margin: 0 auto; padding: 0 16px; }
.fl-section { padding-top: clamp(70px, 11vw, 120px); }
.fl-card { background: var(--fl-card); border-radius: 26px; box-shadow: 0 24px 50px -36px color-mix(in srgb, var(--inv-text) 55%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.fl-lead { text-align: center; font-family: var(--inv-font-heading); font-size: 1.2rem; color: var(--fl-ink-soft); max-width: 40ch; margin: 0 auto 26px; }
.fl-wide-photo { margin: 0; border-radius: 32px; overflow: hidden; aspect-ratio: 16 / 9; box-shadow: 0 30px 60px -40px color-mix(in srgb, var(--inv-text) 60%, transparent); }
.fl-wide-photo img { width: 100%; height: 100%; object-fit: cover; }

.fl-welcome { text-align: center; max-width: 720px; margin: 0 auto; }
.fl-welcome-title { font-size: clamp(2.2rem, 7vw, 3.2rem); color: var(--inv-primary); margin-bottom: 16px; }
.fl-prose { font-size: 1.1rem; }
.fl-quote-author { font-family: var(--inv-font-heading); color: var(--inv-primary); }

/* Child: the photo with butterflies resting around it */
.fl-child-grid { display: grid; gap: 34px; justify-items: center; text-align: center; }
.fl-wreath { position: relative; margin: 0; width: min(340px, 78vw); aspect-ratio: 1; display: grid; place-items: center; }
.fl-wreath-butterfly { position: absolute; width: 18%; z-index: 2; transform: rotate(var(--turn)); }
.fl-wreath > img, .fl-wreath-initial { position: relative; width: 78%; height: 78%; object-fit: cover; border-radius: 50%; box-shadow: 0 16px 30px -18px color-mix(in srgb, var(--inv-text) 60%, transparent); }
.fl-wreath-initial { display: grid; place-items: center; background: var(--inv-surface); font-family: var(--inv-font-heading); font-size: 6rem; color: var(--inv-primary); }
.fl-child-name { font-family: var(--inv-font-heading); font-size: clamp(1.9rem, 6vw, 2.5rem); margin-bottom: 6px; }
.fl-child-born { color: var(--fl-ink-soft); }
.fl-child-born strong { font-weight: 500; color: var(--inv-text); }
.fl-child-message { font-family: var(--inv-font-heading); font-size: 1.2rem; max-width: 38ch; }
@media (min-width: 760px) { .fl-child-grid { grid-template-columns: minmax(0, 360px) 1fr; text-align: left; justify-items: start; align-items: center; gap: 60px; } }

/* Family */
.fl-family-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); text-align: center; }
.fl-person { padding: 24px 22px; }

/* Programme along a stem */
.fl-stemline { list-style: none; margin: 0 auto; padding: 0; max-width: 680px; position: relative; display: grid; gap: 26px; }
.fl-stemline::before { content: ""; position: absolute; left: 18px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: repeating-linear-gradient(color-mix(in srgb, var(--inv-primary) 45%, var(--inv-accent)) 0 8px, transparent 8px 16px); }
.fl-moment { position: relative; padding-left: 52px; }
.fl-bud { position: absolute; left: 6px; top: 28px; width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--fl-tint); border: 2px solid color-mix(in srgb, var(--inv-primary) 55%, var(--inv-accent)); }
.fl-moment-card { padding: 24px 26px 20px; }
.fl-moment-time { font-family: var(--inv-font-heading); font-size: 2.1rem; line-height: 1; color: var(--inv-primary); margin-bottom: 8px; }
.fl-moment-card h3 { font-size: 1.5rem; margin-bottom: 4px; }
.fl-moment-place { font-weight: 500; margin: 10px 0 0; }
.fl-moment-address, .fl-moment-notes { color: var(--fl-ink-soft); margin: 0; }
.fl-moment-notes { margin-top: 6px; }
.fl-moment .kit-event-actions { justify-content: flex-start; }
.fluturas .kit-button { border-radius: 999px; border: 1px solid var(--kit-field-border); color: var(--inv-primary); background: transparent; font-size: .82rem; font-weight: 400; padding: 9px 16px; text-decoration: none; }
.fluturas .kit-button:hover { background: var(--inv-primary); color: var(--inv-bg); }

/* Countdown */
.fl-countdown { text-align: center; }
.fl-countdown .kit-countdown { gap: clamp(10px, 3vw, 24px); }
.fl-countdown .kit-countdown-unit { min-width: 0; }
.fl-countdown .kit-countdown-value { display: grid; place-items: center; width: clamp(70px, 19vw, 112px); aspect-ratio: 1; border-radius: 50%; background: var(--fl-card); box-shadow: 0 0 0 1px var(--kit-field-border), 0 16px 30px -20px color-mix(in srgb, var(--inv-text) 50%, transparent); font-size: clamp(1.8rem, 6vw, 2.6rem); color: var(--inv-primary); }
.fl-countdown .kit-countdown-label { margin-top: 10px; opacity: 1; color: var(--fl-ink-soft); }

/* Gallery */
.fl-gallery-grid.kit-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 2vw, 18px); }
.fl-gallery-grid.kit-gallery a { border-radius: 24px; aspect-ratio: 4 / 5; }
@media (min-width: 760px) { .fl-gallery-grid.kit-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* RSVP */
.fl-reply { max-width: 700px; margin: 0 auto; padding: clamp(30px, 6vw, 54px); }
.fluturas .inv-rsvp__intro { font-family: var(--inv-font-heading); font-size: 1.15rem; }
.fluturas .inv-rsvp__deadline { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--inv-primary); }
.fluturas .inv-rsvp__choice label { border-radius: 999px; }

/* Info, contact */
.fl-info-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.fl-info-item { padding: 26px 24px 14px; text-align: center; }
.fl-info-item h3 { font-size: 1.4rem; color: var(--inv-primary); margin-bottom: 8px; }
.fl-faq { max-width: 720px; margin: 40px auto 0; text-align: center; }
.fl-faq details { text-align: left; margin-bottom: 10px; border-radius: 20px; }
.fl-faq summary { cursor: pointer; list-style: none; padding: 16px 50px 16px 22px; position: relative; font-family: var(--inv-font-heading); font-size: 1.12rem; border-radius: inherit; }
.fl-faq summary::-webkit-details-marker { display: none; }
.fl-faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--inv-primary); font-size: 1.4rem; transition: transform .3s; }
.fl-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.fl-faq summary:focus-visible { outline: 2px solid var(--inv-primary); outline-offset: 2px; }
.fl-faq details p { padding: 0 22px; color: var(--fl-ink-soft); }
.fl-faq details p:last-child { padding-bottom: 16px; }
.fl-contact { text-align: center; }
.fl-contact-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 60px; }
.fl-contact-person a { text-decoration: none; }

/* Footer */
.fl-footer { text-align: center; padding: clamp(100px, 15vw, 160px) 16px 70px; }
.fl-footer-message { font-family: var(--inv-font-heading); font-size: 1.3rem; color: var(--fl-ink-soft); }
.fl-footer-name { font-family: var(--inv-font-heading); font-weight: 700; font-size: clamp(3.4rem, 13vw, 6rem); line-height: 1; color: var(--inv-primary); margin: 4px 0 10px; }
.fl-hashtag { letter-spacing: .12em; color: var(--inv-primary); }

@media (prefers-reduced-motion: reduce) {
    .fl-wing, .fl-flight, .fl-flight .fl-butterfly, .fl-hero-butterfly { animation: none; }
    .fl-flight { display: none; }
    .fl-breeze { transition: none; }
}
