/* Scroll-led compositions. Without JavaScript they remain ordinary sections. */
.scroll-feature { position: relative; background: var(--cream); }
.scroll-feature-stage { position: relative; min-height: 80svh; display: grid; place-items: center; padding: 100px 0 80px; overflow: clip; isolation: isolate; }
.feature-art { position: absolute; inset: 0; z-index: -1; overflow: clip; }
.feature-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg,#250020bc,#34042f77 55%,#250020a6); }
.feature-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.feature-copy { position: relative; text-align: center; }
.feature-copy>.eyebrow { margin-bottom: 35px; }
.feature-copy h2 { font-size: clamp(46px,7.1vw,105px); line-height: 1.08; letter-spacing: -.04em; margin: 0 auto; max-width: 1150px; }
.feature-copy h2 em { font-family: Groovy,Georgia,serif; font-style: normal; }
.feature-line { display: block; font: inherit; padding-bottom: .16em; margin-bottom: -.16em; }
.feature-line>span { display: block; font: inherit; }
.feature-home { color: var(--cream); }
.feature-home .scroll-feature-stage { min-height: 85svh; }
.feature-home .feature-copy h2 { font-size: clamp(54px,7.8vw,118px); }
.feature-statement .feature-copy h2 { font-size: clamp(42px,5.5vw,84px); }
.feature-note { max-width: 700px; margin: 35px auto 0; font-size: 17px; line-height: 1.8; }
.feature-reading { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(35px,8vw,120px); padding-block: 75px 100px; }
.feature-reading p { font-size: 18px; line-height: 1.85; max-width: 600px; }
.feature-reading .text-link { margin-top: 28px; }

.scroll-feature.is-scrubbed { height: 190svh; }
.feature-statement.is-scrubbed { height: 170svh; }
.is-scrubbed .scroll-feature-stage { position: sticky; top: 0; height: 100svh; min-height: 0; }
.is-scrubbed .feature-art { clip-path: inset(var(--feature-inset-y,16%) var(--feature-inset-x,10%) round var(--feature-radius,75px)); }
.is-scrubbed .feature-art img { transform: scale(var(--feature-scale,1.1)); }
.is-scrubbed .feature-line { overflow: clip; }
.is-scrubbed .feature-line>span { opacity: var(--line-opacity,0); transform: translate3d(0,var(--line-y,100%),0); }
.is-scrubbed .feature-copy>.eyebrow { opacity: var(--feature-label,0); }
.is-scrubbed .feature-note { opacity: var(--feature-note-opacity,0); transform: translate3d(0,var(--feature-note-y,30px),0); }

/* Earlier starts and a longer ease make the everyday arrivals settle gently. */
.motion-ready [data-reveal] { transform: translate3d(0,46px,0); transition: opacity 1.2s cubic-bezier(.22,1,.36,1),transform 1.55s cubic-bezier(.22,1,.36,1); }
.motion-ready [data-reveal="image"] { transform: translate3d(0,55px,0); }
.motion-ready [data-reveal].is-visible,.motion-ready [data-reveal]:focus-within { opacity: 1; transform: none; }
.motion-ready .is-scrubbed [data-reveal] { opacity: 1; transform: none; transition: none; }
.layered-visual:not([hidden]) { animation-duration: .95s; animation-timing-function: cubic-bezier(.22,1,.36,1); }

/* The chapter picture changes continuously, without an on/off threshold. */
.chapter-media { opacity: var(--chapter-opacity,0); transform: none; border-radius: 40px; transition: none; }
.chapter-media.is-active { opacity: var(--chapter-opacity,1); transform: none; border-radius: 40px; }

@media(min-width:701px) and (min-height:650px) {
  .service-overture { height: 165svh; }
  .contact-overture { height: 175svh; }
}
@media(max-width:700px) {
  .scroll-feature-stage { min-height: 0; padding-block: 75px; }
  .feature-home .scroll-feature-stage { min-height: 75svh; }
  .feature-copy>.eyebrow { margin-bottom: 28px; font-size: 10px; }
  .feature-home .feature-copy h2 { font-size: clamp(40px,10.5vw,70px); }
  .feature-statement .feature-copy h2 { font-size: clamp(29px,7.5vw,50px); }
  .feature-note { font-size: 16px; text-align: left; margin-top: 30px; }
  .feature-reading { grid-template-columns: 1fr; gap: 28px; padding-block: 45px 65px; }
  .feature-reading p { font-size: 16px; }
  .motion-ready [data-reveal],.motion-ready [data-reveal="image"] { transform: translate3d(0,28px,0); }
  .motion-ready [data-reveal].is-visible,.motion-ready [data-reveal]:focus-within { transform: none; }
}
@media(prefers-reduced-motion:reduce) {
  :where(body:not(.motion-autoplay)) .scroll-feature.is-scrubbed { height: auto; }
  :where(body:not(.motion-autoplay)) .is-scrubbed .scroll-feature-stage { position: relative; height: auto; min-height: 0; }
  :where(body:not(.motion-autoplay)) .is-scrubbed .feature-art { clip-path: none; }
  :where(body:not(.motion-autoplay)) .is-scrubbed :is(.feature-art img,.feature-line>span,.feature-note) { transform: none; }
  :where(body:not(.motion-autoplay)) .is-scrubbed :is(.feature-line>span,.feature-note,.feature-copy>.eyebrow) { opacity: 1; }
  .motion-ready :where(body:not(.motion-autoplay)) [data-reveal] { opacity: 1; transform: none; transition: none; }
  :where(body:not(.motion-autoplay)) :is(.service-overture,.contact-overture) { height: auto; }
}

/* The introduction is read in document order, like the rest of the page. */
.reading-sequence-stage {
  display: grid;
  justify-items: center;
  gap: clamp(18px,3vw,36px);
  padding: clamp(44px,7vw,96px) clamp(16px,5vw,72px);
  color: var(--prune);
  text-align: var(--copy-alignment,justify);
  text-align-last: start;
}
.reading-sequence-line {
  width: min(100%,62rem);
  margin: 0;
  font: 400 clamp(22px,3.25vw,44px)/1.24 DM,Arial,sans-serif;
  letter-spacing: -.025em;
  text-wrap: pretty;
  hyphens: var(--copy-hyphens,auto);
  scroll-margin-top: calc(var(--header-offset) + 24px);
}
.reading-sequence-line:first-child {
  font: 400 clamp(29px,4.25vw,68px)/1.12 Retro,Georgia,serif;
  letter-spacing: -.04em;
}

.chapter-sheet {
  display: flow-root;
  padding-block: var(--chapter-padding,0);
  background: var(--chapter-paper,var(--cream));
}

.page-chapter[data-chapter-scene="amber"] {
  --chapter-paper: color-mix(in srgb,var(--prune) 49%,#211020);
  color: var(--cream);
}
[data-chapter-scene="amber"] > .chapter-sheet {
  position: relative;
  isolation: isolate;
}
[data-chapter-scene="amber"] > .chapter-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--chapter-scrim,linear-gradient(100deg,#24102029 4%,#31102c6e 49%,#32102ef5 87%)),
    url("assets/ambiance-papier-nuit-2026-10-27.png") center 52% / cover;
}

@keyframes chapter-glow {
  0%, 12% {
    background-color: var(--glow-start);
    transform: scale(1);
    border-radius: 0;
    box-shadow: 0 0 0 0 transparent, 0 0 0 transparent;
  }
  47%, 55% {
    background-color: var(--glow-end);
    transform: scale(1);
    border-radius: 0;
    box-shadow: 0 0 0 0 transparent, 0 0 0 transparent;
  }
  86%, 100% {
    background-color: var(--glow-end);
    transform: scale(var(--glow-scale));
    border-radius: var(--glow-radius);
    box-shadow: var(--glow-halo);
  }
}

@supports (animation-timeline: view()) {
  @media screen and (prefers-reduced-motion: no-preference) and (min-width: 761px) and (min-height: 600px) {
    .chapter-story { isolation: isolate; }
    .chapter-story::before {
      content: "";
      position: fixed;
      inset: 0 0 auto;
      block-size: var(--header-offset);
      z-index: 1;
      background: var(--cream);
      pointer-events: none;
    }
    .profile.chapter-story { margin-top: 0; }
    .profile.chapter-story > .profile-hero { --chapter-padding: clamp(28px,4svh,50px) 42px; }

    [data-chapter-scene="glow"] > .chapter-sheet {
      display: grid;
      align-content: center;
      min-block-size: calc(100svh - var(--header-offset));
      padding-block: clamp(66px,12svh,130px);
    }
    [data-chapter-scene="glow"][data-glow-fit] {
      view-timeline: --chapter-glow block;
      view-timeline-inset: var(--header-offset) 0px;
    }
    [data-chapter-scene="glow"][data-glow-fit]::after {
      content: "";
      display: block;
      block-size: var(--glow-travel);
    }
    [data-chapter-scene="glow"][data-glow-fit] > .chapter-sheet {
      position: sticky;
      top: var(--header-offset);
      isolation: isolate;
      overflow: clip;
      color: var(--prune);
      background: var(--glow-night),
        url("assets/ambiance-papier-nuit-2026-10-27.png") center / cover;
    }
    [data-chapter-scene="glow"][data-glow-fit] > .chapter-sheet::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      pointer-events: none;
      background-image: radial-gradient(ellipse at 46% 40%,#fff3d6a8,transparent 74%),
        url("assets/ambiance-verre-couleur.png");
      background-position: center;
      background-size: cover;
      background-blend-mode: screen, soft-light;
      animation: chapter-glow auto cubic-bezier(.32,0,.24,1) both;
      animation-timeline: --chapter-glow;
      animation-range: contain 0% contain 100%;
    }
  }
}
