/* Studio Tecnico Casella — foglio di stile
   Impostazione scura: grafite, testo chiaro, rosso del logo come accento.
   Carattere Montserrat ospitato sul server dello studio (nessuna richiesta a Google). */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #262729;          /* grafite */
  --bg-2: #2E3032;        /* fasce alterne */
  --panel: #36393B;       /* riquadri */
  --panel-2: #404346;
  --text: #EDEDEB;
  --muted: #A4A7A9;
  --line: #44474A;
  --accent: #A3010E;      /* rosso logo: pulsanti e superfici */
  --accent-hover: #BC0A19;
  --accent-text: #E0323F; /* rosso leggibile per titoli su fondo scuro */
  --ink: #1C1D1E;

  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 2px;
  --header-h: 76px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.65 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--accent-text); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--accent); color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: #fff; padding: 10px 14px; z-index: 200; }
.skip:focus { left: 8px; }

h1, h2, h3 { font-family: var(--font); font-weight: 700; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 .5em; text-wrap: balance; color: #fff; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); color: var(--accent-text); }
h3 { font-size: 1.2rem; line-height: 1.3; }
p { margin: 0 0 1em; max-width: 70ch; }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.65; color: var(--muted); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(38, 39, 41, .96); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand img { width: 50px; height: 50px; }
.brand-name { display: block; font-size: 1.05rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; }
.brand-sub { display: block; font-size: .72rem; color: var(--muted); margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { text-decoration: none; padding: 10px 12px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent-text); }
.nav .btn { margin-left: 10px; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 20px; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .18s, transform .18s, visibility .18s; max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 15px 4px; font-size: .95rem; border-bottom: 1px solid var(--line); }
  .nav .btn { margin: 16px 0 0; justify-content: center; border-bottom: 0; }
}

/* ---------- Pulsanti ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; background: var(--accent); color: #fff; border: 2px solid var(--accent); border-radius: var(--radius); font-weight: 700; font-size: .92rem; text-decoration: none; line-height: 1.2; letter-spacing: .02em; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.btn-accent { background: var(--accent); border-color: var(--accent); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.btn-ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn svg { width: 20px; height: 20px; flex: none; }
.nav .btn { min-height: 42px; padding: 9px 16px; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; padding-top: clamp(40px, 6vw, 84px); padding-bottom: clamp(48px, 7vw, 96px); }
.hero h1 { color: var(--accent-text); font-weight: 700; }
.hero .lead { color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-meta { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 8px 40px; margin: 40px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); list-style: none; font-size: .85rem; color: var(--muted); }
.hero-meta strong { display: block; font-size: 1.5rem; color: #fff; font-weight: 700; }
.hero-figure { margin: 0; position: relative; }
.hero-figure img:not(.hero-logo) { width: 100%; aspect-ratio: 4 / 4.4; object-fit: cover; background: var(--panel); }
.hero-figure figcaption { position: absolute; left: 0; bottom: 0; background: var(--accent); color: #fff; padding: 8px 14px; font-size: .8rem; font-weight: 600; }
.hero-logo { display: none; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-figure img:not(.hero-logo) { aspect-ratio: 16 / 11; }
  .hero-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; }
  .hero-meta strong { font-size: 1.2rem; }
}

/* ---------- Testata pagine interne ---------- */
.page-hero { position: relative; overflow: hidden; background: var(--bg); }
.page-hero .wrap { position: relative; padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(28px, 4vw, 48px); }
.page-hero h1 { color: var(--accent-text); max-width: 22ch; }
.crumbs { font-size: .8rem; color: var(--muted); margin-bottom: 18px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.crumbs a { color: #fff; text-decoration: none; }
.crumbs a:hover { color: var(--accent-text); }

/* ---------- Sezioni ---------- */
.section { padding: clamp(60px, 8vw, 110px) 0; }
.section-dark { background: var(--bg-2); }
.section-white { background: var(--bg); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 64px; align-items: end; margin-bottom: clamp(30px, 4.5vw, 52px); }
.section-head p { margin: 0; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }

/* ---------- Scala dell'intervento ---------- */
.scale-rule { position: relative; margin: 8px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 2px solid #fff; }
.scale-rule::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 10px; background: repeating-linear-gradient(90deg, var(--muted) 0 1px, transparent 1px 2%); opacity: .5; pointer-events: none; }
.scale-rule button { width: 100%; text-align: left; background: none; border: 0; padding: 22px 12px 18px 0; color: var(--muted); position: relative; min-height: 48px; }
.scale-rule button::before { content: ""; position: absolute; left: 0; top: -2px; width: 2px; height: 22px; background: #fff; }
.scale-rule .s-size { display: block; font-size: .75rem; margin-bottom: 4px; }
.scale-rule .s-name { display: block; font-size: clamp(.95rem, 1.6vw, 1.2rem); font-weight: 700; color: #fff; line-height: 1.2; }
.scale-rule button[aria-selected="true"] .s-name { color: var(--accent-text); }
.scale-rule button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 12px; top: -3px; height: 4px; background: var(--accent-text); }
.scale-rule button:hover .s-name { color: var(--accent-text); }
.scale-panels { margin-top: 28px; }
.scale-panel { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.scale-panel[hidden] { display: none; }
.scale-panel h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.scale-panel dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 12px 20px; padding: 22px; background: var(--panel); font-size: .92rem; }
.scale-panel dt { color: var(--accent-text); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding-top: 2px; }
.scale-panel dd { margin: 0; }
@media (max-width: 760px) {
  .scale-rule { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-right: calc(var(--gutter) * -1); }
  .scale-rule::-webkit-scrollbar { display: none; }
  .scale-rule li { flex: 0 0 44%; scroll-snap-align: start; }
  .scale-panel { grid-template-columns: 1fr; }
  .scale-panel dl { grid-template-columns: 1fr; gap: 2px; }
  .scale-panel dd { margin-bottom: 10px; }
}

/* ---------- Servizi ---------- */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.service { padding: 28px 26px 30px; display: flex; flex-direction: column; text-decoration: none; background: var(--panel); transition: background .15s; border-bottom: 3px solid transparent; }
.service:hover { background: var(--panel-2); border-bottom-color: var(--accent-text); color: inherit; }
.service svg { width: 40px; height: 40px; color: var(--accent-text); margin-bottom: 20px; }
.service h3 { margin-bottom: .45em; }
.service p { color: var(--muted); font-size: .93rem; flex: 1; }
.service .more { font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: #fff; }
@media (max-width: 960px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .services { grid-template-columns: 1fr; } .service { padding: 24px 20px; } }

/* ---------- Metodo ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.steps li { counter-increment: step; padding: 24px; background: var(--panel); }
.steps li::before { content: counter(step); display: block; font-size: 2.2rem; font-weight: 800; line-height: 1; color: var(--accent-text); margin-bottom: 14px; }
.steps h3 { font-size: 1.05rem; }
.steps p { color: var(--muted); font-size: .93rem; margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Progetti: filtri e griglia a tessere ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; }
.filters button { background: var(--panel); border: 0; border-radius: var(--radius); padding: 8px 14px; min-height: 40px; font-size: .85rem; font-weight: 700; color: #fff; }
.filters button:hover { background: var(--panel-2); }
.filters button[aria-pressed="true"] { color: var(--accent-text); background: var(--panel-2); }
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.project[hidden] { display: none; }
.project > a { display: block; text-decoration: none; color: #fff; }
.project figure { position: relative; margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--panel); }
.project .ph, .project .ph img { width: 100%; height: 100%; }
.project img { object-fit: cover; transition: transform .6s ease, filter .3s; }
.project figure::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.25) 38%, rgba(0,0,0,0) 60%); pointer-events: none; }
.project figcaption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 22px 20px 20px; }
.project figcaption strong { display: block; font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 700; line-height: 1.15; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.project figcaption span { display: block; font-size: .82rem; color: #D6D7D8; margin-top: 6px; }
.project .open { font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.project > a:hover img { transform: scale(1.05); }
.project > a:hover .open, .project > a:focus-visible .open { opacity: 1; transform: none; }
@media (hover: none) { .project .open { opacity: 1; transform: none; } }
@media (max-width: 960px) { .projects { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .projects { grid-template-columns: 1fr; } .project figure { aspect-ratio: 4 / 3.6; } }

/* ---------- Lo studio ---------- */
.studio { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(28px, 6vw, 80px); align-items: start; }
.studio-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--panel); }
.studio h2 { color: var(--accent-text); }
.people { list-style: none; margin: 30px 0 0; padding: 0; }
.people li { display: grid; grid-template-columns: 9rem 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.people .role { color: var(--accent-text); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding-top: 4px; }
.people strong { font-size: 1.12rem; font-weight: 700; display: block; color: #fff; }
.people p { margin: 4px 0 0; color: var(--muted); font-size: .93rem; }
@media (max-width: 860px) { .studio { grid-template-columns: 1fr; } .studio-photo img { aspect-ratio: 16 / 12; } }
@media (max-width: 520px) { .people li { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Zone ---------- */
.zones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.zone { background: var(--panel); padding: 22px; border-top: 3px solid var(--accent-text); }
.zone p { color: var(--muted); font-size: .92rem; margin: 0; }
@media (max-width: 1000px) { .zones { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .zones { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 880px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 44px 20px 0; position: relative; font-size: 1.05rem; font-weight: 700; line-height: 1.35; color: #fff; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; margin-top: -9px; border-right: 2px solid var(--accent-text); border-bottom: 2px solid var(--accent-text); transform: rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq details > div { padding: 0 0 22px; color: var(--muted); }

/* ---------- Contatti ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { padding: 16px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 7.5rem 1fr; gap: 12px; }
.contact-list li > span:first-child { color: var(--accent-text); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding-top: 4px; }
.contact-list a { color: #fff; font-size: 1.05rem; word-break: break-word; }
.contact-actions { display: grid; gap: 10px; align-content: start; }
.contact-actions .btn { justify-content: flex-start; min-height: 58px; font-size: .95rem; }
.copy-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.mailtxt { color: #fff; font-size: 1.05rem; user-select: all; word-break: break-all; }
.copybtn { background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: var(--radius); padding: 5px 10px; font-size: .78rem; font-weight: 600; }
.copybtn:hover { border-color: #fff; }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; } .contact-list li { grid-template-columns: 1fr; gap: 2px; } }

.cform { margin-top: clamp(40px, 6vw, 64px); background: var(--panel); padding: clamp(22px, 4vw, 40px); border-top: 4px solid var(--accent-text); scroll-margin-top: calc(var(--header-h) + 16px); }
.cform h3 { font-size: clamp(1.3rem, 2.3vw, 1.7rem); color: var(--accent-text); margin-bottom: .3em; }
.cform-intro { color: var(--muted); margin-bottom: 22px; }
.cform-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.cform-grid .full { grid-column: 1 / -1; }
.cform label { display: grid; gap: 6px; font-size: .85rem; font-weight: 600; }
.cform input[type=text], .cform input[type=email], .cform input[type=tel], .cform select, .cform textarea { width: 100%; font: inherit; font-weight: 400; color: #fff; background: var(--bg); border: 1px solid #55595C; border-radius: var(--radius); padding: 12px 14px; min-height: 48px; }
.cform textarea { resize: vertical; min-height: 130px; }
.cform ::placeholder { color: #8A8D90; }
.cform input:focus, .cform select:focus, .cform textarea:focus { outline: 2px solid var(--accent-text); outline-offset: 0; border-color: var(--accent-text); }
.cform [aria-invalid="true"] { border-color: var(--accent-text); }
.cform-privacy { display: flex !important; align-items: flex-start; gap: 10px !important; font-weight: 400 !important; margin-top: 18px; }
.cform-privacy input { width: 22px; height: 22px; flex: none; accent-color: var(--accent); margin-top: 1px; }
.cform-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 20px; }
.cform-status { margin: 0; font-weight: 600; }
.cform-status.ok { color: #7BD08F; }
.cform-status.err { color: var(--accent-text); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 640px) { .cform-grid { grid-template-columns: 1fr; } }

/* ---------- Pagine servizio e legali ---------- */
.prose { max-width: 780px; }
.prose h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--accent-text); }
.prose strong { color: #fff; }
.prose table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 0 0 1.4em; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--panel); color: #fff; }
.two-col { display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.aside-card { background: var(--panel); padding: 24px; position: sticky; top: calc(var(--header-h) + 20px); }
.aside-card h2 { font-size: 1.3rem; }
.aside-card .btn { width: 100%; margin-top: 10px; }
.aside-card img { margin-bottom: 18px; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; background: var(--bg); }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } .aside-card { position: static; } }

.cta-band { background: var(--accent); color: #fff; }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-top: 40px; padding-bottom: 40px; }
.cta-band h2 { margin: 0; font-size: clamp(1.4rem, 2.6vw, 2rem); max-width: 26ch; color: #fff; }
.cta-band .btn { background: #fff; border-color: #fff; color: var(--ink); }
.cta-band .btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Pagina progetto ---------- */
.project-hero { padding: 0; }
.project-banner { position: relative; height: clamp(300px, 52vh, 560px); overflow: hidden; background: var(--panel); }
.project-banner img { width: 100%; height: 100%; object-fit: cover; }
.project-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,.6) 0%, rgba(0,0,0,.15) 65%); }
.project-banner .wrap { position: absolute; inset: auto 0 0 0; z-index: 1; padding-bottom: clamp(24px, 4vw, 48px); }
.project-banner h1 { color: var(--accent-text); text-transform: uppercase; letter-spacing: .01em; margin-bottom: .2em; font-size: clamp(1.9rem, 4.4vw, 3.4rem); text-shadow: 0 2px 16px rgba(0,0,0,.45); }
.project-banner .place { color: #fff; font-size: clamp(1rem, 1.6vw, 1.25rem); font-weight: 600; margin: 0; }
.project-bar { display: flex; align-items: center; gap: 16px; padding-top: 18px; padding-bottom: 6px; }
.back { display: inline-grid; place-items: center; width: 46px; height: 46px; background: var(--accent); color: #fff; text-decoration: none; font-size: 1.6rem; line-height: 1; }
.back:hover { background: var(--accent-hover); color: #fff; }
.project-body { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: start; margin-bottom: clamp(40px, 6vw, 72px); }
.project-facts { margin: 0 0 24px; display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: .92rem; }
.project-facts dt { color: var(--accent-text); font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; padding-top: 3px; }
.project-facts dd { margin: 0; color: #fff; }
.project-cover { margin: 0; }
.project-cover img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--panel); }
.project-text p { color: var(--text); }
.project-cta { margin-top: 1.6em; }
.gallery-title { font-size: clamp(1.3rem, 2.4vw, 1.75rem); margin-bottom: 20px; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 10px; }
.gallery a { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--panel); cursor: zoom-in; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery a:hover img { transform: scale(1.05); }
.gallery .cap { position: absolute; left: 0; bottom: 0; background: var(--accent); color: #fff; font-size: .78rem; font-weight: 600; padding: 6px 10px; }
.project-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-top: 8px; padding-bottom: clamp(40px, 6vw, 72px); }
.project-nav a { display: block; padding: 18px 20px; background: var(--panel); text-decoration: none; font-weight: 700; color: #fff; }
.project-nav a:last-child { text-align: right; }
.project-nav a:hover { background: var(--panel-2); color: var(--accent-text); }
.project-nav span { display: block; font-weight: 600; font-size: .72rem; color: var(--muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 860px) { .project-body { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .project-nav { grid-template-columns: 1fr; } .project-nav a:last-child { text-align: left; } .gallery { grid-template-columns: 1fr 1fr; gap: 6px; } }

/* ---------- Visualizzatore immagini ---------- */
.lb { position: fixed; inset: 0; z-index: 120; background: rgba(14, 15, 16, .97); display: grid; grid-template-rows: auto 1fr auto; color: #fff; }
.lb[hidden] { display: none; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 10px 16px; font-size: .85rem; font-weight: 600; }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 56px; touch-action: pan-y; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb button { background: none; border: 0; color: #fff; width: 48px; height: 48px; font-size: 1.9rem; line-height: 1; }
.lb button:hover { background: var(--accent); }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 4px; } .lb-next { right: 4px; }
.lb-cap { text-align: center; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); font-size: .85rem; color: var(--muted); min-height: 1.2em; }
@media (max-width: 600px) { .lb-stage { padding: 0 4px; } .lb-prev, .lb-next { top: auto; bottom: -56px; transform: none; } .lb-prev { left: 16px; } .lb-next { right: 16px; } }

/* ---------- Footer ---------- */
.site-footer { background: #1E1F20; color: var(--muted); font-size: .88rem; padding: 56px 0 28px; }
.site-footer a { color: var(--text); }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot-grid h2 { font-size: .78rem; font-weight: 700; color: var(--accent-text); margin-bottom: 12px; letter-spacing: .07em; text-transform: uppercase; }
.foot-grid h2.mt { margin-top: 22px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: 8px; }
.foot-legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.foot-legal p { margin: 0; max-width: none; }
.linkbtn { background: none; border: 0; padding: 0; text-decoration: underline; text-decoration-color: var(--accent-text); text-underline-offset: 3px; color: var(--text); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- Barra azioni da telefono ---------- */
.mobile-bar { display: none; }
@media (max-width: 760px) {
  .mobile-bar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #1E1F20; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .mobile-bar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 4px 10px; color: #fff; text-decoration: none; font-size: .74rem; font-weight: 600; }
  .mobile-bar a:first-child { background: var(--accent); }
  .mobile-bar svg { width: 22px; height: 22px; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}

/* ---------- Banner cookie ---------- */
.cc { position: fixed; z-index: 90; left: 16px; right: 16px; bottom: 16px; max-width: 560px; background: var(--panel); color: var(--text); border-top: 4px solid var(--accent); box-shadow: 0 18px 50px rgba(0, 0, 0, .5); padding: 22px 22px 18px; }
.cc[hidden] { display: none; }
.cc h2 { font-size: 1rem; font-weight: 700; margin: 0 36px 8px 0; color: #fff; }
.cc p { font-size: .86rem; color: var(--muted); margin-bottom: 14px; }
.cc-close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--muted); }
.cc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cc-actions .btn { min-height: 46px; padding: 10px 14px; font-size: .88rem; }
.cc-save { grid-template-columns: 1fr; margin-top: 12px; }
.cc-more { margin-top: 10px; font-size: .84rem; background: none; border: 0; padding: 6px 0; text-decoration: underline; text-underline-offset: 3px; color: var(--text); }
.cc-prefs { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.cc-prefs[hidden] { display: none; }
.cc-opt { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.cc-opt small { grid-column: 1; color: var(--muted); }
.cc-opt input { grid-row: 1 / span 2; grid-column: 2; width: 22px; height: 22px; accent-color: var(--accent); align-self: center; }
@media (max-width: 760px) { .cc { left: 8px; right: 8px; bottom: calc(72px + env(safe-area-inset-bottom)); padding: 18px 16px 14px; } }
@media (min-width: 761px) { .cc { left: 24px; bottom: 24px; } }

.todo { background: #5A4A00; padding: 0 4px; }

/* entrata della prima schermata */
@media (prefers-reduced-motion: no-preference) {
  .hero-in > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-in > *:nth-child(2) { animation-delay: .08s; }
  .hero-in > *:nth-child(3) { animation-delay: .16s; }
  .hero-in > *:nth-child(4) { animation-delay: .24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}
.project-hero + .section { padding-top: clamp(28px, 4vw, 48px); }

/* ---------- Effetto al passaggio del mouse sulle tessere progetto ---------- */
.project figure::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(163, 1, 14, .9); opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.project figcaption { top: 0; display: flex; flex-direction: column; justify-content: flex-end; z-index: 2; padding: 24px 22px; }
.project figcaption strong, .project figcaption span { transition: color .3s ease, transform .35s ease; }
.project .open { order: 3; }
@media (hover: hover) {
  .project > a:hover figure::before, .project > a:focus-visible figure::before { opacity: 1; }
  .project > a:hover figure::after, .project > a:focus-visible figure::after { opacity: 0; }
  .project > a:hover figcaption, .project > a:focus-visible figcaption { justify-content: flex-start; }
  .project > a:hover figcaption strong, .project > a:focus-visible figcaption strong { color: var(--ink); text-shadow: none; font-size: clamp(1.35rem, 2.2vw, 1.8rem); }
  .project > a:hover figcaption span, .project > a:focus-visible figcaption span { color: var(--ink); font-weight: 600; }
  .project > a:hover .open, .project > a:focus-visible .open { margin-top: auto; color: #fff; }
  .project > a:hover img { transform: scale(1.06); filter: grayscale(.4); }
}
.project figure::after { transition: opacity .35s ease; }

/* ---------- Progetto in evidenza (tessera a tutta larghezza) ---------- */
.project.wide { grid-column: 1 / -1; }
.project.wide figure { aspect-ratio: 21 / 8; }
.project.wide figcaption strong { font-size: clamp(1.6rem, 3.2vw, 2.6rem); }
.project.wide figcaption span { font-size: .95rem; }
@media (max-width: 960px) { .project.wide figure { aspect-ratio: 16 / 9; } }
@media (max-width: 560px) { .project.wide figure { aspect-ratio: 4 / 3.6; } }

/* ---------- Transizione delle tessere progetto: patina che sale e titolo che scorre ---------- */
.project figure::before { background: rgba(163, 1, 14, .86); transition: opacity .5s ease; }
.project figure::after { transition: opacity .5s ease; }
.project figcaption { display: block; top: 100%; bottom: auto; transform: translateY(-100%); transition: top .5s cubic-bezier(.4, 0, .2, 1), transform .5s cubic-bezier(.4, 0, .2, 1); }
.project figcaption strong { transition: color .4s ease, font-size .5s ease; }
.project figcaption span { transition: color .4s ease .1s, opacity .4s ease .2s, transform .4s ease .2s; }
@media (hover: hover) {
  .project > a:hover figcaption, .project > a:focus-visible figcaption { top: 0; transform: translateY(0); justify-content: normal; }
  .project > a:hover figcaption span, .project > a:focus-visible figcaption span { animation: stc-desc .45s ease .2s both; }
}
@keyframes stc-desc { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }


/* L'effetto delle tessere resta attivo anche con "riduci animazioni": è breve e parte solo al passaggio del mouse */
@media (prefers-reduced-motion: reduce) {
  .project figure::before, .project figure::after { transition: opacity .5s ease !important; }
  .project figcaption { transition: top .5s cubic-bezier(.4, 0, .2, 1), transform .5s cubic-bezier(.4, 0, .2, 1) !important; }
  .project figcaption strong { transition: color .4s ease, font-size .5s ease !important; }
  .project img { transition: transform .6s ease, filter .3s !important; }
  .project > a:hover figcaption span { animation: stc-desc .45s ease .2s both !important; }
}
.hero-figure > a { display: block; }
.hero-figure img:not(.hero-logo) { object-position: 55% center; }

/* ---------- Prima schermata con immagini a scorrimento ---------- */
.hero-slide .wrap { display: block; padding-top: 0; padding-bottom: 0; }
.hero-slide .hero-head { padding-top: clamp(32px, 5vw, 64px); padding-bottom: clamp(20px, 3vw, 32px); }
.hero-slide h1 { max-width: none; font-size: clamp(2rem, 4.4vw, 3.9rem); margin: 0; }
.slider { position: relative; aspect-ratio: 21 / 9; overflow: hidden; background: var(--panel); }
.slides, .slide { position: absolute; inset: 0; margin: 0; }
.slide { opacity: 0; transition: opacity 1.1s ease; }
.slide.is-active { opacity: 1; z-index: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 7s linear; }
.slide.is-active img { transform: scale(1); }
.slider::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 40%); }
.slider-cap { position: absolute; left: 0; bottom: 0; z-index: 3; display: block; padding: 14px 20px; background: var(--accent); color: #fff; text-decoration: none; max-width: calc(100% - 220px); }
.slider-cap strong { display: block; font-size: clamp(1rem, 1.6vw, 1.25rem); font-weight: 700; }
.slider-cap span { display: block; font-size: .8rem; opacity: .9; margin-top: 2px; }
.slider-cap:hover { background: var(--accent-hover); color: #fff; }
.slider-ctrl { position: absolute; right: 14px; bottom: 14px; z-index: 3; display: flex; align-items: center; gap: 4px; }
.slider-ctrl button { background: rgba(20, 21, 22, .6); border: 0; color: #fff; width: 40px; height: 40px; font-size: 1.4rem; line-height: 1; display: grid; place-items: center; }
.slider-ctrl button:hover { background: var(--accent); }
.sl-pause { font-size: .75rem !important; letter-spacing: -1px; }
.sl-pause .i-play, .sl-pause[aria-pressed="true"] .i-pause { display: none; }
.sl-pause[aria-pressed="true"] .i-play { display: inline; }
.sl-dots { display: flex; gap: 2px; padding: 0 6px; }
.sl-dots .sl-dot { width: 22px !important; height: 40px !important; background: transparent !important; position: relative; }
.sl-dots .sl-dot::before { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 3px; margin-top: -1.5px; background: rgba(255, 255, 255, .5); }
.sl-dots .sl-dot[aria-current="true"]::before { background: #fff; height: 5px; margin-top: -2.5px; }
.sl-dots .sl-dot:hover::before { background: var(--accent-text); }
.hero-foot { display: grid !important; grid-template-columns: 1.25fr .75fr; gap: clamp(24px, 5vw, 72px); align-items: end; padding-top: clamp(28px, 4vw, 44px) !important; padding-bottom: clamp(48px, 6vw, 80px) !important; }
.hero-foot .lead { margin-bottom: 0; }
.hero-foot .hero-meta { margin: 0; border-top: 0; padding: 0; grid-template-columns: 1fr; gap: 14px; }
.hero-foot .hero-meta li { border-left: 3px solid var(--accent-text); padding-left: 14px; }
@media (max-width: 960px) { .slider { aspect-ratio: 16 / 9; } .hero-foot { grid-template-columns: 1fr; } .hero-foot .hero-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .slider { aspect-ratio: 4 / 3.4; }
  .slider-cap { max-width: 100%; right: 0; padding: 10px 14px; }
  .slider-cap span { display: none; }
  .slider-ctrl { top: 10px; bottom: auto; right: 10px; }
  .sl-dots { display: none; }
  .hero-foot .hero-meta { grid-template-columns: 1fr; }
}
/* lo scorrimento resta attivo anche con "riduci animazioni", ma senza zoom */
@media (prefers-reduced-motion: reduce) { .slide { transition: opacity .8s ease !important; } .slide img { transform: none !important; } }
.hero-slide h1 { text-wrap: wrap; font-size: clamp(2rem, 4.9vw, 4.3rem); letter-spacing: -0.02em; }

/* ---------- Dicono di noi (recensioni Google) ---------- */
.rating { display: flex; align-items: center; gap: 18px; justify-self: end; }
.rating .rating-num { font-size: clamp(3rem, 6vw, 4.4rem); font-weight: 800; line-height: 1; color: #fff; margin: 0; }
.rating p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.stars { color: #F2B01E; letter-spacing: 2px; font-size: 1rem; }
.stars.big { font-size: 1.5rem; }
.reviews { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.review { background: var(--panel); padding: 26px 24px 22px; display: flex; flex-direction: column; border-top: 3px solid var(--accent-text); }
.review blockquote { margin: 14px 0 18px; flex: 1; }
.review blockquote p { margin: 0; color: var(--text); font-size: .98rem; line-height: 1.65; }
.review blockquote p::before { content: "“"; color: var(--accent-text); font-size: 2.6rem; line-height: 0; vertical-align: -.45em; margin-right: 4px; font-weight: 800; }
.review .who { margin: 0; display: flex; flex-direction: column; }
.review .who strong { color: #fff; }
.review .who span { color: var(--muted); font-size: .8rem; }
.reviews-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (max-width: 960px) { .reviews { grid-template-columns: 1fr; } .rating { justify-self: start; } }

/* ---------- Footer: gerarchia studio e professionisti ---------- */
.foot-studio h2 { margin: 0 0 8px; }
.foot-studio h2 + p { margin-bottom: 22px; }
.foot-studio p:last-child { margin-bottom: 0; }
.nav a { padding: 10px 10px; }
@media (max-width: 1180px) and (min-width: 961px) { .nav a { padding: 10px 7px; font-size: .74rem; } .nav .btn { margin-left: 6px; padding: 8px 12px; } }
