/* Intro cinématique de l'accueil (une fois par visite, jamais en mouvement réduit).
   Tout est en pseudo-éléments sur <body> : aucun nœud ajouté avant l'hydratation React.
   html[data-intro=""] est posé par le script en tête de index.html / en.html. */
@property --ds-n{syntax:'<integer>';inherits:false;initial-value:0}

html[data-intro=""]{--ds-ease:cubic-bezier(.76,0,.24,1);--ds-out:cubic-bezier(.16,1,.3,1)}

/* Deux volets qui se séparent comme un rideau : nom en haut, compteur en bas. */
html[data-intro=""] body::before,
html[data-intro=""] body::after{
  position:fixed;left:0;right:0;height:50.5vh;z-index:2147483000;pointer-events:none;
  background:#0b0c0c;color:#f3f1ec;display:flex;justify-content:center;
  font-family:inherit;font-weight:600;font-size:clamp(28px,6.2vw,96px);line-height:1;letter-spacing:-.04em;
}
html[data-intro=""] body::before{
  content:'David Shots';top:0;align-items:flex-end;padding-bottom:.12em;
  animation:ds-word 1.25s var(--ds-out) both,ds-lift-up 1s var(--ds-ease) 1.5s forwards;
}
html[data-intro=""] body::after{
  counter-reset:n var(--ds-n);content:counter(n,decimal-leading-zero) '%';
  bottom:0;align-items:flex-start;padding-top:1.2em;
  font-size:12px;font-weight:500;line-height:1;letter-spacing:.24em;color:rgba(243,241,236,.55);
  /* Fine ligne de progression sous le nom. */
  background:linear-gradient(#f3f1ec,#f3f1ec) top center/var(--ds-bar,0%) 1px no-repeat,#0b0c0c;
  animation:ds-count 1.3s cubic-bezier(.65,0,.35,1) both,ds-bar 1.3s cubic-bezier(.65,0,.35,1) both,ds-lift-down 1s var(--ds-ease) 1.5s forwards;
}
@property --ds-bar{syntax:'<length-percentage>';inherits:false;initial-value:0%}
@keyframes ds-count{to{--ds-n:100}}
@keyframes ds-bar{to{--ds-bar:min(420px,60%)}}
@keyframes ds-word{from{color:transparent;text-shadow:0 0 18px rgba(243,241,236,.6);letter-spacing:.18em}to{color:#f3f1ec;text-shadow:0 0 0 transparent;letter-spacing:-.04em}}
@keyframes ds-lift-up{to{transform:translateY(-101%)}}
@keyframes ds-lift-down{to{transform:translateY(101%)}}

/* Profondeur : l'image part de loin (travelling arrière) et se met au point. */
html[data-intro=""] .studio-motion-media>:is(img,video){animation:ds-dolly 2.6s var(--ds-out) 1.45s both}
@keyframes ds-dolly{from{scale:1.38;filter:blur(16px) brightness(.55)}60%{filter:blur(0) brightness(.9)}to{scale:1;filter:none}}

/* Titre façon Framer : chaque ligne monte en sortant du flou, décalée. */
html[data-intro=""] .studio-site .motion-title-line>span{animation:ds-rise 1.1s var(--ds-out) 1.9s both!important}
html[data-intro=""] .studio-site .motion-title-line:nth-of-type(2)>span{animation-delay:2.02s!important}
html[data-intro=""] .studio-site :is(.hero-title-sub,.studio-hero-disciplines,.studio-hero-context,.studio-hero-actions,.studio-hero-foot,.studio-hairline){animation:ds-rise .9s var(--ds-out) 2.25s both!important}
html[data-intro=""] .studio-site :is(.studio-hero-context,.studio-hero-foot){animation-delay:2.35s!important}
html[data-intro=""] .studio-site .studio-hero-actions{animation-delay:2.45s!important}
html[data-intro=""] .studio-site .vf{animation:ds-fade 1s ease 2.4s both}
@keyframes ds-rise{from{opacity:0;translate:0 .6em;filter:blur(10px)}to{opacity:1;translate:none;filter:none}}
@keyframes ds-fade{from{opacity:0}}

/* Parallaxe au pointeur (posée par intro-v1.js) : fond et texte sur deux plans. */
@media (hover:hover) and (pointer:fine){
  .studio-motion-hero .studio-motion-media{translate:calc(var(--ds-px,0)*-18px) calc(var(--ds-py,0)*-12px);transition:translate .9s cubic-bezier(.16,1,.3,1)}
  .studio-motion-hero .studio-hero-content{translate:calc(var(--ds-px,0)*10px) calc(var(--ds-py,0)*6px);transition:translate .9s cubic-bezier(.16,1,.3,1)}
}

@media (prefers-reduced-motion:reduce){
  html[data-intro=""] body::before,html[data-intro=""] body::after{display:none}
  html[data-intro=""] *{animation:none!important}
  .studio-motion-hero :is(.studio-motion-media,.studio-hero-content){translate:none!important}
}

/* Fin de l'intro : on fige l'état final (sinon l'ancienne entrée du titre se rejouerait). */
html[data-intro=done] body::before,html[data-intro=done] body::after{content:none}
html[data-intro=done] .studio-site :is(.motion-title-line>span,.hero-title-sub,.studio-hero-disciplines,.studio-hero-context,.studio-hero-actions,.studio-hero-foot,.studio-hairline){animation:none!important}
