/* ============================================================
   HERO VISUAL
   Constellation: Google SERP centered + 4 social phones
   (TikTok / Instagram / X / YouTube) flanking left/right,
   tilted 3D frame, amber radial halo behind.

   Responsive scaling mirrors the Preview section pattern:
   3 phases via --hero-scale that compresses on mobile and
   grows gently on large screens.
   ============================================================ */

/* ---------- Wrapper + responsive scaling ---------- */


.hero-visual {
    /* ---- STACKED MODE TUNABLES ----
       Frame box now matches actual rendered (post-3D-rotation) bounds,
       so the layout reserves the right amount of space and the text
       below no longer overlaps. */
    --hero-frame-width: 1060px;
    --hero-frame-aspect: 1060 / 791;
    --hero-shift-x: -32px;
    --hero-shift-y: -124px;

    position: relative;
    width: 100%;
    max-width: var(--hero-frame-width);
    margin: 0 auto;
    aspect-ratio: var(--hero-frame-aspect);
    overflow: visible;
    /* --hero-scale and --hero-scale-sxs are computed by JS (inline in <head>
       for first paint, then hero.js on resize) to support Firefox + browsers
       without CSS Values 4 length-division. Values inherit from :root. */
}

.hero-visual__stage {
    position: absolute;
    top: 0;
    left: 50%;
    width: 850px;
    height: 850px;
    transform-origin: top center;
    transform:
        translateX(calc(-50% + var(--hero-shift-x) * var(--hero-scale)))
        translateY(calc(var(--hero-shift-y) * var(--hero-scale)))
        scale(var(--hero-scale));
    perspective: 1400px;
}

/* ---- SIDE-BY-SIDE MODE: anchor visual column out of flex flow ----
   The visual wrapper becomes position: absolute relative to its container,
   so it no longer moves with the flex column or vertical centering.
   Tune these 3 values to position the visual exactly where you want. */
@media (min-width: 1280px) {
    .hero-visual-col {
        --hero-col-top: -20px;     /* distance from top of flex row */
        --hero-col-left: 55%;     /* distance from left of container (% or px) */
        --hero-col-width: 45%;    /* width of the visual zone (% or px) */

        position: absolute;
        top: var(--hero-col-top);
        left: var(--hero-col-left);
        width: var(--hero-col-width);
        max-width: 700px;
        flex: none;
        margin: 0;
    }
}

@media (min-width: 1280px) {
    .hero-visual {
        --hero-frame-width-sxs: 760px;
        --hero-frame-aspect-sxs: 760 / 870;
        /* Shifts are in viewport px, NOT multiplied by scale —
           garantit une position absolue stable quelle que soit
           la taille de la fenêtre. */
        --hero-shift-x-sxs: -104px;
        --hero-shift-y-sxs: -50px;

        max-width: var(--hero-frame-width-sxs);
        aspect-ratio: var(--hero-frame-aspect-sxs);
        margin: 0;
    }
    .hero-visual__stage {
        position: absolute;
        top: 0;
        left: 50%;
        transform-origin: top center;
        transform:
            translateX(calc(-50% + var(--hero-shift-x-sxs)))
            translateY(var(--hero-shift-y-sxs))
            scale(var(--hero-scale-sxs));
    }
}

.hero-visual__tilt {
    position: absolute;
    inset: 0;
    transform: rotateY(-25deg) rotateX(3deg);
    transform-style: preserve-3d;
}

/* ---------- Halo (amber radial glow, pushed back in 3D) ---------- */

.hv-halo {
    position: absolute;
    top: 70%; left: 50%;
    width: 800px; height: 800px;
    border-radius: 50%;
    background: radial-gradient(circle,
        rgba(245,158,11,0.40) 0%,
        rgba(245,158,11,0.15) 30%,
        rgba(0,0,0,0) 65%);
    pointer-events: none;
    transform: translate(-50%, -50%) translateZ(-200px);
}

/* ---------- Phone (shared base, iPhone shape) ---------- */

.hv-phone {
    position: absolute;
    width: 190px;
    height: 400px;
    border-radius: 28px;
    background: #000;
    border: 4px solid #18181b;
    box-shadow:
        0 40px 80px -20px rgba(0,0,0,0.9),
        0 0 0 1px rgba(255,255,255,0.06),
        0 20px 40px -10px rgba(245,158,11,0.32);
    overflow: hidden;
}
.hv-notch {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 60px; height: 14px;
    background: #000;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 50;
}
.hv-screen {
    position: absolute; inset: 0;
    background: #000;
    display: flex; flex-direction: column;
    padding: 22px 0 0;
    overflow: hidden;
}

/* ---------- Phone positions (constellation G layout) ---------- */

.hv-phone--tt {
    bottom: 3%; left: calc(-15% - 60px);
    transform: rotateY(14deg) rotate(-6deg);
    z-index: 5;
}
.hv-phone--ig {
    bottom: 9%; left: calc(-2% - 30px);
    transform: rotateY(8deg) rotate(-2.5deg);
    z-index: 4;
}
.hv-phone--x {
    bottom: 8%; right: calc(-2% + 60px);
    transform: rotateY(-7deg) rotate(2deg);
    z-index: 4;
}
.hv-phone--yt {
    bottom: 3%; right: calc(-15% + 50px);
    transform: rotateY(-13deg) rotate(7deg);
    z-index: 5;
}

/* ---------- Shared phone UI (bar / profile / interface) ---------- */

.hv-bar {
    display: flex; align-items: center; justify-content: center;
    gap: 7px; padding: 10px 0;
    font-size: 23px; font-weight: 800;
    letter-spacing: -0.02em; color: white;
    position: relative;
}
.hv-bar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(245,158,11,0.1), rgba(245,158,11,0.02));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.hv-prof {
    display: flex; flex-direction: column; align-items: center;
    padding: 12px 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: relative;
}
.hv-handle {
    font-size: 28px; font-weight: 800; color: white;
    letter-spacing: -0.04em; line-height: 1;
    margin-bottom: 10px;
    display: inline-block;
    text-shadow:
        0 0 14px rgba(245,158,11,0.7),
        0 0 4px rgba(245,158,11,0.4),
        0 2px 22px rgba(245,158,11,0.3);
}
.hv-handle .at { color: #f59e0b; }
.hv-stats {
    font-size: 8.5px; color: rgba(255,255,255,0.5);
    font-weight: 600; letter-spacing: 0.02em;
}
.hv-stats b { color: white; font-weight: 800; }

.hv-iface {
    flex: 1; min-height: 0; overflow: hidden;
    display: flex; flex-direction: column;
}

/* ---------- Tabs (icon variant TT/IG, text variant X/YT) ---------- */

.hv-tabs--icons {
    display: flex; border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 0 12px; margin-top: 4px; gap: 6px; justify-content: center;
}
.hv-tab--icon {
    padding: 6px 8px 7px;
    color: rgba(255,255,255,0.35);
    display: flex; align-items: center; justify-content: center;
}
.hv-tab--icon.is-on { color: white; box-shadow: inset 0 -2px 0 #f59e0b; }

.hv-tabs--text {
    display: flex; border-bottom: 1px solid rgba(255,255,255,0.06);
    margin-top: 4px;
    justify-content: space-around;
    font-size: 9.5px; font-weight: 600;
}
.hv-tab--text {
    padding: 7px 4px 8px;
    color: rgba(255,255,255,0.45);
    letter-spacing: -0.01em;
}
.hv-tab--text.is-on {
    color: white;
    box-shadow: inset 0 -2px 0 #f59e0b;
    font-weight: 700;
}

/* ---------- TT/IG grid + thumbnails ---------- */

.hv-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1.5px; padding: 1.5px;
}
.hv-thumb {
    position: relative; overflow: hidden;
    background: #0a0a0a;
}
.hv-thumb--tt { aspect-ratio: 9/14; }
.hv-thumb--ig { aspect-ratio: 1/1; }
.hv-thumb-bg { position: absolute; inset: 0; }

.hv-tt-play {
    position: absolute; bottom: 2px; left: 3px;
    font-size: 7px; font-weight: 800; color: white;
    display: flex; align-items: center; gap: 2px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.hv-tt-play svg { width: 7px; height: 7px; }

/* ---------- Instagram highlights + content type icons ---------- */

.hv-highlights {
    display: flex; justify-content: center;
    gap: 9px; padding: 7px 8px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.hv-hl {
    display: flex; flex-direction: column; align-items: center;
    gap: 3px; flex-shrink: 0;
}
.hv-hl-bubble {
    width: 32px; height: 32px;
    border-radius: 50%; padding: 1.5px;
    background: rgba(255,255,255,0.2);
    box-shadow: inset 0 0 0 1.5px #000;
}
.hv-hl-bubble-inner {
    width: 100%; height: 100%;
    border-radius: 50%;
    border: 1.5px solid #000;
}
.hv-hl-bubble-inner--1 { background: linear-gradient(135deg, #6a6a6a 0%, #3a3a3a 100%); }
.hv-hl-bubble-inner--2 { background: linear-gradient(180deg, #707070 0%, #3a3a3a 100%); }
.hv-hl-bubble-inner--3 { background: radial-gradient(circle at 35% 35%, #787878, #383838 75%); }
.hv-hl-bubble-inner--4 { background: linear-gradient(45deg, #4a4a4a 0%, #707070 100%); }
.hv-hl-label {
    font-size: 7.5px; color: rgba(255,255,255,0.65);
    font-weight: 500; text-align: center;
    max-width: 42px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.hv-ig-type {
    position: absolute; top: 3px; right: 3px;
    color: white;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
    display: flex;
}
.hv-ig-type svg { display: block; }

/* ---------- X (Twitter) tweet feed ---------- */

.hv-x-feed { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.hv-tweet {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.hv-tweet-head {
    display: flex; align-items: center; gap: 7px;
    margin-bottom: 5px;
}
.hv-tweet-ava {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1a1a, #000);
    border: 1px solid rgba(245,158,11,0.45);
    flex-shrink: 0;
}
.hv-tweet-meta { font-size: 9.5px; line-height: 1.1; flex: 1; min-width: 0; }
.hv-tweet-name { font-weight: 800; color: white; }
.hv-tweet-time { color: rgba(255,255,255,0.5); margin-left: 3px; font-weight: 500; }
.hv-tweet-text {
    font-size: 9.5px; color: rgba(255,255,255,0.88);
    line-height: 1.35; margin-bottom: 6px;
}
.hv-tweet-engage {
    display: flex; gap: 13px;
    color: rgba(255,255,255,0.5);
    font-size: 8px; font-weight: 600;
}
.hv-tweet-engage span { display: inline-flex; align-items: center; gap: 3px; }
.hv-tweet-engage svg { width: 9px; height: 9px; }

/* ---------- YouTube video feed ---------- */

.hv-yt-feed { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.hv-yt-video {
    display: flex; gap: 8px;
    padding: 7px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.hv-yt-thumb-wrap {
    position: relative;
    width: 78px; aspect-ratio: 16/9;
    border-radius: 4px; overflow: hidden;
    flex-shrink: 0; background: #0a0a0a;
}
.hv-yt-thumb-bg { position: absolute; inset: 0; }
.hv-yt-duration {
    position: absolute; bottom: 2px; right: 2px;
    background: rgba(0,0,0,0.75); color: white;
    font-size: 7px; font-weight: 700;
    padding: 1.5px 3px; border-radius: 2px;
    line-height: 1; letter-spacing: 0.02em;
}
.hv-yt-info {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column;
    justify-content: space-between;
    padding: 1px 0;
}
.hv-yt-title {
    font-size: 9px; font-weight: 700; color: white;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hv-yt-meta {
    font-size: 7.5px; color: rgba(255,255,255,0.55);
    font-weight: 500; margin-top: 3px;
}

/* ============================================================
   SERP (Google search results, MacBook canvas)
   Positioned upper-center, slightly shifted left, pushed back
   in 3D space behind the phones (translateZ -80px).
   ============================================================ */

.hv-laptop {
    position: absolute;
    top: 15%; left: 42%;
    width: 720px;
    /* height: auto — le card colle au contenu, pas de zone vide qui crée
       l'effet "tronqué" / ghost card sous les box-shadows en 3D. */
    border-radius: 12px;
    background: #1a1a1a;
    border: 4px solid #18181b;
    box-shadow:
        0 40px 80px -20px rgba(0,0,0,0.9),
        0 0 0 1px rgba(255,255,255,0.06),
        0 20px 40px -10px rgba(245,158,11,0.32);
    overflow: hidden;
    transform: translate(-50%, 0) translateZ(-80px);
}

.hv-serp {
    display: flex; flex-direction: column;
    background: #1a1a1a;
    color: #e8e8e8;
    font-family: arial, sans-serif;
}
.hv-serp__header {
    display: flex; align-items: center;
    gap: 22px;
    padding: 10px 18px 10px 22px;
    border-bottom: 1px solid #2a2a2a;
}
.hv-serp__logo {
    font-family: "Product Sans", arial, sans-serif;
    font-weight: 700; font-size: 22px;
    letter-spacing: -1px; line-height: 1;
}
.hv-serp__search {
    flex: 1; max-width: 540px;
    background: #262626;
    border: 1px solid #3a3a3a;
    border-radius: 24px;
    padding: 6px 14px;
    display: flex; align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #e8e8e8;
}
.hv-serp__search-text { flex: 1; font-size: 14px; }
.hv-serp__search svg { flex-shrink: 0; }
.hv-serp__tabs {
    display: flex; gap: 22px;
    padding: 0 18px 0 64px;
    font-size: 11px; color: #9a9a9a;
    border-bottom: 1px solid #2a2a2a;
    font-family: arial, sans-serif;
}
.hv-serp__tab {
    padding: 8px 0;
    position: relative;
    display: inline-flex; align-items: center;
    gap: 4px;
    cursor: default;
}
.hv-serp__tab.is-on { color: #e8e8e8; font-weight: 500; }
.hv-serp__tab.is-on::after {
    content: "";
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 2px;
    background: #e8e8e8;
    border-radius: 1px;
}
.hv-serp__results {
    /* No flex:1 / overflow:hidden — content drives height, no clipping. */
    padding: 10px 24px 10px 64px;
}
.hv-serp__meta {
    font-size: 12px;
    color: #9a9a9a;
    margin-bottom: 12px;
}
.hv-serp__result {
    margin-bottom: 13px;
    max-width: 540px;
}
.hv-serp__result--featured {
    position: relative;
    background: linear-gradient(135deg, rgba(245,158,11,0.13) 0%, rgba(245,158,11,0.03) 100%);
    border: 1px solid rgba(245,158,11,0.4);
    border-radius: 8px;
    padding: 8px 10px;
    margin: 0 -10px 16px;
    box-shadow: 0 4px 22px rgba(245,158,11,0.18);
}
.hv-serp__pin {
    position: absolute;
    top: -16px; right: -12px;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: white;
    font-weight: 800;
    font-size: 18px;
    padding: 4px 14px;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(245,158,11,0.6);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: -apple-system, sans-serif;
    letter-spacing: 0.02em;
}
.hv-serp__url {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}
.hv-serp__favicon {
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 700;
    font-family: sans-serif;
    flex-shrink: 0;
}
.hv-serp__favicon--featured { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.hv-serp__favicon--linkedin { background: #3a3a3a; }
.hv-serp__favicon--wiki { background: #d8d8d8; color: #1a1a1a; font-family: serif; font-size: 13px; }
.hv-serp__favicon--spotify { background: #3a3a3a; font-size: 11px; }
.hv-serp__favicon--youtube { background: #4a4a4a; font-size: 10px; }
.hv-serp__favicon--crunch { background: #3a3a3a; font-size: 13px; }
.hv-serp__url-text { line-height: 1.2; min-width: 0; }
.hv-serp__domain {
    font-size: 13px;
    color: #e8e8e8;
    font-weight: 400;
}
.hv-serp__breadcrumb {
    font-size: 12px;
    color: #969696;
}
.hv-serp__title {
    font-size: 17px;
    color: #ffffff;
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 2px;
    font-family: arial, sans-serif;
}
.hv-serp__snippet {
    font-size: 13px;
    color: #bdbdbd;
    line-height: 1.4;
}
.hv-serp__snippet b { font-weight: 700; color: #bdbdbd; }

/* ---------- Background gradients (shared monochrome thumbs) ---------- */

.hv-bg-a { background: linear-gradient(135deg, #2a2a2a, #0e0e0e); }
.hv-bg-b { background: linear-gradient(45deg, #161616, #2e2e2e); }
.hv-bg-c { background: linear-gradient(180deg, #262626, #0a0a0a); }
.hv-bg-d { background: linear-gradient(225deg, #2a2a2a, #141414); }
.hv-bg-e { background: radial-gradient(circle at 30% 30%, #2e2e2e, #0a0a0a 75%); }
.hv-bg-f { background: linear-gradient(135deg, #1a1a1a, #2a2a2a, #1a1a1a); }
.hv-bg-g { background: linear-gradient(0deg, #0a0a0a, #232323); }
.hv-bg-h { background: linear-gradient(90deg, #141414, #2a2a2a); }
.hv-bg-i { background: radial-gradient(ellipse at 70% 70%, #262626, #060606 70%); }
