/* ==========================================================
   HERO — style éditorial (fond pierre, nom géant en marquee,
   portrait détouré, phrase révélée au scroll)
   ========================================================== */

/* jetons partagés par les sections claires (hero, à propos, compétences, projets, services) */
.hx,
.ab,
.sk,
.pj,
.sv {
    --hx-bg: #d7d5d0;
    --hx-ink: #1c1a19;
    --hx-ink-soft: #4a4542;
    --hx-ghost: #cbc4bf;     /* lettres du marquee */
    --hx-faint: #bab3ae;     /* texte pas encore révélé */
    --hx-accent: #9a7062;    /* front de révélation */
    --hx-display: 'Anton', 'Impact', 'Arial Narrow', sans-serif;
    --hx-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --p: 0; /* progression du scroll sur la scène (0 → 1), pilotée par hero.js */
}

.hx {
    position: relative;
    z-index: 1;
    background: var(--hx-bg);
    color: var(--hx-ink);
    overflow: clip;
}

/* ---------- Scène : marquee + portrait ---------- */

.hx-stage {
    position: relative;
    height: 100vh;
    height: 100svh;
    min-height: 560px;
}

.hx-marquee {
    position: absolute;
    left: 0;
    right: 0;
    top: 54%;
    transform: translate3d(calc(var(--p) * -12vw), -50%, 0);
    opacity: calc(1 - var(--p) * 0.9);
    pointer-events: none;
    user-select: none;
    animation: hx-fade 1.2s var(--hx-ease) 0.1s both;
}

.hx-marquee-track {
    display: flex;
    width: max-content;
    font-family: var(--hx-display);
    font-size: clamp(8rem, 27vw, 26rem);
    line-height: 0.82;
    letter-spacing: -0.01em;
    color: var(--hx-ghost);
    white-space: nowrap;
    animation: hx-marquee 48s linear infinite;
    will-change: transform;
}

.hx-marquee-track > span { display: block; }

.hx-portrait {
    position: absolute;
    left: 50%;
    bottom: 0;
    height: min(86%, 820px);
    margin: 0;
    transform: translate3d(-50%, calc(var(--p) * 14vh), 0);
    -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 98%);
            mask-image: linear-gradient(to bottom, #000 62%, transparent 98%);
}

.hx-portrait img {
    height: 100%;
    width: auto;
    max-width: none;
    animation: hx-portrait-in 1.4s var(--hx-ease) 0.35s both;
}

.hx-tags {
    position: absolute;
    left: 50%;
    bottom: 14%;
    transform: translate3d(-50%, calc((1 - var(--p)) * 24px), 0);
    opacity: clamp(0, calc(var(--p) * 4 - 0.2), 1);
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
    font-family: var(--font);
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 2;
    letter-spacing: 0.38em;
    text-transform: uppercase;
    color: #fff;
    mix-blend-mode: difference; /* clair sur le sweat noir, foncé sur le fond */
}

/* ---------- Intro : phrase + texte + boutons ---------- */

.hx-intro {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10vh 24px 13vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 4vw;
}

.hx-statement {
    grid-column: 1 / -1;
    max-width: 12.5em;
    margin: 0;
    font-family: var(--hx-display);
    font-weight: 400;
    font-size: clamp(2.3rem, 4.4vw, 4rem);
    line-height: 1.04;
    letter-spacing: 0.005em;
    text-transform: uppercase;
    color: var(--hx-ink);
}

/* lettres découpées par hero.js */
[data-reveal-text] .w { display: inline-block; white-space: nowrap; }
[data-reveal-text] .c { color: var(--hx-faint); transition: color 0.35s ease; }
[data-reveal-text] .c.is-front { color: var(--hx-accent); }
[data-reveal-text] .c.is-on { color: var(--hx-ink); }

.hx-aside {
    grid-column: 2;
    max-width: 360px;
    margin-top: 3.5rem;
}

.hx-desc {
    margin: 0 0 1.75rem;
    font-size: 0.74rem;
    line-height: 1.55;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--hx-ink-soft);
}

.hx-desc strong { color: var(--hx-ink); font-weight: 600; }

.hx-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hx-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    border: 1px solid var(--hx-ink);
    font-family: var(--hx-display);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s var(--hx-ease);
}

.hx-btn i { font-size: 0.6rem; transition: transform 0.3s var(--hx-ease); }

.hx-btn-solid { background: var(--hx-ink); color: var(--hx-bg); }
.hx-btn-solid:hover { background: #3a3532; }

.hx-btn-line { color: var(--hx-ink); }
.hx-btn-line:hover { background: var(--hx-ink); color: var(--hx-bg); }
.hx-btn-line:hover i { transform: translateX(3px); }

.hx-btn:focus-visible,
.hx-cv:focus-visible,
.hx-socials a:focus-visible {
    outline: 2px solid var(--hx-accent);
    outline-offset: 3px;
}

.hx-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(28, 26, 25, 0.15);
}

.hx-cv {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hx-ink-soft);
}

.hx-cv i { font-size: 0.65rem; margin-right: 4px; }
.hx-cv:hover { color: var(--hx-ink); }

.hx-socials { display: inline-flex; gap: 14px; }
.hx-socials a { color: var(--hx-ink-soft); font-size: 0.95rem; }
.hx-socials a:hover { color: var(--hx-accent); }

/* apparition au scroll du bloc de droite */
.hx-aside.hx-hidden { opacity: 0; transform: translateY(28px); }
.hx-aside { transition: opacity 0.9s var(--hx-ease), transform 0.9s var(--hx-ease); }

/* ---------- Navbar claire tant qu'on est sur le hero ---------- */

.navbar.nav-light,
.navbar.nav-light.scrolled {
    background: rgba(226, 224, 219, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(28, 26, 25, 0.07);
    box-shadow: none;
    padding: 12px 0;
}

.navbar.nav-light .nav-logo {
    background: none;
    -webkit-text-fill-color: #1c1a19;
    color: #1c1a19;
}

.navbar.nav-light .nav-link {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6b6561;
}

.navbar.nav-light .nav-link:hover,
.navbar.nav-light .nav-link.active {
    color: #1c1a19;
    background: transparent;
}

.navbar.nav-light .nav-toggle span { background: #1c1a19; }

.navbar,
.navbar .nav-logo,
.navbar .nav-link { transition: background 0.4s ease, color 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease; }

/* ---------- Animations ---------- */

@keyframes hx-marquee {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-50%, 0, 0); }
}

@keyframes hx-fade {
    from { opacity: 0; }
}

@keyframes hx-portrait-in {
    from { opacity: 0; filter: blur(14px); transform: translateY(40px) scale(1.03); }
    to   { opacity: 1; filter: blur(0);    transform: none; }
}

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

@media (max-width: 900px) {
    .hx-intro { grid-template-columns: 1fr; padding-top: 6vh; }
    .hx-aside { grid-column: 1; margin-top: 2.5rem; }
}

@media (max-width: 768px) {
    .hx-stage { height: 88svh; min-height: 520px; }
    .hx-marquee { top: 46%; }
    .hx-marquee-track { font-size: 42vw; }
    .hx-portrait { height: 78%; }
    .hx-tags { font-size: 0.62rem; letter-spacing: 0.3em; bottom: 12%; }
    .hx-statement { font-size: clamp(2.1rem, 10vw, 3rem); }

    .navbar.nav-light .nav-menu { background: #e2e0db; border-left-color: rgba(28, 26, 25, 0.08); }
    .navbar.nav-light .nav-link { font-size: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
    .hx-marquee,
    .hx-marquee-track,
    .hx-portrait img { animation: none; }
    [data-reveal-text] .c { color: var(--hx-ink); transition: none; }
    .hx-aside, .hx-aside.hx-hidden { opacity: 1; transform: none; transition: none; }
}
