/* GS Lab — site styles. Pure CSS with custom properties, mobile first.
   World: the pattern maker's table. Paper, ink, the camel of the logo, and the red
   and blue pencils pattern makers draw with (used only for pattern marks). */

:root {
  --paper: #faf8f4;      /* page: warm off-white (Matteo, 27/11: lighter than the cream) */
  --paper-2: #f1ede6;    /* raised: inputs, panels */
  --card: #ffffff;
  --ink: #1d1a16;
  --ink-2: #4f463d;      /* secondary text */
  --ink-3: #6b6156;      /* muted text */
  --line: rgb(29 26 22 / .12);
  --camel: #b58b51;      /* logo gold: decoration only */
  --camel-ink: #82602f;  /* camel as text on paper (AA) */
  --red: #b0432c;        /* red pencil */
  --blue: #34578c;       /* blue pencil */

  --font: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-quote: 'Allura', 'Snell Roundhand', 'Segoe Script', cursive; /* Ferré's quote only */
  --font-hand: 'Caveat', 'Bradley Hand', 'Segoe Print', cursive; /* the About us title only */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --wrap: 1240px;
  --gutter: 16px;
  /* vertical rhythm on one scale: tight where two sections belong together,
     wide before a new chapter (the portfolio, the contacts) */
  --section-tight: 48px;
  --section: 64px;
  --section-wide: 88px;
}
@media (min-width: 700px) { :root { --gutter: 32px; } }
@media (min-width: 1100px) { :root { --gutter: 48px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
.nb { white-space: nowrap; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(32px, 4.4vw, 52px); letter-spacing: -0.02em; }
p { margin: 0; text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 16px; border-radius: 4px; }
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* Small label above the hero title: sentence case, camel ink */
.eyebrow { font-size: 16px; font-weight: 500; color: var(--camel-ink); margin-bottom: 20px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 4px;
  font-size: 16px; font-weight: 500; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease), transform .12s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: #3a332b; }
.btn--line { border-color: rgb(29 26 22 / .3); color: var(--ink); background: transparent; }
.btn--line:hover { border-color: var(--ink); background: rgb(29 26 22 / .04); }

/* Links that underline like a seam: dashed line drawn on hover */
.stitch, .footer a, .recapiti a {
  text-decoration: none;
  background-image: linear-gradient(90deg, currentColor 50%, transparent 0);
  background-size: 6px 1px; background-repeat: repeat-x; background-position: 0 100%;
}

/* ---------- Background stars: a few small ones on one fixed layer behind every page ---------- */
.stelle { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
/* the margins beside the 1240px column are too narrow for a star below 1300px: no stars there */
@media (max-width: 1299px) { .stelle { display: none; } }
.stella { position: absolute; height: auto; transform: translate(-50%, -50%); opacity: var(--o); transition: opacity 4s ease-in-out; }
.stella path { fill: var(--camel); }
.stella--linea path { fill: none; stroke: var(--camel); stroke-width: 1.4; }
.stella--linea { --o2: calc(var(--o) * 1.8); opacity: var(--o2); }
/* with JS each star fades out, jumps to a new spot while invisible, and fades back in */
.js .stella.is-off { opacity: 0; }
main, .footer { position: relative; z-index: 1; }

/* ---------- Header ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgb(250 248 244 / .92);
  backdrop-filter: saturate(1.2) blur(8px); -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), transform .35s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 80px; }
.nav__end { display: flex; align-items: center; gap: 8px; }
.nav__cta { display: none; }
/* language dropdown (.langdd, as on Castaldo) */
.langdd { position: relative; }
.langdd summary { list-style: none; cursor: pointer; user-select: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 1px solid rgb(29 26 22 / .18); border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink); transition: border-color .16s var(--ease); }
.langdd summary::-webkit-details-marker { display: none; }
.langdd summary:hover { border-color: var(--ink); }
.langdd__chev { transition: transform .15s var(--ease); }
.langdd[open] .langdd__chev { transform: rotate(180deg); }
.langdd__menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; margin: 0; padding: 6px; list-style: none; min-width: 168px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 34px rgb(29 26 22 / .14); }
.langdd__menu button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 6px; background: none; cursor: pointer; font: 400 15px var(--font); color: var(--ink); text-align: left; }
.langdd__menu button:hover { background: var(--paper-2); }
.langdd__code { font-size: 11px; letter-spacing: .1em; color: var(--ink-3); }
.langdd__menu button[aria-pressed="true"] { font-weight: 500; }
.langdd__menu button[aria-pressed="true"] .langdd__code { color: var(--camel-ink); }
.nav__logo img { width: 150px; height: auto; }
.menu { display: none; }
.menu a:not(.btn) { text-decoration: none; font-size: 17px; color: var(--ink-2); padding: 8px 2px; position: relative; }
.menu a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: linear-gradient(90deg, var(--camel) 50%, transparent 0) 0 0 / 6px 1px repeat-x;
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.menu a:not(.btn):hover { color: var(--ink); }
.menu a:not(.btn):hover::after { transform: scaleX(1); }
.nav__toggle { width: 44px; height: 44px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; margin-right: -12px; }
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after { content: ""; display: block; width: 22px; height: 1.5px; background: var(--ink); transition: transform .25s var(--ease), opacity .2s; }
.nav__toggle span { position: relative; }
.nav__toggle span::before { position: absolute; top: -7px; }
.nav__toggle span::after { position: absolute; top: 7px; }
.nav-open .nav__toggle span { background: transparent; }
.nav-open .nav__toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav__toggle span::after { transform: translateY(-7px) rotate(-45deg); }
.nav-open .menu {
  display: flex; flex-direction: column; gap: 4px;
  position: absolute; left: 0; right: 0; top: 80px;
  background: var(--paper); border-bottom: 1px solid var(--line);
  padding: 12px var(--gutter) 24px;
}
.nav-open .menu a:not(.btn) { font-size: 20px; padding: 12px 0; }
.nav-open .menu .btn { margin-top: 12px; }
@media (min-width: 900px) {
  /* logo | menu in the middle | language + Contattaci */
  .nav__inner { display: grid; grid-template-columns: 1fr auto 1fr; height: 100px; }
  .nav__logo img { width: 190px; }
  .nav__toggle { display: none; }
  .menu, .nav-open .menu { display: flex; flex-direction: row; align-items: center; gap: 48px; position: static; padding: 0; border: 0; background: none; }
  .menu .menu__cta { display: none; }
  .nav__end { justify-self: end; gap: 16px; }
  .nav__cta { display: inline-flex; min-height: 48px; padding-inline: 24px; font-size: 16px; }
}

/* ---------- Hero ---------- */
.hero { padding: 32px 0 64px; overflow: hidden; }
.hero__grid { display: grid; gap: 40px; align-items: center; }
.hero__title { font-size: clamp(42px, 6vw, 76px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 400; max-width: 16ch; text-wrap: balance; }
.hero__lead { margin-top: 24px; font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 34rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
/* keep the feet on the first screen on wide, short windows */
@media (min-width: 960px) {
  }
@media (min-width: 960px) {
  :root { --section-tight: 64px; --section: 96px; --section-wide: 136px; }
  .hero { padding: 48px 0 var(--section-tight); }
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; }
  }

/* Entrance: content is visible without JS; the animation only adds the rise */
@media (prefers-reduced-motion: no-preference) {
  .hero__in { animation: rise .8s var(--ease) both; animation-delay: calc(var(--i) * 90ms + 60ms); }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* Hero: three mannequins, each garment sketched first and then cut into the real one.
   No JS: the first garment of each mannequin shows as a photo. */
.vetrina { position: relative; margin: 0; display: flex; align-items: flex-end; justify-content: space-between; width: 100%; max-width: 560px; justify-self: center; }
.manichino { position: relative; flex: none; height: auto; }
.abito { position: absolute; inset: 0; visibility: hidden; }
.abito.is-on { visibility: visible; }
.abito img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.js .abito__foto { clip-path: inset(0 100% 0 0); }
.js .abito.is-cut .abito__foto { clip-path: none; }
.taglio { position: absolute; top: 0; bottom: 0; left: 0; width: 1.5px; background: var(--red); opacity: 0; pointer-events: none; }
/* Entrance in CSS, not JS: it starts with the first paint instead of after the scripts, so on a
   slow phone the first photo is not revealed late (it is the page's largest element, LCP).
   Woman first, then man, then child; site.js marks each garment cut when its sweep ends. */
.manichino { container-type: inline-size; }
@media (prefers-reduced-motion: no-preference) {
  .js .vetrina.is-intro .abito:first-child .abito__foto { animation: taglio-cut .9s var(--taglio-ease) var(--d) both; }
  .js .vetrina.is-intro .taglio { animation: taglio-move .9s var(--taglio-ease) var(--d), taglio-fade .9s linear var(--d); }
}
.vetrina { --taglio-ease: cubic-bezier(.77, 0, .175, 1); }
.manichino--donna { --d: .3s; }
.manichino--uomo { --d: .6s; }
.manichino--bambino { --d: .9s; }
@keyframes taglio-cut { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0% 0 0); } }
@keyframes taglio-move { from { transform: translateX(0); } to { transform: translateX(100cqw); } }
/* linear in time: 29% and 68% are where the eased sweep is at 8% and 92%, as in the JS passes */
@keyframes taglio-fade { 0%, 100% { opacity: 0; } 29%, 68% { opacity: 1; } }
/* reduced motion: no entrance, the first photos show at once without waiting for site.js */
@media (prefers-reduced-motion: reduce) {
  .js .vetrina.is-intro .abito:first-child .abito__foto { clip-path: none; }
}
/* hover: a window shows the sketch under the garment */
.vetrina.is-scrub .manichino.is-under .abito.is-on .abito__foto {
  -webkit-mask-image: radial-gradient(circle 96px at var(--mx) var(--my), transparent 0 62%, #000 100%);
  mask-image: radial-gradient(circle 96px at var(--mx) var(--my), transparent 0 62%, #000 100%);
}
@media (hover: hover) { .vetrina { cursor: crosshair; } }
@media (min-width: 960px) {
  /* as wide as fits while the tallest mannequin stays within the first screen */
  .vetrina { max-width: min(100%, calc((100svh - 200px) * 0.98)); justify-self: end; }
}

/* ---------- Sections ---------- */
.section-head { max-width: 44rem; margin-bottom: 48px; }
.section-head--row { max-width: none; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }

.studio { padding: var(--section) 0; border-top: 1px solid var(--line); }
.studio__grid { display: grid; gap: 48px; align-items: start; }
.studio__media { margin: 0; }
/* the photo as a print in a white mount, slightly tilted, with a handwritten caption */
.stampa { position: relative; margin: 0 auto; max-width: 560px; background: var(--card); padding: 12px 12px 44px; box-shadow: 0 1px 2px rgb(0 0 0 / .06), 0 18px 40px -18px rgb(0 0 0 / .25); rotate: -1.2deg; }
.stampa img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.stampa figcaption { position: absolute; left: 16px; bottom: 6px; font-family: var(--font-hand); font-size: 24px; font-weight: 500; color: var(--ink-2); }
@media (min-width: 960px) { .stampa { padding: 16px 16px 52px; } .stampa figcaption { left: 20px; bottom: 8px; font-size: 26px; } }
.studio__text h2 { white-space: nowrap; font-size: clamp(24px, 7.4vw, 44px); } /* one line */
.studio__text p { margin-top: 16px; color: var(--ink-2); max-width: 36rem; }
.studio__text h2 + p { margin-top: 24px; }
@media (min-width: 960px) {
  .studio__grid { grid-template-columns: 1.25fr 1fr; gap: 80px; align-items: center; }
  .studio__text h2 { font-size: min(44px, 3.3vw); }
}

/* ---------- Servizi: a 2x2 sheet, not a sequence ---------- */
.servizi { padding: var(--section) 0; border-top: 1px solid var(--line); }
.servizi .section-head { margin-inline: auto; text-align: center; }
/* Chi siamo: a photo band behind the services title, fading into the paper */
.servizi--fascia { position: relative; isolation: isolate; }
.servizi__fascia { position: absolute; inset: 0 0 auto 0; height: 240px; z-index: -1; overflow: hidden; }
.servizi__fascia img { width: 100%; height: 100%; object-fit: cover; }
.servizi__fascia::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgb(250 248 244 / .1), rgb(250 248 244 / .25) 50%, var(--paper)); }
/* the title sits on the photo, in a paper label (Matteo, 29/11: as before) */
.servizi--fascia .section-head h2 { display: inline-block; background: rgb(250 248 244 / .88); padding: 8px 24px; border-radius: 6px; }
.servizi--fascia .section-head { margin-top: 16px; margin-bottom: 112px; }
@media (min-width: 960px) {
  .servizi__fascia { height: 320px; }
  .servizi--fascia .section-head { margin-top: 32px; margin-bottom: 144px; }
}
.servizi__lista { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.servizio { position: relative; padding: 32px 16px 36px; border-bottom: 1px solid var(--line); display: grid; gap: 12px; align-content: start; justify-items: center; text-align: center; }
.servizio h3 { font-size: clamp(24px, 2.6vw, 30px); font-weight: 400; letter-spacing: -0.015em; line-height: 1.15; }
.servizio p { color: var(--ink-2); max-width: 28rem; }
/* tacking stitch: a red dashed line runs along the top of the cell on hover */
.servizio::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 0;
  border-top: 1.5px dashed var(--red); transform: scaleX(0); transform-origin: center;
  transition: transform .6s var(--ease);
}
@media (hover: hover) { .servizio:hover::before { transform: scaleX(1); } }
@media (min-width: 760px) {
  .servizi__lista { grid-template-columns: 1fr 1fr; column-gap: 64px; }
  .servizio { padding: 40px 4px 44px; }
}

/* Service icons: line drawings that draw themselves when the item is revealed */
.icona { width: 48px; height: 48px; margin-bottom: 8px; }
.icona path { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.icona .icona__accento { stroke: var(--red); }
@media (prefers-reduced-motion: no-preference) {
  .js .servizio .icona path { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .js .servizio.in .icona path { stroke-dashoffset: 0; transition: stroke-dashoffset 1.2s var(--ease) .2s; }
  .js .servizio.in .icona path:nth-child(2) { transition-delay: .45s; }
  .js .servizio.in .icona .icona__accento { transition-delay: .7s; }
}
.chi__cta { margin-top: 48px; display: flex; justify-content: center; }

/* ---------- Chi siamo ---------- */
.chi { padding: 48px 0 var(--section); background: var(--paper-2); } /* warm band (option 3, 29/11) */
.chi__grid { display: grid; gap: 48px; align-items: start; }
.chi__title { font-family: var(--font-hand); font-size: clamp(64px, 8.4vw, 112px); line-height: .95; letter-spacing: 0; font-weight: 500; margin: 0 0 8px -2px; }
/* the big A, in the camel of the logo, as if the pen started there */
.chi__A { font-size: 1.4em; color: var(--camel-ink); margin-right: -.02em; vertical-align: -.06em; }
.chi__text { display: grid; gap: 16px; max-width: 38rem; color: var(--ink-2); font-size: 18px; }
.chi__foto { margin: 0; max-width: 360px; }
.chi__foto img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 6px; }
.chi__foto.stampa img { border-radius: 0; }
@media (min-width: 960px) {
  .chi { padding: 96px 0 var(--section); }
  .chi__grid { grid-template-columns: minmax(0, 40rem) minmax(0, 360px); justify-content: space-between; gap: 96px; }
  .chi__foto { max-width: min(360px, calc((100svh - 200px) * .7)); width: 100%; margin-top: 16px; }
  .chi__text { max-width: none; }
}

/* Quote: Ferré's line, the words surface one by one */
.citazione { padding: var(--section) 0 var(--section-tight); border-top: 1px solid var(--line); }
.citazione__fig { margin: 0 auto; max-width: 52rem; text-align: center; }
.citazione blockquote { margin: 0; }
.citazione blockquote p { font-family: var(--font-quote); font-size: clamp(36px, 5vw, 64px); line-height: 1.25; letter-spacing: 0; font-weight: 400; font-style: normal; margin: 0; text-wrap: balance; }
.citazione blockquote p + p { color: var(--red); margin-top: 8px; }
.citazione figcaption { margin-top: 28px; font-size: 16px; color: var(--ink-3); }
.parola { display: inline-block; white-space: pre; }
@media (prefers-reduced-motion: no-preference) {
  .js .citazione__fig .parola { opacity: 0; transform: translateY(.35em); }
  .js .citazione__fig.in .parola { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--w) * 70ms); }
  .js .citazione__fig.in p + p .parola { transition-delay: calc(var(--w) * 70ms + .7s); }
}

/* handwritten link with a drawn arrow, the same hand as the About us title */
.link-mano { display: inline-flex; align-items: flex-end; gap: 6px; min-height: 48px; margin-top: 24px; font-family: var(--font-hand); font-size: 30px; font-weight: 500; line-height: 1.2; color: var(--red); text-decoration: none; }
.link-mano svg { flex: none; margin-bottom: 10px; transition: transform .3s var(--ease); }
.link-mano:hover svg { transform: translateX(5px) rotate(-6deg); }
.link-mano:focus-visible { outline: 2px solid var(--camel); outline-offset: 4px; border-radius: 4px; }

/* ---------- Lavori ---------- */
.lavori { padding: var(--section-wide) 0 var(--section); border-top: 1px solid var(--line); }
.filtri { display: none; flex-wrap: wrap; gap: 8px; }
.js .filtri { display: flex; }

/* Sfilata: one garment at the centre, neighbours smaller and faded */
.sfilata { display: none; align-items: center; gap: 8px; }
.js .sfilata { display: flex; }
.sfilata__stage { overflow: hidden; flex: 1; touch-action: pan-y; }
.sfilata__track { list-style: none; margin: 0; padding: 0; display: flex; transition: transform .55s var(--ease); }
.sfilata__item { flex: 0 0 70%; opacity: .32; transform: scale(.72); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.sfilata__item.is-center { opacity: 1; transform: none; }
.sfilata__item.is-hidden { display: none; }
.sfilata__btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: center; }
.sfilata__item.is-center .sfilata__btn { cursor: zoom-in; }
.sfilata__btn img { width: 100%; max-width: 360px; margin: 0 auto; aspect-ratio: 2 / 3; object-fit: contain; }
.sfilata__nav { display: grid; width: 40px; height: 40px; flex: none; place-items: center; border-radius: 50%; border: 1px solid rgb(29 26 22 / .16); background: var(--card); color: var(--ink); cursor: pointer; transition: border-color .16s var(--ease); }
.sfilata__nav:hover { border-color: var(--ink); }
@media (min-width: 700px) {
  .sfilata__nav { width: 48px; height: 48px; }
  .sfilata__item { flex-basis: 33.333%; }
}
.filtro {
  min-height: 40px; padding: 0 16px; border-radius: 4px; cursor: pointer;
  border: 1px solid rgb(29 26 22 / .22); background: transparent; color: var(--ink-2); font-size: 15px;
  transition: background-color .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.filtro:hover { border-color: var(--ink); color: var(--ink); }
.filtro[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.lavori__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .lavori__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1100px) { .lavori__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; } }
.lavoro { transition: opacity .3s var(--ease), transform .3s var(--ease); }
.lavoro.is-hidden { display: none; }
.lavori__more { display: flex; justify-content: center; margin-top: 48px; }
/* with JS: the runway by default, the grid only after "Mostra tutti" */
/* The /lavori page */
.lavori--pagina { border-top: 0; padding-top: var(--section-tight); }
.lavori__title { font-size: clamp(40px, 5.6vw, 68px); letter-spacing: -0.02em; }
.lavori__lead { margin-top: 16px; color: var(--ink-2); max-width: 34rem; }
.lavoro__btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; }
.lavoro__btn img { width: 100%; aspect-ratio: 2 / 3; object-fit: contain; transition: transform .4s var(--ease); }
@media (hover: hover) {
  .lavoro__btn:hover img { transform: translateY(-4px); }
}

.lightbox { border: 0; padding: 0; background: var(--card); border-radius: 8px; max-width: min(92vw, 560px); width: 100%; overflow: hidden; }
.lightbox::backdrop { background: rgb(29 26 22 / .6); }
.lightbox[open] { animation: pop .28s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.lightbox img { width: 100%; max-height: 78vh; object-fit: contain; background: var(--paper); }
.lightbox__close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgb(251 248 242 / .9); cursor: pointer; }
.lightbox__nav { position: absolute; top: 50%; translate: 0 -50%; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgb(29 26 22 / .12); border-radius: 50%; background: rgb(251 248 242 / .92); color: var(--ink); cursor: pointer; transition: border-color .16s var(--ease); }
.lightbox__nav:hover { border-color: var(--ink); }
.lightbox__nav:active { scale: .96; }
.lightbox__nav--prev { left: 12px; }
.lightbox__nav--next { right: 12px; }
.lightbox.is-single .lightbox__nav { display: none; }

/* ---------- Contatti ---------- */
.contatti { padding: var(--section-wide) 0 var(--section); border-top: 1px solid var(--line); }
.contatti__grid { display: grid; gap: 48px; }
.contatti__intro > p { margin-top: 24px; color: var(--ink-2); max-width: 36rem; }
.recapiti { margin: 32px 0 0; display: grid; gap: 16px; }
.recapiti div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; }
.recapiti dt { color: var(--ink-3); font-size: 15px; }
.recapiti dd { margin: 0; }
.contatti__mappa { margin-top: 32px; justify-self: start; }
.contatti__foto { margin: 0; }
.contatti__foto img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
@media (min-width: 960px) {
  .contatti__grid { grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: start; }
}

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #d8d0c4; padding: 64px 0 32px; font-size: 15px; }
.footer__top { display: grid; gap: 36px; }
.footer__logo { width: 200px; }
.footer__col { display: grid; gap: 8px; align-content: start; }
.footer__h { color: #988e81; font-size: 14px; margin-bottom: 4px; }
.footer__ig { display: inline-flex; align-items: center; gap: 8px; justify-self: start; margin-top: 4px; }
.footer a { color: #ece5da; background-size: 6px 1px; background-image: none; }
.footer a:hover { background-image: linear-gradient(90deg, currentColor 50%, transparent 0); }
.footer__bottom a { background-image: linear-gradient(90deg, currentColor 50%, transparent 0); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid rgb(255 255 255 / .1); color: #988e81; font-size: 14px; }
@media (min-width: 900px) { .footer__top { grid-template-columns: 1.4fr 1fr 1fr 0.8fr; gap: 48px; } }

.notfound { padding: 120px 0; }
/* privacy and cookie pages */
.legale { padding: 56px 0 var(--section); }
.legale__wrap { max-width: calc(46rem + 2 * var(--gutter)); }
.legale h1 { font-size: clamp(36px, 5vw, 56px); margin-bottom: 28px; }
.legale h2 { font-size: clamp(22px, 2.4vw, 28px); margin: 40px 0 12px; }
.legale p, .legale li { color: var(--ink-2); }
.legale p + p { margin-top: 12px; }
.legale ul { padding-left: 20px; display: grid; gap: 10px; }
.legale a { color: var(--ink); }
.legale code { font-size: .9em; background: var(--paper-2); padding: 1px 6px; border-radius: 4px; }
.legale__data { margin-top: 40px; font-size: 15px; color: var(--ink-3) !important; }
.footer__legal { display: inline-flex; gap: 20px; }
.notfound h1 { font-size: clamp(40px, 6vw, 72px); margin-bottom: 20px; }
.notfound p { color: var(--ink-2); margin-bottom: 32px; }

/* Scroll reveal: visible by default, only JS adds the hidden start state */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
