/* =========================================================
   HERO SYSTEM 016 — TEXT RESTORE + CONTACTO MOTION MASTER
   Safe reveal: static state is always visible. During the delay,
   backwards fill applies the opening frame; after the animation,
   CSS returns to the visible static state. No hero can remain hidden.
   ========================================================= */
:root{
  --sz-master-left:5.8vw;
  --sz-master-top:52svh;
  --sz-master-width:760px;
  --sz-master-serif:"Cormorant Garamond","Baskerville","Times New Roman",serif;
  --sz-master-sans:-apple-system,BlinkMacSystemFont,"Helvetica Neue",Arial,sans-serif;
  --sz-master-title:clamp(64px,6.2vw,104px);
  --sz-master-line:.88;
  --sz-master-track:-.045em;
  --sz-master-ease:cubic-bezier(.22,.7,.18,1);
}

/* Copy anchor */
body[data-page="home"] .art-hero.art-hero-full .art-hero-copy,
body[data-page="projects"] .projects-hero .hero-inner,
body[data-page="studio"] .st-hero-content,
body[data-page="approach"] .ef-hero-copy,
body[data-page="contact"] .contact-hero-copy{
  position:absolute !important;
  top:var(--sz-master-top) !important;
  left:var(--sz-master-left) !important;
  right:auto !important;
  bottom:auto !important;
  width:min(var(--sz-master-width),88vw) !important;
  max-width:var(--sz-master-width) !important;
  padding:0 !important;
  margin:0 !important;
  z-index:8 !important;
  display:block !important;
  visibility:visible !important;
}

/* Kicker */
body[data-page="home"] .art-hero.art-hero-full .art-kicker,
body[data-page="projects"] .projects-hero .eyebrow,
body[data-page="studio"] .st-hero-content .st-kicker,
body[data-page="approach"] .ef-hero-copy .ef-kicker,
body[data-page="contact"] .contact-hero-copy .contact-kicker{
  margin:0 0 18px !important;
  font:500 9px/1 var(--sz-master-sans) !important;
  letter-spacing:.30em !important;
  text-transform:uppercase !important;
  color:rgba(255,255,255,.82) !important;
}

/* Exact Contacto title scale */
body[data-page="home"] .art-hero.art-hero-full .art-title,
body[data-page="projects"] .projects-hero .title,
body[data-page="studio"] .st-hero-cover h1,
body[data-page="approach"] .ef-hero h1,
body[data-page="contact"] .contact-hero-copy h1{
  margin:0 !important;
  max-width:var(--sz-master-width) !important;
  font-family:var(--sz-master-serif) !important;
  font-size:var(--sz-master-title) !important;
  font-weight:400 !important;
  font-style:normal !important;
  line-height:var(--sz-master-line) !important;
  letter-spacing:var(--sz-master-track) !important;
  color:#fff !important;
  visibility:visible !important;
}

body[data-page="contact"] .contact-hero-copy h1 em{
  display:inline-block !important;
  margin-top:18px !important;
  max-width:650px !important;
  font-family:inherit !important;
  font-size:.58em !important;
  font-weight:400 !important;
  font-style:normal !important;
  line-height:1.05 !important;
  letter-spacing:-.025em !important;
}

/* Static/fallback state = visible. Existing page animations are fully replaced. */
body[data-page="home"] .art-hero.art-hero-full .art-hero-copy > *,
body[data-page="projects"] .projects-hero .hero-inner > *,
body[data-page="studio"] .st-hero-content > *,
body[data-page="approach"] .ef-hero-copy > *,
body[data-page="contact"] .contact-hero-copy > *{
  opacity:1;
  transform:none;
  visibility:visible !important;
  animation-name:szHero016Reveal !important;
  animation-duration:1.3s !important;
  animation-timing-function:var(--sz-master-ease) !important;
  animation-fill-mode:backwards !important;
  animation-iteration-count:1 !important;
}

body[data-page="home"] .art-hero-copy > *:nth-child(1),
body[data-page="projects"] .projects-hero .hero-inner > *:nth-child(1),
body[data-page="studio"] .st-hero-content > *:nth-child(1),
body[data-page="approach"] .ef-hero-copy > *:nth-child(1),
body[data-page="contact"] .contact-hero-copy > *:nth-child(1){animation-delay:.70s !important}
body[data-page="home"] .art-hero-copy > *:nth-child(2),
body[data-page="projects"] .projects-hero .hero-inner > *:nth-child(2),
body[data-page="studio"] .st-hero-content > *:nth-child(2),
body[data-page="approach"] .ef-hero-copy > *:nth-child(2),
body[data-page="contact"] .contact-hero-copy > *:nth-child(2){animation-delay:.95s !important}
body[data-page="home"] .art-hero-copy > *:nth-child(3),
body[data-page="projects"] .projects-hero .hero-inner > *:nth-child(3),
body[data-page="studio"] .st-hero-content > *:nth-child(3),
body[data-page="approach"] .ef-hero-copy > *:nth-child(3),
body[data-page="contact"] .contact-hero-copy > *:nth-child(3){animation-delay:1.22s !important}
body[data-page="home"] .art-hero-copy > *:nth-child(4),
body[data-page="projects"] .projects-hero .hero-inner > *:nth-child(4),
body[data-page="studio"] .st-hero-content > *:nth-child(4),
body[data-page="approach"] .ef-hero-copy > *:nth-child(4),
body[data-page="contact"] .contact-hero-copy > *:nth-child(4){animation-delay:1.45s !important}
body[data-page="home"] .art-hero-copy > *:nth-child(5),
body[data-page="studio"] .st-hero-content > *:nth-child(5),
body[data-page="approach"] .ef-hero-copy > *:nth-child(5){animation-delay:1.62s !important}

@keyframes szHero016Reveal{
  from{opacity:0;transform:translateY(18px)}
  to{opacity:1;transform:translateY(0)}
}

/* Exact Contacto image behaviour: immediately present + 5s settle */
body[data-page="home"] .art-hero.art-hero-full .art-hero-image,
body[data-page="projects"] .projects-hero .hero-media{
  opacity:1 !important;
  clip-path:none !important;
  animation:none !important;
  visibility:visible !important;
}
body[data-page="home"] .art-hero.art-hero-full .art-image-zoom,
body[data-page="projects"] .projects-hero .hero-media img,
body[data-page="studio"] .st-hero-bg img,
body[data-page="approach"] .ef-hero-image img,
body[data-page="contact"] .contact-hero-image img{
  transform:none;
  animation:szHero016Image 5s var(--sz-master-ease) .08s backwards !important;
}
@keyframes szHero016Image{
  from{transform:scale(1.018)}
  to{transform:scale(1)}
}

@media(min-width:901px) and (max-height:820px){
  :root{--sz-master-top:46svh;--sz-master-title:clamp(58px,5.6vw,94px)}
}

@media(max-width:900px){
  :root{
    --sz-master-left:20px;
    --sz-master-top:48svh;
    --sz-master-width:calc(100vw - 40px);
    --sz-master-title:clamp(50px,13.5vw,58px);
    --sz-master-line:.90;
    --sz-master-track:-.04em;
  }
  body[data-page="home"] .art-hero.art-hero-full .art-hero-copy,
  body[data-page="projects"] .projects-hero .hero-inner,
  body[data-page="studio"] .st-hero-content,
  body[data-page="approach"] .ef-hero-copy,
  body[data-page="contact"] .contact-hero-copy{
    left:20px !important;right:20px !important;width:auto !important;max-width:none !important;
  }
  body[data-page="contact"] .contact-hero-copy h1 em{font-size:.55em !important;margin-top:12px !important}
}

@media(max-width:900px) and (max-height:740px){
  :root{--sz-master-top:42svh;--sz-master-title:clamp(46px,12.6vw,54px)}
}

@media(prefers-reduced-motion:reduce){
  body[data-page="home"] .art-hero.art-hero-full .art-hero-copy > *,
  body[data-page="projects"] .projects-hero .hero-inner > *,
  body[data-page="studio"] .st-hero-content > *,
  body[data-page="approach"] .ef-hero-copy > *,
  body[data-page="contact"] .contact-hero-copy > *,
  body[data-page="home"] .art-hero.art-hero-full .art-image-zoom,
  body[data-page="projects"] .projects-hero .hero-media img,
  body[data-page="studio"] .st-hero-bg img,
  body[data-page="approach"] .ef-hero-image img,
  body[data-page="contact"] .contact-hero-image img{
    animation:none !important;opacity:1 !important;transform:none !important;visibility:visible !important;
  }
}

/* PROJECTS HERO — subtitle clearance for IT/EN long titles */
body[data-page="projects"] .projects-hero .title{
  margin-bottom:38px !important;
}
body[data-page="projects"] .projects-hero .lead{
  margin-top:0 !important;
}
@media(max-width:900px){
  body[data-page="projects"] .projects-hero .title{margin-bottom:24px !important;}
}
