* { box-sizing: border-box }
html { scroll-behavior: smooth; background: #101114; color: #f3f4f7; font-family: Inter, "Segoe UI", sans-serif }
body, h1, h2 { margin: 0 }
body { -webkit-user-select:none; user-select:none }
.journey { position:relative; isolation:isolate; background:#06080d }
.journey.scroll-scene {
  --approach-height:107svh; --opening-height:78svh; --after-open:224svh;
  display:grid; grid-template:var(--approach-height) var(--opening-height) minmax(calc(100dvh + var(--after-open)),auto) / minmax(0,1fr);
}
.scroll-scene > .intro, .scroll-scene > .night-sky {
  grid-area:1 / 1 / 4 / 2; position:sticky; top:0; align-self:start;
  height:100dvh;
}
.scroll-scene > .intro { pointer-events:none }
.intro {
  --pixel-pitch:4px;
  min-height:100svh; display:grid; place-items:center; position:relative;
  isolation:isolate; overflow:hidden; text-align:center;
  z-index:2;
}
@media (width < 600px) { .intro { --pixel-pitch:3px } }
.night-sky { position:absolute; top:0; left:0; width:100%; height:100svh; pointer-events:none }
.intro::after {
  content:""; position:absolute; inset:auto 0 0; height:37%; z-index:-2; pointer-events:none;
  background:radial-gradient(circle at 49% var(--planet-center), transparent var(--planet-radius),
    rgba(44,112,221,.40) calc(var(--planet-radius) + 1px),
    rgba(29,77,156,.20) calc(var(--planet-radius) + 9px),
    transparent calc(var(--planet-radius) + 44px));
  mask-image:radial-gradient(ellipse 38% 100% at 34% 48%, black 10%, transparent 100%);
  animation:horizon-light 13s ease-in-out infinite alternate;
  transform-origin:0 0; transform:var(--surface-transform,none);
}
.planet-horizon, .planet-glints {
  position:absolute; inset:auto 0 0; width:100%; height:37%; z-index:-1;
  pointer-events:none;
}
@keyframes horizon-light { from { opacity:calc(.47 * var(--air,1)) } to { opacity:calc(.94 * var(--air,1)) } }
.planet-horizon { height:100% }
.planet-glints { transform-origin:0 0; transform:var(--surface-transform,none); opacity:var(--air,1) }
@media (prefers-reduced-motion:reduce) { .intro::after { animation:none; opacity:.7 } }
.intro .portrait { transform:translateY(calc(-4svh + var(--portrait-lift,0px))); opacity:var(--portrait-opacity,1) }
.portrait { display:grid; justify-items:center; gap:24px; padding:42px 18px; pointer-events:auto }
.portrait[hidden] { display:none }
@font-face {
  font-family:"Bricolage Grotesque";
  src:url("bricolage-grotesque.ttf") format("truetype");
  font-weight:200 800;
  font-display:swap;
}
@font-face {
  font-family:"Reggae One";
  src:url("reggae-one-latin.woff2") format("woff2");
  font-weight:400;
  font-display:swap;
}
.portrait h1 {
  font-family:"Bricolage Grotesque", sans-serif; font-size:clamp(38px,5vw,80px);
  line-height:1.05; font-weight:470; font-optical-sizing:auto; letter-spacing:.002em;
}
.network-accent { --logo-blue:#3d77fa; --rim-blue:#84bdfb; color:var(--logo-blue) }
.network-accent:not(:has(.pixel-reveal)) {
  background:linear-gradient(90deg,var(--logo-blue),var(--rim-blue));
  background-clip:text; color:transparent;
}
.network-accent:has(.pixel-reveal) .title-letter {
  --pixel-ink:color-mix(in srgb,var(--logo-blue),var(--rim-blue) var(--ink-position));
  color:var(--pixel-ink);
}
@media (forced-colors:active) {
  .network-accent:not(:has(.pixel-reveal)) { background:none; color:CanvasText }
}
.tagline {
  width:80%; margin:clamp(12px,1.4vw,20px) auto 0; container-type:inline-size;
  font:400 1rem/1.45 "Bricolage Grotesque",sans-serif;
  --pixel-ink:#b8c1cd; color:var(--pixel-ink);
}
.tagline-line {
  display:block; white-space:nowrap; text-align-last:justify;
  font-size:3.65cqi; font-variation-settings:"opsz" 16;
}
.portrait h1 > span, .title-letter, .tagline-line > span { display:inline-block; position:relative }
.word-pixels { display:none }
@media (prefers-reduced-motion:no-preference) {
  .title-letter {
    --start:calc(.36s + var(--letter) * .075s);
    --assembly-duration:.86s;
    --travel:clamp(1.7px,.035em,2.6px);
  }
  .tagline-line > span { --start:calc(.85s + var(--word) * .17s); --assembly-duration:.68s }
  .pixel-reveal {
    animation:finish-word var(--assembly-duration) step-end var(--start) backwards;
  }
  .word-pixels {
    display:block; position:absolute; inset:0; pointer-events:none; color:var(--pixel-ink,#f3f4f7);
    mask:conic-gradient(at 50% 50%, #000 0 25%, transparent 25% 100%) var(--tile) / 4px 4px repeat;
    animation:assemble-word var(--assembly-duration) cubic-bezier(.32,.12,.25,1) var(--start) both;
  }
  .title-letter > .word-pixels {
    animation-duration:calc(var(--assembly-duration) - .15s);
    animation-delay:calc(var(--start) + var(--phase) * .05s);
  }
}
@keyframes finish-word { from { color:transparent } to { color:inherit } }
@keyframes assemble-word {
  from { opacity:0; transform:translate(calc(var(--dx) * var(--travel, 1px)),calc(var(--dy) * var(--travel, 1px))) }
  65% { opacity:1 }
  to { opacity:1; transform:none }
}
.symbol { position:relative; width:clamp(144px,19vw,242px); aspect-ratio:1 }
.symbol img,.symbol canvas { width:100%;height:100%;display:block }
.symbol canvas { position:absolute;left:-60%;top:-60%;width:220%;height:220%;pointer-events:none }
.symbol.ready img { visibility:hidden }
.descend { position:absolute;bottom:5vh;display:grid;align-content:center;justify-items:center;width:48px;height:48px;color:#87919e;opacity:var(--arrow-opacity,1);pointer-events:auto }
.descend i { width:12px;height:12px;border:solid currentColor;border-width:0 2px 2px 0;transform:rotate(45deg);margin-top:-5px }
.descend:hover { color:#6ac7ff }
.descend:focus-visible { outline:2px solid #6ac7ff; outline-offset:2px; border-radius:50% }
.chapter { min-height:100svh; display:grid; place-items:center; position:relative; text-align:center }
.scroll-scene > .chapter { grid-area:2 / 1 / 4 / 2; z-index:4; pointer-events:none }
.scroll-scene .chapter-stage {
  position:absolute; inset:calc(0px - var(--approach-height)) 0 0; pointer-events:none;
}
.scroll-scene .chapter h2 {
  position:sticky; top:50dvh; transform:translateY(-50%); width:fit-content;
  max-width:calc(100% - 36px); margin-inline:auto;
  mask-image:linear-gradient(90deg, #000 var(--chapter-front,-85%), transparent calc(var(--chapter-front,-85%) + 85%));
}
.chapter h2 {
  display:flex; align-items:center; justify-content:center; gap:.18em;
  margin:0 18px; color:#eff4ff; font:470 clamp(36px,5vw,80px)/1.05 "Bricolage Grotesque",sans-serif;
  letter-spacing:.002em; opacity:var(--chapter-opacity,1);
}
.chapter-cube {
  position:relative; flex:0 0 .96em; width:.96em; height:.96em; overflow:hidden;
}
.chapter-cube img {
  position:absolute; left:50%; top:50%; width:154%; height:auto; transform:translate(-50%,-50%);
}
@media (max-width:380px) { .chapter h2 { font-size:clamp(24px,9vw,36px) } }
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto } }

.projects { position:relative }
.project-view { position:relative; height:100dvh; isolation:isolate; overflow:hidden }
.project-aperture {
  --panel-height:65dvh;
  --bleed:clamp(23px,4dvh,40px);
  --fringe:calc(2 * var(--bleed) * var(--reveal,1));
  position:absolute; inset-inline:0; top:50%; transform:translateY(-50%); overflow:hidden;
  height:calc(var(--panel-height) * var(--reveal,1) + var(--fringe));
  /* One continuous alpha surface keeps both moving edges transparent at fractional heights. */
  mask:url("project-reveal-mask.png") center / calc(38.4 * var(--bleed)) 100% repeat-x;
}
.project-pair {
  --blend:clamp(24px,2.6vw,48px);
  position:absolute; inset-inline:0; top:50%; height:var(--panel-height); transform:translateY(-50%);
  display:flex;
}
.project {
  --bleed-top:var(--bleed); --bleed-bottom:var(--bleed);
  position:relative; isolation:isolate; display:flex; align-items:center; justify-content:center;
  flex:1 1 0%; min-width:0; min-height:0;
  padding:clamp(22px,4vw,74px); color:#f6f7fa; text-decoration:none;
}
.project-art {
  position:absolute; z-index:-1; pointer-events:none; overflow:hidden;
  inset:calc(-1 * var(--bleed-top)) 0 calc(-1 * var(--bleed-bottom));
}
.project-art img { display:block; width:100%; height:100%; object-fit:cover }
.naruto { z-index:1 }
.naruto .project-art {
  right:calc(-1 * var(--blend));
  --blend-direction:to right;
  mask-image:linear-gradient(var(--blend-direction),
    #000 calc(100% - 2 * var(--blend)), rgb(0 0 0 / .88) calc(100% - 1.55 * var(--blend)),
    rgb(0 0 0 / .12) calc(100% - .45 * var(--blend)), transparent);
}
.scp .project-art { left:calc(-1 * var(--blend)); right:calc(-1 * var(--blend) - 1.6%) }
@media (min-width:701px) and (pointer:fine), (min-width:961px) {
  .naruto .project-art {
    mask-image:linear-gradient(to right, #000 calc(100% - 2 * var(--blend)),
        rgb(0 0 0 / .97) calc(100% - 1.8 * var(--blend)),
        rgb(0 0 0 / .82) calc(100% - 1.5 * var(--blend)),
        rgb(0 0 0 / .5) calc(100% - var(--blend)),
        rgb(0 0 0 / .18) calc(100% - .5 * var(--blend)),
        rgb(0 0 0 / .03) calc(100% - .2 * var(--blend)), transparent),
      radial-gradient(ellipse calc(2 * var(--blend)) calc(2 * var(--bleed)) at right top, transparent 50%, #000),
      radial-gradient(ellipse calc(2 * var(--blend)) calc(2 * var(--bleed)) at right bottom, transparent 50%, #000);
    mask-composite:intersect;
  }
  .scp .project-art {
    background:#06080d;
  }
  .scp .project-art::before {
    content:""; position:absolute; z-index:1; inset:0 auto 0 0; width:calc(2 * var(--blend));
    background:linear-gradient(to right,#06080d 0%,rgb(6 8 13 / .85) 30%,rgb(6 8 13 / .15) 75%,transparent);
    pointer-events:none;
  }
}
.scp .project-art img { object-position:49.2% 50%; transform-origin:49.2% 50% }
.naruto img { object-position:43% 55% }
.project-art::after {
  content:""; position:absolute; inset:0;
  /* Keep the strongest part of the fade inside the photo, past the pixel fringe. */
  background-color:rgb(0 0 0 / 25%);
  background-image:linear-gradient(to bottom,
    rgb(1 3 7 / .82) var(--bleed-top), rgb(1 3 7 / .64) 15%,
    rgb(1 3 7 / .24) 26%, transparent 39%, transparent 61%,
    rgb(1 3 7 / .26) 73%, rgb(1 3 7 / .68) 85%,
    rgb(1 3 7 / .88) calc(100% - var(--bleed-bottom)));
}
.project-info {
  position:relative; display:grid; justify-items:center; gap:clamp(8px,1.5vh,16px);
  text-shadow:0 1px 6px #080c14;
}
.project-year { font:500 12px/1.2 "Bricolage Grotesque",sans-serif; letter-spacing:.12em; text-transform:uppercase }
.project-discover { font:500 15px/1.1 "Bricolage Grotesque",sans-serif }
.project-pixels { position:absolute; left:-18px; top:-18px; z-index:2; pointer-events:none }
@media (hover:hover) and (pointer:fine) {
  .project-discover {
    position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); white-space:nowrap;
    font-size:clamp(30px,3.5vw,68px); opacity:var(--discover,0);
  }
  .project-year,.project-label { opacity:var(--identity,1) }
  .project:is(:hover,:focus-visible) { --identity:0; --discover:1 }
}
.project-label {
  position:relative; z-index:1; display:inline-flex; align-items:center; gap:.36em;
  font:470 clamp(32px,3.8vw,76px)/1.08 "Bricolage Grotesque",sans-serif; letter-spacing:-.025em;
}
.naruto .project-label { font-family:"Reggae One",sans-serif; font-weight:400 }
.project-mark { display:block; flex:none; width:1.02em; height:1.02em; object-fit:contain }
.project:focus-visible { outline:2px solid white; outline-offset:-6px }
.scroll-scene .projects { grid-area:3 / 1; z-index:3 }
.scroll-scene .projects-stage { position:absolute; inset:calc(0px - var(--opening-height)) 0 0; pointer-events:none }
.scroll-scene .project-view { position:sticky; top:0 }
.scroll-scene .project-aperture { --reveal:var(--photo-height,0); opacity:var(--photo-opacity,0) }
.scroll-scene .projects.is-open .project { pointer-events:auto }
.scroll-scene .project-info { opacity:var(--label-opacity,0) }
.scroll-scene .project-view::before, .scroll-scene .project-view::after {
  content:""; position:absolute; z-index:1; top:calc(50% - 1px); height:2px; pointer-events:none;
}
.scroll-scene .project-view::before {
  inset-inline:0; clip-path:inset(0 var(--line-cut,50%));
  background:linear-gradient(90deg,#5187d5,#e0efff 48%,#e0efff 52%,#5187d5);
  mask:repeating-linear-gradient(90deg,#000 0 2px,transparent 2px 4px);
  opacity:var(--line-opacity,0);
}
.scroll-scene .project-view::after {
  left:50%; width:3px; transform:translateX(-50%); background:#e0efff;
  box-shadow:0 0 5px #73adf9; opacity:var(--core-opacity,0);
}
@media (max-width:700px), (pointer:coarse) and (max-width:960px) {
  .project-pair { flex-direction:column; --blend:clamp(14px,2.2dvh,24px) }
  .project { padding:clamp(18px,5vw,40px) }
  .project:first-child { --bleed-bottom:0px }
  .project:last-child { --bleed-top:0px }
  .naruto .project-art { right:0; bottom:calc(-1 * var(--blend)); --blend-direction:to bottom }
  .scp .project-art { left:0; right:-1.6%; top:calc(-1 * var(--blend)) }
}
@media (hover:hover) and (pointer:fine) and (min-width:701px) {
  .project { padding-inline:0 }
  .project:is(:hover,:focus-visible) { flex-grow:1.25 }
  .project:is(:hover,:focus-visible) .project-art::after { background-color:rgb(0 0 0 / 90%) }
  .scroll-scene .projects:not(.is-open) .project { flex-grow:1 }
  @media (prefers-reduced-motion:no-preference) {
    .project { transition:flex-grow 1.05s ease-in-out }
    .project-art::after { transition:background-color .95s ease-in-out }
    .project-art img { will-change:transform; transition:transform 1.15s cubic-bezier(.25,.55,.25,1) }
    .project:is(:hover,:focus-visible) .project-art img { transform:scale(1.30) }
  }
}

/* A stepped arrow echoes the square pixels along the cards. */
.project-label .pixel-arrow {
  content:""; display:inline-block; width:.72em; height:.72em;
  background:currentColor;
  clip-path:polygon(28% 0,100% 0,100% 72%,86% 72%,86% 28%,72% 28%,72% 42%,58% 42%,58% 56%,44% 56%,44% 70%,30% 70%,30% 84%,16% 84%,16% 98%,0 98%,0 82%,14% 82%,14% 68%,28% 68%,28% 54%,42% 54%,42% 40%,56% 40%,56% 26%,70% 26%,70% 14%,28% 14%);
}
.project-label .pixel-arrow { display:none }
@media (hover:hover) and (pointer:fine) {
  .project-label .pixel-arrow { display:block; position:absolute; left:calc(100% + .3em); width:.28em; height:.28em }
  .naruto .project-label .pixel-arrow { top:calc(50% + .045em); transform:translateY(-50%) }

}
.games-finale { min-height:100dvh; display:grid; place-items:center }
.games-finale img { display:block; width:min(62vw,540px); height:auto }
.scroll-scene .games-finale { grid-area:1 / 1 / 4 / 2; position:sticky; top:0; align-self:start; opacity:var(--games-opacity,0); height:100dvh; z-index:4; pointer-events:none; visibility:var(--games-visibility,hidden) }
.project-teaser { min-height:100dvh; display:grid; place-items:center }
.project-teaser img { width:min(88vw,600px); height:auto }
.scroll-scene .project-teaser { grid-area:1 / 1 / 4 / 2; position:sticky; top:0; align-self:start; height:100dvh; z-index:4; pointer-events:none; opacity:var(--teaser-opacity,0); visibility:var(--teaser-visibility,hidden) }

.network-footer { position:fixed; z-index:11; inset:auto 0 0; padding:clamp(22px,4vh,42px) max(6vw,20px); display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:18px; background:linear-gradient(transparent,rgba(6,8,13,.88) 32%,#06080d); font:500 14px/1.4 "Bricolage Grotesque",sans-serif; transform:translateY(101%); visibility:hidden; transition:transform .36s ease,visibility 0s .36s }
.network-footer.open { transform:none; visibility:visible; transition-delay:0s }
.network-footer a { color:#aeb9c8; text-decoration:none }
.network-footer a:hover,.network-footer a:focus-visible { color:white }
.network-footer .footer-brand { font-size:19px; color:#edf2f8 }
.footer-brand span { color:#7ab8fa }
.network-footer nav { display:flex; align-items:center; flex-wrap:wrap; gap:8px 20px }
.footer-brand img { vertical-align:middle; object-fit:contain; margin-right:7px }
.network-footer nav[aria-label="Informations du portail"] { font-size:13px }
@media(max-width:700px) { .network-footer { display:grid; gap:12px; padding:24px 32px 20px 20px } }
.footer-toggle { position:fixed; z-index:12; left:50%; bottom:10px; transform:translateX(-50%); width:44px; height:38px; border:0; background:transparent; color:#9caabc; cursor:pointer; font-size:24px }
.footer-toggle[aria-expanded=true] { bottom:var(--footer-height); transform:translateX(-50%) rotate(180deg) }
@media(prefers-reduced-motion:reduce) { .network-footer { transition:none } }

html { scrollbar-width:none }
html::-webkit-scrollbar { display:none }
.journey-rail { position:fixed; right:max(4px,env(safe-area-inset-right)); top:50%; transform:translateY(-50%); z-index:15; width:28px; color:#87c4ff }
.rail-track { position:relative; height:min(58dvh,580px); touch-action:none; cursor:pointer }
.rail-pixels { position:absolute; left:calc(50% - 4px); width:8px; height:100%; pointer-events:none }
.rail-window { position:absolute; left:calc(50% - 1px); width:2px; pointer-events:none }
.journey-rail button { appearance:none; border:0; background:transparent; color:inherit; cursor:pointer; width:100%; height:16px; padding:0 }
.rail-track button { position:absolute; left:0; transform:translateY(-50%) }
.journey-rail button::after { content:attr(data-label); position:absolute; right:100%; top:50%; transform:translateY(-50%); white-space:nowrap; background:#0b1019; color:#e7effa; padding:5px 9px; font:12px/1.3 "Bricolage Grotesque",sans-serif; opacity:0; pointer-events:none }
.journey-rail button:is(:hover,:focus-visible)::after { opacity:1 }
@media(max-width:700px) { .journey-rail { right:0;width:22px } }


.rail-footer { position:relative; display:block; margin-top:5px }
.journey-rail .rail-footer::before { content:""; display:block; margin:auto; width:2.7px; height:2.7px; background:#587ba5 }
.journey-rail .rail-footer[aria-current=step]::before { background:white }

.portal-info { min-height:100vh; background:#06080d; color:#e8edf6; font:16px/1.65 "Bricolage Grotesque",sans-serif; user-select:text }
.portal-info main { max-width:680px; margin:auto; padding:clamp(32px,7vw,80px) 24px }
.portal-info a { color:#83bafa } .portal-info h1 { margin:28px 0 }
.portal-info section { margin:32px 0 } .portal-info h2 { font-size:21px } .portal-info p { color:#b9c3d2 }
