.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    visibility: hidden;
}

.dev {
    font-family: "Ranade", Arial, sans-serif;
}

.hero-logo {
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.hero-logo svg {
    width: clamp(280px, 34vw, 520px);
    height: auto;
    display: block;
}

.dev {
    font-size: clamp(2rem, 4vw, 4rem);
    font-weight: 300;
    margin-left: 0.15em;
    margin-bottom: 4.5rem;
    line-height: 1;
}

.hero-content {
    width: clamp(280px, 34vw, 520px);
    margin-top: 1.5rem;
    text-align: left;
    align-self: center;

    /* décale le texte pour l'aligner sur le R,
       car .dev élargit la ligne du logo */
    transform: translateX(-3.2rem);
}

.hero-content h1 {
    font-size: clamp(1.4rem, 2vw, 2rem);
    font-weight: 500;
    line-height: 1.15;
    color: #fff;

    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}

.hero-content p {
    margin: 0.7rem 0 0;
    padding: 0;
    font-size: clamp(0.9rem, 1vw, 1rem);
    font-weight: 400;
    line-height: 1.6;
    color: #ddd;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    text-align: inherit;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.75);
}

.hero-content .typewriter-word {
    display: inline-block;
    white-space: nowrap;
}

/* blocks */

.hero-bg {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.hero-bg__block {
    position: absolute;
    border-radius: 120px;
    opacity: 0;
    filter: blur(7px);
    will-change: transform;
}

.hero-bg__block--1 {
    width: 250px;
    height: 900px;
    left: -220px;
    top: -300px;
    background: #f58d06;
}

.hero-bg__block--2 {
    width: 500px;
    height: 800px;
    left: 20%;
    bottom: -700px;
    background: #8f0f01;
}

.hero-bg__block--3 {
    width: 350px;
    height: 1000px;
    right: -270px;
    top: -350px;
    background: #fdb85d;
}

/* Le contenu du Hero reste au-dessus */
.hero > *:not(.hero-bg):not(.hero-nav) {
    position: relative;
    z-index: 1;
}

/* navigation */

.hero-nav {
    opacity: 0;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4.5rem;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(3rem, 6vw, 6rem);
}

.hero-nav a {
    position: relative;
    z-index: 0;
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
}

.hero-nav a {
    transition: scale 0.3s ease;
}

.hero-nav a:hover {
    scale: 1.08;
}
.hero-nav a::before {
    content: "";
    position: absolute;
    left: -8px;
    right: -8px;
    top: 50%;
    height: 16px;

    border-radius: 4px 2px 5px 3px;
    transform: translateY(-50%) rotate(-3deg);
    z-index: -1;
}

.hero-nav a[aria-current="location"] {
    display: none;
}

/* ========================================
   HERO — MOBILE
======================================== */

@media (max-width: 600px) {
    .hero-logo {
        width: 100%;
        max-width: 100%;
        padding-inline: 1rem;
        align-items: flex-end;
        justify-content: center;
        transform-origin: center;
    }

    .hero-logo svg {
        width: min(65vw, 260px);
        height: auto;
        flex-shrink: 1;
    }

    .dev {
        font-size: clamp(1rem, 5vw, 1.5rem);
        margin-left: 0.15em;
        margin-bottom: 3rem;
        flex-shrink: 0;
    }
    .hero-content {
        width: 90%;
        max-width: 340px;
        margin-top: 2.5rem;
        transform: none;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 1.5rem;
        line-height: 1.3;
        max-width: 100%;
        text-wrap: balance;
    }

    .hero-content h1 span {
        display: inline;
    }

    .hero-content p {
        max-width: 34ch;
        margin-inline: auto;
        font-size: 0.95rem;
        line-height: 1.65;
    }

    .hero-nav {
        left: 0;
        right: 0;
        bottom: 4rem;
        width: 100%;
        justify-content: center;
        gap: 2.5rem;
        display: none;
    }
}

/* Déplacement de la navigation — hors mobile */
@media (min-width: 601px) {
    .hero-nav {
        position: fixed;
        top: calc(100dvh - 4.5rem);
        left: 50%;
        right: auto;
        bottom: auto;
        width: max-content;
        z-index: 100;

        transform: translate(-50%, -100%);

        transition:
            top 0.7s ease,
            left 0.7s ease,
            transform 0.7s ease,
            gap 0.7s ease;
    }

    .hero-nav.is-docked {
        top: 2rem;
        left: 95%;
        transform: translate(-100%, 0);
        gap: 1.5rem;
    }

    /* Le lien reste en place pour éviter un saut au déplacement */
    .hero-nav:not(.is-docked) a[href="#home"] {
        display: none;
    }

    /* Remplace les mini-nav des sections */
    .section-mini-nav {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-nav {
        transition: none;
    }
}

/* Tablette et desktop : navigation par liens */
@media (min-width: 601px) {
    .mobile-menu-toggle,
    .mobile-menu {
        display: none;
    }
}
