/* Studio Busato — foglio di stile unico per tutte le pagine.
   Stile della scheda Residence Leonardo: fondo scuro caldo, oro opaco, spigoli vivi.
   Colori, font e misure si cambiano solo dalle variabili qui sotto. */

/* Caratteri dello studio, dentro il sito (non da Google): niente richieste a server esterni e caricamento più rapido.
   Cinzel e Cormorant Garamond, licenza SIL Open Font License; solo i caratteri latini. */
@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("../fonts/cinzel-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: "Cormorant Garamond"; font-style: normal; font-weight: 500 600; font-display: swap; src: url("../fonts/cormorant-garamond-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: "Cormorant Garamond"; font-style: italic; font-weight: 500; font-display: swap; src: url("../fonts/cormorant-garamond-italic-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; }

:root {
  --bg: #0b0a09; --surface: #14120f; --surface2: #1c1915; --fg: #efe9dd; --muted: #a79e8b;
  --accent: #c9a45c; --accent-ink: #0b0a09; --line: #2d2820; --paper: #f8f5f0; --paper-ink: #2a2219;
  /* fissi: fascia nera, titolo hero, prezzi */
  --black: #0b0a09; --gold: #c9a45c; --gold-light: #e3c987; --gold-dark: #6e5a2c; --cream: #f3ecdc;
  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --body: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --gutter-x: max(1rem, env(safe-area-inset-left, 0px));
  --gutter-x-r: max(1rem, env(safe-area-inset-right, 0px));
  --section: clamp(2.5rem, 7vw, 5.5rem);
  color-scheme: dark;
}
/* Il sito è sempre scuro: il logo dello studio va sempre su fondo nero (identità dello studio),
   anche quando il computer o il telefono sono impostati in modalità chiara. */

/* ---------- base ---------- */
* { box-sizing: border-box; }
/* Il sito cresce con lo schermo: 1rem fino a 90rem, poi in proporzione fino a 1.375rem (circa 160rem e oltre). */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head-c, 5rem) + 1.5rem); overflow-x: clip; font-size: 100%; }
/* sugli schermi grandi il testo cresce a piccoli scalini (non in proporzione alla finestra):
   così lo zoom del browser (Ctrl + rotella) ingrandisce davvero la pagina */
@media (min-width: 1600px) { html { font-size: 110%; } }
@media (min-width: 1900px) { html { font-size: 118.75%; } }
@media (min-width: 2300px) { html { font-size: 125%; } }
body {
  margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 1.15rem; line-height: 1.55;
  padding-left: var(--gutter-x); padding-right: var(--gutter-x-r);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* parti del browser nei colori dello studio: selezione del testo, cursore, barra di scorrimento */
::selection { background: var(--gold); color: var(--black); }
html { accent-color: var(--gold); caret-color: var(--gold); scrollbar-color: #4a3f2c var(--bg); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #3a3225; border: 3px solid var(--bg); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }
:target { scroll-margin-top: calc(var(--head-c, 5rem) + 1.5rem); }
.wrap { max-width: 77.5rem; margin: 0 auto; }
.eyebrow { font-family: var(--display); font-size: .72rem; letter-spacing: .34em; text-transform: uppercase; color: var(--accent); margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; text-wrap: balance; margin: 0; }
p { margin: 0; }
.it { font-style: italic; }
.num { font-variant-numeric: tabular-nums; }
.sel { user-select: all; }
.skip { position: absolute; left: 1rem; top: 0; transform: translateY(-150%); z-index: 60; background: var(--accent); color: var(--accent-ink); padding: 0.625rem 1rem; font-family: var(--display); font-size: .75rem; letter-spacing: .2em; text-decoration: none; }
.skip:focus { transform: translateY(.75rem); }

/* ---------- header ---------- */
header.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line);
  margin-left: calc(-1 * var(--gutter-x)); margin-right: calc(-1 * var(--gutter-x-r));
  padding-left: var(--gutter-x); padding-right: var(--gutter-x-r);
}
.top-in { max-width: 77.5rem; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: .75rem; flex-wrap: wrap; }
.brand { font-family: var(--display); letter-spacing: .3em; font-size: .95rem; text-decoration: none; color: var(--accent); white-space: nowrap; }
.brand:hover { color: var(--accent); }
.brand:has(.mark) { display: inline-flex; align-items: center; gap: .75rem; }

/* logo: solo la "B" dorata del marchio dello studio, senza fondo */
.mark { display: block; flex: none; }
.mark img { position: static; width: 100%; height: auto; }
.mark--dock { width: 2.25rem; }

/* intestazione con lo script (js/main.js), come la testa pagina di 2dstudio.it:
   in cima alla pagina è alta e trasparente, con il logo grande al centro (B sopra la scritta) e il menu
   centrato sotto; appena si scorre diventa una barra più bassa, grigio scuro, con il logo piccolo a
   sinistra e il menu a destra. Altezza e colore cambiano in 0,4 s; il logo e il menu scivolano al loro
   posto (js/main.js li accompagna con un'animazione dalla posizione di prima). */
:root { --ease-out: cubic-bezier(0.23, 1, 0.32, 1); --head-c: 5rem; --head-t: 12.5rem; }
@media (max-width: 899px) { :root { --head-c: 4.25rem; --head-t: 4.25rem; } }
html.head-js { --head-h: max(var(--head-c), var(--head-real, 0px)); }
html.head-js header.top {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; margin: 0;
  background: transparent; border-bottom-color: transparent;
  transition: background-color .4s ease, border-color .4s ease, box-shadow .4s ease;
}
html.head-js body { padding-top: max(var(--head-t), var(--head-real, 0px)); }
html.head-js .top-in { min-height: var(--head-c); padding-block: .5rem; transition: min-height .4s ease; }
html.head-js .mark--dock { width: 3rem; }
/* barra bassa: grigio scuro staccato dal nero della pagina */
html.head-js.head-compact header.top { background: var(--surface2); border-bottom-color: var(--line); box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .35); }
/* in cima: tutto centrato, logo grande */
@media (min-width: 900px) {
  html.head-js:not(.head-compact) .top-in { min-height: var(--head-t); flex-direction: column; justify-content: center; gap: .875rem; padding-block: 1rem .75rem; }
  html.head-js:not(.head-compact) .brand { flex-direction: column; gap: .5rem; font-size: 1.05rem; letter-spacing: .42em; }
  html.head-js:not(.head-compact) .mark--dock { width: 6.25rem; }
  html.head-js:not(.head-compact) nav.menu ul { justify-content: center; }
}
@media (max-width: 899px) { html.head-js .mark--dock { width: 2.25rem; } }

/* menu a pallini (unità) */
nav.units { display: flex; gap: 0.5rem; align-items: center; }
nav.units a {
  width: 2.375rem; height: 2.375rem; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center;
  font-family: var(--display); font-size: .9rem; text-decoration: none; color: var(--fg); transition: background .2s, color .2s, border-color .2s;
}
nav.units a:hover, nav.units a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* menu testuale */
nav.menu ul { display: flex; flex-wrap: wrap; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
nav.menu a {
  display: block; padding: 0.5625rem 0.75rem; border: 1px solid transparent; font-family: var(--display); font-size: .72rem;
  letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: var(--fg);
  transition: background .2s, color .2s, border-color .2s;
}
nav.menu a:hover, nav.menu a[aria-current] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* tendina dei servizi: si apre passando con il mouse, con la freccia (clic o tastiera); sul telefono è sempre aperta sotto "Servizi" */
nav.menu .has-sub { position: relative; display: flex; align-items: stretch; }
.sub-btn {
  display: grid; place-items: center; width: 1.75rem; padding: 0; background: transparent; border: 1px solid transparent; color: var(--fg);
  transition: background .2s, color .2s, border-color .2s;
}
.sub-btn svg { width: .75rem; height: .75rem; fill: none; stroke: currentColor; stroke-width: 1.6; transition: transform .2s cubic-bezier(.16, 1, .3, 1); }
.sub-btn:hover { color: var(--accent); }
.has-sub[data-open="true"] .sub-btn svg { transform: rotate(180deg); }
nav.menu .sub { list-style: none; margin: 0; padding: 0; }
nav.menu .sub a { text-transform: none; letter-spacing: .08em; font-size: .8rem; white-space: nowrap; }
@media (min-width: 900px) {
  nav.menu .sub {
    position: absolute; top: 100%; left: 0; z-index: 25; min-width: 15rem; display: grid; gap: 1px; margin-top: .5rem;
    padding: .375rem; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 .75rem 2rem rgba(0, 0, 0, .45);
    opacity: 0; visibility: hidden; transform: translateY(-.25rem);
    transition: opacity .16s ease-out, transform .16s cubic-bezier(.16, 1, .3, 1), visibility 0s linear .16s;
  }
  /* striscia invisibile tra la voce e la tendina: il mouse ci passa sopra senza che si chiuda */
  nav.menu .sub::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: .5rem; }
  nav.menu .has-sub:hover .sub, nav.menu .has-sub[data-open="true"] .sub {
    opacity: 1; visibility: visible; transform: none; transition: opacity .16s ease-out, transform .16s cubic-bezier(.16, 1, .3, 1), visibility 0s;
  }
  nav.menu .sub a { padding: .5rem .75rem; }
}
@media (max-width: 899px) {
  nav.menu .has-sub { flex-wrap: wrap; }
  nav.menu .has-sub > a { flex: 1; }
  .sub-btn { display: none; }
  nav.menu .sub { flex-basis: 100%; padding: 0 0 .375rem 1rem; border-left: 1px solid var(--line); margin-left: .25rem; }
  nav.menu .sub a { padding: .5rem .25rem; font-size: .95rem; font-family: var(--body); letter-spacing: .02em; }
}

.menu-btn {
  display: none; background: transparent; border: 1px solid var(--line); padding: 0.5625rem 0.875rem; font-family: var(--display);
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; transition: background .2s, color .2s, border-color .2s;
}
.menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (max-width: 899px) {
  .menu-btn { display: block; }
  nav.menu { flex-basis: 100%; }
  nav.menu[data-open="false"] { display: none; }
  nav.menu ul { flex-direction: column; gap: 0; border-top: 1px solid var(--line); padding-top: 0.375rem; }
  nav.menu a { padding: 0.75rem 0.25rem; font-size: .78rem; }
}

/* ---------- pulsanti ---------- */
.btn {
  display: inline-block; padding: 0.75rem 1.25rem; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  font-family: var(--display); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: transparent; color: var(--accent); }
.btn--line { background: transparent; color: var(--fg); border-color: var(--line); }
.btn--line:hover { border-color: var(--accent); color: var(--accent); }
.hero .btn { background: var(--gold); border-color: var(--gold); color: var(--black); }
.hero .btn:hover { background: transparent; color: var(--gold-light); }
.hero .btn--line { background: transparent; color: var(--cream); border-color: rgba(243, 236, 220, .45); }
.hero .btn--line:hover { color: var(--gold-light); border-color: var(--gold-light); }
.actions { display: flex; flex-wrap: wrap; gap: 0.625rem; }

/* ---------- hero ---------- */
.hero { position: relative; margin-top: 1.25rem; border-radius: 2px; overflow: hidden; min-height: clamp(23.75rem, 56vw, 40rem); display: flex; align-items: flex-end; background: #000; }
.hero > img, .hero > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* velo scuro: dal basso e da sinistra, dove stanno i testi, così si leggono anche sopra la facciata chiara */
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.28) 45%, rgba(0,0,0,0) 70%), linear-gradient(180deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,.22) 40%, rgba(0,0,0,.86) 100%); }
.hero-t .eyebrow, .hero p { text-shadow: 0 1px 12px rgba(0, 0, 0, .55); }
.hero-t { position: relative; z-index: 1; padding: clamp(1.25rem, 4vw, 3.5rem); color: var(--cream); display: grid; gap: 0.625rem; }
.hero-t .eyebrow { color: #d9bb7c; }
.hero h1 { font-size: clamp(2.1rem, 7.2vw, 5.6rem); letter-spacing: .08em; line-height: 1.02; font-weight: 700; color: var(--gold-light); }
.hero p { margin: 0; font-size: clamp(1.05rem, 2vw, 1.4rem); max-width: 46ch; color: #ebe3d2; }
.hero .actions { margin-top: 0.75rem; }
@media (max-width: 619px) { .hero { min-height: 36rem; } }
/* apertura a scorrimento: la pagina resta sull'apertura finché la rotella non ha portato il video alla fine */
html.scrub-js .hero { position: sticky; top: calc(var(--head-h, 4rem) + 1.25rem); }
.hero-scrub, .hero-hint { display: none; }
html.scrub-js .hero-scrub { display: block; position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 3px; background: rgba(243, 236, 220, .18); }
.hero-scrub span { display: block; height: 100%; background: var(--gold); transform-origin: 0 50%; transform: scaleX(0); }
html.scrub-js .hero-hint {
  display: block; position: absolute; right: clamp(1.25rem, 4vw, 3.5rem); bottom: 1.25rem; z-index: 2; margin: 0;
  font-family: var(--display); font-size: .72rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-light); text-shadow: 0 1px 6px rgba(0, 0, 0, .85); transition: opacity .2s;
}
@media (max-width: 899px) { html.scrub-js .hero-hint { right: auto; left: clamp(1.25rem, 4vw, 3.5rem); bottom: auto; top: 1rem; } }

/* ---------- sezioni ---------- */
section.blk { padding-block: var(--section); }
section.blk + section.blk { padding-top: 0; }
.head { display: grid; gap: 0.625rem; margin-bottom: 1.75rem; max-width: 62ch; }
.head h2 { font-size: clamp(1.5rem, 3.6vw, 2.4rem); letter-spacing: .06em; line-height: 1.2; }
.head h1 { font-size: clamp(1.9rem, 5vw, 3.2rem); letter-spacing: .06em; line-height: 1.1; }
.head:has(> h1) { max-width: none; }
.head:has(> h1) > p { max-width: 62ch; }
.crumb + section.blk { padding-top: clamp(1.25rem, 3vw, 2.5rem); }
.head p { margin: 0; color: var(--muted); }
.hint { margin: 0.75rem 0 0; color: var(--muted); font-style: italic; }
.note { color: var(--muted); font-size: .95rem; margin-top: 1.625rem; font-style: italic; }

/* servizi: elenco a due colonne con filetto */
.svc { display: grid; gap: 0 2rem; grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; }
.svc li { border-top: 1px solid var(--line); padding: 1.125rem 0 1.25rem; display: grid; gap: 0.375rem; align-content: start; }
.svc h3 { font-size: .95rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
@media (min-width: 760px) { .svc { grid-template-columns: 1fr 1fr; } }
/* servizio con una pagina propria: tutto il titolo è il link */
.svc-link h3 a { color: inherit; text-decoration: none; }
.svc-link h3 a:hover { color: var(--fg); }
.svc-link h3 a span { display: inline-block; transition: transform .2s; }
@media (hover: hover) and (pointer: fine) { .svc-link h3 a:hover span { transform: translateX(.25rem); } }

/* pagina servizi: ogni lavorazione con la sua immagine */
.svc-all { margin-top: 1.5rem; }
/* riquadri a foto piena: la foto riempie il riquadro, scurita, con il titolo in alto e la descrizione in basso */
.tiles { display: grid; gap: 1rem; grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; }
@media (min-width: 620px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile { position: relative; overflow: hidden; aspect-ratio: 16 / 10; background: var(--black); border: 1px solid var(--line); isolation: isolate; }
.tile > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,10,9,.74) 0%, rgba(11,10,9,.3) 40%, rgba(11,10,9,.55) 62%, rgba(11,10,9,.94) 100%); }
.tile-t { height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 1rem; padding: clamp(1rem, 2vw, 1.5rem); color: var(--cream); }
.tile h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); letter-spacing: .06em; line-height: 1.15; color: var(--cream); text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.tile p { font-size: 1rem; line-height: 1.4; color: #e6dcc7; max-width: 38ch; }
@media (hover: hover) and (pointer: fine) { .tile:hover > img { transform: scale(1.04); } }
/* tavole di progetto su carta bianca: in grigio e un filo più scure, per non abbagliare sul fondo nero */
.tile > img.is-drawing { filter: grayscale(1) brightness(.85) contrast(1.1); }
/* riquadro che porta a un'altra pagina: tutto il riquadro è il link */
.tile--link h2 a { color: inherit; text-decoration: none; }
.tile--link h2 a::after { content: ""; position: absolute; inset: 0; }
.tile--link h2 a span { display: inline-block; color: var(--gold-light); transition: transform .2s; }
.tile--link:hover { border-color: var(--gold); }
/* arrivando dalla tendina il riquadro scelto ha il bordo d'oro */
.tile:target { border-color: var(--gold); outline: 1px solid var(--gold-dark); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .tile--link:hover h2 a span { transform: translateX(.25rem); } }
.tile--link:has(a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.tile--link a:focus-visible { outline: none; }
/* foto non ancora arrivata: fondo scuro con la B in filigrana (si sostituisce con la foto del servizio) */
.tile--ph { background: radial-gradient(120% 90% at 70% 45%, #1f1b16 0%, var(--black) 70%); }
.tile--ph::before { display: none; }
.tile--ph > img { inset: auto; right: 8%; top: 50%; width: 28%; height: auto; transform: translateY(-50%); opacity: .14; object-fit: contain; }
@media (hover: hover) and (pointer: fine) { .tile--ph:hover > img { transform: translateY(-50%); } }
.jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.5rem; }
/* telefono: i tre salti in pagina su due righe ordinate (prima "Domande" restava da solo) */
@media (max-width: 599px) {
  .jump { display: grid; grid-template-columns: 1fr 1fr; }
  .jump > :first-child { grid-column: 1 / -1; }
  .jump .btn { text-align: center; }
}

/* ---------- card ---------- */
.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.card { display: grid; gap: .875rem; background: var(--surface); border: 1px solid var(--line); padding: 1.25rem; text-decoration: none; transition: border-color .2s, transform .2s; }
.card:hover { border-color: var(--accent); transform: translateY(-3px); color: inherit; }
.card .l { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.card .l b { font-family: var(--display); font-size: 1.5rem; color: var(--accent); letter-spacing: .08em; font-weight: 500; }
.card .l .up { flex: none; }
.card .mini { background: var(--paper); padding: 0.25rem; }
.card dl { margin: 0; display: grid; gap: 2px; font-size: 1.05rem; }
.card dt { color: var(--muted); font-size: .9rem; }
.card dd { margin: 0; }
.price { font-family: var(--display); font-size: 1.25rem; letter-spacing: .04em; color: var(--fg); font-variant-numeric: tabular-nums; }
.price small { display: block; font-family: var(--body); font-style: italic; font-size: .95rem; color: var(--muted); letter-spacing: 0; }
@media (min-width: 620px) { .cards--units { grid-template-columns: repeat(6, 1fr); } .cards--units .card:nth-child(-n+3) { grid-column: span 2; } .cards--units .card:nth-child(n+4) { grid-column: span 3; } }
@media (min-width: 1040px) { .cards--units { grid-template-columns: repeat(5, 1fr); } .cards--units .card:nth-child(n) { grid-column: auto; } }

/* lavori */
.works { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .works { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .works { grid-template-columns: repeat(3, 1fr); } .works--two { grid-template-columns: repeat(2, 1fr); } }
.work-card .cover { margin: -1.25rem -1.25rem 0; overflow: hidden; background: #000; }
.work-card .cover img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.work-card .go { font-family: var(--display); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
/* un solo lavoro: la scheda occupa tutta la riga, immagine a sinistra */
.works--one { grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .works--one .work-card { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-content: end; column-gap: 1.75rem; }
  .works--one .work-card .cover { grid-column: 1; grid-row: 1 / span 4; margin: -1.25rem 0 -1.25rem -1.25rem; }
  .works--one .work-card .cover img { height: 100%; aspect-ratio: auto; min-height: 23.75rem; }
  .works--one .work-card > :not(.cover) { grid-column: 2; }
}

/* ---------- galleria ---------- */
.gal { display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
.gal figure { margin: 0; position: relative; overflow: hidden; background: #000; }
.gal img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; }
.gal figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2.125rem 1rem 0.75rem; background: linear-gradient(transparent, rgba(0,0,0,.78));
  color: #efe5cf; font-family: var(--display); font-size: .7rem; letter-spacing: .3em; text-transform: uppercase;
}
@media (min-width: 760px) {
  .gal--lr { grid-template-columns: repeat(6, 1fr); }
  .gal--lr figure:nth-child(1) { grid-column: span 4; } .gal--lr figure:nth-child(2) { grid-column: span 2; }
  .gal--lr figure:nth-child(3) { grid-column: span 3; } .gal--lr figure:nth-child(4) { grid-column: span 3; }
}

.gal--tall img { aspect-ratio: 4 / 3; object-position: 50% 40%; }

/* metodo: quattro passi */
.steps { display: grid; gap: 1.5rem 1rem; grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; }
@media (min-width: 620px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps .gal { gap: 0; }
.steps img { aspect-ratio: 4 / 5; filter: grayscale(1) contrast(1.12) brightness(.9); }
.steps p { margin-top: 0.75rem; max-width: none; }
.steps .tall { object-position: 50% 30%; }
.steps .right { object-position: 78% 50%; }
/* metodo: numero del passo, e col mouse la foto riprende colore */
.step-n { display: block; font-family: var(--display); font-size: 1.6rem; letter-spacing: .04em; color: var(--accent); line-height: 1; margin-bottom: .35rem; }
.steps img { transition: filter .6s ease, transform 1.4s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .steps li:hover img { filter: grayscale(0) contrast(1.02) brightness(1); } }
.steps li { position: relative; }
.steps p { position: relative; padding-top: .75rem; }
.steps p::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); transform-origin: left; transform: scaleX(1); }
html.reveal-js .steps > .reveal p::before { transform: scaleX(0); transition: transform 1.1s var(--ease-out) .35s; }
html.reveal-js .steps > .reveal.is-in p::before { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) { html.reveal-js .steps > .reveal p::before { transform: none; transition: none; } }

/* ---------- da dove parti: schede ---------- */
.tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.875rem; }
.tabs button {
  background: transparent; border: 1px solid var(--line); padding: 0.5625rem 1.125rem; font-family: var(--display); font-size: .78rem;
  letter-spacing: .2em; text-transform: uppercase; transition: background .2s, color .2s, border-color .2s;
}
.tabs button:hover { border-color: var(--accent); }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
/* telefono: le quattro schede in una griglia 2 x 2 di larghezza uguale (prima righe da 1, 2 e 1) */
@media (max-width: 599px) {
  .tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .tabs button { padding-inline: 0.5rem; text-align: center; letter-spacing: .14em; }
}
@media (max-width: 359px) { .tabs button { padding-inline: 0.25rem; font-size: .72rem; letter-spacing: .08em; } }
.pick { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .pick { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
  /* riquadro del testo alto come la foto e testo centrato: niente vuoto sotto, altezza stabile cambiando scheda */
  .pick .pane { align-content: center; }
}
.pick figure { margin: 0; background: #000; }
.pick figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.pane { background: var(--surface); border: 1px solid var(--line); padding: clamp(1.25rem, 3vw, 2rem); display: grid; gap: 0.875rem; align-content: start; }
.pane h2, .pane h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); letter-spacing: .06em; color: var(--accent); }
.pane .bring { color: var(--muted); }
.pane .bring b { font-weight: 600; color: var(--fg); }
.pane .actions { margin-top: 0.5rem; }

/* ---------- fascia nera con bordo oro, superfici ---------- */
.band { display: inline-flex; align-items: stretch; background: var(--black); border: 1px solid var(--gold); outline: 1px solid var(--gold-dark); outline-offset: 3px; color: var(--cream); width: max-content; max-width: 100%; flex-wrap: wrap; }
.band span, .band a.b { display: grid; align-content: center; padding: 0.625rem 1.25rem; font-family: var(--display); }
.band .a { font-size: .75rem; letter-spacing: .3em; color: var(--gold); border-right: 1px solid var(--gold-dark); line-height: 1.5; }
.band .a em { display: block; font-style: normal; font-size: .95rem; letter-spacing: .1em; color: var(--cream); font-weight: 700; }
.band .b { font-size: clamp(1.5rem, 4.4vw, 2.3rem); color: var(--gold-light); font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.band a.b { text-decoration: none; font-family: var(--body); font-size: clamp(1.25rem, 3.8vw, 2.3rem); letter-spacing: .02em; overflow-wrap: anywhere; }
.band a.b:hover { color: var(--cream); }
.stats { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); grid-template-columns: repeat(2, 1fr); margin: 1.375rem 0; }
.stats div { background: var(--surface); padding: 0.875rem 1rem; }
.stats dt { font-size: .9rem; color: var(--muted); }
.stats dd { margin: 0; font-family: var(--display); font-size: 1.15rem; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.stats dd a { text-decoration: none; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(5, 1fr); } .stats--3 { grid-template-columns: repeat(3, 1fr); } }
.stats--3 dd { font-size: 1.05rem; }
@media (max-width: 759px) { .stats--3 { grid-template-columns: 1fr; } }

/* ---------- mappa con le indicazioni stradali (Contatti) ---------- */
.map { position: relative; margin-top: 1.75rem; width: 100%; height: clamp(20rem, 37.5vw, 30rem); border: 1px solid var(--line); background: var(--black); overflow: hidden; }
@media (max-width: 759px) { .map { height: min(125vw, 34rem); } }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* prima del clic: vista dall'alto della strada dello studio (dal video del drone), scurita */
.map-ph {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: .875rem; padding: 1.5rem; text-align: center;
  background: linear-gradient(rgba(11, 10, 9, .72), rgba(11, 10, 9, .86)), url("../video/apertura-inizio.webp") center / cover;
}
.map-pin { width: 2.25rem; height: 2.25rem; fill: var(--gold); }
.map-pin circle { fill: var(--black); }
.map-t { font-family: var(--display); letter-spacing: .08em; color: var(--cream); font-size: clamp(1rem, 1.8vw, 1.25rem); }
.map-ph .actions { justify-content: center; }
.map-note { font-size: .9rem; font-style: italic; color: #b9b09c; max-width: 44ch; }
.map-dir { margin-top: .875rem; }
.map-dir a { font-family: var(--display); font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
.map-dir a:hover { color: var(--fg); }
/* la riga sotto serve solo quando la mappa è aperta (prima c'è il pulsante nel riquadro) */
.map:not(.is-on) + .map-dir { display: none; }

/* ---------- lo studio ---------- */
.about { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .about { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
/* su computer la foto è alta quanto il testo (prima restava un vuoto sotto) */
@media (min-width: 900px) {
  .about { align-items: stretch; }
  .about .gal--tall, .about .gal--tall figure { height: 100%; }
  .about .gal--tall figure { min-height: 22rem; }
  .about .gal--tall img { position: absolute; inset: 0; aspect-ratio: auto; }
}
.about .lead { font-size: clamp(1.2rem, 1.9vw, 1.4rem); line-height: 1.5; }
/* storia dello studio: un paragrafo d'apertura più grande, poi due paragrafi di testo normale */
.story { display: grid; gap: 1rem; max-width: 62ch; }
.story p:not(.lead) { color: var(--fg); opacity: .88; }
.stats--2 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .stats--2 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 459px) { .stats--2 { grid-template-columns: 1fr; } }
.about .stats { margin: 1.375rem 0 0; }

/* titolo di sezione centrato con filetto sotto (Chi siamo, Team) */
.head--center { margin-inline: auto; text-align: center; justify-items: center; }
.head--center::after { content: ""; width: 5rem; height: 1px; background: var(--gold-dark); margin-top: .5rem; }

/* ---------- team ---------- */
.team { display: grid; gap: 2rem 1.5rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 19rem)); justify-content: center; list-style: none; margin: 0; padding: 0; }
.member { display: grid; gap: .375rem; align-content: start; text-align: center; }
.member img.photo, .member-ph { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; margin-bottom: .75rem; border: 1px solid var(--line); }
/* foto scontornata (sfondo tolto): la persona sta direttamente sul fondo del sito, senza riquadro;
   il taglio in basso sfuma nel nero e dietro c'è solo un alone caldo leggerissimo */
.member img.photo--cut {
  border: 0; object-fit: contain; object-position: 50% 100%;
  background: radial-gradient(60% 55% at 50% 45%, rgba(201, 164, 92, .14) 0%, rgba(201, 164, 92, 0) 70%);
  -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent 100%); mask-image: linear-gradient(180deg, #000 78%, transparent 100%);
}
/* senza foto: fondo scuro con la B in filigrana */
.member-ph { display: grid; place-items: center; background: radial-gradient(110% 80% at 50% 35%, #1f1b16 0%, var(--black) 70%); }
.member-ph img { width: 34%; opacity: .16; }
.member h3 { font-size: 1.05rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fg); }
.member .role { font-family: var(--display); font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.member p:not(.role) { color: var(--muted); margin-top: .25rem; }

/* ---------- comparsa allo scorrimento (js/main.js) ---------- */
html.reveal-js .reveal { opacity: 0; transform: translateY(1.25rem); }
html.reveal-js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); transition-delay: calc(var(--i, 0) * 60ms);
}

/* ---------- domande ---------- */
/* domande: a fisarmonica, una aperta alla volta; la risposta si apre scorrendo (browser recenti) */
:root { interpolate-size: allow-keywords; }
.faq { display: grid; max-width: 52rem; border-bottom: 1px solid var(--line); }
.faq details { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.125rem 0; font-family: var(--display); font-size: 1.05rem; letter-spacing: .06em; color: var(--accent); text-wrap: balance; transition: color .2s ease; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
@media (hover: hover) and (pointer: fine) { .faq summary:hover { color: var(--fg); } }
.faq-ico { position: relative; flex: none; width: 1rem; height: 1rem; }
.faq-ico::before, .faq-ico::after { content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 1px; background: currentColor; transition: transform .35s var(--ease-out); }
.faq-ico::after { transform: rotate(90deg); }
.faq details[open] .faq-ico::after { transform: rotate(0deg); }
.faq details[open] .faq-ico::before { transform: rotate(180deg); }
.faq details p { margin: 0; padding: 0 2.5rem 1.375rem 0; max-width: 46rem; }
.faq details::details-content { block-size: 0; overflow: clip; opacity: 0;
  transition: block-size .4s var(--ease-out), opacity .3s ease, content-visibility .4s allow-discrete; }
.faq details[open]::details-content { block-size: auto; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .faq details::details-content { transition: none; } .faq-ico::before, .faq-ico::after { transition: none; } }

/* ---------- planimetria cliccabile ---------- */
.planbox { position: relative; background: var(--paper); border: 1px solid var(--line); padding: clamp(0.375rem, 1.2vw, 0.875rem); }
.planbox img { width: 100%; height: auto; }
.pin {
  position: absolute; transform: translate(-50%, -50%); width: clamp(2.125rem, 5.4vw, 3.625rem); aspect-ratio: 1; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); border: 2px solid #fff; display: grid; place-items: center; text-decoration: none;
  box-shadow: 0 0.25rem 0.875rem rgba(0,0,0,.35); transition: transform .2s;
}
.pin:hover { color: var(--accent-ink); }
.pin svg { width: 46%; height: 46%; position: absolute; top: 14%; fill: none; stroke: currentColor; stroke-width: 2; }
.pin b { font-family: var(--display); font-size: clamp(.8rem, 1.9vw, 1.15rem); position: relative; top: 22%; }
.pin:hover, .pin:focus-visible { transform: translate(-50%, -50%) scale(1.14); }
.pin .tip {
  position: absolute; bottom: calc(100% + 0.625rem); left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--black); color: var(--cream);
  border: 1px solid var(--gold); padding: 0.375rem 0.75rem; font-family: var(--body); font-size: 1rem; opacity: 0; pointer-events: none; transition: opacity .2s; font-weight: 600;
}
.pin:hover .tip, .pin:focus-visible .tip { opacity: 1; }

/* ---------- pagina unità ---------- */
.crumb { display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.375rem; font-size: 1rem; }
.crumb a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
.crumb a:hover { color: var(--accent); border-color: var(--accent); }
.crumb span { color: var(--muted); }
.u-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.125rem; margin-block: 1.375rem 0.5rem; }
.band .b { flex: 1 1 auto; }
.u-head h1 { font-size: clamp(2rem, 6vw, 3.8rem); letter-spacing: .1em; font-weight: 500; }
.u-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .u-grid { grid-template-columns: minmax(0, 1fr) 18.75rem; } }
.paper { background: var(--paper); border: 1px solid var(--line); padding: 0.375rem; position: relative; }
.paper button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.paper img { width: 100%; height: auto; }
.zoomtag { position: absolute; right: 0.875rem; bottom: 0.875rem; background: var(--black); color: var(--gold-light); font-family: var(--display); font-size: .62rem; letter-spacing: .24em; padding: 0.4375rem 0.6875rem; border: 1px solid var(--gold); pointer-events: none; }
.side { display: grid; gap: 1rem; align-content: start; }
.side h3 { font-size: .8rem; letter-spacing: .28em; color: var(--accent); margin-bottom: 0.625rem; font-weight: 500; }
.side p { margin: 0.625rem 0 0; color: var(--muted); font-size: 1rem; }
.pn { display: flex; justify-content: space-between; gap: 0.75rem; margin-top: clamp(2.25rem, 6vw, 4rem); padding-top: 1.375rem; border-top: 1px solid var(--line); }
.pn a { font-family: var(--display); letter-spacing: .16em; font-size: .85rem; text-decoration: none; color: var(--fg); }
.pn a:hover { color: var(--accent); }

/* ---------- footer ---------- */
footer.foot { border-top: 1px solid var(--line); padding-block: 2.75rem 3.375rem; display: grid; gap: 1.875rem; }
.logos { background: var(--black); border: 1px solid var(--gold-dark); padding: 1.375rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-around; gap: 1.375rem 2.125rem; }
.logos img { height: clamp(2.875rem, 8vw, 4.875rem); width: auto; }
.f-grid { display: grid; gap: 1.625rem; grid-template-columns: 1fr; }
@media (min-width: 820px) { .f-grid { grid-template-columns: 1fr 1fr; } }
.f-grid h2, .f-grid h3 { font-size: .8rem; letter-spacing: .28em; color: var(--accent); margin-bottom: 0.625rem; }
.f-grid p { margin: 0 0 0.25rem; }
.f-links { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 1.625rem; }
.f-links a { display: inline-block; padding: 0.25rem 0; text-decoration: none; }
.legal { display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; color: var(--muted); font-size: .95rem; }
.legal p { margin: 0; }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 50; background: rgba(5,4,3,.94); display: flex; flex-direction: column; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.lb[hidden] { display: none; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.75rem max(1rem, env(safe-area-inset-left, 0px)); color: #efe5cf; font-family: var(--display); font-size: .75rem; letter-spacing: .24em; }
.lb-bar button { background: var(--gold); color: var(--black); border: 0; padding: 0.5625rem 1.125rem; font-family: var(--display); font-size: .72rem; letter-spacing: .2em; }
.lb-sc { flex: 1; overflow: auto; padding: 0 0.75rem 1rem; }
.lb-sc img { width: max(100%, 1500px); max-width: none; height: auto; background: var(--paper); }

/* ---------- rilievo 3D ---------- */
.work-card[aria-current] { border-color: var(--accent); }
.viewer3d { margin: 0; background: var(--black); border: 1px solid var(--gold-dark); color: var(--cream); }
.v3d-stage { position: relative; aspect-ratio: 16 / 9; max-height: 72vh; width: 100%; background: var(--black); }
.v3d-stage model-viewer { position: absolute; inset: 0; width: 100%; height: 100%; --poster-color: transparent; }
.v3d-stage model-viewer:not(:defined) { display: none; }
.v3d-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.v3d-stage.is-ready .v3d-poster { visibility: hidden; }
.v3d-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.25rem; padding: .75rem 1rem; border-top: 1px solid var(--gold-dark); }
.v3d-views { display: flex; flex-wrap: wrap; gap: .5rem; }
.v3d-views button {
  background: transparent; color: var(--cream); border: 1px solid rgba(243, 236, 220, .35); padding: .5rem .875rem; font-family: var(--display);
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.v3d-views button:hover { border-color: var(--gold-light); color: var(--gold-light); }
.v3d-views button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--black); }
.v3d-msg { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: .75rem 1rem; background: rgba(11, 10, 9, .85); color: var(--cream); font-size: .95rem; }
.v3d-hint { margin: 0; font-size: .9rem; color: #b9b09c; font-style: italic; }
.viewer3d figcaption { padding: 0 1rem .875rem; font-size: .9rem; color: #b9b09c; }
@media (max-width: 619px) { .v3d-stage { aspect-ratio: 4 / 3; } }
.v3d-hint--touch { display: none; }
@media (hover: none) { .v3d-hint--mouse { display: none; } .v3d-hint--touch { display: inline; } }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  /* con "riduci movimento" le sezioni appaiono solo in dissolvenza, senza salire */
  html.reveal-js .reveal { transform: none; }
  html.reveal-js .reveal.is-in { transition: opacity .3s ease !important; transition-delay: 0s !important; }
}

/* =====================================================================
   ANIMAZIONI (tutte con transform/opacity/clip-path; con "riduci movimento" si spengono, vedi in fondo)
   ===================================================================== */

/* entrata dell'apertura: occhiello, titolo, frase e pulsanti salgono uno dopo l'altro; il titolo si scopre dal basso */
@keyframes rise-in { from { opacity: 0; transform: translateY(1.25rem); } to { opacity: 1; transform: none; } }
@keyframes title-in { from { opacity: 0; clip-path: inset(0 0 100% 0); transform: translateY(.6em); } to { opacity: 1; clip-path: inset(0 0 -.2em 0); transform: none; } }
.hero-t > * { animation: rise-in .8s var(--ease-out) both; }
.hero-t > .eyebrow { animation-delay: .15s; }
.hero-t > h1 { animation: title-in 1s var(--ease-out) .25s both; }
.hero-t > p { animation-delay: .45s; }
.hero-t > .actions { animation-delay: .6s; }
/* invito a scorrere: una sola riga, con un trattino d'oro che scende piano */
html.scrub-js .hero-hint { white-space: nowrap; }
html.scrub-js .hero-hint::before {
  content: ""; display: inline-block; vertical-align: middle; width: 1px; height: 1.1rem; margin: -.2rem .75rem 0 0; background: var(--gold-light);
  transform-origin: 50% 0; animation: hint-drop 1.8s cubic-bezier(0.77, 0, 0.175, 1) 1.2s infinite;
}
@keyframes hint-drop { 0% { transform: scaleY(0); opacity: 1; } 50% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1) translateY(.6rem); opacity: 0; } }

/* riflesso d'oro che attraversa la B: una volta all'apertura, e di nuovo passando con il mouse sul logo */
.mark--dock { position: relative; }
.mark--dock::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url("../assets/logo-b.svg") center / contain no-repeat; mask: url("../assets/logo-b.svg") center / contain no-repeat;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 248, 225, .9) 50%, transparent 62%) 140% 0 / 260% 100% no-repeat;
  animation: shine 1.6s var(--ease-out) .6s both;
}
@keyframes shine { from { background-position: 140% 0; } to { background-position: -40% 0; } }
@keyframes shine-again { from { background-position: 140% 0; } to { background-position: -40% 0; } }
@media (hover: hover) and (pointer: fine) { .brand:hover .mark--dock::after { animation: shine-again 1.1s var(--ease-out) both; } }

/* filetto d'oro sotto i titoli centrati: si disegna dal centro quando la sezione compare */
html.reveal-js .head--center.reveal::after { transform: scaleX(0); transition: transform .9s var(--ease-out) .25s; }
html.reveal-js .head--center.reveal.is-in::after { transform: scaleX(1); }

/* pulsanti: si abbassano appena alla pressione */
.btn, .tabs button, .v3d-views button, .menu-btn { transition-property: background, color, border-color, transform; transition-duration: .2s, .2s, .2s, .12s; }
.btn:active, .tabs button:active, .v3d-views button:active, .menu-btn:active { transform: scale(.97); }

/* riquadri dei servizi: al passaggio del mouse una linea d'oro cresce sotto il titolo */
.tile h2 { position: relative; padding-bottom: .4rem; }
.tile h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 2.5rem; height: 1px; background: var(--gold); transform: scaleX(.4); transform-origin: 0 50%; transition: transform .45s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .tile:hover h2::after { transform: scaleX(1.6); } }

/* schede (lavori, rilievi): l'immagine si avvicina appena */
.work-card .cover img { transition: transform .7s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .work-card:hover .cover img { transform: scale(1.035); } }

/* passaggio tra le pagine: l'intestazione resta ferma, il contenuto sfuma e sale di poco (browser recenti) */
@view-transition { navigation: auto; }
header.top { view-transition-name: intestazione; }
::view-transition-old(root) { animation: vt-out .18s ease-in both; }
::view-transition-new(root) { animation: vt-in .42s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(.75rem); } }

@media (prefers-reduced-motion: reduce) {
  .hero-t > *, .hero-t > h1, .mark--dock::after, html.scrub-js .hero-hint::before { animation: none !important; }
  .mark--dock::after { display: none; }
  html.reveal-js .head--center.reveal::after { transform: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
  .btn:active, .tabs button:active { transform: none; }
}

/* ---------- pagina 404 ---------- */
.nf { min-height: 60vh; display: grid; align-content: center; justify-items: center; text-align: center; }
.nf-num { font-family: var(--display); font-weight: 700; font-size: clamp(6rem, 18vw, 12rem); line-height: 1; letter-spacing: .08em;
  color: transparent; -webkit-text-stroke: 1px var(--gold-dark); margin-bottom: .5rem; }
.nf-actions { justify-content: center; margin-top: 1rem; }

/* telefono: l'invito a scorrere sta in alto e va a capo, più piccolo, invece di uscire dal riquadro */
@media (max-width: 899px) { html.scrub-js .hero-hint { white-space: normal; max-width: calc(100% - 2.5rem); font-size: .62rem; letter-spacing: .24em; line-height: 1.6; } }

/* Residence Leonardo: la B dello studio (torna al sito) accanto al nome del complesso */
.brand-group { display: inline-flex; align-items: center; gap: .875rem; }
.brand-group .brand--sub { padding-left: .875rem; border-left: 1px solid var(--line); }

/* foto delle sezioni: quando compaiono si "posano", da un filo più grandi alla misura giusta */
html.reveal-js .reveal .gal img, html.reveal-js .reveal.member img.photo { transform: scale(1.06); transition: transform 1.4s var(--ease-out), filter .6s ease; }
html.reveal-js .reveal.is-in .gal img, html.reveal-js .reveal.is-in.member img.photo { transform: none; }
html.reveal-js .steps > .reveal .gal img { transform: scale(1.06); }
html.reveal-js .steps > .reveal.is-in .gal img { transform: none; }
@media (prefers-reduced-motion: reduce) { html.reveal-js .reveal .gal img, html.reveal-js .reveal.member img.photo { transform: none !important; } }

/* bagliore d'oro che segue il mouse sui riquadri dei servizi e sulle schede (solo con il mouse) */
@media (hover: hover) and (pointer: fine) {
  .tile::after, .work-card::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s ease;
    background: radial-gradient(22rem circle at var(--mx, 50%) var(--my, 50%), rgba(227, 201, 135, .14), transparent 60%);
  }
  .work-card { position: relative; overflow: hidden; }
  .tile:hover::after, .work-card:hover::after { opacity: 1; }
}

/* tendina dei servizi: le voci entrano una dopo l'altra */
@media (min-width: 900px) {
  nav.menu .sub li { opacity: 0; transform: translateY(-.25rem); transition: opacity .2s ease-out, transform .25s var(--ease-out); }
  nav.menu .has-sub:hover .sub li, nav.menu .has-sub[data-open="true"] .sub li { opacity: 1; transform: none; }
  nav.menu .sub li:nth-child(2) { transition-delay: 25ms; } nav.menu .sub li:nth-child(3) { transition-delay: 50ms; }
  nav.menu .sub li:nth-child(4) { transition-delay: 75ms; } nav.menu .sub li:nth-child(5) { transition-delay: 100ms; }
  nav.menu .sub li:nth-child(6) { transition-delay: 125ms; } nav.menu .sub li:nth-child(7) { transition-delay: 150ms; }
  nav.menu .sub li:nth-child(8) { transition-delay: 175ms; }
}
@media (prefers-reduced-motion: reduce) { nav.menu .sub li { opacity: 1 !important; transform: none !important; } }

/* telefono: il menu si apre scendendo e sfumando (browser recenti; negli altri si apre e basta) */
@media (max-width: 899px) {
  nav.menu { transition: opacity .22s ease-out, transform .26s var(--ease-out), display .26s allow-discrete; }
  nav.menu[data-open="true"] { opacity: 1; transform: none; }
  @starting-style { nav.menu[data-open="true"] { opacity: 0; transform: translateY(-.5rem); } }
  nav.menu[data-open="false"] { opacity: 0; transform: translateY(-.5rem); }
  nav.menu ul > li { transition: opacity .25s ease-out, transform .3s var(--ease-out); }
  @starting-style { nav.menu[data-open="true"] ul > li { opacity: 0; transform: translateY(-.35rem); } }
  nav.menu ul > li:nth-child(2) { transition-delay: 30ms; } nav.menu ul > li:nth-child(3) { transition-delay: 60ms; } nav.menu ul > li:nth-child(4) { transition-delay: 90ms; }
}

/* "Da dove partire": cambio di scheda morbido */
.pane > *, .pick figure img { transition: opacity .18s ease-out, transform .25s var(--ease-out); }
.pane.is-swapping > * { opacity: 0; transform: translateY(.3rem); }
.pick figure img.is-swapping { opacity: 0; }
.pane > :nth-child(2) { transition-delay: 30ms; } .pane > :nth-child(3) { transition-delay: 60ms; } .pane > :nth-child(4) { transition-delay: 90ms; }
.pane.is-swapping > * { transition-delay: 0s; }

/* pagina Servizi: i riquadri si scoprono da sinistra, uno dopo l'altro */
html.reveal-js .tiles > .tile.reveal { opacity: 1; transform: none; clip-path: inset(0 100% 0 0); }
html.reveal-js .tiles > .tile.reveal.is-in { clip-path: inset(0 0 0 0); transition: clip-path .9s cubic-bezier(0.77, 0, 0.175, 1); transition-delay: calc(var(--i, 0) * 90ms); }
html.reveal-js .tiles > .tile.reveal:not(.tile--ph) > img { transform: scale(1.12); transition: transform 1.4s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
html.reveal-js .tiles > .tile.reveal.is-in > img { transform: none; }
@media (hover: hover) and (pointer: fine) { html.reveal-js .tiles > .tile.reveal.is-in:hover > img { transform: scale(1.04); transition-delay: 0s; } }
@media (prefers-reduced-motion: reduce) {
  html.reveal-js .tiles > .tile.reveal { clip-path: none; }
  html.reveal-js .tiles > .tile.reveal > img { transform: none; }
  .pane.is-swapping > *, .pick figure img.is-swapping { opacity: 1; transform: none; }
}

/* fondo pagina: la B con il nome dello studio, come sulla carta intestata */
.logos--studio { flex-direction: column; gap: .75rem; padding-block: 1.75rem; }
.logos--studio img { height: clamp(3.25rem, 7vw, 4.5rem); }
.wordmark { margin: 0; text-align: center; font-family: var(--display); color: var(--gold-light); letter-spacing: .34em; font-size: clamp(.9rem, 1.6vw, 1.1rem); }
.wordmark span { display: block; margin-top: .35rem; font-family: var(--body); font-style: italic; letter-spacing: .06em; font-size: .95rem; color: var(--muted); }
/* numeri di telefono, CAP e partita IVA con le cifre tutte alte (più leggibili delle cifre "antiche" del carattere) */
.f-grid, .legal, .crumb, .map-t, .hero p, .legal-text { font-variant-numeric: lining-nums; }
/* schede affiancate: stessa altezza e "Apri" sempre in fondo, allineato tra le schede */
.works:not(.works--one) .work-card { display: flex; flex-direction: column; }
.works:not(.works--one) .work-card .go { margin-top: auto; padding-top: .25rem; }
/* il link "Vai ai contenuti" (tastiera) resta leggibile anche al passaggio del mouse */
.skip:hover, .skip:focus { color: var(--accent-ink); }
/* pulsanti oro premuti nel visualizzatore 3D: al passaggio del mouse il testo resta scuro */
.v3d-views button[aria-pressed="true"]:hover { color: var(--black); border-color: var(--gold); }

/* pulsante "torna su": compare dopo un po' di scorrimento nelle pagine lunghe */
.to-top {
  position: fixed; right: max(1rem, env(safe-area-inset-right, 0px)); bottom: max(1rem, env(safe-area-inset-bottom, 0px)); z-index: 15;
  width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: 50%;
  background: rgba(11, 10, 9, .82); border: 1px solid var(--gold-dark); color: var(--gold-light); backdrop-filter: blur(6px);
  opacity: 0; transform: translateY(.75rem); pointer-events: none; transition: opacity .25s ease-out, transform .3s var(--ease-out), border-color .2s, color .2s;
}
.to-top svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.6; }
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--gold); color: var(--cream); }
.to-top:active { transform: scale(.94); }

/* stampa: fondo bianco, niente video né menu, indirizzi dei link scritti per esteso */
@page { margin: 1.5cm; }
@media print {
  :root { --bg: #fff; --fg: #111; --muted: #444; --surface: #fff; --surface2: #fff; --line: #ccc; }
  body { background: #fff; color: #111; padding: 0; }
  header.top, .hero-stage, .menu-btn, nav.menu, .to-top, .map, .map-dir, .skip, .jump, video, model-viewer { display: none !important; }
  html.head-js body { padding-top: 0; }
  .reveal { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .tile { break-inside: avoid; border-color: #ccc; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
  .band, .logos { background: #fff; color: #111; }
  /* home stampata: il nome dello studio resta in testa al foglio, senza video né pulsanti */
  .hero-stage:has(#hero-video) { display: block !important; height: auto !important; min-height: 0 !important; position: static !important; }
  .hero-stage:has(#hero-video) .hero { display: block; height: auto; min-height: 0; position: static; background: none; padding: 0 0 1.5rem; }
  .hero-stage:has(#hero-video) .hero-t { position: static; transform: none; opacity: 1; padding: 0; }
  .hero-stage:has(#hero-video) :is(.hero-hint, .hero-scrub, .actions, #hero-spacer) { display: none !important; }
  .hero-stage:has(#hero-video) .hero { margin: 0; }
  .hero-stage:has(#hero-video) .hero::after { content: none; }
  .hero-stage:has(#hero-video) .hero p { text-shadow: none; }
  .hero-t > *, .hero-t > h1 { animation: none !important; opacity: 1 !important; transform: none !important; }
  .hero-stage:has(#hero-video) h1 { color: #6e5a2c; }
  .hero-stage:has(#hero-video) .it, .hero-stage:has(#hero-video) .eyebrow { color: #333; }
  /* oro chiaro su bianco non si legge: in stampa diventa oro scuro e nero */
  .band .a em { color: #111; }
  .band a.b { color: #6e5a2c; }
  .copy-btn { display: none !important; }
  .stats dd { white-space: nowrap; }
  a[href*="google.com/maps"]::after { content: none; }
}
/* il pulsante "torna su" non copre il link "Torna su" in fondo alla pagina */
.legal { padding-right: 3.75rem; }
@media (min-width: 1360px) { .legal { padding-right: 0; } } /* con margine laterale "Torna su" si allinea al bordo destro */
/* telefoni stretti: nome dello studio più compatto, così "Menu" resta sulla stessa riga */
@media (max-width: 389px) {
  .brand { letter-spacing: .16em; font-size: .85rem; gap: .5rem !important; }
  .menu-btn { padding-inline: .625rem; letter-spacing: .14em; }
}

/* tipografia: niente parole sole a fine paragrafo, titoli bilanciati */
p, dd, li { text-wrap: pretty; }
h1, h2, h3, dt { text-wrap: balance; }

/* mappa: il segnaposto d'oro scende al suo posto quando la sezione compare */
html.reveal-js .map.reveal .map-pin { opacity: 0; transform: translateY(-1.25rem); }
html.reveal-js .map.reveal.is-in .map-pin { opacity: 1; transform: none; transition: opacity .3s ease-out .35s, transform .7s cubic-bezier(.34, 1.56, .64, 1) .35s; }
.map-pin { filter: drop-shadow(0 .35rem .5rem rgba(0, 0, 0, .55)); }
@media (prefers-reduced-motion: reduce) { html.reveal-js .map.reveal .map-pin { opacity: 1; transform: none; } }

/* visualizzatore 3D: pulsante schermo intero e modello a tutto schermo */
.v3d-full {
  background: transparent; color: var(--gold-light); border: 1px solid var(--gold-dark); padding: .5rem .875rem; font-family: var(--display);
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; cursor: pointer; transition: border-color .2s, color .2s, transform .12s;
}
.v3d-full:hover { border-color: var(--gold-light); color: var(--cream); }
.v3d-full:active { transform: scale(.97); }
.viewer3d.is-full { display: flex; flex-direction: column; width: 100vw; height: 100vh; border: 0; }
.viewer3d.is-full .v3d-stage { flex: 1; max-height: none; aspect-ratio: auto; }
.viewer3d:fullscreen { background: var(--black); }

/* fascia a tutta larghezza, appena più chiara del fondo: separa le parti della home (Team) */
section.blk--band { position: relative; padding-block: var(--section); margin-block: var(--section); }
section.blk--band::before {
  content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1;
  background: radial-gradient(60% 120% at 50% 0%, rgba(201, 164, 92, .07), transparent 70%), var(--surface);
  border-block: 1px solid var(--line);
}
section.blk--band + section.blk { padding-top: 0; }
section.blk + section.blk--band { padding-top: var(--section); }

/* pagina Privacy: testo da leggere, colonna stretta */
.legal-text { max-width: 46rem; }
.legal-text h2 { font-size: 1.05rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 2rem 0 .625rem; }
.legal-text p { margin-bottom: .875rem; }
.legal-text a { color: var(--gold-light); }
.legal a { color: inherit; }

/* Residence Leonardo: quando la planimetria compare, un anello d'oro pulsa due volte intorno a ogni unità (si possono cliccare) */
.pin::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--gold); opacity: 0; pointer-events: none; }
.planbox.reveal.is-in .pin::after, html:not(.reveal-js) .planbox .pin::after { animation: pin-pulse 1.6s var(--ease-out) 2; }
.planbox .pin:nth-of-type(2)::after { animation-delay: .15s; } .planbox .pin:nth-of-type(3)::after { animation-delay: .3s; }
.planbox .pin:nth-of-type(4)::after { animation-delay: .45s; } .planbox .pin:nth-of-type(5)::after { animation-delay: .6s; }
@keyframes pin-pulse { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(1.8); } }
@media (prefers-reduced-motion: reduce) { .pin::after { animation: none !important; } }

/* occhiello sopra il titolo dell'apertura: spaziatura un po' più stretta, così "Nuova costruzione · 5 unità abitative" sta su una riga */
.hero-t .eyebrow { letter-spacing: .24em; }
@media (max-width: 619px) { .hero-t .eyebrow { letter-spacing: .18em; font-size: .68rem; } }
.hero-t .eyebrow { max-width: none; }

/* avviso breve in basso: sale, resta due secondi, scende */
.toast {
  position: fixed; left: 50%; bottom: max(1.25rem, env(safe-area-inset-bottom, 0px)); z-index: 40; margin: 0;
  padding: .7rem 1.25rem; background: var(--black); color: var(--cream); border: 1px solid var(--gold); box-shadow: 0 .75rem 2rem rgba(0, 0, 0, .5);
  font-family: var(--display); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; max-width: calc(100vw - 2rem); overflow: hidden; text-overflow: ellipsis;
  opacity: 0; transform: translate(-50%, 1rem); pointer-events: none; transition: opacity .2s ease-out, transform .35s var(--ease-out);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast::before { content: ""; display: inline-block; width: .32rem; height: .62rem; margin: 0 .85rem 0 .1rem; border: solid var(--gold-light); border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-.15rem); }

/* email dei Contatti con il pulsante "Copia l'email" accanto */
.band-row { display: flex; flex-wrap: wrap; align-items: center; gap: .875rem 1.25rem; }
.copy-btn { font-size: .72rem; }
/* telefono: etichetta sopra e indirizzo sotto, divisi da un filetto orizzontale (prima il filetto verticale restava appeso) */
@media (max-width: 560px) {
  .band { display: flex; flex-direction: column; width: 100%; }
  .band .a { border-right: 0; border-bottom: 1px solid var(--gold-dark); padding-block: .55rem; }
  .band a.b { padding-block: .8rem .9rem; }
  .band-row .copy-btn { width: 100%; }
}

/* barra d'oro sotto l'intestazione: avanza con la lettura della pagina */
.read-bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .toast { transition: opacity .2s ease-out; transform: translate(-50%, 0); } }

/* domande su schermi larghi: titolo a sinistra, fermo mentre si scorre, e le domande a destra */
@media (min-width: 1040px) {
  #domande { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr); column-gap: 4rem; align-items: start; }
  #domande > .head { position: sticky; top: calc(var(--head-c) + 2rem); grid-row: 1 / span 2; }
  #domande > .faq { max-width: none; }
  #domande > .svc-all { grid-column: 2; }
}

/* home: anteprima del servizio che segue il mouse (js/main.js) */
.svc-peek { position: fixed; left: 0; top: 0; z-index: 40; width: 15rem; aspect-ratio: 4 / 3; pointer-events: none; overflow: hidden;
  border: 1px solid rgba(227, 201, 135, .45); background: #000; box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, .55);
  opacity: 0; scale: .85; transition: opacity .25s ease, scale .35s var(--ease-out); will-change: transform; }
.svc-peek.is-on { opacity: 1; scale: 1; }
.svc-peek img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; scale: 1.08; transition: opacity .3s ease, scale .6s var(--ease-out); }
.svc-peek img.is-on { opacity: 1; scale: 1; }
/* la riga sotto il mouse: filetto d'oro che si allunga */
.svc li { position: relative; }
.svc li::before { content: ""; position: absolute; left: 0; top: -1px; width: 100%; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .svc li:hover::before { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .svc li::before { transition: none; } }

/* team: il titolare in alto; sotto, i collaboratori su una striscia che scorre da sola verso destra.
   js/main.js ne mette una seconda copia in coda, così il giro non ha stacchi (si sposta di metà, cioè di una copia) */
.staff-marquee { position: relative; margin-top: 3rem; padding-top: 2.5rem; border-top: 1px solid var(--line); overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.team--staff { display: flex; flex-wrap: wrap; justify-content: center; gap: 2rem 0; list-style: none; margin: 0; padding: 0; }
.team--staff .member { width: clamp(9.5rem, 17%, 14rem); margin-inline: .625rem; }
.team--staff .member h3 { font-size: .92rem; }
.team--staff .member .role { font-size: .68rem; }
@media (max-width: 560px) { .team--staff .member { width: calc(50% - 1.25rem); } }
@media (prefers-reduced-motion: no-preference) {
  .staff-marquee.is-running .team--staff { flex-wrap: nowrap; justify-content: flex-start; width: max-content; will-change: transform; }
  .staff-marquee.is-running .team--staff .member { width: 13rem; flex: none; }
  @media (max-width: 560px) { .staff-marquee.is-running .team--staff .member { width: 10rem; } }
}
@keyframes staff-scorre { from { transform: translateX(-50%); } to { transform: translateX(0); } }
/* posto ancora senza foto: stesso alone e stessa sfumatura delle foto scontornate, con la B in filigrana */
.member--slot .member-ph { border: 0; background: radial-gradient(60% 55% at 50% 45%, rgba(201, 164, 92, .12) 0%, rgba(201, 164, 92, 0) 70%);
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, #000 70%, transparent 100%); }
.member--slot h3, .member--slot .role { opacity: .55; }

/* team: tutti sulla stessa striscia che scorre, Paolo per primo; la striscia parte subito sotto il titolo */
.staff-marquee { margin-top: 0; padding-top: 0; border-top: 0; }
.team--staff .member--lead h3 { font-size: 1.05rem; }
.team--staff .member--lead .role { font-size: .78rem; }
.team--staff .member--lead p:not(.role) { font-size: .95rem; }
@media (prefers-reduced-motion: no-preference) {
  .staff-marquee.is-running .team--staff .member { width: 16.5rem; margin-inline: 1.25rem; }
  @media (max-width: 560px) { .staff-marquee.is-running .team--staff .member { width: 12rem; margin-inline: .75rem; } }
}

/* telefono e tablet in verticale: l'apertura riempie tutto lo schermo sotto la barra (prima restava una fascia nera sotto),
   e l'invito a scorrere sta su una piccola targa scura, leggibile anche sopra i tetti chiari */
@media (max-width: 899px) and (orientation: portrait) {
  .hero { min-height: max(26rem, calc(100svh - var(--head-h, 4rem) - 2.5rem)); }
  html.scrub-js .hero-hint { padding: .45rem .75rem; background: rgba(11, 10, 9, .55); border: 1px solid rgba(227, 201, 135, .22);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); text-shadow: none; }
}

/* rilievi: i pulsanti di servizio stanno in un gruppo; sul telefono punti di vista su una riga e servizi su un'altra, a tutta larghezza */
.v3d-tools { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 619px) {
  .v3d-views, .v3d-tools { width: 100%; flex-wrap: nowrap; }
  .v3d-views button, .v3d-tools > * { flex: 1 1 0; min-width: 0; padding-inline: .4rem; white-space: nowrap; text-align: center; }
  .v3d-views button { font-size: .62rem; letter-spacing: .12em; }
  .v3d-tools > * { font-size: .62rem; letter-spacing: .14em; }
}
@media (max-width: 379px) { .v3d-views { flex-wrap: wrap; } .v3d-views button { flex: 1 1 auto; } }

/* giro 13:45 — numeri legali che non si spezzano a metà (P.IVA, codice fiscale) */
.nw { white-space: nowrap; }

/* 404 sul telefono: i tre pulsanti uno sotto l'altro, tutti larghi uguale (prima "Contatti" restava da solo) */
@media (max-width: 619px) {
  .nf-actions { flex-direction: column; align-items: stretch; width: min(100%, 20rem); }
  .nf-actions .btn { text-align: center; justify-content: center; }
}
/* 404: il numero compare piano, salendo appena al suo posto (solo opacità e transform) */
@keyframes nf-in { from { opacity: 0; transform: translateY(.12em) scale(.96); } to { opacity: 1; transform: none; } }
.nf-num { animation: nf-in 1.2s var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) { .nf-num { animation: none; } }

/* Residence Leonardo sul telefono: B, nome e pallini A–E su una sola riga (prima due righe, barra alta 115 px) */
@media (max-width: 619px) {
  .top-in:has(nav.units) { gap: .625rem; }
  .brand-group { gap: .625rem; }
  .brand-group .brand--sub { padding-left: .625rem; white-space: normal; max-width: 6.2rem; font-size: .66rem; letter-spacing: .14em; line-height: 1.35; }
  nav.units { gap: .375rem; }
  nav.units a { width: 2rem; height: 2rem; font-size: .82rem; }
}

/* schede di Lavori e Rilievi: l'invito "Apri" ha una freccia che avanza e un filetto d'oro che si allunga al passaggio */
.work-card .go { position: relative; display: inline-flex; align-items: center; gap: .5rem; align-self: flex-start; padding-bottom: .3rem; }
.work-card .go::after { content: "→"; display: inline-block; transition: transform .35s var(--ease-out); }
.work-card .go::before { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: currentColor; opacity: .7;
  transform: scaleX(.18); transform-origin: left; transition: transform .5s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .work-card:hover .go::after { transform: translateX(.35rem); }
  .work-card:hover .go::before { transform: scaleX(1); }
}
.work-card:focus-visible .go::before { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) { .work-card .go::after, .work-card .go::before { transition: none; } }

/* Chi siamo, "Su Google": cinque stelle d'oro che si accendono una dopo l'altra quando il blocco compare */
.stars { display: flex; gap: .15rem; margin-bottom: .2rem; color: var(--gold); font-size: .95rem; letter-spacing: 0; line-height: 1; }
.stars i { font-style: normal; display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  html.reveal-js .reveal .stars i { opacity: .18; transform: scale(.6); transition: opacity .35s ease, transform .5s cubic-bezier(.34, 1.56, .64, 1); }
  html.reveal-js .reveal.is-in .stars i { opacity: 1; transform: none; }
  html.reveal-js .reveal.is-in .stars i:nth-child(1) { transition-delay: .5s; }
  html.reveal-js .reveal.is-in .stars i:nth-child(2) { transition-delay: .62s; }
  html.reveal-js .reveal.is-in .stars i:nth-child(3) { transition-delay: .74s; }
  html.reveal-js .reveal.is-in .stars i:nth-child(4) { transition-delay: .86s; }
  html.reveal-js .reveal.is-in .stars i:nth-child(5) { transition-delay: .98s; }
}

/* persona già con nome e ruolo ma ancora senza foto: testo pieno, resta la B al posto della foto */
.member--named h3, .member--named .role { opacity: 1; }
.team--staff .member--named h3 { font-size: 1.05rem; }
.team--staff .member--named .role { font-size: .78rem; }
.team--staff .member--named p:not(.role) { font-size: .95rem; }

/* striscia del Team: frecce ai lati per spostarla a mano (la striscia continua comunque a scorrere da sola) */
.staff-wrap { position: relative; }
.staff-marquee.is-running { touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.staff-marquee.is-drag { cursor: grabbing; }
.staff-marquee.is-running img { -webkit-user-drag: none; pointer-events: none; }
.staff-arrow { position: absolute; top: calc(var(--staff-photo, 21rem) / 2); z-index: 2; width: 3rem; height: 3rem; margin-top: -1.5rem; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--gold-dark); background: rgba(11, 10, 9, .72); color: var(--gold-light); cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: border-color .2s ease, color .2s ease, background .2s ease, transform .15s var(--ease-out); }
.staff-arrow svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.staff-arrow--prev { left: 0; } .staff-arrow--next { right: 0; }
.staff-arrow:hover { border-color: var(--gold-light); background: rgba(201, 164, 92, .16); }
.staff-arrow:active { transform: scale(.92); }
.staff-arrow:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
@media (max-width: 560px) { .staff-arrow { width: 2.5rem; height: 2.5rem; margin-top: -1.25rem; } .staff-arrow--prev { left: -.25rem; } .staff-arrow--next { right: -.25rem; } }
.staff-wrap { --staff-photo: 20.625rem; }
@media (max-width: 560px) { .staff-wrap { --staff-photo: 15rem; } }

/* titoli delle sezioni: ogni parola sale dal basso, mascherata, una dopo l'altra */
html.reveal-js .words .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .16em; margin-bottom: -.16em; }
html.reveal-js .words .w > span { display: inline-block; transform: translateY(110%); transition: transform .95s var(--ease-out); transition-delay: calc(var(--wi, 0) * 70ms + .08s); }
html.reveal-js .reveal.is-in .words .w > span, html.reveal-js .is-in .words .w > span { transform: none; }

/* Team: la scheda sotto il mouse si fa avanti, la foto si solleva appena */
@media (hover: hover) and (pointer: fine) {
  .team--staff .member { transition: opacity .35s ease; }
  .team--staff .member img.photo, .team--staff .member-ph { transition: transform .6s var(--ease-out); }
  .team--staff:hover .member { opacity: .62; }
  .team--staff .member:hover { opacity: 1; }
  .team--staff .member:hover img.photo, .team--staff .member:hover .member-ph { transform: translateY(-.4rem) scale(1.03); }
}

/* piè di pagina: stesso riflesso d'oro del logo in alto, quando la B compare (e di nuovo col mouse sopra) */
.f-mark { position: relative; display: inline-block; line-height: 0; }
.f-mark::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  -webkit-mask: url("../assets/logo-b.svg") center / contain no-repeat; mask: url("../assets/logo-b.svg") center / contain no-repeat;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 248, 225, .9) 50%, transparent 62%) 140% 0 / 260% 100% no-repeat;
}
.f-mark.is-shine::after { animation: shine 1.8s var(--ease-out) .2s both; }
@media (hover: hover) and (pointer: fine) { .f-mark:hover::after { animation: shine-again 1.1s var(--ease-out) both; } }

/* home, "Cosa fa lo studio": griglia leggera. Per ogni servizio un'icona d'oro a filo, il nome e una riga sola;
   tanto spazio intorno. Le icone si disegnano tratto per tratto quando la sezione compare */
.svc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.25rem 1.25rem; }
@media (min-width: 760px) { .svc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3rem 2.25rem; } }
.svc-grid a { position: relative; display: grid; align-content: start; gap: .55rem; height: 100%; padding-top: 1.375rem; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.svc-grid a::before { content: ""; position: absolute; left: 0; top: -1px; width: 100%; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .55s var(--ease-out); }
.svc-ico { width: 2.6rem; height: 2.6rem; margin-bottom: .35rem; fill: none; stroke: var(--gold); stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s var(--ease-out); }
.svc-grid h3 { font-size: .9rem; letter-spacing: .17em; text-transform: uppercase; color: var(--fg); transition: color .25s ease; }
.svc-grid p { margin: 0; font-size: 1.02rem; line-height: 1.45; color: var(--muted); max-width: 28ch; }
@media (hover: hover) and (pointer: fine) {
  .svc-grid a:hover::before { transform: scaleX(1); }
  .svc-grid a:hover h3 { color: var(--gold-light); }
  .svc-grid a:hover .svc-ico { transform: translateY(-.2rem); }
}
.svc-grid a:focus-visible { outline: 1px solid var(--accent); outline-offset: 6px; }
.svc-grid a:focus-visible::before { transform: scaleX(1); }
@media (prefers-reduced-motion: no-preference) {
  html.reveal-js .svc-grid .reveal .svc-ico * { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.3s cubic-bezier(.65, 0, .35, 1); transition-delay: calc(var(--i, 0) * 90ms + .25s); }
  html.reveal-js .svc-grid .reveal.is-in .svc-ico * { stroke-dashoffset: 0; }
}
@media (max-width: 380px) { .svc-grid p { font-size: .95rem; } }
/* solo icona e nome: righe più vicine */
.svc-grid { row-gap: 1.75rem; }
@media (min-width: 760px) { .svc-grid { row-gap: 2.25rem; } }
.svc-grid a { padding-bottom: .25rem; }
.svc-grid + .svc-all { margin-top: 2.5rem; }

/* Team · attività come elenco puntato */
.member .jobs { list-style:none; margin:.55rem auto 0; width:fit-content; max-width:100%; padding:0; display:grid; gap:.3rem; color:var(--muted); text-align:left; }
.member .jobs li { position:relative; padding-left:1rem; line-height:1.3; }
.member .jobs li::before { content:""; position:absolute; left:.1rem; top:.58em; width:.32rem; height:.32rem; border-radius:50%; background:var(--gold); opacity:.85; }
.team--staff .member .jobs { font-size:.95rem; }

/* Contatti in home: telefono, cellulare ufficio e cellulare su una riga, indirizzo sotto */
@media (min-width: 760px) { .stats--tel > div:last-child { grid-column: 1 / -1; } }

/* ---------- Residence Leonardo: planimetria generale disegnata (stessa veste delle piante) ---------- */
.ss { --ss-ink: #2b2620; --ss-brown: #5a4630; --ss-rule: #c3a27f; background: #f6f2eb; color: var(--ss-ink); border: 1px solid var(--line);
  padding: clamp(1rem, 3vw, 2.5rem); font-family: "Helvetica Neue", Arial, sans-serif; }
.ss-head { border-bottom: 1px solid var(--ss-rule); padding-bottom: .6rem; margin-bottom: clamp(1rem, 2.5vw, 1.75rem); box-shadow: 0 4px 0 -3px var(--ss-rule); }
.ss-t { margin: 0; font-family: var(--body); font-size: clamp(1.6rem, 4.2vw, 2.9rem); line-height: 1.05; color: var(--ss-ink); }
.ss-t b { color: var(--ss-brown); font-weight: 700; }
.ss-sub { margin: .45rem 0 0; font-size: clamp(.62rem, 1.4vw, .78rem); letter-spacing: .08em; text-transform: uppercase; color: #6f675d; }
.ss-body { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
@media (min-width: 1000px) { .ss-body { grid-template-columns: minmax(0, 1fr) 16.5rem; align-items: start; } }
.ss-map { position: relative; }
.ss-map img { display: block; width: 100%; height: auto; }
.ss-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ss-map a { outline: none; }
.ss .lot { fill: rgba(201, 164, 92, 0); stroke: rgba(201, 164, 92, 0); stroke-width: 6; transition: fill .25s ease, stroke .25s ease; }
.ss .badge > g { transform-box: fill-box; transform-origin: center; transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.ss .badge circle { fill: var(--ss-brown); stroke: #fff; stroke-width: 5; filter: drop-shadow(0 3px 5px rgba(0,0,0,.35)); }
.ss .badge text { fill: #fff; font-family: var(--display); font-size: 46px; font-weight: 600; text-anchor: middle; }
.ss-map a:hover .lot, .ss-map a:focus-visible .lot,
.ss[data-hi="A"] [data-k="A"] .lot, .ss[data-hi="B"] [data-k="B"] .lot, .ss[data-hi="C"] [data-k="C"] .lot,
.ss[data-hi="D"] [data-k="D"] .lot, .ss[data-hi="E"] [data-k="E"] .lot { fill: rgba(225, 190, 110, .42); stroke: #c9a45c; }
.ss-map a:hover .badge > g, .ss-map a:focus-visible .badge > g,
.ss[data-hi="A"] [data-k="A"] .badge > g, .ss[data-hi="B"] [data-k="B"] .badge > g, .ss[data-hi="C"] [data-k="C"] .badge > g,
.ss[data-hi="D"] [data-k="D"] .badge > g, .ss[data-hi="E"] [data-k="E"] .badge > g { transform: scale(1.22); }
.ss-map a:focus-visible .lot { stroke: #2b2620; }
.ss-leg { background: #fff; border: 1px solid #e3dccf; box-shadow: 0 6px 18px rgba(60, 45, 25, .12); padding: 1.1rem 1.2rem 1.2rem; }
.ss-leg h3 { margin: 0 0 .6rem; padding-bottom: .5rem; border-bottom: 1px solid var(--ss-rule); font-family: inherit; font-size: .9rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ss-brown); }
.ss-leg ul { list-style: none; margin: 0; padding: 0; }
.ss-units a { display: grid; grid-template-columns: 1.75rem 1fr auto; align-items: center; gap: .6rem; padding: .45rem .35rem; margin-inline: -.35rem; color: var(--ss-ink); text-decoration: none; font-size: .95rem; transition: background-color .2s ease; }
.ss-units i { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--ss-brown); color: #fff; font-style: normal; font-family: var(--display); font-size: .85rem; }
.ss-units em { font-style: normal; color: #6f675d; font-size: .88rem; font-variant-numeric: tabular-nums; }
.ss-units a:hover, .ss-units a:focus-visible, .ss[data-hi="A"] .ss-units [data-k="A"], .ss[data-hi="B"] .ss-units [data-k="B"], .ss[data-hi="C"] .ss-units [data-k="C"],
.ss[data-hi="D"] .ss-units [data-k="D"], .ss[data-hi="E"] .ss-units [data-k="E"] { background: #f3e8d1; color: var(--ss-ink); }
.ss-units a:focus-visible { outline: 2px solid var(--ss-brown); outline-offset: 1px; }
.ss-keys { margin-top: .9rem !important; padding-top: .8rem !important; border-top: 1px solid #e3dccf !important; display: grid; gap: .5rem; font-size: .82rem; color: #4d463d; }
.ss-keys li { display: grid; grid-template-columns: 1.75rem 1fr; gap: .6rem; align-items: center; line-height: 1.3; }
.sw { display: block; width: 1.5rem; height: 1rem; border-radius: 2px; font-style: normal; }
.sw--green { background: repeating-linear-gradient(90deg, #5fae42 0 4px, #6bb94d 4px 8px); }
.sw--pave { background: #cfcbc3; background-image: linear-gradient(#b9b5ae 1px, transparent 1px), linear-gradient(90deg, #b9b5ae 1px, transparent 1px); background-size: 6px 4px; }
.sw--park { background: #a9a7a2; color: #fff; font: 700 .7rem/1rem Arial, sans-serif; text-align: center; }
.sw--pv { background: #2b4566; background-image: linear-gradient(90deg, #c9d3dd 1px, transparent 1px); background-size: 6px 100%; }
.sw--in { width: 0; height: 0; border-radius: 0; margin-left: .4rem; border-left: .45rem solid transparent; border-right: .45rem solid transparent; border-bottom: .7rem solid var(--ss-brown); }
.ss-north { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid #e3dccf; font-size: .78rem; color: #6f675d; line-height: 1.35; }
.ss-north svg { width: 2.6rem; height: 2.6rem; flex: none; }
.ss-north circle { fill: none; stroke: #5a5249; stroke-width: 1.5; }
.ss-north path { fill: #2b2620; }
.ss-note { margin: clamp(.9rem, 2vw, 1.4rem) 0 0; font-size: .75rem; color: #7a7268; line-height: 1.45; }
@media (prefers-reduced-motion: reduce) { .ss .lot, .ss .badge > g, .ss-units a { transition: none; } }
@media (max-width: 640px) { .ss .badge circle { r: 64px; stroke-width: 7; } .ss .badge text { font-size: 74px; } }
.sw--fence { height: 4px; border-radius: 0; background: #8e877b; box-shadow: inset 0 1px 0 #d8d2c6; position: relative; }
.sw--fence::before, .sw--fence::after { content: ""; position: absolute; top: -1.5px; width: 5px; height: 7px; background: #3f3a34; }
.sw--fence::before { left: 2px; } .sw--fence::after { right: 2px; }
.sw--gate { height: .75rem; border-radius: 0; border: 1.5px dashed #6e685f; border-bottom: 3px solid #4f4a43; border-radius: 0 .75rem 0 0; background: none; }

/* Residence Leonardo · pagina unità: dettagli ingranditi dai render (si aprono grandi al clic) */
.dets { margin-top: clamp(1.75rem, 4vw, 2.75rem); }
.dets h2 { font-family: var(--display); font-size: .8rem; letter-spacing: .28em; color: var(--accent); margin: 0 0 .875rem; font-weight: 500; }
.views { display: grid; gap: clamp(.75rem, 2vw, 1.25rem); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1000px) { .views { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.views figure { margin: 0; }
.view-btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; overflow: hidden; border-radius: 2px; }
.view-btn img { display: block; width: 100%; height: auto; transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
@media (hover: hover) and (pointer: fine) { .view-btn:hover img { transform: scale(1.04); } }
.view-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.views figcaption { margin-top: .45rem; font-size: .95rem; color: var(--muted); line-height: 1.3; }
@media (prefers-reduced-motion: reduce) { .view-btn img { transition: none; } }
.lb--photo .lb-sc { display: grid; place-items: center; }
.lb--photo .lb-sc img { width: 100%; max-width: 1920px; background: none; }

/* apertura con il video: sempre a tutta finestra, da bordo a bordo e alta quanto lo schermo sotto la barra,
   qualunque sia lo zoom del browser (le misure seguono la finestra, non la grandezza del testo) */
#hero-stage .hero { width: 100vw; margin-left: calc(50% - 50vw); margin-top: 0; border-radius: 0;
  min-height: 0; height: max(22rem, calc(100svh - var(--head-h, 4rem))); }
html.scrub-js #hero-stage .hero { top: var(--head-h, 4rem); }
/* le scritte dell'apertura restano allineate al resto della pagina (logo e sezioni), non incollate al bordo */
#hero-stage .hero-t { padding-inline: max(clamp(1.25rem, 4vw, 3.5rem), calc((100vw - 77.5rem) / 2)); }
