/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

a { color: inherit; text-decoration: none; }

html { background: #000; }

body {
  background: #000;
  overscroll-behavior: none;
  font-family: "Helvetica Neue", Arial, sans-serif;
}

/* ---- scroll runway: tall container drives the pinned viewport ---- */
.stage {
  position: relative;
  height: 160vh;        /* scroll runway */
}

/* ---- pinned viewport: everything happens here ---- */
.viewport {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;       /* iOS URL-bar safe, falls back to 100vh above */
  width: 100%;
  overflow: hidden;
  background: #000;
  perspective: 1600px;        /* gentler 3D (larger = subtler fold) */
  perspective-origin: 25% 50%;
}

/* ---- street poster: full-bleed, fades in behind the plaque ---- */
.poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;   /* keep left wall glued to the page edge */
  opacity: 1;                     /* fallback: shown; animation fades it in */
  will-change: opacity;
}

/* ---- plaque: shrinks + tilts onto the wall ----
   Fixed base box (720x480, native 3:2). scroll.js writes the geometry vars
   (start --x0/--s0, stages --*33/--*66, final --x1/--y1/--s1/--roty1); the
   keyframes below interpolate them. The whole animation runs on the
   compositor via animation-timeline: scroll() — no per-frame JS. */
.plaque-wrap {
  position: absolute;
  top: 50%;
  left: 0;
  width: 720px;
  height: 480px;
  margin-top: -240px;              /* box vertical-center at top:50% */
  transform-origin: 0 50%;         /* hinge on the box's left edge (near wall edge) */
  will-change: transform;
  /* FALLBACK (no scroll-timeline support): pin to the FINAL frame so the page
     looks finished. The @supports block below overrides this with animation. */
  transform:
    translate(var(--x1, 0px), var(--y1, 0px))
    perspective(var(--persp, 520px))
    rotateY(var(--roty1, 0deg))
    rotateX(var(--tiltx, 0deg))
    scale(var(--s1, 0.5));
}

.plaque {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* soften the png's black vignette so it blends onto the poster near the end */
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.6));
}

/* ---- scroll cue ---- */
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #e9e4d6;
  font-size: 13px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  opacity: 0;                      /* fallback: hidden (reveal already done) */
  pointer-events: none;
}

.scroll-hint .chevron {
  font-size: 22px;
  line-height: 1;
  animation: bob 1.6s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(5px); }
}

/* ===================================================================
   SCROLL-DRIVEN ANIMATION (pure CSS, compositor-driven).
   Progresses as the document scrolls across the hero runway (the distance
   the sticky viewport stays pinned = .stage height - 100vh). scroll.js writes
   that distance to --runway so the reveal finishes exactly as the hero unpins,
   whatever .stage height is set to. Applied only where animation-timeline is
   supported; otherwise the fallback states above win.
   =================================================================== */
@supports (animation-timeline: scroll()) {
  .plaque-wrap {
    animation: plaque-reveal linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 var(--runway, 120vh);
  }
  .poster {
    opacity: 0;
    animation: poster-fade linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 var(--runway, 120vh);
  }
  .scroll-hint {
    opacity: 1;
    animation: hint-fade linear both;
    animation-timeline: scroll(root block);
    animation-range: 0 var(--runway-hint, 12vh);   /* fades over the first sliver */
  }

  @keyframes plaque-reveal {
    0% {
      transform:
        translate(var(--x0), 0px)
        perspective(var(--persp)) rotateY(0deg) rotateX(0deg)
        scale(var(--s0));
    }
    33% {
      transform:
        translate(var(--x33), var(--y33))
        perspective(var(--persp)) rotateY(var(--roty33)) rotateX(var(--tiltx))
        scale(var(--s33));
    }
    66% {
      transform:
        translate(var(--x66), var(--y66))
        perspective(var(--persp)) rotateY(var(--roty66)) rotateX(var(--tiltx))
        scale(var(--s66));
    }
    100% {
      transform:
        translate(var(--x1), var(--y1))
        perspective(var(--persp)) rotateY(var(--roty1)) rotateX(var(--tiltx))
        scale(var(--s1));
    }
  }

  @keyframes poster-fade {
    0%   { opacity: 0; }
    33%  { opacity: 0.20; }
    66%  { opacity: 0.65; }
    100% { opacity: 1; }
  }

  @keyframes hint-fade {
    0%   { opacity: 1; }
    100% { opacity: 0; }
  }
}

/* ---- reduced motion: no scroll animation, show final frame ---- */
@media (prefers-reduced-motion: reduce) {
  .scroll-hint .chevron { animation: none; }
  @supports (animation-timeline: scroll()) {
    .plaque-wrap, .poster, .scroll-hint { animation: none; }
    .poster { opacity: 1; }
    .scroll-hint { opacity: 0; }
    /* .plaque-wrap keeps its fallback (final-frame) transform */
  }
}

/* ---- band content below the hero ---- */
.content {
  position: relative;
  z-index: 2;
  background: #0a0d16;      /* deep navy-black, picks up the plaque's blue */
  color: #e9e4d6;           /* enamel cream */
}

.band-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 24px;
  border-top: 1px solid rgba(233, 228, 214, 0.1);
}

.band-section h2 {
  font-size: clamp(28px, 8vw, 44px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
  color: #f3eee0;
}

.band-section p {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 16px;
  color: rgba(233, 228, 214, 0.82);
}

.band-section .lead {
  font-size: 18px;
  color: #e9e4d6;
}

.members {
  list-style: none;
  margin-top: 28px;
  display: grid;
  gap: 12px;
}

.members li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(233, 228, 214, 0.12);
  font-size: 15px;
  color: rgba(233, 228, 214, 0.6);
}

.members li span {
  color: #f3eee0;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* videos */
.video-grid {
  display: grid;
  gap: 28px;
  margin-top: 28px;
}

.video { margin: 0; }

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video figcaption {
  margin-top: 10px;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: rgba(233, 228, 214, 0.6);
}

/* footer */
.band-footer {
  text-align: center;
  padding: 48px 24px calc(48px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(233, 228, 214, 0.1);
}

.band-footer p {
  font-size: 18px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #f3eee0;
}

.band-footer .small {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(233, 228, 214, 0.4);
}

.band-footer .small a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.band-footer .small a:hover {
  color: rgba(233, 228, 214, 0.8);
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

/* desktop: two-up video grid */
@media (min-width: 680px) {
  .video-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- mentions légales page ---- */
.legal-page { padding: 2rem 1.5rem 4rem; color: #e9e4d6; }
.legal { max-width: 720px; margin: 0 auto; }
.legal h1 { font-size: 1.6rem; margin-bottom: 2rem; color: #f3eee0; letter-spacing: 0.1em; }
.legal h2 { font-size: 1rem; letter-spacing: 0.15em; text-transform: uppercase; color: #aaa; margin: 2rem 0 0.5rem; }
.legal p { margin: 0.3rem 0; line-height: 1.7; }
.legal a { color: #e9e4d6; }
.back { display: inline-block; margin-bottom: 2rem; color: #aaa; text-decoration: none; font-size: 0.9rem; letter-spacing: 0.1em; }
.back:hover { color: #e9e4d6; }
