/*
 * Published `site` project pages (AI Website Builder).
 * Standalone, mobile-first, opinionated. Theme tokens (--site-*) are injected
 * server-side by siteRenderer.js.
 *
 * Design philosophy ("Apple model"): the system guarantees rhythm, hierarchy
 * and polish. Content is presented in a clean editorial column with generous,
 * consistent spacing — NOT a wall of identical boxes. Cards are used sparingly
 * (links, galleries, media, chat), while hero and prose breathe openly. Every
 * image is aspect-locked and object-fit covered, headings clamp to a tasteful
 * scale, and link buttons are uniform — so bad input still renders beautifully.
 */

*, *::before, *::after { box-sizing: border-box; }

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

html, body { margin: 0; padding: 0; min-height: 100%; }

body {
    background: var(--site-bg, #fff);
    color: var(--site-text, #14161c);
    font-family: var(--site-body-font, 'Inter', system-ui, sans-serif);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
    font-family: var(--site-heading-font, 'Poppins', system-ui, sans-serif);
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 0 0 0.4em 0;
    font-weight: 700;
    overflow-wrap: break-word;
}

p { margin: 0 0 1em 0; overflow-wrap: break-word; }

a { color: var(--site-brand, #4D61FE); text-underline-offset: 2px; }

img, video, iframe { max-width: 100%; }

/* ── background media + legibility scrim ─────────────────────────── */
.site-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-size: cover;
    background-position: center;
    z-index: -2;
}

.site-bg-overlay { position: fixed; inset: 0; z-index: -1; }

/* ── shell ───────────────────────────────────────────────────────── */
.site-header {
    text-align: center;
    font-family: var(--site-heading-font, 'Poppins', system-ui, sans-serif);
    font-size: clamp(1.15rem, 3.5vw, 1.45rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    padding: clamp(1.5rem, 5vw, 2.75rem) 1.25rem 0 1.25rem;
}

.site-header:empty { padding: 0; }

/* ── header navigation menu (mobile-friendly anchor nav) ─────────── */
.site-header-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    text-align: left;
    padding: 0;
    background: color-mix(in srgb, var(--site-surface, #fff) 86%, transparent);
    backdrop-filter: saturate(1.4) blur(12px);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--site-border);
}

.site-header-nav .site-header-inner {
    position: relative;
    max-width: calc(var(--site-content, 1024px) + 2.5rem);
    margin: 0 auto;
    padding: 0.6rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--site-text);
    font-weight: 700;
    margin-right: auto;
    min-width: 0;
}

.site-brand-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60vw;
}

/* the menu logo is CSS-constrained so it can never be oversized in height */
.site-menu-logo {
    height: clamp(28px, 7vw, 42px);
    width: auto;
    max-width: 60vw;
    object-fit: contain;
    display: block;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.site-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    text-decoration: none;
    color: var(--site-muted);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.45em 0.75em;
    border-radius: 999px;
    transition: color 0.15s ease, background 0.15s ease;
}

.site-nav-link:hover,
.site-nav-link.is-active {
    color: var(--site-text);
    background: color-mix(in srgb, var(--site-brand) 12%, transparent);
}

.site-nav-link > i { font-size: 1.05em; color: var(--site-brand); }

.site-nav-toggle {
    display: none;
    width: 2.6em;
    height: 2.6em;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--site-border);
    border-radius: 12px;
    background: var(--site-surface, #fff);
    color: var(--site-text);
    font-size: 1.2rem;
    cursor: pointer;
}

/* anchored blocks clear the sticky header when scrolled to */
.site-header-nav ~ .site-main [id^="sec-"] { scroll-margin-top: 4.75rem; }

@media (max-width: 640px) {
    .site-nav-toggle { display: inline-flex; }
    .site-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--site-surface, #fff);
        border-bottom: 1px solid var(--site-border);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
        padding: 0.4rem;
        display: none;
    }
    .site-header-nav.site-nav-open .site-nav { display: flex; }
    .site-header-nav.site-nav-open .site-nav-toggle {
        background: color-mix(in srgb, var(--site-brand) 14%, transparent);
        border-color: var(--site-brand);
    }
    .site-nav-link { font-size: 1rem; padding: 0.75em 0.9em; border-radius: 10px; }
}

.site-main {
    width: 100%;
    max-width: calc(var(--site-content, 1024px) + 2.5rem);
    margin: 0 auto;
    padding: clamp(1.75rem, 5vw, 3rem) 1.25rem clamp(2rem, 6vw, 3.5rem);
    display: flex;
    flex-direction: column;
    gap: var(--site-gap, 3rem);
}

/* ── motion system (scroll-triggered reveals) ────────────────────── */
/* Fail-open: hidden states only exist under .site-anim, which siteHost.js
   adds at runtime — without JS every block is fully visible. One signature
   curve everywhere; users don't pick animations, the system guarantees them. */
@media (prefers-reduced-motion: no-preference) {

    /* focus-pull reveal: blur → sharp + rise, not a lazy-load fade */
    .site-anim .sr-block {
        opacity: 0;
        transform: translateY(26px);
        filter: blur(10px);
        transition:
            opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
            filter 0.9s cubic-bezier(0.22, 1, 0.36, 1);
        transition-delay: var(--srb-delay, 0s);
    }

    .site-anim .sr-block.sr-in {
        opacity: 1;
        transform: none;
        filter: none;
    }

    /* child choreography: pieces arrive as a sequence inside their block */
    .site-anim .sr-child {
        opacity: 0;
        transform: translateY(18px);
        filter: blur(6px);
        transition:
            opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
            filter 0.65s cubic-bezier(0.22, 1, 0.36, 1);
        transition-delay: calc(var(--srb-delay, 0s) + var(--sr-delay, 0s) + 0.1s);
    }

    .site-anim .sr-in .sr-child {
        opacity: 1;
        transform: none;
        filter: none;
    }

    /* imagery settles from a gentle zoom (Ken Burns landing) */
    .site-anim .site-gallery-cell.sr-child { transform: translateY(12px) scale(1.04); }
    .site-anim .sr-in .site-gallery-cell.sr-child { transform: none; }

    .site-anim .site-hero-media.sr-child {
        transform: translateY(10px) scale(1.06);
        transition-duration: 1.1s;
    }
    .site-anim .sr-in .site-hero-media.sr-child { transform: none; }

    /* the hero block itself stays subtle — its children carry the show */
    .site-anim .site-hero.sr-block { transform: translateY(18px); }
    .site-anim .site-hero.sr-block.sr-in { transform: none; }
}

/* base block: NO default card — most blocks are open and editorial */
.site-block { width: 100%; }

/* a soft surface treatment, applied only where it belongs */
.site-surface {
    background: var(--site-surface);
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius-surface-lg, 22px);
}

/* ── hero ────────────────────────────────────────────────────────── */
.site-hero { text-align: center; }

.site-hero-media {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-radius: var(--site-radius-surface-lg, 22px);
    box-shadow: var(--site-shadow);
    margin-bottom: clamp(1.25rem, 4vw, 2rem);
}

/* Fit to image size: whole image at its own proportions, never upscaled past
   its natural width, centered. No forced banner ratio. */
.site-hero-media-natural {
    width: auto;
    max-width: 100%;
    height: auto;
    aspect-ratio: auto;
    object-fit: initial;
    margin-inline: auto;
}

/* Stretch to fill: keep the wide banner box but distort to fill it. */
.site-hero-media-fill {
    object-fit: fill;
}

.site-hero-text { padding: 0; }

.site-hero h1 {
    font-size: clamp(2rem, 7vw, 3.25rem);
    margin-bottom: 0.35em;
}

.site-hero-sub {
    color: var(--site-muted);
    font-size: clamp(1.05rem, 3vw, 1.3rem);
    line-height: 1.5;
    max-width: 36ch;
    margin: 0 auto 1.4em auto;
}

/* ── buttons ─────────────────────────────────────────────────────── */
.site-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55em;
    padding: 0.85em 1.9em;
    border-radius: var(--site-radius, 18px);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.02rem;
    min-height: 52px;
    line-height: 1.2;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
    cursor: pointer;
}

.site-btn:hover { transform: translateY(-2px); }
.site-btn:active { transform: translateY(0); }

.site-btn-primary {
    background: var(--site-brand, #4D61FE);
    color: var(--site-on-brand, #fff);
    box-shadow: 0 10px 26px color-mix(in srgb, var(--site-brand) 32%, transparent);
}

.site-btn-primary:hover {
    box-shadow: 0 14px 32px color-mix(in srgb, var(--site-brand) 42%, transparent);
}

/* ── link buttons (group: stacked column or inline row) ──────────── */
.site-link-buttons { display: flex; gap: clamp(0.6rem, 2vw, 0.9rem); }

.site-link-buttons.site-lb-column { flex-direction: column; }

.site-link-buttons.site-lb-row {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
}

.site-lb-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1em;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.2;
    padding: 1em 1.5em;
    min-height: 56px;
    border-radius: var(--site-radius, 18px);
    border: 1px solid transparent;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, filter 0.18s ease;
}

.site-lb-btn:hover { transform: translateY(-2px); }
.site-lb-btn:active { transform: translateY(0) scale(0.985); }

/* stacked = full width; row = auto width with icon inline */
.site-lb-column .site-lb-btn { width: 100%; }
.site-lb-row .site-lb-btn { flex: 0 1 auto; flex-direction: row; gap: 0.5em; }

.site-lb-btn > i { font-size: 1.2em; }

.site-lb-label { font-size: 1.05rem; }
.site-lb-sub { font-weight: 400; font-size: 0.85rem; }

/* soft (surface) variant */
.site-lb-soft {
    background: var(--site-surface-strong, #fff);
    border-color: var(--site-border);
    box-shadow: var(--site-shadow);
    color: var(--site-text);
}
.site-lb-soft:hover {
    border-color: color-mix(in srgb, var(--site-brand) 55%, var(--site-border));
    box-shadow: 0 18px 38px rgba(0,0,0,0.12);
}
.site-lb-soft > i { color: var(--site-brand); }
.site-lb-soft .site-lb-sub { color: var(--site-muted); }

/* solid (brand) variant — for the one CTA you want to pop */
.site-lb-solid {
    background: var(--site-brand, #4D61FE);
    color: var(--site-on-brand, #fff);
    box-shadow: 0 10px 26px color-mix(in srgb, var(--site-brand) 32%, transparent);
}
.site-lb-solid:hover {
    box-shadow: 0 14px 32px color-mix(in srgb, var(--site-brand) 42%, transparent);
    filter: brightness(1.04);
}
.site-lb-solid .site-lb-sub { color: rgba(255,255,255,0.85); }

/* ── rich text: styled like an article, not a blob ───────────────── */
.site-rich-text {
    max-width: var(--site-content, 1024px);
    margin: 0 auto;
}

.site-rich-text > :first-child { margin-top: 0; }
.site-rich-text > :last-child { margin-bottom: 0; }
.site-rich-text h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); margin: 1.2em 0 0.4em; }
.site-rich-text h2 { font-size: clamp(1.4rem, 4vw, 1.8rem); margin: 1.2em 0 0.4em; }
.site-rich-text h3 { font-size: 1.25rem; margin: 1.1em 0 0.35em; }
.site-rich-text ul, .site-rich-text ol { padding-left: 1.3em; margin: 0 0 1em; }
.site-rich-text li { margin-bottom: 0.35em; }
.site-rich-text blockquote {
    margin: 1.2em 0;
    padding: 0.4em 0 0.4em 1.1em;
    border-left: 3px solid var(--site-brand);
    color: var(--site-muted);
    font-style: italic;
}
.site-rich-text img {
    height: auto;
    border-radius: var(--site-radius-surface, 16px);
    box-shadow: var(--site-shadow);
    margin: 0.5em 0;
}
.site-rich-text hr { border: none; border-top: 1px solid var(--site-border); margin: 1.6em 0; }
.site-rich-text a {
    color: var(--site-brand);
    text-decoration: none;
    background-image: linear-gradient(currentColor, currentColor);
    background-size: 0% 1.5px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.25s ease;
}
.site-rich-text a:hover { background-size: 100% 1.5px; }

/* ── gallery ─────────────────────────────────────────────────────── */
.site-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: clamp(0.6rem, 2vw, 1rem);
}

.site-gallery-cell { margin: 0; }

.site-gallery-cell img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: var(--site-radius-surface, 16px);
    display: block;
    box-shadow: var(--site-shadow);
    transition: transform 0.25s ease;
    cursor: zoom-in;
}

.site-gallery-cell img:hover { transform: scale(1.02); }

.site-caption {
    color: var(--site-muted);
    font-size: 0.85em;
    margin-top: 0.4em;
    text-align: center;
}

/* ── gallery: carousel variant ───────────────────────────────────── */
/* Fail-open: a horizontal scroll-snap strip even before siteHost.js runs,
   so every image is reachable without JS. */
.site-carousel {
    display: block;
    position: relative;
}

/* the viewport is the flex scroller; the track collapses with
   display:contents so the cells are the viewport's own flex children —
   the canonical single-element scroll-snap carousel (a width-constrained
   inner track never grows to scroll). Native scroll keeps touch-swipe. */
.site-carousel-viewport {
    display: flex;
    gap: clamp(0.6rem, 2vw, 1rem);
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: var(--site-radius-surface, 16px);
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.site-carousel-viewport::-webkit-scrollbar { display: none; }

.site-carousel-track { display: contents; }

.site-carousel .site-gallery-cell {
    flex: 0 0 100%;
    scroll-snap-align: start;
    min-width: 0;
}

.site-carousel .site-gallery-cell img {
    aspect-ratio: 16 / 10;
    cursor: default;
}

.site-carousel .site-gallery-cell img:hover { transform: none; }

.site-carousel-nav {
    position: absolute;
    top: calc(50% - 1.4em);
    transform: translateY(-50%);
    width: 2.8em;
    height: 2.8em;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    color: #14161c;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease;
    z-index: 2;
}

.site-carousel-nav:hover { transform: translateY(-50%) scale(1.08); }
.site-carousel-prev { left: 0.6em; }
.site-carousel-next { right: 0.6em; }

/* only meaningful once JS can move slides — hidden in the fail-open state */
.site-carousel:not(.is-ready) .site-carousel-nav { display: none; }
.site-carousel-nav[disabled] { opacity: 0.35; cursor: default; pointer-events: none; }

.site-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.45em;
    margin-top: 0.8em;
}

.site-carousel:not(.is-ready) .site-carousel-dots { display: none; }

.site-carousel-dot {
    width: 0.5em;
    height: 0.5em;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: var(--site-muted);
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.site-carousel-dot.is-active {
    opacity: 1;
    background: var(--site-brand, #4D61FE);
    transform: scale(1.25);
}

/* ── video ───────────────────────────────────────────────────────── */
.site-video { margin: 0; }

.site-video-frame, .site-video-file {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: var(--site-radius-surface-lg, 22px);
    display: block;
    background: #000;
    box-shadow: var(--site-shadow);
}

.site-video .site-caption { margin-top: 0.6em; }

/* ── faq ─────────────────────────────────────────────────────────── */
.site-faq {
    max-width: var(--site-content, 1024px);
    margin: 0 auto;
    width: 100%;
}

.site-faq-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    text-align: center;
    margin-bottom: 0.8em;
}

.site-faq-item {
    border-bottom: 1px solid var(--site-border);
    padding: 0.3em 0;
}

.site-faq-item summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    min-height: 56px;
    padding: 0.2em 0;
}

.site-faq-item summary::-webkit-details-marker { display: none; }

.site-faq-item summary::after {
    content: '+';
    font-size: 1.5em;
    font-weight: 300;
    color: var(--site-brand);
    transition: transform 0.25s ease;
    flex: 0 0 auto;
}

.site-faq-item[open] summary::after { transform: rotate(45deg); }

.site-faq-answer { color: var(--site-muted); padding: 0 0 0.9em 0; }

/* JS-driven expand/collapse — inline height/opacity set by siteHost.js */
.site-faq-answer.site-faq-animating {
    overflow: hidden;
    transition: height 0.32s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.26s ease,
                padding-bottom 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── embed ───────────────────────────────────────────────────────── */
.site-embed iframe {
    width: 100%;
    border: none;
    display: block;
    border-radius: var(--site-radius-surface-lg, 22px);
    box-shadow: var(--site-shadow);
    background: var(--site-surface);
}

/* ── contact form ────────────────────────────────────────────────── */
.site-contact {
    max-width: var(--site-content, 1024px);
    margin: 0 auto;
    width: 100%;
}

.site-contact-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    text-align: center;
    margin-bottom: 0.3em;
}

.site-contact-desc {
    text-align: center;
    color: var(--site-muted);
    margin-bottom: 1.4em;
}

.site-contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.85em;
    background: var(--site-surface-strong, #fff);
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius-surface-lg, 22px);
    box-shadow: var(--site-shadow);
    padding: clamp(1.1rem, 4vw, 1.8rem);
}

.site-contact-field {
    display: flex;
    flex-direction: column;
    gap: 0.35em;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--site-text);
}

.site-contact-field input,
.site-contact-field textarea {
    font: inherit;
    font-weight: 400;
    color: var(--site-text);
    background: var(--site-surface, #fff);
    border: 1px solid var(--site-border);
    border-radius: var(--site-radius-surface, 14px);
    padding: 0.7em 0.85em;
    width: 100%;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.site-contact-field textarea { resize: vertical; min-height: 6em; }

.site-contact-field input:focus,
.site-contact-field textarea:focus {
    outline: none;
    border-color: var(--site-brand, #4D61FE);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--site-brand) 22%, transparent);
}

/* honeypot — visually gone, still in the DOM for bots to trip over */
.site-contact-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.site-contact-submit { margin-top: 0.3em; width: 100%; }
.site-contact-submit.is-loading { opacity: 0.7; cursor: progress; }

.site-contact-status {
    margin: 0;
    font-size: 0.9rem;
    text-align: center;
    color: var(--site-muted);
}
.site-contact-status.is-error { color: #e0567a; }

.site-contact-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.4em;
    padding: 1.4em 1em;
    color: var(--site-text);
}

/* author display rules override the UA [hidden] rule — restore it explicitly */
.site-contact-success[hidden],
.site-contact-status[hidden] { display: none; }

.site-contact-success i {
    font-size: 2.6rem;
    color: var(--site-brand, #4D61FE);
}

.site-contact-success p { margin: 0; font-size: 1.05rem; }

/* legibility over a background image/gradient */
.site-has-bg.site-text-light .site-contact-title { text-shadow: 0 1px 16px rgba(0,0,0,0.35); }

/* ── chatbot ─────────────────────────────────────────────────────── */
.site-chatbot {
    border-radius: var(--site-radius-surface-lg, 22px);
    overflow: hidden;
    box-shadow: var(--site-shadow);
    border: 1px solid var(--site-border);
    background: var(--site-surface-strong);
}

.site-chatbot #siteChatContainer {
    height: clamp(440px, 64vh, 680px);
    width: 100%;
}

/* ── footer ──────────────────────────────────────────────────────── */
.site-footer { text-align: center; padding: clamp(2rem, 6vw, 3.5rem) 1.25rem 2.5rem; }

.site-footer a {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    color: var(--site-muted);
    font-size: 0.8rem;
    text-decoration: none;
    padding: 0.4em 0.9em;
    border: 1px solid var(--site-border);
    border-radius: 999px;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.site-footer a:hover { color: var(--site-text); border-color: var(--site-brand); }

/* ── over-background legibility ──────────────────────────────────── */
/* open text blocks (no surface of their own) get a soft shadow only when
   light text sits over a custom background — guarantees readability. */
.site-has-bg.site-text-light .site-header,
.site-has-bg.site-text-light .site-hero h1,
.site-has-bg.site-text-light .site-hero-sub,
.site-has-bg.site-text-light .site-rich-text,
.site-has-bg.site-text-light .site-faq-title {
    text-shadow: 0 1px 16px rgba(0, 0, 0, 0.45);
}

/* ── share QR (top-right glass button + sheet) ───────────────────── */
.site-share-btn {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 60;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--site-border);
    background: color-mix(in srgb, var(--site-bg) 55%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--site-text);
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--site-shadow);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.site-share-btn:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--site-brand) 55%, var(--site-border));
}

/* when a header menu exists, the share button lives in the bar (not floating)
   so it never overlaps the nav/hamburger */
.site-header-nav .site-share-btn {
    position: static;
    top: auto;
    right: auto;
    z-index: auto;
    width: 2.6em;
    height: 2.6em;
    font-size: 1.1rem;
    box-shadow: none;
    flex: 0 0 auto;
}
.site-header-nav .site-share-btn:hover { transform: translateY(-1px); }

.site-share-sheet {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(8, 10, 16, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.site-share-sheet[hidden] { display: none; }

.site-share-card {
    background: #ffffff;
    color: #14161c;
    border-radius: 22px;
    padding: 1.75rem 1.75rem 1.4rem;
    width: min(92vw, 340px);
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

@media (prefers-reduced-motion: no-preference) {
    .site-share-card {
        animation: site-share-pop 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    @keyframes site-share-pop {
        from { opacity: 0; transform: translateY(14px) scale(0.96); }
        to   { opacity: 1; transform: none; }
    }
}

/* the QR itself always sits dark-on-white so it scans on any theme */
.site-share-qr {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    min-height: 200px;
}

.site-share-qr img, .site-share-qr canvas {
    border-radius: 12px;
}

.site-share-title {
    font-family: var(--site-heading-font, 'Poppins', system-ui, sans-serif);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.15rem;
}

.site-share-url {
    color: #646b78;
    font-size: 0.8rem;
    margin-bottom: 1.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-share-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
}

.site-share-actions button {
    border: none;
    border-radius: 999px;
    padding: 0.6em 1.3em;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.site-share-actions button:hover { transform: translateY(-1px); filter: brightness(1.05); }

.site-share-copy {
    background: var(--site-brand, #4D61FE);
    color: #fff;
}

.site-share-done {
    background: rgba(20, 22, 28, 0.07);
    color: #14161c;
}

/* ── lightbox (siteHost.js) ──────────────────────────────────────── */
.site-lightbox { backdrop-filter: blur(4px); }

@media (prefers-reduced-motion: reduce) {
    html, .site-carousel-viewport { scroll-behavior: auto !important; }
    .site-main > *, .site-gallery-cell img, .site-btn, .site-btn-link, .site-lb-btn,
    .site-faq-answer, .site-rich-text a {
        animation: none !important;
        transition: none !important;
    }
}
