/* hero-overrides.css
   Extracted from inline <style> block in index.html to enable strict
   Content-Security-Policy (style-src 'self' without 'unsafe-inline').
   Contains hero-specific overrides + mobile burger overlay rules. */

/* ---- Hero (minimal-style) ---- */
.hero {
    position: relative;
    padding: 110px 0 50px;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 100vh;
    background: oklch(0.985 0.005 80);
}

.hero .container {
    max-width: 1280px;
}

.hero__video-wrap {
    position: absolute;
    right: -2%;
    top: 0;
    width: 54%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
}

.hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    opacity: 0.95;
    filter: contrast(1.05) saturate(1.05);
    mix-blend-mode: multiply;
}

.hero__inner {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 56px;
    width: 100%;
}

.hero__title {
    font-size: clamp(64px, 6.4vw, 110px);
    font-family: 'Instrument Serif', 'Times New Roman', serif;
    font-weight: 400;
    letter-spacing: -0.04em;
    line-height: 0.92;
    color: oklch(0.18 0.018 290);
    max-width: 56%;
    margin: 0 0 0 -75px;
}

.hero__title em {
    font-style: italic;
    background: linear-gradient(120deg,
            oklch(0.50 0.20 295) 0%,
            oklch(0.55 0.18 320) 50%,
            oklch(0.60 0.18 35) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    padding-right: 0.12em;
    margin-right: -0.06em;
}

.hero__bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    max-width: 48%;
}

.hero__sub {
    font-size: 19px;
    line-height: 1.5;
    color: oklch(0.30 0.020 290);
    max-width: 480px;
}

.hero__cta-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
}

.hero__cta-row {
    display: flex;
    gap: 10px;
}

.hero__cta-note {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: oklch(0.62 0.018 290);
    text-align: center;
}

.hero__scroll {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: oklch(0.62 0.018 290);
    z-index: 3;
}

.hero__scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, transparent, oklch(0.48 0.020 290));
    animation: heromix-line 2.5s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

@keyframes heromix-line {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    51% {
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

@media (max-width: 760px) {
    .hero__bottom {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        max-width: 100%;
        align-items: center;
    }

    .hero__sub {
        max-width: 100%;
        margin: 0 auto;
    }

    .hero__cta-stack {
        align-items: center;
        width: 100%;
        margin-top: 20px;
    }

    .hero__cta-row {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .hero__cta-row .btn {
        width: 100%;
        justify-content: center;
    }

    .hero__video-wrap {
        width: 105%;
        right: -25%;
        top: -27%;
        opacity: 0.72;
    }

    .hero__top {
        display: none !important;
    }

    .hero {
        padding-bottom: 70px;
    }

    .hero__title {
        margin: 0;
        max-width: 100%;
        text-align: left;
    }

    .hero__scroll {
        bottom: 18px;
    }

    .hero__scroll-line {
        height: 28px;
    }
}

/* Override original .container ONLY inside the hero so the layout is   */
/* identical to minimal (1280px instead of 1120px, padding 32px).       */
.hero .container {
    max-width: 1280px;
    padding: 0 32px;
}

.hero__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
    min-height: 34px;
}

/* ---- Ticker banner (minimal) ---- */
.ticker {
    border-top: 1px solid oklch(0.88 0.012 80);
    border-bottom: 1px solid oklch(0.88 0.012 80);
    padding: 22px 0;
    background: oklch(0.965 0.008 80);
    overflow: hidden;
}

.ticker__track {
    display: flex;
    gap: 72px;
    padding-right: 72px;
    animation: heromix-scroll 40s linear infinite;
    width: max-content;
}

@media (min-width: 761px) and (max-width: 1366px) {
    .hero__title {
        font-size: clamp(64px, 5.8vw, 80px);
        max-width: 56%;
        margin-left: -75px;
    }

    .hero__video-wrap {
        right: -2%;
        width: 54%;
    }
}

.ticker__item {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: 'Instrument Serif', 'Times New Roman', serif;
    font-size: 28px;
    color: oklch(0.30 0.020 290);
    white-space: nowrap;
}

.ticker__item em {
    font-style: italic;
    color: oklch(0.50 0.18 295);
}

.ticker__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: oklch(0.50 0.18 295);
    flex-shrink: 0;
}

@keyframes heromix-scroll {
    to {
        transform: translateX(-50%);
    }
}

/* ---- Reveal-on-scroll for hero (minimal-style) ---- */
@media (prefers-reduced-motion: no-preference) {
    .hero [data-reveal] {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
            transform 1s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .hero [data-reveal].is-revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Pricing cards — equal height, button aligned at bottom ---- */
.pricing-grid {
    align-items: stretch;
}

.pricing-card {
    display: flex;
    flex-direction: column;
}

.pricing-features {
    flex: 1;
}

/* ---- 3D carousel — slightly more spacing on mobile only ---- */
@media (max-width: 480px) {
    .carousel-3d-arm {
        transform: rotateY(var(--angle)) translateZ(300px);
    }
}

/* ---- Stats bar fixes for mobile (no overflow, no shifting) ---- */
@media (max-width: 768px) {
    .stats-bar { padding: 0; }
    .stat-item {
        min-width: 0;
        padding: 1.5rem 1rem;
        gap: 0.25rem;
        overflow: hidden;
    }
    .stat-number {
        font-size: clamp(1.5rem, 6vw, 2rem);
        font-variant-numeric: tabular-nums;
    }
    .stat-suffix {
        font-size: clamp(1rem, 4vw, 1.5rem);
    }
    .stat-label {
        font-size: 0.75rem;
        line-height: 1.3;
    }
}
@media (max-width: 480px) {
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
    .stat-item {
        padding: 1.25rem 0.75rem;
    }
    .stat-item:nth-child(2) { border-right: none; }
    .stat-item:nth-child(1),
    .stat-item:nth-child(2) {
        border-bottom: 1px solid var(--border);
    }
}

/* ---- Carousel — hide side arrows on mobile, viewport takes full width ---- */
@media (max-width: 768px) {
    .carousel .carousel-arrow { display: none; }
    .carousel {
        grid-template-columns: minmax(0, 1fr);
    }
    .carousel-viewport {
        grid-column: 1;
    }
    .carousel-slide { padding: 0; }
}

/* ---- Navbar — only transition specific props to avoid sub-pixel jitter ---- */
.navbar {
    transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease !important;
}

/* ---- Hamburger button reset — fix top line looking thinner ---- */
.nav-hamburger {
    background: transparent;
    border: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    line-height: 0;
    transform: translateZ(0);
}
.nav-hamburger span {
    display: block !important;
    width: 24px !important;
    height: 3px !important;
    background: oklch(0.18 0.018 290) !important;
    border-radius: 2px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    flex-shrink: 0 !important;
    opacity: 1 !important;
    backface-visibility: hidden;
    transform-origin: center;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.2s ease !important;
}
/* Re-calibrated X for 24×3 spans with 5px gap (8px offset to center) */
.nav-hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg) !important;
}
.nav-hamburger.active span:nth-child(2) {
    opacity: 0 !important;
}
.nav-hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg) !important;
}

/* ---- Connexion + Inscription move into burger menu on mobile ---- */
.nav-link--cta,
.nav-link--login { display: none; }

@media (max-width: 768px) {
    .nav-actions { display: none; }

    /* Stacking — hamburger + logo above the overlay */
    .navbar { z-index: 1100; }

    /* On mobile, force fully opaque navbar when scrolled so the colored
       footer logo never bleeds through behind the colored navbar logo.
       iOS Safari backdrop-filter is unreliable — solid bg is safer. */
    .navbar.scrolled {
        background: oklch(0.985 0.005 80) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    .nav-container { position: relative; }
    .nav-logo,
    .nav-hamburger {
        position: relative;
        z-index: 1102;
    }

    /* ------------------------------------------------------------
       Burger overlay — GPU-composited slide-down.
       Why transform (not opacity):
         · One compositor-only animation, no per-frame repaint of
           the cream background → smooth on iOS Safari even after
           scroll triggers a navbar backdrop-filter recomposite.
         · Open and close share the exact same curve + duration.
         · No partial-transparent state where styles.css's stale
           "position:absolute; top:100%" rule could leak through.

       The overlay is ALWAYS in the DOM, ALWAYS full-screen fixed —
       only `transform` and `visibility` toggle. `visibility` is
       delayed on close so the slide-out finishes before the
       element becomes inert.

       `!important` defeats styles.css `.nav-links.open` defaults.
       ------------------------------------------------------------ */
    .nav-links {
        display: flex !important;
        position: fixed !important;
        inset: 0 !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 0.5rem !important;
        padding: 0 2rem !important;
        background: oklch(0.985 0.005 80) !important;
        border: none !important;
        box-shadow: none !important;
        z-index: 1101;

        transform: translate3d(0, -100%, 0);
        visibility: hidden;
        overscroll-behavior: contain;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        will-change: transform;
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                    visibility 0s linear 0.28s;
    }

    .nav-links.open {
        transform: translate3d(0, 0, 0);
        visibility: visible;
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                    visibility 0s linear 0s;
    }

    /* Soft aurora glow behind the menu — matches hero */
    .nav-links::before {
        content: '';
        position: absolute;
        inset: -10%;
        background:
            radial-gradient(ellipse 50% 40% at 30% 30%, oklch(0.78 0.18 295 / 0.18) 0%, transparent 60%),
            radial-gradient(ellipse 45% 35% at 75% 70%, oklch(0.85 0.14 60 / 0.14) 0%, transparent 60%);
        filter: blur(60px);
        pointer-events: none;
    }

    .nav-links .nav-link {
        position: relative;
        z-index: 1;
        font-size: 1.5rem;
        font-weight: 500;
        padding: 0.6rem 0;
        color: oklch(0.18 0.018 290);
    }

    .nav-link--login,
    .nav-link--cta {
        display: inline-flex !important;
        justify-content: center;
        margin-top: 1.25rem;
        font-size: 1rem !important;
        padding: 0.85rem 2.5rem !important;
    }

    /* Neutralize navbar's scrolled state while the overlay is up
       so the cream reads clean (no blur or shadow bleed). */
    body.menu-open .navbar,
    body.menu-open .navbar.scrolled {
        background: transparent !important;
        box-shadow: none !important;
        border-bottom: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}
