:root {
    --paper: #fafafa;
    --ink: #2a2f45;
    --muted: #7b8196;
    --line: #d9dbe3;
    --night: #0f0f0f;
    /* La scène reprend le cadre 16:9 de la vidéo ; en portrait on n'en garde que la bande centrale (1200/1920). */
    --stage-w: min(100vw, 177.78svh);
}
@media (max-aspect-ratio: 10/9) {
    :root { --stage-w: 160vw; }
}
/* La page d'accueil tient en un écran : la scène recouvre l'en-tête et le pied du thème. */
html, body { overflow: hidden; background: var(--paper); }
.g4, .g4 * { box-sizing: border-box; }
.g4 {
    color: var(--ink);
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
}
.hero.frame {
    position: fixed;
    inset: 0;
    z-index: 9;
    height: auto;
    background: var(--paper);
}

/* ---------- Scène : même géométrie pour la vidéo et pour la page ---------- */
.frame {
    position: relative;
    height: 100svh;
    overflow: hidden;
}
.stage {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--stage-w);
    aspect-ratio: 16 / 9;
    transform: translate(-50%, -50%);
    container-type: size;
}

/* ---------- Premier écran (calé sur la dernière image de la vidéo) ---------- */
.hero h1 { margin: 0; }
.hero .logo {
    position: absolute;
    width: auto;
    max-width: none;
    top: 12cqh;
    left: 50%;
    height: 30cqh;
    transform: translateX(-50%);
}
.hero .tagline {
    position: absolute;
    top: 54.6cqh;
    left: 0;
    right: 0;
    margin: 0;
    text-align: center;
    font-size: 3.05cqw;
    line-height: 1.11;
    letter-spacing: 0.005em;
}
.hero .tagline span { display: block; }
.hero .tagline span + span + span { margin-top: 0.77em; }
.hero .sign {
    position: absolute;
    bottom: max(3svh, 20px);
    left: 0;
    right: 0;
    text-align: center;
    font-size: clamp(12px, calc(var(--stage-w) * 0.0115), 22px);
    font-weight: 400;
    line-height: 1.6;
    letter-spacing: 0.06em;
    color: var(--muted);
}
.hero .sign p { margin: 0; }
.hero .sign strong { font-weight: 600; color: var(--ink); }
.hero .sign a, .hero .sign button {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}
.hero .sign a:hover, .hero .sign button:hover { color: var(--ink); }
.hero .sign button {
    margin-top: 0.9em;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 0.85em;
    letter-spacing: inherit;
    opacity: .7;
    cursor: pointer;
}
/* ---------- Introduction vidéo ---------- */
.intro {
    position: fixed;
    inset: 0;
    z-index: 10;
    background: var(--night);
    transition: opacity .7s ease, background-color .5s ease;
}
/* Le thème ajoute une marge entre blocs : on l'annule pour coller aux bords de l'écran. */
.intro, .hero.frame { margin: 0 !important; max-width: none !important; }
.intro[hidden] { display: none; }
.intro .frame { height: 100%; }
.intro.light { background: var(--paper); }
.intro.out { opacity: 0; pointer-events: none; }
.intro video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.intro .skip {
    position: absolute;
    right: 24px;
    bottom: 24px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    background: rgba(15, 15, 15, .35);
    color: rgba(255, 255, 255, .75);
    font: 400 0.8rem 'Hanken Grotesk', sans-serif;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease, opacity .4s ease;
}
.intro .skip:hover { color: #fff; border-color: rgba(255, 255, 255, .6); }
.intro.light .skip { opacity: 0; }

/* ---------- Raccord : la page prend le relais du logo en pixels de la vidéo ---------- */
@keyframes logo-settle {
    from { transform: translateX(-50%) translateY(21cqh) scale(1.34); }
    to   { transform: translateX(-50%); }
}
@keyframes rise {
    from { opacity: 0; transform: translateY(0.4em); }
    to   { opacity: 1; transform: none; }
}
body.reveal .hero .logo { animation: logo-settle 1.1s cubic-bezier(.6, 0, .2, 1) .5s both; }
body.reveal .hero .tagline span,
body.reveal .hero .sign { animation: rise .7s ease both; }
body.reveal .hero .tagline span:nth-child(1) { animation-delay: 1.5s; }
body.reveal .hero .tagline span:nth-child(2) { animation-delay: 2.1s; }
body.reveal .hero .tagline span:nth-child(3) { animation-delay: 2.9s; }
body.reveal .hero .sign { animation-delay: 3.6s; }
