/* Narrativa de scroll y ajustes estéticos. La página se lee como un corto en cinco actos.
   Sin soporte de animaciones por scroll o con «reducir movimiento», todo queda estático y legible. */

/* ── Acto 1 · Portada: el titular protagoniza ─────────────────────────── */
.video-preview.direction-editorial .hero{min-height:100svh;display:flex;flex-direction:column}
.video-preview.direction-editorial .hero-stage{margin-top:auto}
.direction-editorial .hero-copy{grid-template-columns:1.45fr 1fr;align-items:end;column-gap:6vw;row-gap:1.25rem}
.direction-editorial .hero-statement{grid-column:1;grid-row:1/span 3;margin:0;padding:0;border:0;font-size:clamp(3rem,6.4vw,6.25rem);line-height:.98;letter-spacing:-.06em}
.direction-editorial .hero-statement>span,.direction-editorial .hero-statement>em{display:inline-block}
.direction-editorial .hero-description{grid-column:2;grid-row:1;margin:0;padding:0;font-size:1rem;line-height:1.6}
.direction-editorial .hero-sound{grid-column:2;grid-row:2}
.direction-editorial .hero-sound p{margin:0;font-size:.95rem;line-height:1.6;opacity:.85}
.direction-editorial .hero-actions{grid-column:2;grid-row:3;align-self:start}
.direction-editorial .hero-meta,.direction-editorial .hero-bottom{font-size:.8rem;letter-spacing:.04em}
.direction-editorial .hero-bottom span{opacity:.85}
@media(max-width:900px){
  .direction-editorial .hero-copy{grid-template-columns:1fr}
  .direction-editorial .hero-statement{grid-row:1;font-size:clamp(2.75rem,12vw,4.25rem);margin-bottom:.75rem}
  .direction-editorial .hero-description{grid-column:1;grid-row:2}
  .direction-editorial .hero-sound{grid-column:1;grid-row:3}
  .direction-editorial .hero-actions{grid-column:1;grid-row:4}
}

/* ── Acto 2 · Work: carrusel con cambio de foco ─────────────────────────── */
/* Solo el póster del frente está nítido y en color; el foco «salta» al rotar, como en cámara. */
.direction-editorial .wheel-poster img{transition:filter 1.1s var(--ease)}
.direction-editorial .wheel-poster:not(.is-front) img{filter:grayscale(1) brightness(.55) blur(1.5px)}
.direction-editorial .wheel-poster:not(.is-front):hover img,.direction-editorial .wheel-poster:not(.is-front):focus-visible img{filter:grayscale(1) brightness(.8) blur(0)}
.direction-editorial .project-wheel.has-multiple-posters .wheel-poster.is-front{transform:translateX(-50%) translateZ(25px) rotateX(var(--tilt-y,0deg)) rotateY(var(--tilt-x,0deg))}
.direction-editorial .project-wheel.has-multiple-posters .wheel-poster.is-front[style*="--tilt"]{transition:transform .35s var(--ease),filter 1.2s}
.direction-editorial .project-wheel{cursor:grab}
.direction-editorial .project-wheel:active{cursor:grabbing}
.direction-editorial .project-wheel .wheel-poster{cursor:pointer}
.wheel-caption{width:min(100%,28rem);margin:.5rem auto 0;text-align:center}
.wheel-caption p{display:flex;justify-content:center;align-items:baseline;flex-wrap:wrap;gap:.35rem .75rem;margin:0;font-size:.8rem;letter-spacing:.03em}
.wheel-count{font-variant-numeric:tabular-nums;opacity:.7}
.wheel-title{font-size:1rem;font-weight:700;letter-spacing:-.01em}
.wheel-kind{opacity:.7}
.wheel-progress{display:block;height:1px;margin:.9rem auto 0;width:6rem;background:rgba(245,236,217,.2);overflow:hidden;position:relative}
.wheel-progress::after{content:'';position:absolute;inset:0;background:var(--cream);transform:scaleX(0);transform-origin:left}
.wheel-playing .wheel-progress::after{animation:wheel-progress 6.5s linear forwards}
@keyframes wheel-progress{to{transform:scaleX(1)}}
.wheel-caption.is-changing p{animation:caption-in .6s var(--ease)}
@keyframes caption-in{from{opacity:0;transform:translateY(6px)}}
/* En ordenador la inclinación y el cursor de mano indican que el póster se abre; la frase queda para pantallas táctiles. */
@media(hover:hover) and (pointer:fine){.direction-editorial .project-open-hint{display:none}}
@media(hover:none){.direction-editorial .project-wheel{cursor:auto}}
@media(prefers-reduced-motion:reduce){.direction-editorial .wheel-poster img,.wheel-caption.is-changing p{transition:none;animation:none}.wheel-playing .wheel-progress::after{animation:none}}

/* ── Acto 3 · Reel: portada propia en lugar del recuadro blanco de Vimeo ── */
.reel-facade{position:absolute;inset:0;z-index:1;display:grid;place-items:center;width:100%;padding:0;border:0;background:#0c0c0c;color:var(--cream);font:inherit;cursor:pointer;overflow:hidden}
.reel-facade[hidden]{display:none}
.reel-facade img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.32;filter:grayscale(1) contrast(1.1);transition:opacity .4s,transform .8s var(--ease)}
.reel-facade-play{position:relative;display:inline-flex;align-items:center;gap:.75rem;min-height:56px;padding:.9rem 1.5rem;border-radius:999px;background:var(--cream);color:var(--ink);font-size:.95rem;transition:transform .3s var(--ease)}
.reel-facade-play>span{font-size:.75rem}
.reel-facade:hover img,.reel-facade:focus-visible img{opacity:.45;transform:scale(1.03)}
.reel-facade:hover .reel-facade-play,.reel-facade:focus-visible .reel-facade-play{transform:scale(1.05)}
.reel-facade:focus-visible{outline:2px solid var(--cream);outline-offset:-6px}

/* ── Servicios: título fijo, una línea visible y números con presencia ─── */
.direction-editorial .services{position:relative;isolation:isolate;overflow-x:clip}
.direction-editorial .services-list article{grid-template-columns:3.25rem 1fr}
.direction-editorial .services-list article>span{font-size:1.75rem;line-height:1.1;letter-spacing:-.05em;opacity:.3}
.service-lede{grid-column:2;margin:.15rem 0 0;font-size:.95rem;line-height:1.55;opacity:.75}
@media(min-width:901px){.direction-editorial .services-intro{position:sticky;top:8.5rem;align-self:start}}

/* ── Curvas de nivel en Servicios y Contacto ───────────────────────────── */
/* Fondo estático por defecto; curvas.js lo sustituye por curvas que reaccionan como presión sonora. */
.direction-editorial .contact{position:relative;isolation:isolate}
.direction-editorial :is(.services,.contact)[data-curvas]{background-image:url(topografia.svg);background-size:cover;background-position:center}
.direction-editorial .about[data-curvas]{background-image:url(topografia-claro.svg);background-size:cover;background-position:center}
.direction-editorial :is(.services,.contact,.about).curvas-on{background-image:none}
.curvas-canvas{position:absolute;inset:0;z-index:-1;width:100%;height:100%;pointer-events:none}

/* ── Textos pequeños legibles ───────────────────────────────────────────── */
.direction-editorial .index{opacity:.85}
.direction-editorial .contact-form label>span,.direction-editorial .form-submit p{opacity:.8}
.direction-editorial .studio-reel-heading>p span{opacity:.85}
.direction-editorial .studio-reel-fallback{color:rgba(245,236,217,.82)}

/* ── Páginas interiores ─────────────────────────────────────────────────── */
/* Términos: misma banda carbón con curvas que las páginas de servicio. */
.terms-page{overflow-x:clip}
.terms-page main{margin-top:0}
.terms-hero{margin:0 calc(50% - 50vw) 40px;padding:clamp(3rem,7vw,5rem) max(24px,calc(50vw - 366px));background:#1e1e1e url(topografia-claro.svg) center/cover;color:#f5ecd9}
.terms-hero h1{margin-bottom:20px}
.terms-hero .meta:last-child{margin:0;opacity:.85}

/* ── Movimiento: solo si el visitante no pidió reducirlo ────────────────── */
@media(prefers-reduced-motion:no-preference){
  /* Apertura: el titular llega en dos tiempos. */
  .direction-editorial .hero-statement>span,.direction-editorial .hero-statement>em{animation:line-in 1.1s var(--ease) both}
  .direction-editorial .hero-statement>em{animation-delay:.75s}
  .direction-editorial .hero-description,.direction-editorial .hero-sound,.direction-editorial .hero-actions{animation:line-in 1s var(--ease) 1.2s both}
  @keyframes line-in{from{opacity:0;transform:translateY(.4em)}}
  /* Nosotros y Contacto: el titular llega y su final entra después, como en la portada. */
  .info-page h1{animation:line-in 1s var(--ease) both}
  .info-page h1 em{display:inline-block;animation:line-in 1s var(--ease) .7s both}

  @supports (animation-timeline:view()){
    /* Acto 1: al bajar, el video se encoge hasta quedar en un marco y se oscurece. */
    .video-preview .hero{view-timeline:--hero block}
    .video-preview .hero-video{animation:hero-frame linear both;animation-timeline:--hero;animation-range:exit 0% exit 90%}
    .video-preview .hero-stage,.video-preview .hero-bottom{animation:hero-leave linear both;animation-timeline:--hero;animation-range:exit 0% exit 70%}
    @keyframes hero-frame{to{transform:scale(.8);border-radius:28px;opacity:.35}}
    @keyframes hero-leave{to{transform:translateY(-6vh);opacity:0}}

    /* Acto 2: los pósteres llegan desde la profundidad. */
    .work .project-carousel{animation:depth-in linear both;animation-timeline:view();animation-range:entry 0% cover 40%}
    @keyframes depth-in{from{opacity:.15;transform:scale(.86) translateY(48px)}}

    /* Acto 3: se apagan las luces antes del reel. */
    .studio-reel{position:relative;isolation:isolate}
    .studio-reel::before{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(transparent,rgba(0,0,0,.6) 30%,rgba(0,0,0,.6) 70%,transparent);animation:lights-down linear both;animation-timeline:view();animation-range:entry 0% cover 45%}
    .studio-reel-player{animation:screen-in linear both;animation-timeline:view();animation-range:entry 5% cover 40%}
    .studio-reel-heading>p{animation:fade-up linear both;animation-timeline:view();animation-range:entry 20% cover 45%}
    @keyframes lights-down{from{opacity:0}}
    @keyframes screen-in{from{opacity:.35;transform:scale(.9)}}
    @keyframes fade-up{from{opacity:0;transform:translateY(12px)}}

    /* Acto 4: los servicios entran uno a uno; la frase de Nosotros se ilumina. */
    .direction-editorial .services-list article{animation:slide-in linear both;animation-timeline:view();animation-range:entry 0% cover 30%}
    @keyframes slide-in{from{opacity:0;transform:translateX(40px)}}
    .direction-editorial .about h2#about-title{background:linear-gradient(90deg,var(--cream) 46%,rgba(245,236,217,.18) 54%) 100% 0/220% 100% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;animation:ink-fill linear both;animation-timeline:view();animation-range:entry 40% cover 60%}
    .direction-editorial .about h2#about-title em{color:transparent}
    @keyframes ink-fill{to{background-position:0 0}}

  }
}
@media(forced-colors:active),print{.curvas-canvas{display:none}.direction-editorial :is(.services,.contact)[data-curvas]{background-image:none}}
