/* styles.css (homepage) — COMPLET
   ✅ marges harmonisées avec project1
   ❌ hero full width inchangé
   ❌ header inchangé
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ✅ cache scrollbar (scroll OK) */
body {
    overflow-x: hidden;
    overflow-y: auto;
    background: #101010;
    font-family: 'Source Code Pro', monospace;
    min-height: 100vh;
    position: relative;
    color: #f5f5f5;

    padding-top: 140px;

    -ms-overflow-style: none;
    scrollbar-width: none;

    overscroll-behavior: none;
}
body::-webkit-scrollbar { width: 0; height: 0; }

a{
    color: #f5f5f5;
    text-decoration: none;
}

/* ========================= */
/* SCENES */
/* ========================= */
.scene{
    position: relative;
    height: 260vh;
    overflow: visible;
}

/* clip seulement scene 1 si tu veux */
.scene-1{
    overflow: clip;
}
@supports not (overflow: clip){
    .scene-1{ overflow: hidden; }
}

.scene .sticky{
    position: sticky;
    top: 70px;
    min-height: calc(100vh - 70px);
    overflow: visible;
    contain: none;
}

/* ========================= */
/* HERO */
/* ========================= */
h2.hero_main{
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: bolder;
    font-size: clamp(6rem, 14vw, 18rem);
    line-height: 0.72;
    letter-spacing: -0.13em;
    color: #f5f5f5;
    display: block;
    width: 100%;
    white-space: nowrap;
    text-transform: uppercase;
}

h2, h3{
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
}

.hero_main{
    position: relative;
    left: 0;
    transform: none;
    width: 100%;
    margin-left: 0;
    padding-left: 0;
    padding-right: 0;
    /* ✅ on ne touche PAS : hero full width */
}

p{
    font-size: 0.75rem;
    line-height: 1.2;
    letter-spacing: 0.12rem;
    font-weight: 300;
    margin: 0;
    text-transform: uppercase;
}

/* ========================= */
/* HERO LETTERS */
/* ========================= */
.hero_letters{
    display: inline-block;
    user-select: none;
    cursor: default;
    text-transform: none;
    contain: layout paint;
}

.hero_letters .char,
.hero_letters .space{
    display: inline-block;
    text-align: center;
    vertical-align: baseline;
    transition: font-weight 320ms ease,
                font-style 320ms ease,
                opacity 320ms ease,
                filter 320ms ease;
}

.hero_letters .br{
    display: block;
    height: 0;
}

/* ========================= */
/* HEADER (inchangé) */
/* ========================= */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 40px 60px;
    background: transparent;
    opacity: 1 !important;
    transform: none !important;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items:flex-start;
    max-width: 1400px;
    margin: 0 auto;
}

.site-title,
.main-nav{
    opacity: 1 !important;
    transform: none !important;
    text-transform: uppercase;
}

.site-title {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 1px;
}

.main-nav {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-size: 0.8rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: opacity 0.2s;
}

.nav-link:hover {
    opacity: 0.6;
}

/* ========================= */
/* MAIN CONTENT */
/* ========================= */
.main-content {
    position: relative;
    z-index: 10;
    max-width: 1400px;

    /* ✅ MODIF: comme project page */
    margin: 0 auto;

    margin-top: 15vh;
    padding: 0 60px 80px;
    display: flex;
}

.intro-text {
    margin-bottom: 80px;
    max-width: 500px;
    padding-right: 80px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 80px;
}

.project-column {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.project-item {
    position: relative;
    display: block;
    text-transform: uppercase;
}

.project-item::before {
    content: '';
    position: absolute;
    right: calc(100% + 7px);
    top: 2px;
    width: 8px;
    height: 8px;
    background: #f5f5f5;
    transition: width 0.3s ease;
}

.project-item:hover::before {
    width: 20px;
}

.project-title{
    font-size: 0.75rem;
    line-height: 1.2;
    letter-spacing: 0.12rem;
    font-weight: 400;
    margin: 0 0 12px 0;
}

/* ========================= */
/* SCENE 2 (CAROUSEL) */
/* ========================= */
.scene-2{
    height: 260vh; /* pas besoin d’un mega end : Observer gère les slides */
    overflow: visible;
}

.scene-2 .featured-sticky{
    overflow: visible;
    contain: none;
}

/* viewport carousel */
.carousel{
    position: relative;
    width: 100%;
    height: calc(100vh - 70px);
    margin-top: 0;
    overflow: hidden; /* ✅ masque */
    background: #101010;
}

.carousel-track{
    height: 100%;
    display: flex;
    will-change: transform;
}

.carousel-slide{
    width: 100vw;
    flex: 0 0 100vw;
}

/* Dots */
.carousel-dots{
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
    mix-blend-mode: difference;
}

.carousel-dots .dot{
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: rgba(245,245,245,0.55);
    transition: transform 220ms ease, opacity 220ms ease, background 220ms ease;
    cursor: pointer;
}
.carousel-dots .dot.is-active{
    background: rgba(245,245,245,0.95);
    transform: scale(1.35);
}

/* ========================= */
/* PROJECT HERO ROW */
/* ========================= */
.project-row{
    min-height: 80vh;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;

    /* ✅ MODIF: aligné sur la grille project1 */
    max-width: 1400px;
    margin: 0 auto;

    padding: 0 60px;

    opacity: 1;
    transition: none;

    position: relative;
    overflow: hidden;
    background: #101010;
    isolation: isolate;
}

.project-index{
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 800;
    letter-spacing: -0.06em;
    font-size: clamp(7rem, 16vw, 15rem);
    line-height: 0.75;
    padding-right: 80px;
    position: relative;
    z-index: 3;
    mix-blend-mode: difference;
    text-transform: uppercase;
}

.project-content{
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 60px;
    align-items: start;
    position: relative;
    z-index: 3;
    mix-blend-mode: difference;
    text-transform: uppercase;
}

.project-row h2{
    font-size: 0.75rem;
    line-height: 1.2;
    letter-spacing: 0.12rem;
    font-weight: 400;
    margin: 0;
    text-transform: uppercase;
}

.project-cta{
    display: flex;
    justify-content: flex-end;
}

.project-cta a{
    font-size: 0.75rem;
    letter-spacing: 0.12rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
}

.project-cta a::after{
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0%;
    height: 1px;
    background: currentColor;
    transition: width 0.5s ease;
}

.project-row:hover .project-cta a::after{
    width: 100%;
}

.project-cta .arrow{
    transition: transform 0.4s ease;
}

.project-cta a:hover .arrow{
    transform: translateX(6px);
}

/* image overlay */
.project-image{
    position: absolute;
    top: 52%;
    left: 50vw;
    transform: translate(-50%, -50%);
    width: min(58vw, 760px);
    pointer-events: none;
    user-select: none;
    mix-blend-mode: exclusion;
    z-index: 1;
    will-change: transform;

    opacity: 0;
    filter: grayscale(1) contrast(1.3) brightness(1.05);
    transition: opacity 360ms ease;
}
.project-image.is-loaded{
    opacity: 0.95;
}

/* ========================= */
/* ABOUT / CONTACT */
/* ========================= */
.flat-section{
    padding: 160px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.flat-inner{
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 60px;
    align-items: start;
}

.flat-title h2{
    
    font-weight: 200;
    
    font-size: 1rem;
    text-transform: uppercase;
}

.flat-text{
    max-width: 780px;
}

/* PERF */
#heroLetters,
.carousel-track,
.project-image {
    will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce){
    .scene-2{ height: auto; }
    .carousel{ height: auto; }
    .project-image{
        opacity: 0.95 !important;
        transition: none !important;
    }
}
/* ========================= */
/* FIX STACKING CAROUSEL */
/* ========================= */

.scene-2{
    position: relative;
    z-index: 10;
}

.scene-2 .featured-sticky{
    position: relative;
    z-index: 20;
}

.flat-section{
    position: relative;
    z-index: 1;
}

.carousel{
    background: #101010;
}

/* ===== CONTACT LINKS ANIMATION ===== */

#contact a{
    position: relative;
    display: inline-block;
    text-decoration: none;
    color: inherit;

    font-weight: 500; /* 👈 AJOUT (plus bold, propre avec ta typo) */

    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* underline animée */
#contact a::after{
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: currentColor;

    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* hover */
#contact a:hover{
    transform: translateX(4px);
    opacity: 0.9;
}

#contact a:hover::after{
    transform: scaleX(1);
}

/* micro feedback click */
#contact a:active{
    transform: translateX(2px) scale(0.98);
}
/* ===== TEXTE GLOBAL UNIFIÉ ===== */

p,
.intro-text p,
.project-description,
.flat-text p,
.project-info p {
    font-weight: lighter;
}
