/* ===== HOME: sezioni che si "sfoderano" come card (movimenti di thelinestudio.com) ===== */
body[data-page=home] main{padding:0}
.section-title{display:flex;padding-bottom:.93vw}

/* 2. INTRO — card chiara che entra ruotata (translate(-10%,0) rotate(8deg) -> 0) */
.h-intro{position:relative;z-index:3}
.h-intro::after{content:"";position:absolute;left:0;top:100%;width:100%;height:100vh;background:var(--bg)}
.h-intro__wrapper{position:relative;background:var(--bg);padding:.46vw var(--gutter) .6vw;will-change:transform}
.h-intro__title{font-size:clamp(28px,4.2vw,80px);font-weight:450;letter-spacing:-.045em;line-height:1.26;max-width:20ch}
.h-intro__links{display:flex;gap:12px clamp(28px,3vw,52px);padding-top:3.47vw;flex-wrap:wrap}

/* link con linea sotto: al passaggio la linea esce a destra e rientra da sinistra.
   Il testo resta fermo (prima scivolava a destra e finiva sopra la voce accanto). */
.arrow-link{position:relative;display:inline-flex;align-items:center;gap:1.5vw;font-size:clamp(16px,1.45vw,26px);font-weight:450;padding-bottom:4px}
.arrow-link::after{content:"";position:absolute;left:0;bottom:0;width:100%;height:1px;background:currentColor;transform-origin:left}
.arrow-link span,.arrow-link i{font-style:normal}
.arrow-link:hover::after,.arrow-link:focus-visible::after{animation:al-wipe .9s cubic-bezier(.19,1,.22,1)}
@keyframes al-wipe{0%{transform:scaleX(1);transform-origin:right}40%{transform:scaleX(0);transform-origin:right}41%{transform:scaleX(0);transform-origin:left}100%{transform:scaleX(1);transform-origin:left}}

/* 3. EVENTI IN EVIDENZA — pila di card: quella sopra vola via in alto a sinistra ruotando */
.h-feat{position:relative;z-index:4}
.h-feat__sticky{position:sticky;top:0;height:100vh;overflow:hidden}
.h-feat__head{position:absolute;left:0;top:0;width:100%;z-index:50;padding:calc(var(--head-h) + .5vw) var(--gutter) 0;pointer-events:none;color:#f8f8f8;mix-blend-mode:difference}
.h-feat__list{list-style:none;position:relative;margin-top:.87vw;font-size:clamp(14px,1.25vw,22px);font-weight:450;text-transform:uppercase}
.h-feat__list li{display:flex;line-height:1.26;opacity:.5;transition:opacity .3s}
.h-feat__list li.is-active{opacity:1}
.h-feat__list li .id{flex:0 0 22vw}
.h-feat__list li .t{flex:0 0 33vw}
.h-feat__asset{position:absolute;inset:0;pointer-events:none}
.h-feat__asset.is-active{pointer-events:all}
.h-feat__wrapper{position:absolute;inset:0;background:rgba(222,223,227,.97);transform-origin:0 0;will-change:transform}
.h-feat__title-wrapper{display:flex;justify-content:space-between;align-items:flex-end;padding:calc(var(--head-h) + 9vw) var(--gutter) 0}
.h-feat__title{font-size:clamp(40px,6.5vw,124px);font-weight:500;letter-spacing:-.06em;line-height:1.26;text-transform:none}
.h-feat__fig-wrapper{position:absolute;left:0;top:34%;width:100%;height:100%;will-change:transform}
.h-feat__fig{position:absolute;inset:0;-webkit-mask-image:radial-gradient(ellipse at center,#fff 55%,rgba(0,0,0,0) 100%);mask-image:radial-gradient(ellipse at center,#fff 55%,rgba(0,0,0,0) 100%)}
.h-feat__fig video,.h-feat__fig img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.h-feat__meta{position:absolute;left:var(--gutter);right:var(--gutter);top:calc(34% - 2.2vw);display:flex;gap:2vw;font-size:12px;font-weight:500;text-transform:uppercase}
.h-feat__meta .red{color:var(--accent)}
.h-feat__scroller{height:100vh}

/* 4. CHI SIAMO */
.h-about{position:relative;z-index:5;background:var(--bg)}
.h-about__header{background:#f8f8f8;padding:.46vw var(--gutter) 18.5vw;will-change:transform}
.h-about__title{font-size:clamp(34px,6.2vw,120px);font-weight:450;letter-spacing:-.055em;line-height:1.26;max-width:16ch}
.h-about__grid{display:grid;grid-template-columns:repeat(9,1fr);gap:var(--gutter);padding:0 var(--gutter) 10vw}
.h-about__figs{grid-column:1/span 5;position:relative;min-height:60vw}
.h-about__fig{position:relative;overflow:hidden;will-change:transform}
.h-about__fig img{width:100%;height:100%;object-fit:cover}
.h-about__fig--a{width:85%;aspect-ratio:4/5;margin-top:12vw}
.h-about__fig--b{position:absolute;right:0;top:-10vw;width:42%;aspect-ratio:3/4}
.h-about__content{grid-column:6/span 4;padding-top:30vw}
.h-about .services{grid-template-columns:1fr 1fr}
.h-about__partners{font-size:clamp(16px,1.45vw,26px);font-weight:450;text-transform:uppercase;line-height:1.26}

/* footer rosso come la reference */
body[data-page=home] .footer{margin-top:0;background:var(--accent);color:var(--bg);position:relative;z-index:6}
body[data-page=home] .footer__cta:hover{color:var(--ink)}

@media (max-width:820px){
  .h-feat__list li .id{flex-basis:12vw}.h-feat__list li .t{flex-basis:auto}
  .h-feat__title-wrapper{padding-top:calc(var(--head-h) + 34vw);flex-direction:column;align-items:flex-start;gap:12px}
  .h-feat__fig-wrapper{top:46%}.h-feat__meta{top:calc(46% - 28px);flex-wrap:wrap}
  .h-about__figs,.h-about__content{grid-column:1/-1}
  .h-about__content{padding-top:0}
  .h-about__figs{min-height:110vw}
}
@media (prefers-reduced-motion:reduce){
  [data-unfold],[data-hero-layer],.h-feat__wrapper,.h-feat__fig-wrapper{transform:none!important}
}

/* ===== Brandbook 03 (PROVA): nero, quattro grigi, liste numerate, logo dritto in fondo a sinistra ===== */

.h-intro__wrapper{background:var(--bg);color:var(--ink);border-top:1px solid var(--fondo);padding-top:var(--gutter)}
.h-intro::after{background:var(--bg)}
.h-intro__title{color:var(--hi);font-weight:800;font-stretch:75%;letter-spacing:-.01em;line-height:1.26;max-width:22ch;margin-top:1vw}
.h-intro__note{margin-top:2vw;max-width:46ch;font-size:clamp(13px,1vw,16px);line-height:1.35}
.arrow-link{color:var(--hi);font-weight:500;font-stretch:75%}
.h-feat__head{color:var(--ink);mix-blend-mode:normal}
.h-feat__list li{opacity:1;color:var(--ink);font-weight:800;font-stretch:75%;transition:color .3s}
.h-feat__list li.is-active{color:var(--hi)}
.h-feat__list li .id{flex:0 0 12vw;font-weight:500}
.h-feat__wrapper{background:var(--bg);border-top:1px solid var(--fondo)}
.h-feat__title{color:var(--hi);font-weight:800;font-stretch:75%;letter-spacing:-.01em;line-height:1.26;display:flex;gap:.25em;align-items:flex-start;max-width:70vw}
.h-feat__title .num{padding-top:.6em;font-size:12px}
.h-feat__fig{-webkit-mask-image:none;mask-image:none}
.h-feat__meta{color:var(--ink);font-weight:500;font-stretch:75%}
.h-feat__meta .lbl{color:var(--hi)}
.h-about{background:var(--bg)}
.h-about__header{background:var(--fondo);color:var(--ink)}
.h-about__title{color:var(--hi);font-weight:800;font-stretch:75%;letter-spacing:-.01em;line-height:1.26}
.h-about__partners{color:var(--ink);font-weight:800;font-stretch:75%}
body[data-page=home] .footer{background:var(--bg);color:var(--ink)}
body[data-page=home] .footer__cta:hover{color:var(--ink)}
@media (max-width:820px){.h-feat__list li .id{flex-basis:16vw}}
.header__status{font-size:11px;line-height:1.1}
.h-feat__title{text-transform:uppercase;font-size:clamp(34px,5.4vw,104px)}
.h-feat__list{font-size:12px;line-height:1.26}
/* --fy (inizio della foto) e la posizione del titolo li calcola home.js (layoutFeat) */
.h-feat__title-wrapper{position:absolute;left:0;right:0;top:calc(42% - 3vh);bottom:auto;padding:0 var(--gutter)}
.h-feat__fig-wrapper{top:var(--fy,42%)}
.h-feat__meta{top:calc(var(--fy,42%) - 2vh)}
@media (max-width:820px){.h-feat__title-wrapper{padding-top:0}}
@media (max-width:820px){
  .h-feat__list li{white-space:nowrap}
  .h-feat__list li span:nth-child(3){display:none}
  .h-feat__list li .t{overflow:hidden;text-overflow:ellipsis;flex:1}
  .h-feat__title-wrapper{bottom:auto;flex-direction:column;align-items:flex-start;gap:8px}
  .h-feat__title{font-size:clamp(28px,8.6vw,44px);max-width:none}
  .h-feat__fig-wrapper{top:var(--fy,62%)}.h-feat__meta{display:none}
}

/* ===== 1. HERO + PRELOADER (struttura di thelinestudio.com) =====
   preloader rosso con contatore -> il logo si scrive -> il rosso diventa filtro multiply sul micromontaggio
   -> allo scroll il filtro si stacca ruotando attorno all'angolo in basso a sinistra e scopre i colori */
:root{--rosso:#ff2a00}
.h-hero{position:relative;height:200vh}
.h-hero__sticky{position:sticky;top:0;height:100vh;overflow:hidden;background:#fff}
.h-hero__fig{position:absolute;inset:-1px;opacity:0;transform:translate(-10%,124%) rotate(15deg);transition:transform 1s cubic-bezier(.19,1,.22,1)}
body.is-loaded .h-hero__fig{opacity:1;transform:none}
.h-hero__fig video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:grayscale(.35) contrast(1.15)}
.h-hero__acetate{position:absolute;inset:0;background:var(--rosso);mix-blend-mode:multiply;transform-origin:0 100%;will-change:transform;z-index:1}
.h-hero__wrapper{position:relative;z-index:2;height:100vh;display:flex;align-items:flex-end;padding:0 var(--gutter) var(--gutter);color:#fff;pointer-events:none}
.h-hero__logo{display:block;width:100%;pointer-events:auto}
.h-logo{display:block;width:100%;height:auto;overflow:visible}
.h-logo__dot{transform-box:fill-box;transform-origin:50% 50%;transform:scale(0)}

.preloader{position:fixed;inset:0;z-index:45;pointer-events:none;color:#fff}
.preloader__count{position:absolute;left:var(--gutter);top:calc(var(--head-h) + .4vw);display:flex;align-items:baseline;
  font-size:clamp(44px,8.4vw,150px);font-weight:300;font-stretch:75%;letter-spacing:-.04em;line-height:.9;font-variant-numeric:tabular-nums;white-space:nowrap}
.preloader__count i{font-style:normal;font-weight:200;margin:0 .04em}
.preloader__unit{margin-left:.25em}
.preloader.is-done{opacity:0;transition:opacity .4s ease .1s}

/* header durante il caricamento: bianco sul rosso, entra dopo un attimo (come la reference) */
body[data-page=home].pre-head .header{opacity:1;color:#fff;transition:opacity .5s}
body[data-page=home].pre-head:not(.is-loaded) .header{pointer-events:none}
body[data-page=home] .header{transition:opacity .5s,color .4s}

@media (prefers-reduced-motion:reduce){
  .h-hero__fig{transition:none}.preloader{display:none}
}

/* header trasparente e bianco finché si è sull'apertura (come la reference), poi torna al nero */
body[data-page=home].on-hero .header{background:transparent;color:#fff}
body[data-page=home].on-hero .header .nav a.is-active .dot{background:#fff}
body[data-page=home] .header{transition:opacity .5s,color .4s,background-color .4s}
