/* --------------------------------------------------------------------------
   Layout du hero
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    min-height: clamp(640px, calc(100vh - 72px), 1000px);
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-block: var(--space-12) var(--space-20);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 30% 20%, var(--accent-blue-soft), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    grid-template-areas:
        "text   visual"
        "cta    visual";
    column-gap: var(--space-12);
    row-gap: var(--space-8);
    align-items: center;
}

.hero-text   { grid-area: text;   min-width: 0; }
.hero-visual { grid-area: visual; min-width: 0; position: relative; z-index: 2; }
.hero-cta    { grid-area: cta; }

/* --------------------------------------------------------------------------
   Spotlights qui suivent la souris.
   - Bleue : visible sur la partie gauche (titre)
   - Jaune : visible sur la partie droite (partition)
   - Crossfade géré via la custom prop --side (0 = gauche, 1 = droite),
     mise à jour en JS depuis la position relative horizontale du pointer.

   Positionnement : on utilise top/left en px (depuis JS) + translate(-50%)
   pour centrer la spotlight sur le pointer. Évite le piège du translate%
   qui se calcule sur la taille de l'élément, pas du parent.
   -------------------------------------------------------------------------- */

.hero-spotlight,
.hero-spotlight-yellow {
    position: absolute;
    top: var(--y, 50%);
    left: var(--x, 50%);
    width: 600px;
    height: 600px;
    pointer-events: none;
    z-index: 1;
    border-radius: var(--radius-full);
    filter: blur(40px);
    transform: translate(-50%, -50%);
    transition: opacity 250ms var(--ease-out);
    opacity: 0;
}

.hero-spotlight {
    background: radial-gradient(circle, var(--accent-blue-soft) 0%, transparent 60%);
}
.hero-spotlight-yellow {
    background: radial-gradient(circle, var(--accent-yellow-soft) 0%, transparent 60%);
}

.hero[data-pointer-active="true"] .hero-spotlight {
    opacity: calc(1 - var(--side, 0));
}
.hero[data-pointer-active="true"] .hero-spotlight-yellow {
    opacity: var(--side, 0);
}

/* --------------------------------------------------------------------------
   Eyebrow (badge en haut du hero)
   -------------------------------------------------------------------------- */

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-8);
}
.hero-eyebrow::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--accent-blue);
    box-shadow: 0 0 12px var(--accent-blue-glow);
    animation: hero-pulse 2.4s ease-in-out infinite;
}

@keyframes hero-pulse {
    0%, 100% { transform: scale(1);    opacity: 1;   }
    50%      { transform: scale(1.4);  opacity: 0.6; }
}

/* --------------------------------------------------------------------------
   Titre + animation eye-tracking sur les mots
   -------------------------------------------------------------------------- */

.hero-title {
    font-size: clamp(2.5rem, 1.5rem + 3.5vw, 4.5rem);
    line-height: var(--lh-tight);
    letter-spacing: -0.035em;
    max-width: 14ch;
    margin-bottom: var(--space-8);
}

.hero-title .word {
    display: inline-block;
    color: var(--text-primary);
    opacity: var(--word-opacity, 0.18);
    transition: opacity 250ms var(--ease-out), text-shadow 250ms var(--ease-out);
    text-shadow: 0 0 var(--word-glow, 0px) var(--accent-blue-glow);
    margin-right: 0.25em;
}

/* --------------------------------------------------------------------------
   Subtitle, CTAs
   -------------------------------------------------------------------------- */

.hero-subtitle {
    font-size: var(--fs-lg);
    color: var(--text-secondary);
    line-height: var(--lh-relaxed);
    max-width: 56ch;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
}

/* --------------------------------------------------------------------------
   Partition (SVG) — 3 portées en perspective
   -------------------------------------------------------------------------- */

.score-frame {
    position: relative;
    padding: var(--space-8);
    background: linear-gradient(180deg, var(--bg-elevated), var(--bg-raised));
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: perspective(1400px) rotateY(-12deg) rotateX(3deg);
    transform-origin: center center;
    transition: transform 600ms var(--ease-out);
}
.score-frame:hover {
    transform: perspective(1400px) rotateY(-5deg) rotateX(1deg);
}

.score-frame::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: radial-gradient(ellipse at center, var(--accent-blue-soft), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.score {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
    display: block;
}

/* Lignes de portée + bar lines : strokes subtiles */
.score .stave line,
.score .barline {
    stroke: var(--text-tertiary);
    stroke-width: 1;
    opacity: 0.5;
}

.score .clef {
    stroke: var(--text-secondary);
    opacity: 0.7;
}

.score .note {
    opacity: var(--note-opacity, 0.18);
    transition: opacity 250ms var(--ease-out), filter 250ms var(--ease-out);
    filter: drop-shadow(0 0 var(--note-glow, 0px) var(--accent-blue-glow));
}
.score .note-head { fill: var(--text-primary); }
.score .note-stem {
    stroke: var(--text-primary);
    stroke-width: 1.4;
    stroke-linecap: round;
}

/* --------------------------------------------------------------------------
   Reduced motion : tout visible, pas d'animation, pas de perspective
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .hero-title .word { opacity: 1 !important; text-shadow: none !important; }
    .score .note     { opacity: 1 !important; filter: none !important; }
    .score-frame     { transform: none !important; }
    .hero-eyebrow::before { animation: none; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .hero-inner {
        grid-template-columns: 1fr;
        grid-template-areas:
            "text"
            "visual"
            "cta";
        gap: var(--space-12);
    }
    .hero-visual {
        max-width: 640px;
        margin-inline: auto;
        width: 100%;
    }
    .hero-cta {
        justify-content: center; 
    }
    .score-frame {
        transform: perspective(2200px) rotateY(-5deg);
        padding: var(--space-6);
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding-block: var(--space-20) var(--space-12);
    }
    .score-frame {
        transform: none;
        padding: var(--space-4);
    }
}

@media (max-width: 480px) {
    .score-frame {
        padding: var(--space-3);
        border-radius: var(--radius-lg);
    }
}