/* Font self-hosted: Montserrat (principale) e Lora (di supporto), variabili, sottoinsiemi latin + latin-ext */
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/montserrat-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/montserrat-latin.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/lora-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/lora-latin.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* SAIE S.p.A. — foglio di stile unico
   Breakpoint: tablet 729–1024px, mobile ≤728px (come il tema originale) */

/* ---------------------------------------------------------------- base */
* { margin: 0; padding: 0; }
html { background: #fff; }
body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 300;
  color: #222;
  letter-spacing: .5px;
}
::selection { background: #222; color: #fff; }
img, svg { display: block; }
a { font-weight: 500; color: #222; }
a:hover { text-decoration: none; }
h1 { font-family: 'Lora', serif; font-size: 42px; font-weight: 400; line-height: 1.2em; letter-spacing: 1px; }
h2 { font-family: 'Montserrat', sans-serif; font-size: 35px; font-weight: 400; line-height: 42px; letter-spacing: 3px; }
h3 { font-family: 'Lora', serif; font-size: 21px; font-weight: 400; line-height: 21px; letter-spacing: 2px; }
h4 { font-size: 14px; font-weight: 500; line-height: 21px; letter-spacing: 1px; }
h6 { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 11px; font-weight: 500; line-height: 21px; letter-spacing: 5px; text-transform: uppercase; }
[hidden] { display: none !important; }
html.scroll-y { overflow-y: scroll; }
.is-hidden { visibility: hidden; }
/* elementi animati in ingresso: nascosti fin dal primo disegno, li mostra lo script */
.js .reveal, .js .js-title, .js .js-cover { visibility: hidden; }
.js .is-shown { visibility: visible; }
.js .work__img { opacity: 0; }
/* altezza delle sezioni a tutto schermo: finestra meno header, footer e 50px (come il tema originale) */
.js-fill { height: max(400px, calc(100vh - 190px)); height: max(400px, calc(100svh - 190px)); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- pulsanti */
.btn {
  display: inline-block;
  border: 2px solid #222;
  line-height: 28px;
  padding: 0 21px;
  color: #222;
  background: transparent;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all .2s linear;
}
.btn:hover { background: #222; color: #fff; }
.btn:active { opacity: .25; transition: all .075s linear; }
.btn--light { border-color: #fff; color: #fff; }
.btn--light:hover { background: #fff; color: #222; }
.btn-dark {
  display: block;
  margin-top: 21px;
  background: #383838;
  line-height: 28px;
  padding: 0 21px;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  border-radius: 3px;
  box-shadow: 0 1px 0 0 #434343 inset, 0 0 1px rgba(0,0,0,.1);
  transition: all .2s linear;
}
.btn-dark:hover { background: #434343; }
.btn-dark:active { opacity: .5; transition: all .075s linear; }

/* ---------------------------------------------------------------- struttura */
.site { position: relative; max-width: 1980px; margin: 0 auto; overflow-x: clip; }
.main { min-height: 100vh; box-sizing: border-box; padding: 90px 70px 0; }
.page-body { position: relative; background: #fff; }

/* header */
.header {
  position: absolute;
  top: 0; left: 0; right: 0;
  margin-top: 10px;
  height: 70px;
  padding: 0 70px;
  display: flex;
  justify-content: space-between;
  line-height: 70px;
  background: #fff;
  z-index: 99;
  user-select: none;
}
.logo img { width: auto; height: 70px; }
.logo:active { opacity: .5; }
.nav ul { display: flex; list-style: none; }
.nav li { margin-left: 21px; font-size: 11px; font-weight: 500; text-transform: uppercase; }
.nav li:first-child { margin-left: 0; }
.nav a { position: relative; display: block; color: #919191; text-decoration: none; letter-spacing: 1px; }
.nav a:hover, .nav a[aria-current] { color: #222; }
.nav a[aria-current]::before { content: ''; position: absolute; top: 1px; left: 0; right: 0; height: 2px; background: #222; }
.nav a:active { color: rgba(34,34,34,.3) !important; }
.menu-btn { display: none; align-self: flex-start; margin-top: 19px; padding: 0 7px; font-weight: 300; }
.header.is-compact .nav { display: none; }
.header.is-compact .menu-btn { display: block; }
@media (max-width: 518px) {
  .header:not(.is-measured) .nav { display: none; }
  .header:not(.is-measured) .menu-btn { display: block; }
}

/* menu a schermo intero (mobile) */
.menu-overlay {
  position: fixed; inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.9);
  overflow: auto;
  -webkit-font-smoothing: antialiased;
}
.menu-overlay__close { position: absolute; top: 21px; right: 21px; padding: 0; border: 0; background: none; cursor: pointer; }
.menu-overlay__close:active { opacity: .25; }
.menu-overlay__close path { fill: #fff; }
.menu-overlay ul { position: absolute; left: 10%; top: 50%; width: 80%; padding: 21px 0; list-style: none; text-align: center; transform: translateY(-50%); }
.menu-overlay a { display: block; color: #fff; text-decoration: none; line-height: 35px; font-size: 24px; font-weight: 300; letter-spacing: 10px; text-transform: uppercase; }

/* footer */
.footer {
  position: relative;
  display: flex;
  height: 70px;
  padding-right: 21px;
  line-height: 70px;
  font-size: 12px;
  letter-spacing: 1px;
  color: #666;
  background: #fff;
  user-select: none;
}
.has-footer-line .footer { border-top: 1px solid #eee; }
.footer__info { flex: 1; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.footer__logos { display: flex; align-items: center; gap: 20px; margin-top: 10px; }
.footer__logos img { height: auto; }
.footer__credits span { font-weight: 500; color: #222; }
.to-top { display: flex; align-items: flex-start; height: 70px; padding: 0 0 0 21px; border: 0; background: none; cursor: pointer; }
.to-top svg { margin-top: 27px; }
.to-top path { fill: #999; }
.to-top:active svg { opacity: .25; }

/* ---------------------------------------------------------------- animazioni di ingresso */
/* cambio pagina: la nuova pagina entra in dissolvenza dal bianco (la vecchia esce in dissolvenza, vedi main.js) */
.nav-in body { animation: nav-in .3s ease-out backwards; }
@keyframes nav-in { from { opacity: 0; } }
/* altezza delle sezioni a tutto schermo: finestra meno header, footer e 50px (come il tema originale) */
.js-fill { height: max(400px, calc(100vh - 190px)); height: max(400px, calc(100svh - 190px)); }

/* ---------------------------------------------------------------- titolo pagina (box con bordo) */
.page-title { margin-top: 10px; }
.page-title::after { content: ''; display: table; clear: both; }
.page-title__box { float: left; padding: 21px; border: 2px solid #dedede; }
.page-title h6 { color: #adadad; }
.page-title h1, .page-title h2 { font-family: 'Montserrat', sans-serif; font-size: 35px; font-weight: 400; line-height: 1em; letter-spacing: 1px; overflow-wrap: break-word; }

/* ---------------------------------------------------------------- home */
.hero { position: relative; margin-top: 10px; overflow: hidden; -webkit-font-smoothing: antialiased; }
.hero__bg { position: absolute; inset: 10px 0 0; overflow: hidden; }
.hero__slide { position: absolute; inset: 0; background: center / cover no-repeat; z-index: 1; }
.hero__slide.is-entering { z-index: 2; opacity: 0; }
.hero__arrows { position: absolute; top: 21px; right: 21px; z-index: 10; display: flex; gap: 2px; padding: 2px; border: 2px solid #fff; list-style: none; user-select: none; }
.hero__arrows li { height: 30px; overflow: hidden; cursor: pointer; }
.hero__arrows li > * { transition: all .1s ease-out; }
.hero__arrows li:hover > * { transform: translateY(-30px); }
.hero__arrows li:active { opacity: .25; }
.hero__arrows .arrow-ico { display: block; width: 47px; padding: 10px; }
.hero__arrows path { fill: #fff; }
.hero__arrows .arrow--next .arrow-ico svg { margin-left: auto; }
.hero__arrows .arrow--next > svg { margin-left: auto; }
.hero__box {
  position: absolute; right: 21px; bottom: 21px;
  z-index: 10;
  width: 420px; height: 300px;
  overflow: hidden;
  color: #fff;
  background: rgba(0,0,0,.8);
}
.hero__text { position: relative; height: 100%; padding: 21px; box-sizing: border-box; }
.hero__text h3 { position: relative; margin-bottom: 7px; font-size: 19px; color: rgba(255,255,255,.5); }
.hero__text h3::before { content: ''; position: absolute; top: 7px; left: -21px; width: 14px; height: 2px; background: rgba(255,255,255,.25); }
.hero__text h2 { padding-left: 21px; overflow: hidden; font-size: 29px; text-transform: uppercase; }

/* ---------------------------------------------------------------- pagine con immagine in testa (referenze, privacy) */
.article { padding: 21px; border: 1px solid #eee; border-right-width: 0; }
.article__cover { width: 100%; height: auto; max-width: 1680px; max-height: 500px; }
.article__meta { position: relative; height: 70px; margin-top: -70px; line-height: 70px; text-align: center; background: #fff; }
.article__meta::after, .sheet__meta::after { content: ''; position: absolute; bottom: 0; left: 47%; width: 6%; height: 1px; background: #eee; }
.article__meta h6, .sheet__meta h6 { line-height: 70px; color: #ccc; }
.article__body { width: 960px; margin: 0 auto; }
.article__body > h1 { margin: 42px 0; text-align: center; }

/* testo formattato */
.prose { line-height: 21px; }
.prose p, .prose ul { margin-bottom: 21px; }
.prose h2, .prose h3, .prose h4 { margin: 0 0 21px; text-align: left; text-transform: none; letter-spacing: 1px; font-weight: 400; color: #222; }
.prose h2 { font-family: 'Lora', serif; font-size: 31.5px; line-height: 42px; }
.prose h3 { font-family: 'Lora', serif; font-size: 21px; line-height: 1em; }
.policy-block { padding-bottom: 21px; border-bottom: 1px dotted #636363; }
.policy-block .tight { margin-bottom: 0; }
.policy-block h2.tight, .policy-block h3.tight { padding-top: 21px; }
.policy-block p.tight { padding-top: 5px; }
.privacy { padding-bottom: 42px; }

/* elenco referenze (accordion) */
.accordion { margin-top: 10px; border: 1px solid #ccc; box-shadow: 3px 3px 0 0 #f4f4f4; overflow: hidden; list-style: none; user-select: none; }
.accordion--refs { margin-bottom: 42px; text-align: center; }
.accordion li { height: 63px; overflow: hidden; border-bottom: 1px solid #ccc; cursor: pointer; transition: all .2s ease-in-out; }
.accordion li:last-child { border-bottom: 0; }
.accordion li:hover .accordion__title { color: #919191; }
.accordion li:active .accordion__title { color: #c8c8c8; }
.accordion .accordion__title { margin: 0; padding: 21px; text-align: inherit; text-transform: none; color: inherit; font-family: inherit; font-size: 14px; font-weight: 500; line-height: 21px; letter-spacing: 1px; }
.accordion__content { padding: 0 21px 21px; }
.accordion--refs p { line-height: 32px; text-align: left; }
.privacy > .prose:first-child { margin-bottom: 30px; }

/* ---------------------------------------------------------------- portfolio (elenco) */
.works-page { width: 100%; }
.works { margin-top: 10px; }
.works::after { content: ''; display: table; clear: both; }
.filters { display: flex; margin-bottom: 21px; list-style: none; -webkit-font-smoothing: antialiased; }
.filters li { border: 1px solid #ccc; border-left-width: 0; cursor: pointer; }
.filters li:first-child { border-left-width: 1px; }
.filters span { display: block; margin: 1px; padding: 0 21px; line-height: 21px; font-size: 12px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; }
.filters li:hover span { transition: all .2s; background: #ccc; color: #fff; }
.filters li.is-active span { background: #ccc; color: #fff; }
.filters li:active span { opacity: .25; }
.works__list { position: relative; list-style: none; }
.work { margin-bottom: 21px; color: #fff; }
.work__card { background: #222; }
.work__img { width: 100%; height: 300px; object-fit: cover; }
.work__body { padding: 21px; border-top: 1px solid #fff; text-align: center; -webkit-font-smoothing: antialiased; }
.work__body h2 { font-family: inherit; font-size: 16px; font-weight: 500; line-height: 21px; letter-spacing: 1px; }
.works-page .reveal { padding-bottom: 42px; }

/* ---------------------------------------------------------------- scheda lavoro */
.work-page { width: 100%; }
.gallery-block { padding-bottom: 42px; }
.gallery-block--gap { margin-bottom: 60px; padding-bottom: 0; }
.headline { display: flow-root; text-align: center; }
.headline--spaced { margin-top: 20px; }
.headline h2 { margin-bottom: 21px; font-family: 'Montserrat', sans-serif; font-size: 14px; font-weight: 400; line-height: 1.4; letter-spacing: 2px; text-transform: uppercase; }
.headline::after { content: ''; display: block; height: 1px; margin: 20px 60px; border-top: 1px solid #eee; }

/* carosello */
.carousel { position: relative; margin-top: 10px; user-select: none; }
.carousel__viewport { position: relative; overflow: hidden; transition: height .5s ease-in-out; touch-action: pan-y; }
.carousel__track { display: flex; transform: translate3d(0,0,0); }
.carousel__track > * { flex: 0 0 100%; }
.carousel__track img { width: 100%; height: auto; -webkit-user-drag: none; }
.carousel__controls { margin-top: 10px; text-align: center; -webkit-tap-highlight-color: transparent; }
.carousel__dots button { display: inline-block; vertical-align: baseline; padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.carousel__dots span { display: block; width: 12px; height: 12px; margin: 5px 7px; border-radius: 20px; background: #222; opacity: .25; }
.carousel__dots button:hover span { opacity: .5; }
.carousel__dots button[aria-current] span { opacity: 1; }
.carousel__buttons button {
  display: inline-block; vertical-align: baseline; margin: 5px; padding: 0 21px;
  border: 1px solid #222; border-radius: 3px; background: transparent;
  font: 300 16px/21px 'Helvetica Neue', Helvetica, Arial, sans-serif; letter-spacing: 1px; color: #222;
  opacity: .5; cursor: pointer;
}
.carousel__buttons button:hover { opacity: 1; }
.carousel__buttons button:active { opacity: .25; }

/* lavori correlati */
.related { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; column-gap: 30px; padding-bottom: 42px; }
.related-card {
  position: relative; margin-top: 10px; padding: 21px; box-sizing: border-box; overflow: hidden;
  background: #222 center / cover no-repeat;
}
.related-card__content {
  height: 100%; padding: 21px; box-sizing: border-box;
  background: rgba(0,0,0,.8); color: #fff;
  -webkit-font-smoothing: antialiased;
  opacity: 0; transform: translateY(20px) translateZ(0);
  transition: all .25s cubic-bezier(.19,1,.22,1) .1s;
}
.related-card:hover .related-card__content { opacity: 1; transform: translateY(0); }
.related-card h3 { margin-bottom: 21px; font-family: 'Montserrat', sans-serif; font-size: 21px; line-height: 28px; text-transform: uppercase; }
.related-card p { margin-bottom: 21px; }
.related-card .is-grey { color: #ccc; }

/* ---------------------------------------------------------------- info / contatti */
.sheet-page { position: relative; overflow-x: hidden; overflow-y: scroll; }
.sheet-page__bg { position: absolute; inset: 10px 0 0; overflow: hidden; }
.sheet {
  position: absolute; top: 0; left: 0; z-index: 10;
  width: 960px; min-height: 100%; box-sizing: border-box;
  background: #fff; border: 1px solid #eee; border-width: 1px 0 0 1px;
}
.sheet__meta { position: relative; height: 70px; margin: 0 42px; line-height: 70px; text-align: center; }
.sheet h1 { margin: 42px 0 21px; text-align: center; }
.sheet__content { padding: 0 42px; }
.facts { margin-top: 60px; line-height: 21px; }
.facts__row { display: flex; margin: 0 -15px; }
.facts__row--spaced { margin-bottom: 20px; }
.facts dt, .facts dd { display: flow-root; padding: 0 15px; box-sizing: border-box; }
.facts dt { width: 30%; }
.facts dd { width: 70%; }
.facts p { margin-bottom: 21px; }
.facts dt strong { font-weight: bolder; color: #648093; }
.contact-box { display: flex; margin: 60px -15px 42px; padding: 42px; background: #648093; line-height: 21px; }
.contact-box > div { display: flow-root; width: 50%; padding: 0 15px; box-sizing: border-box; }
.contact-box p { margin-bottom: 21px; }
.contact-box__details { padding-top: 8px !important; }

/* ---------------------------------------------------------------- 404 */
.not-found { position: relative; margin-top: 10px; text-align: center; }

/* ---------------------------------------------------------------- banner cookie */
.cookie-bar {
  position: fixed; left: 0; bottom: 0; z-index: 100000;
  min-width: 100%;
  padding: 10px; box-sizing: border-box;
  font-size: 12px; line-height: 18px; text-align: center;
  color: #fff; background: #000;
}
.cookie-bar a {
  display: inline-block; vertical-align: middle;
  margin: 0 .3em 0 10px; padding: 2px 10px;
  font: 500 12px/20px sans-serif; letter-spacing: 3px; text-transform: uppercase; text-decoration: none;
  color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.25);
  background: #006dcc linear-gradient(to bottom, #0088cc, #0044cc) repeat-x;
  border: 1px solid; border-color: rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25); border-radius: 3px;
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 1px 2px rgba(0,0,0,.05);
  cursor: pointer; outline: none;
  transition: all .2s linear;
}
.cookie-bar a:hover, .cookie-bar a:focus { background-color: #0044cc; background-position: 0 -15px; transition: background-position .1s linear; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1310px) {
  .article__body { width: 90%; }
}
@media (max-width: 1031px) {
  .sheet { width: 100%; }
}
@media (max-width: 1024px) {
  .article { border-left-width: 0; }
  .article__body { width: 90%; }
  .related-card { padding: 0; }
}
@media (max-width: 960px) and (min-width: 729px) {
  .work__body { height: 123px; box-sizing: content-box; }
}
@media (min-width: 961px) and (max-width: 1695px) {
  .work__body { height: 100px; box-sizing: content-box; }
}
@media (max-width: 780px) {
  .related { grid-template-columns: 1fr; row-gap: 30px; }
  .related-card { margin-top: 0; }
  .facts__row, .contact-box { display: block; }
  .facts, .contact-box { text-align: center; }
  .facts__row { margin: 0 0 15px; }
  .facts__row:nth-child(n+11) { margin-bottom: 0; }
  .facts__row--spaced { margin-bottom: 20px !important; }
  .facts__row:nth-child(n+12) dt { margin-bottom: 30px; }
  .facts dt, .facts dd, .contact-box > div { width: auto; padding: 0; }
  .facts p, .contact-box p { margin-bottom: 5px; }
  .contact-box { margin: 60px 0 42px; }
  .contact-box__intro p { line-height: 32px; font-size: 21px; font-family: 'Helvetica Neue'; color: #fff; }
  .contact-box__intro { margin-bottom: 30px; }
  .contact-box__details p, .contact-box__details a { color: #fff; }
  .contact-box__details a { font-weight: 300; text-decoration: none; }
  .accordion--refs p { text-align: center; }
}
@media (max-width: 728px) {
  .main { padding: 0 14px; }
  .header { position: relative; padding: 0 14px; }
  .footer { display: block; padding: 0; }
  .footer__info { display: block; line-height: 35px; }
  .footer__logos { margin-right: 31px; }
  .to-top { position: absolute; top: 0; right: 0; }
  .hero__box { left: 0; right: 0; bottom: 0; width: auto; }
  .page-title__box { float: none; }
  .filters { display: block; }
  .filters li { border-width: 1px 1px 0; }
  .filters li:first-child { border-left-width: 1px; }
  .filters li:last-child { border-bottom-width: 1px; }
  .filters span { margin: 0; line-height: 28px; }
  .work:last-child { margin-bottom: 0; }
}
@media (max-width: 464px) {
  .footer__logos { height: 110px; gap: 10px; flex-wrap: wrap; }
}
@media (max-width: 450px) {
  .hero__box { height: 250px; }
  .hero__text h2 { font-size: 18px; line-height: 30px; }
}

/* 404 (fuori dai media query sopra per leggibilità) */
.not-found__box { position: absolute; left: 25%; bottom: calc(50% - 67px); width: 50%; }
.not-found h1 { line-height: 1em; }
.not-found p { margin: 21px 0; }
.not-found .btn { font-weight: 500; }
