/**
 * Websly — Cinematic Quote Split hero (layout variant: cinematic-quote-split)
 *
 * Light-mode, conversion-focused, *cinematic editorial* hero. A full-bleed
 * looping video sits behind a rich directional scrim (with a brand-red bloom)
 * so the left content + the right glass quote-form card stay legible. Brand
 * colour comes entirely from semantic tokens — no hard-coded brand colour.
 *
 * Motion: kinetic blur-up entrance + count-up stats + pin/parallax scroll-out
 * are driven by assets/js/websly-main.js. A slow Ken-Burns drift on the video
 * is pure CSS. Everything is disabled under prefers-reduced-motion.
 */

/* ------------------------------------------------------------------ *
 * 1. Rich directional scrim over the full-bleed video
 * ------------------------------------------------------------------ */
.ws-hero-cinematic-scrim {
    background:
        /* warm brand-red bloom, top-right */
        radial-gradient(135% 100% at 100% 0%,
            color-mix(in srgb, var(--theme-accent) 18%, transparent) 0%,
            transparent 52%),
        /* soft light pool behind the headline (upper-left) for depth */
        radial-gradient(70% 80% at 8% 30%,
            rgba(var(--page-bg-base-rgb, 255, 246, 246), 0.75) 0%,
            transparent 60%),
        /* horizontal wash: opaque content side, clearing toward the video */
        linear-gradient(100deg,
            rgba(var(--page-bg-base-rgb, 255, 246, 246), 0.98) 0%,
            rgba(var(--page-bg-base-rgb, 255, 246, 246), 0.92) 28%,
            rgba(var(--page-bg-base-rgb, 255, 246, 246), 0.60) 48%,
            rgba(var(--page-bg-base-rgb, 255, 246, 246), 0.18) 70%,
            rgba(var(--page-bg-base-rgb, 255, 246, 246), 0.02) 100%),
        /* vertical wash: blend into the page top + bottom */
        linear-gradient(to bottom,
            rgba(var(--page-bg-base-rgb, 255, 246, 246), 0.40) 0%,
            rgba(var(--page-bg-base-rgb, 255, 246, 246), 0) 20%,
            rgba(var(--page-bg-base-rgb, 255, 246, 246), 0) 68%,
            rgba(var(--page-bg-base-rgb, 255, 246, 246), 0.96) 100%);
}

/* ------------------------------------------------------------------ *
 * 2. Layout container + media drift + parallax hooks
 * ------------------------------------------------------------------ */
.ws-hero-cinematic { position: relative; width: 100%; }

[data-layout="cinematic-quote-split"] .hero-bg-wrapper { will-change: transform; }
[data-layout="cinematic-quote-split"] [data-ws-cine-content] { will-change: transform, opacity; }

/* Slow Ken-Burns drift on the footage for cinematic life */
@media (prefers-reduced-motion: no-preference) {
    [data-layout="cinematic-quote-split"] .hero-bg-wrapper video,
    [data-layout="cinematic-quote-split"] .hero-bg-wrapper img {
        animation: wsCineKenBurns 26s ease-in-out infinite alternate;
        transform-origin: 60% 40%;
    }
}
@keyframes wsCineKenBurns {
    from { transform: scale(1.03); }
    to   { transform: scale(1.13) translate3d(-1.5%, -1.2%, 0); }
}

/* Headline — editorial + dramatic but sized to keep the split balanced and the
   CTA/stats near the fold (the bespoke hero scale would wrap to 4+ lines here). */
.ws-hero-cinematic__content .ws-h1 {
    font-size: clamp(2.4rem, 3.8vw, 3.7rem);
    letter-spacing: -0.02em;
    line-height: 1.04;
}
.ws-hero-cinematic__content h1 { margin-bottom: clamp(0.85rem, 1.6vw, 1.35rem) !important; }
.ws-hero-cinematic__content .ws-section-desc { font-size: clamp(1rem, 1.15vw, 1.15rem); }

/* ------------------------------------------------------------------ *
 * 3. Count-up stats row
 * ------------------------------------------------------------------ */
.ws-hero-cinematic__stats {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: clamp(20px, 3vw, 44px);
    margin: clamp(14px, 2vw, 24px) 0 2px;
}
.ws-hero-cinematic__stat {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-right: clamp(20px, 3vw, 44px);
}
.ws-hero-cinematic__stat:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 8%;
    bottom: 8%;
    width: 1px;
    background: color-mix(in srgb, var(--theme-text, #450a0a) 16%, transparent);
}
.ws-hero-cinematic__stat:last-child { padding-right: 0; }
.ws-hero-cinematic__stat-value {
    font-size: clamp(1.9rem, 3vw, 2.75rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--theme-accent);
    font-variant-numeric: tabular-nums;
}
.ws-hero-cinematic__stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: color-mix(in srgb, var(--theme-text, #450a0a) 66%, transparent);
}

/* ------------------------------------------------------------------ *
 * 4. Trust chips
 * ------------------------------------------------------------------ */
.ws-hero-cinematic__trust { margin: clamp(12px, 1.6vw, 18px) 0 2px; }
.ws-hero-cinematic__trust .ws-hero-trust-badges { gap: 10px; margin-top: 0; }
.ws-hero-cinematic__trust .ws-hero-trust-badge {
    padding: 7px 14px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--page-bg-base, #fff) 70%, transparent);
    border: 1px solid color-mix(in srgb, var(--theme-text, #450a0a) 12%, transparent);
    backdrop-filter: blur(6px);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--theme-text, #450a0a);
    box-shadow: 0 6px 16px -12px rgba(0, 0, 0, 0.4);
}
.ws-hero-cinematic__trust .ws-hero-trust-badge__icon { color: var(--theme-accent); }

/* ------------------------------------------------------------------ *
 * 5. Premium glass quote-form card
 * ------------------------------------------------------------------ */
.ws-hero-cinematic__form-card {
    position: relative;
    background: color-mix(in srgb, var(--page-bg-base, #fff) 82%, transparent);
    border: 1px solid color-mix(in srgb, #fff 55%, transparent);
    border-radius: 1.85rem;
    padding: clamp(1.3rem, 1.8vw, 2rem);
    backdrop-filter: blur(22px) saturate(1.15);
    -webkit-backdrop-filter: blur(22px) saturate(1.15);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 30px 70px -32px color-mix(in srgb, var(--theme-accent) 45%, rgba(0, 0, 0, 0.6)),
        0 10px 30px -18px rgba(0, 0, 0, 0.28);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}
.ws-hero-cinematic__form-card:focus-within {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 0 0 2px color-mix(in srgb, var(--theme-accent) 35%, transparent),
        0 34px 76px -30px color-mix(in srgb, var(--theme-accent) 50%, rgba(0, 0, 0, 0.6));
}
.ws-hero-cinematic__form-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.1rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--theme-text, #450a0a);
}
.ws-hero-cinematic__form-header::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--theme-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--theme-accent) 22%, transparent);
    animation: wsCinePulse 2.4s ease-in-out infinite;
}
@keyframes wsCinePulse {
    0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--theme-accent) 22%, transparent); }
    50%      { box-shadow: 0 0 0 7px color-mix(in srgb, var(--theme-accent) 6%, transparent); }
}
/* Tighter vertical rhythm so the full form sits comfortably in the hero */
.ws-hero-cinematic__form-card .ws-contact-form.space-y-4 > * + * { margin-top: 0.7rem; }

/* Light inputs with a red focus ring */
.ws-hero-cinematic__form-card .ws-contact-form input,
.ws-hero-cinematic__form-card .ws-contact-form textarea,
.ws-hero-cinematic__form-card .ws-contact-form select {
    background: color-mix(in srgb, var(--theme-accent) 3%, #fff);
    border: 1px solid color-mix(in srgb, var(--theme-text, #450a0a) 16%, transparent);
    color: var(--theme-text, #450a0a);
}
.ws-hero-cinematic__form-card .ws-contact-form input::placeholder,
.ws-hero-cinematic__form-card .ws-contact-form textarea::placeholder {
    color: color-mix(in srgb, var(--theme-text, #450a0a) 50%, transparent);
}
.ws-hero-cinematic__form-card .ws-contact-form input:focus,
.ws-hero-cinematic__form-card .ws-contact-form textarea:focus,
.ws-hero-cinematic__form-card .ws-contact-form select:focus {
    border-color: var(--theme-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent) 22%, transparent);
}
.ws-hero-cinematic__form-card .ws-contact-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23B91C1C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Submit CTA — filled accent (shared .ws-btn-primary has no fill rule) */
.ws-hero-cinematic__form-card .ws-contact-form button[type="submit"] {
    background: var(--theme-accent);
    color: var(--text-on-accent, #fff);
    border: 0;
    box-shadow: 0 12px 26px -12px color-mix(in srgb, var(--theme-accent) 75%, transparent);
}
.ws-hero-cinematic__form-card .ws-contact-form button[type="submit"]:hover {
    background: color-mix(in srgb, var(--theme-accent) 86%, #000);
    transform: translateY(-1px);
}
.ws-hero-cinematic__form-card .ws-contact-form button[type="submit"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent) 30%, transparent);
}
/* Success / status reveal */
.ws-hero-cinematic__form-card .form-status:not(.hidden) {
    animation: wsCineStatusIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes wsCineStatusIn {
    from { opacity: 0; transform: translateY(6px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------ *
 * 6. Phone / Email sliding-pill toggle
 * ------------------------------------------------------------------ */
.ws-contact-toggle-field { display: flex; flex-direction: column; gap: 8px; }
.ws-contact-toggle {
    position: relative;
    align-self: flex-end;
    display: inline-flex;
    padding: 3px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--theme-text, #450a0a) 8%, transparent);
}
.ws-contact-toggle__rail {
    display: block;
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(50% - 3px);
    border-radius: 999px;
    background: var(--page-bg-base, #fff);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.ws-contact-toggle[data-active="email"] .ws-contact-toggle__rail { transform: translateX(100%); }
.ws-contact-toggle__opt {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 66px;
    text-align: center;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 5px 16px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    border-radius: 999px;
    color: color-mix(in srgb, var(--theme-text, #450a0a) 60%, transparent);
    transition: color 0.2s ease;
}
.ws-contact-toggle__opt:hover { color: var(--theme-accent); }
.ws-contact-toggle__opt.is-active { color: var(--theme-accent); }
.ws-is-hidden { display: none !important; }

/* ------------------------------------------------------------------ *
 * 7. Project thumbnail strip
 * ------------------------------------------------------------------ */
.ws-hero-cinematic__strip {
    margin-top: clamp(30px, 4vw, 58px);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ws-hero-cinematic__strip-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--theme-text, #450a0a) 60%, transparent);
}
.ws-hero-cinematic__strip-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}
.ws-hero-cinematic__strip-track::-webkit-scrollbar { display: none; }
.ws-hero-cinematic__thumb {
    flex: 0 0 auto;
    width: clamp(124px, 18vw, 208px);
    aspect-ratio: 4 / 3;
    margin: 0;
    border-radius: var(--ws-img-radius-global, 16px);
    overflow: hidden;
    scroll-snap-align: start;
    box-shadow: 0 16px 36px -22px rgba(0, 0, 0, 0.62);
    border: 1px solid color-mix(in srgb, var(--theme-text, #450a0a) 8%, transparent);
}
.ws-hero-cinematic__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.ws-hero-cinematic__thumb:hover img { transform: scale(1.06); }

/* ------------------------------------------------------------------ *
 * 8. Responsive
 * ------------------------------------------------------------------ */
@media (max-width: 1023px) {
    .ws-hero-cinematic__form-card { margin-top: 0.5rem; }
    .ws-contact-toggle { align-self: flex-start; }
}
@media (max-width: 768px) {
    .ws-hero-cinematic-scrim {
        background:
            radial-gradient(120% 60% at 100% 0%, color-mix(in srgb, var(--theme-accent) 16%, transparent) 0%, transparent 60%),
            linear-gradient(to bottom,
                rgba(var(--page-bg-base-rgb, 255, 246, 246), 0.95) 0%,
                rgba(var(--page-bg-base-rgb, 255, 246, 246), 0.80) 38%,
                rgba(var(--page-bg-base-rgb, 255, 246, 246), 0.64) 64%,
                rgba(var(--page-bg-base-rgb, 255, 246, 246), 0.97) 100%);
    }
    .ws-hero-cinematic__stats { gap: 18px; }
    .ws-hero-cinematic__stat { padding-right: 18px; }
}

/* ------------------------------------------------------------------ *
 * 9. Reduced motion
 * ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .ws-hero-cinematic__thumb img,
    .ws-hero-cinematic__form-header::before { animation: none; transition: none; }
    [data-layout="cinematic-quote-split"] .hero-bg-wrapper,
    [data-layout="cinematic-quote-split"] [data-ws-cine-content] {
        transform: none !important;
        opacity: 1 !important;
        will-change: auto;
    }
}
