/* =========================================================
   MaterLab — sito istituzionale
   Identità ripresa dal catalogo: verde antracite, oliva,
   serif bold + corsivo, riquadri a parallelogramma, tagli diagonali.
   ========================================================= */

@font-face {
  font-family: "Crimson Pro";
  src: url("../fonts/crimson-pro-latin-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Crimson Pro";
  src: url("../fonts/crimson-pro-latin-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-latin-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #2f342e;          /* verde antracite (catalogo) */
  --bg-2: #383e37;        /* card su fondo scuro */
  --bg-3: #262a25;        /* sezioni più profonde */
  --bg-4: #1f231f;        /* footer */
  --olive: #868775;       /* accento del brand */
  --olive-l: #a9aa97;     /* oliva chiaro, testi su scuro */
  --olive-d: #5f6052;     /* oliva scuro, testi su chiaro */
  --paper: #f4f3ee;       /* sezioni chiare */
  --white: #faf8f3;
  --ink: #262a25;         /* testo su chiaro */
  --muted: #d3d2c7;       /* testo secondario su scuro */
  --line: rgba(250, 248, 243, 0.14);

  --serif: "Crimson Pro", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --gutter: clamp(20px, 5vw, 56px);
  --maxw: 1200px;
  --header-h: 76px;
  --para: polygon(5% 0, 100% 0, 95% 100%, 0 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.08; margin: 0; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--olive-l); outline-offset: 3px; }
::selection { background: var(--olive); color: var(--bg-4); }

.container { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--white); color: var(--ink); padding: 10px 16px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.eyebrow { font-family: var(--sans); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--olive-l); margin: 0 0 1.1rem; }
.light .eyebrow { color: var(--olive-d); }
.upper { text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }

/* ---------- Bottoni a parallelogramma ---------- */
.btn {
  display: inline-block;
  background: var(--olive);
  color: var(--bg-4);
  font: 600 0.82rem/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1.15rem 2.3rem;
  border: 0;
  cursor: pointer;
  clip-path: var(--para);
  transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--olive-l); }
.btn:focus-visible { outline: none; background: var(--white); color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.btn--sm { padding: 0.95rem 1.7rem; font-size: 0.74rem; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: rgba(47, 52, 46, 0.94); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand { display: block; line-height: 0; }
.brand img { height: 46px; width: auto; }
.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 38px); }
.nav ul { display: flex; gap: clamp(16px, 2.2vw, 34px); }
.nav a:not(.btn) { font-size: 0.8rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; color: var(--muted); padding: 8px 0; border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--white); border-bottom-color: var(--olive); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--white); width: 46px; height: 46px; cursor: pointer; padding: 0; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 20px; height: 2px; background: currentColor; margin: auto; position: relative; transition: transform 0.2s, top 0.2s, background 0.2s; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 1100px) {
  .menu-btn { display: block; }
  .nav { position: fixed; inset: var(--header-h) 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 28px; max-height: calc(100vh - var(--header-h)); overflow-y: auto; transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity 0.2s, transform 0.2s, visibility 0.2s; }
  .nav.open { opacity: 1; transform: none; visibility: visible; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a:not(.btn) { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 0.86rem; }
  .nav .btn { margin-top: 22px; text-align: center; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 120px) 0 clamp(72px, 10vw, 140px); background: var(--bg); }
.hero__mark { position: absolute; right: -6vw; bottom: -9vw; width: min(52vw, 640px); opacity: 0.07; pointer-events: none; user-select: none; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 5rem); max-width: 13em; }
.hero h1 em { display: block; font-style: italic; font-weight: 700; color: var(--olive); }
.hero__lead { margin: clamp(28px, 4vw, 48px) 0 clamp(30px, 4vw, 44px); font-size: clamp(0.86rem, 1.5vw, 1.02rem); letter-spacing: 0.2em; font-weight: 500; text-transform: uppercase; max-width: 34ch; line-height: 1.8; }
.hero .container { position: relative; }

/* ---------- Sezioni chiare ---------- */
.light { background: var(--paper); color: var(--ink); }
/* Sfondo a "bolle" (richiama la porosità del lievito madre), volutamente appena percettibile */
.light:not(.legal) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%23868775' stroke-width='1.4' stroke-opacity='.15'%3E%3Ccircle cx='60' cy='70' r='22'/%3E%3Ccircle cx='150' cy='40' r='9'/%3E%3Ccircle cx='210' cy='110' r='34'/%3E%3Ccircle cx='210' cy='110' r='20'/%3E%3Ccircle cx='320' cy='60' r='14'/%3E%3Ccircle cx='90' cy='190' r='12'/%3E%3Ccircle cx='40' cy='290' r='30'/%3E%3Ccircle cx='150' cy='260' r='8'/%3E%3Ccircle cx='250' cy='230' r='18'/%3E%3Ccircle cx='340' cy='300' r='26'/%3E%3Ccircle cx='340' cy='300' r='13'/%3E%3Ccircle cx='120' cy='360' r='16'/%3E%3Ccircle cx='380' cy='200' r='9'/%3E%3C/g%3E%3Cg fill='%23868775' fill-opacity='.11'%3E%3Ccircle cx='370' cy='150' r='4'/%3E%3Ccircle cx='20' cy='160' r='4'/%3E%3Ccircle cx='200' cy='350' r='5'/%3E%3Ccircle cx='290' cy='372' r='3'/%3E%3Ccircle cx='285' cy='170' r='3'/%3E%3Ccircle cx='110' cy='120' r='3'/%3E%3Ccircle cx='30' cy='30' r='3'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 400px 400px;
}
.section { padding: clamp(64px, 9vw, 120px) 0; }

/* Immagine con taglio diagonale e filo oliva (come il catalogo) */
.diag { position: relative; background: var(--olive); aspect-ratio: 16 / 5.2; clip-path: polygon(0 0, 100% 0, 100% 64%, 0 100%); }
.diag img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; clip-path: polygon(0 0, 100% 0, 100% 60%, 0 95.5%); }
.diag--top { aspect-ratio: 16 / 6; clip-path: polygon(0 0, 100% 16%, 100% 100%, 0 100%); margin-top: clamp(40px, 6vw, 80px); }
.diag--top img { object-position: center 62%; clip-path: polygon(0 3.6%, 100% 20%, 100% 100%, 0 100%); }
@media (max-width: 640px) { .diag { aspect-ratio: 4 / 3; } .diag--top { aspect-ratio: 4 / 3; } }

.statement { font-family: var(--serif); font-weight: 700; font-size: clamp(1.75rem, 3.7vw, 2.9rem); line-height: 1.22; max-width: 24em; margin: 0 auto clamp(40px, 6vw, 72px); text-align: center; text-wrap: balance; }
.statement .o { color: var(--olive); }
.points { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); max-width: 1040px; margin: 0 auto clamp(48px, 7vw, 88px); }
.point { display: flex; gap: clamp(14px, 2vw, 24px); align-items: center; }
.point__n { font-family: var(--serif); font-style: italic; font-weight: 800; font-size: clamp(4.6rem, 8vw, 7rem); line-height: 0.8; color: var(--bg); flex: none; }
.point p { margin: 0; font-size: clamp(1.18rem, 1.9vw, 1.42rem); line-height: 1.5; }
.point strong { font-weight: 600; }
@media (max-width: 720px) { .points { grid-template-columns: 1fr; } }

.banner { background: var(--olive); color: var(--bg-4); clip-path: polygon(3% 0, 100% 0, 97% 100%, 0 100%); padding: clamp(26px, 4vw, 40px) clamp(30px, 8vw, 110px); text-align: center; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 500; line-height: 1.6; max-width: 940px; margin-inline: auto; }
.banner p { margin: 0; }
.banner p + p { font-weight: 600; margin-top: 0.4em; }
a.banner { display: block; text-decoration: none; transition: background 0.2s; }
a.banner:hover { background: var(--olive-l); }
a.banner:focus-visible { outline: none; background: var(--white); text-decoration: underline; text-underline-offset: 5px; }

/* ---------- La vera sfida (messaggio chiave) ---------- */
.challenge {
  --cut: clamp(32px, 5vw, 76px);
  position: relative; overflow: hidden; text-align: center;
  padding: calc(var(--cut) + clamp(72px, 11vw, 150px)) 0 clamp(80px, 12vw, 170px);
  background: radial-gradient(ellipse 80% 90% at 50% 45%, #3b4238 0%, #2c312b 55%, #212520 100%);
}
/* taglio diagonale con filo oliva verso la sezione chiara sopra */
.challenge::before, .challenge::after { content: ""; position: absolute; top: 0; left: 0; right: 0; clip-path: polygon(0 0, 100% 0, 0 100%); }
.challenge::before { height: calc(var(--cut) + 7px); background: var(--olive); }
.challenge::after { height: var(--cut); background: var(--paper); }
.challenge .container { position: relative; z-index: 1; }
.challenge__mark { position: absolute; left: 50%; top: 52%; width: min(78vw, 760px); transform: translate(-50%, -50%); opacity: 0.05; pointer-events: none; user-select: none; }
.challenge__a { font: 500 clamp(0.95rem, 2.1vw, 1.5rem)/1.5 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--olive-l); margin: 0 auto clamp(26px, 4vw, 48px); max-width: 30em; }
.challenge__a::before { content: ""; display: block; width: 84px; height: 6px; background: var(--olive); margin: 0 auto clamp(20px, 3vw, 32px); transform: skewX(-32deg); }
.challenge__a strong { color: var(--white); font-weight: 600; }
.challenge__b { font-family: var(--serif); font-weight: 700; font-size: clamp(2.3rem, 6vw, 5.2rem); line-height: 1.08; letter-spacing: -0.01em; max-width: 17em; margin: 0 auto; text-wrap: balance; }
.challenge__b em { font-style: italic; color: var(--olive); }
@media (prefers-reduced-motion: no-preference) { .js .reveal.d1 { transition-delay: 0.25s; } }

/* Titolo con barra verticale */
.h-bar { border-left: 10px solid var(--olive); padding-left: clamp(16px, 2.4vw, 32px); font-size: clamp(1.9rem, 4vw, 3.1rem); color: var(--olive-d); max-width: 21em; margin-bottom: clamp(28px, 4vw, 48px); }
.lead-caps { font-weight: 500; text-transform: uppercase; letter-spacing: 0.02em; font-size: 1.06rem; max-width: 60ch; margin-bottom: 1.1em; }
.prose { max-width: 62ch; }

/* ---------- Case studies ---------- */
.dark-2 { background: var(--bg-3); }
.section-head { margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2 { font-size: clamp(2.2rem, 5vw, 3.9rem); }
.section-head h2 em { font-style: italic; color: var(--olive); display: block; }
.section-head p { max-width: 62ch; color: var(--muted); }
.section-head h2 + p { font-size: 1.16rem; color: var(--white); margin-top: 1.4rem; }

/* Titolo grande della sezione "Casi di successo" */
.section-head h2.mega { font-size: clamp(3.1rem, 9.5vw, 7.6rem); line-height: 0.95; letter-spacing: 0.01em; text-transform: uppercase; }
.section-head h2.mega em { display: inline; }
.section-head h2.mega::before { content: ""; display: block; width: 96px; height: 7px; background: var(--olive); margin-bottom: clamp(20px, 3vw, 34px); transform: skewX(-32deg); transform-origin: left; }
.section-head p.tagline { font: 700 clamp(1.7rem, 3.6vw, 2.7rem)/1.15 var(--serif); color: var(--white); margin: clamp(22px, 3vw, 36px) 0 1.2rem; max-width: 24em; }
.section-head p.tagline em { font-style: italic; color: var(--olive); }

/* Sfondo con più profondità: luci morbide + bolle appena visibili */
.cases-section {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%23a9aa97' stroke-width='1.4' stroke-opacity='.07'%3E%3Ccircle cx='60' cy='70' r='22'/%3E%3Ccircle cx='150' cy='40' r='9'/%3E%3Ccircle cx='210' cy='110' r='34'/%3E%3Ccircle cx='210' cy='110' r='20'/%3E%3Ccircle cx='320' cy='60' r='14'/%3E%3Ccircle cx='90' cy='190' r='12'/%3E%3Ccircle cx='40' cy='290' r='30'/%3E%3Ccircle cx='150' cy='260' r='8'/%3E%3Ccircle cx='250' cy='230' r='18'/%3E%3Ccircle cx='340' cy='300' r='26'/%3E%3Ccircle cx='340' cy='300' r='13'/%3E%3Ccircle cx='120' cy='360' r='16'/%3E%3Ccircle cx='380' cy='200' r='9'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 400px 400px,
    radial-gradient(ellipse 65% 34% at 12% 0%, #3c4339 0%, transparent 70%),
    radial-gradient(ellipse 60% 30% at 92% 100%, #384037 0%, transparent 70%),
    var(--bg-3);
}

.cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 2.6vw, 36px); }
.case {
  position: relative; display: flex; flex-direction: column;
  padding: clamp(26px, 3.2vw, 44px);
  background: linear-gradient(158deg, #474e45 0%, #383e37 52%, #2f342e 100%);
  border-top: 3px solid var(--olive);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 26px 40px -22px rgba(0, 0, 0, 0.7), 0 8px 16px -6px rgba(0, 0, 0, 0.35);
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
  transition: box-shadow 0.3s ease;
}
/* Riflesso di luce che segue il mouse */
.case::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.1), transparent 62%); }
.case:hover { --ty: -8px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 40px 56px -24px rgba(0, 0, 0, 0.8), 0 12px 22px -8px rgba(0, 0, 0, 0.4); }
.case:hover::after { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .js .case.reveal.in { transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px)); transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s ease, opacity 0.7s ease; }
}
@media (prefers-reduced-motion: reduce) { .case:hover { --ty: 0px; } }
.case__top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.case__icon { display: block; perspective: 700px; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.45)); }
.case__icon-in { display: grid; place-items: center; width: 84px; height: 76px; color: #1d211c; background: linear-gradient(150deg, #b1b29f 0%, #8d8e7b 55%, #767766 100%); clip-path: polygon(9% 0, 100% 0, 91% 100%, 0 100%); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35); }
.case__icon-in svg { width: 46px; height: 46px; }
@media (prefers-reduced-motion: no-preference) {
  .case__icon-in { transition: transform 0.9s cubic-bezier(0.3, 0.7, 0.2, 1); }
  .case:hover .case__icon-in { transform: rotateY(360deg); }
}
.case__n { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: clamp(3.6rem, 6vw, 5rem); line-height: 0.85; color: var(--olive); opacity: 0.4; }
.case h3 { font-size: clamp(1.3rem, 2vw, 1.62rem); line-height: 1.2; margin-bottom: 14px; }
.case p { color: var(--muted); }
.case__res { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }
.case__res .label { display: block; font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--olive-l); font-weight: 600; margin-bottom: 6px; }
.case__res p { margin: 0; color: var(--white); }
@media (max-width: 860px) { .cases { grid-template-columns: 1fr; } }

/* ---------- Metodo ---------- */
.method h2 { text-align: center; color: var(--olive-d); font-size: clamp(2rem, 4.4vw, 3.3rem); margin-bottom: 18px; }
.method .intro { text-align: center; max-width: 54ch; margin: 0 auto clamp(36px, 5vw, 64px); }
.method .intro strong { font-weight: 600; }
.method figure { margin: 0 auto; max-width: 940px; }
.steps { display: none; }
@media (max-width: 719px) {
  .method figure { display: none; }
  .steps { display: grid; gap: 0; counter-reset: s; }
  .steps li { display: flex; align-items: center; gap: 18px; padding: 16px 0; border-bottom: 1px solid rgba(38, 42, 37, 0.15); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; font-size: 0.95rem; }
  .steps li::before { counter-increment: s; content: counter(s); font-family: var(--serif); font-style: italic; font-weight: 800; font-size: 2.6rem; line-height: 1; min-width: 2.1rem; color: var(--olive-d); }
}

/* ---------- Applicazioni ---------- */
.apps h2 { font-size: clamp(2.2rem, 5vw, 3.9rem); }
.apps .intro { max-width: 60ch; margin: 1.4rem 0 clamp(36px, 5vw, 60px); color: var(--muted); }
.apps .intro strong { color: var(--white); font-weight: 600; }
/* Sfondo della sezione: luce morbida + sottili diagonali (diverso dalle "bolle" dei casi di successo) */
.apps {
  background:
    radial-gradient(ellipse 60% 28% at 88% 0%, #3b4239 0%, transparent 70%),
    radial-gradient(ellipse 55% 26% at 6% 100%, #363d35 0%, transparent 70%),
    repeating-linear-gradient(118deg, transparent 0 46px, rgba(250, 248, 243, 0.022) 46px 47px),
    var(--bg);
}
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(18px, 2.4vw, 30px); }
.tile {
  position: relative; display: flex; align-items: center; gap: clamp(18px, 2.2vw, 28px);
  padding: clamp(22px, 2.6vw, 32px) clamp(22px, 2.6vw, 36px);
  color: #262a25;
  background: linear-gradient(152deg, #f6f0e0 0%, #ebe1c8 50%, #ddd1b3 100%);
  border-left: 7px solid #d9a441;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -2px 0 rgba(0, 0, 0, 0.12), 0 24px 36px -22px rgba(0, 0, 0, 0.75), 0 8px 14px -6px rgba(0, 0, 0, 0.35);
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
  transition: box-shadow 0.3s ease;
}
.tile::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s; background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(217, 164, 65, 0.2), transparent 62%); }
.tile:hover { --ty: -6px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -2px 0 rgba(0, 0, 0, 0.12), 0 38px 52px -24px rgba(0, 0, 0, 0.8), 0 12px 20px -8px rgba(0, 0, 0, 0.4); }
.tile:hover::after { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .js .tile.reveal.in { transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px)); transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s ease, opacity 0.7s ease; }
}
@media (prefers-reduced-motion: reduce) { .tile:hover { --ty: 0px; } }
.tile__icon { flex: none; display: block; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.4)); }
.tile__icon-in { display: grid; place-items: center; width: 80px; height: 80px; border-radius: 50%; color: #e9b95f; background: radial-gradient(circle at 32% 26%, #4d554a 0%, #2d322c 62%, #1f231f 100%); box-shadow: inset 0 2px 3px rgba(255, 255, 255, 0.16), inset 0 -3px 6px rgba(0, 0, 0, 0.45), 0 0 0 4px rgba(217, 164, 65, 0.55); }
.tile__icon-in svg { width: 42px; height: 42px; }
@media (prefers-reduced-motion: no-preference) {
  .tile__icon-in { transition: transform 0.9s cubic-bezier(0.3, 0.7, 0.2, 1); }
  .tile:hover .tile__icon-in { transform: rotate(360deg); }
}
.tile__body { min-width: 0; }
.tile h3 { font-size: 1.12rem; text-transform: uppercase; letter-spacing: 0.05em; line-height: 1.25; margin-bottom: 8px; display: flex; gap: 10px; align-items: baseline; }
.tile h3 .n { font-style: italic; font-weight: 700; font-size: 1.4rem; letter-spacing: 0; color: #a06d1a; }
.tile p { margin: 0; font-size: 1rem; line-height: 1.55; }
@media (max-width: 520px) { .tile__icon-in { width: 62px; height: 62px; } .tile__icon-in svg { width: 32px; height: 32px; } .tile { gap: 16px; } }
@media (max-width: 860px) { .tiles { grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */
.cta h2 { font-size: clamp(2.2rem, 5vw, 3.9rem); max-width: 14em; margin-bottom: clamp(28px, 4vw, 48px); }
/* Le due colonne hanno la stessa altezza: la colonna da 3 voci si distribuisce su tutta l'altezza di quella da 4 */
.needs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(24px, 6vw, 90px); max-width: 1040px; margin: 0 0 clamp(52px, 7vw, 92px) clamp(0px, 4vw, 60px); }
.needs ul { display: flex; flex-direction: column; gap: clamp(26px, 3.4vw, 44px); }
.needs ul + ul { justify-content: space-between; gap: 0; }
.needs li { border-left: 6px solid var(--olive); padding: 6px 0 6px 22px; font-weight: 500; font-size: clamp(1.25rem, 2.3vw, 1.8rem); line-height: 1.3; }
@media (max-width: 720px) { .needs { grid-template-columns: 1fr; margin-left: 0; } .needs ul + ul { gap: clamp(26px, 3.4vw, 44px); justify-content: flex-start; margin-top: clamp(26px, 3.4vw, 44px); } }

/* Riquadro "Raccontaci il tuo problema" */
.cta-banner { max-width: 1040px; margin: 0 auto; filter: drop-shadow(0 30px 34px rgba(0, 0, 0, 0.55)) drop-shadow(0 8px 10px rgba(0, 0, 0, 0.3)); }
.cta-banner__in {
  --cut: polygon(3% 0, 100% 0, 97% 100%, 0 100%);
  position: relative; overflow: hidden; text-align: center; color: #171a16; isolation: isolate;
  clip-path: var(--cut);
  padding: clamp(44px, 6.4vw, 84px) clamp(30px, 8vw, 130px);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400' viewBox='0 0 400 400'%3E%3Cg fill='none' stroke='%232a2e29' stroke-width='1.4' stroke-opacity='.09'%3E%3Ccircle cx='60' cy='70' r='22'/%3E%3Ccircle cx='150' cy='40' r='9'/%3E%3Ccircle cx='210' cy='110' r='34'/%3E%3Ccircle cx='210' cy='110' r='20'/%3E%3Ccircle cx='320' cy='60' r='14'/%3E%3Ccircle cx='90' cy='190' r='12'/%3E%3Ccircle cx='40' cy='290' r='30'/%3E%3Ccircle cx='150' cy='260' r='8'/%3E%3Ccircle cx='250' cy='230' r='18'/%3E%3Ccircle cx='340' cy='300' r='26'/%3E%3Ccircle cx='340' cy='300' r='13'/%3E%3Ccircle cx='120' cy='360' r='16'/%3E%3Ccircle cx='380' cy='200' r='9'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 400px 400px,
    linear-gradient(150deg, #c4c5b2 0%, #a6a793 46%, #8c8d7a 100%);
}
/* filetto interno (doppia cornice) */
.cta-banner__in::before { content: ""; position: absolute; inset: 11px; z-index: -1; clip-path: var(--cut); background: rgba(23, 26, 22, 0.42); }
.cta-banner__in::after { content: ""; position: absolute; inset: 13px; z-index: -1; clip-path: var(--cut); background: linear-gradient(150deg, #c4c5b2 0%, #a6a793 46%, #8c8d7a 100%); }
.cta-banner__mark { position: absolute; right: -3%; bottom: -18%; width: min(36%, 320px); filter: brightness(0); opacity: 0.09; pointer-events: none; z-index: 0; }
.cta-banner__in > p, .cta-banner__in > a { position: relative; z-index: 1; }
.cta-banner__sheen { position: absolute; top: 0; bottom: 0; left: -30%; width: 20%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.42), transparent); transform: skewX(-22deg); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) { .cta-banner:hover .cta-banner__sheen { animation: sheen 1.2s ease-out; } }
@keyframes sheen { 0% { left: -30%; opacity: 0; } 15% { opacity: 1; } 100% { left: 120%; opacity: 0; } }
.cta-banner__k { margin: 0 0 0.7em; font: 500 clamp(0.95rem, 1.9vw, 1.3rem)/1.4 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; }
.cta-banner__k::before { content: ""; display: block; width: 72px; height: 5px; margin: 0 auto clamp(14px, 2vw, 22px); background: #171a16; transform: skewX(-32deg); }
.cta-banner__big { margin: 0 auto; max-width: 15em; font: 700 clamp(2.1rem, 5.2vw, 4rem)/1.08 var(--serif); letter-spacing: -0.01em; text-wrap: balance; }
.cta-banner__big em { font-style: italic; padding: 0 0.12em; background: linear-gradient(transparent 60%, rgba(233, 185, 95, 0.9) 60% 90%, transparent 90%); }
.cta-btn { display: inline-block; margin-top: clamp(26px, 3.6vw, 44px); padding: 1.2rem 2.7rem; background: #20241f; color: #e9b95f; font: 600 0.84rem/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; text-decoration: none; clip-path: var(--para); transition: background 0.2s, color 0.2s; }
.cta-btn span { display: inline-block; transition: transform 0.25s; }
.cta-btn:hover { background: #e9b95f; color: #20241f; }
.cta-btn:hover span { transform: translateX(6px); }
.cta-btn:focus-visible { outline: none; background: #faf8f3; color: #171a16; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Gruppo ---------- */
.group h2 { font-size: clamp(2rem, 4.4vw, 3.3rem); max-width: 16em; margin-bottom: clamp(36px, 5vw, 64px); }
.group__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.group__item { padding: clamp(28px, 3.6vw, 48px) clamp(18px, 2.6vw, 40px); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 22px; }
.group__item:first-child { padding-left: 0; }
.group__item:last-child { border-right: 0; padding-right: 0; }
.group__logo { height: 78px; display: flex; align-items: center; }
.group__logo img { max-height: 100%; width: auto; max-width: 240px; object-fit: contain; object-position: left center; }
.group__item p { margin: 0; color: var(--muted); font-size: 1rem; }
@media (max-width: 860px) {
  .group__grid { grid-template-columns: 1fr; }
  .group__item, .group__item:first-child, .group__item:last-child { border-right: 0; border-bottom: 1px solid var(--line); padding-inline: 0; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-4); color: var(--muted); padding: clamp(52px, 7vw, 88px) 0 28px; font-size: 0.98rem; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: clamp(28px, 5vw, 72px); }
.footer__mark { width: 62px; margin-bottom: 22px; }
.footer__grid p { margin: 0 0 0.9em; max-width: 42ch; }
.footer__grid strong { color: var(--white); font-weight: 600; }
.nowrap { white-space: nowrap; } /* la ragione sociale non va mai spezzata: se non ci sta, va a capo intera */
.footer__grid h4 { font: 500 0.74rem/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--olive-l); margin: 0 0 18px; }
.footer__grid address { font-style: normal; line-height: 1.75; }
.footer__grid a { text-decoration: none; border-bottom: 1px solid var(--olive); }
.footer__grid a:hover { color: var(--white); }
.footer__bottom { margin-top: clamp(40px, 6vw, 72px); padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: center; font-size: 0.86rem; }
.footer__bottom ul { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer__bottom a, .linkbtn { color: var(--muted); text-decoration: none; background: none; border: 0; font: inherit; padding: 0; cursor: pointer; border-bottom: 1px solid transparent; }
.footer__bottom a:hover, .linkbtn:hover { color: var(--white); border-bottom-color: var(--olive); }
.payoff { font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--olive-l); }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- Pagine interne (contatti, legali) ---------- */
.page-hero { padding: clamp(56px, 8vw, 104px) 0 clamp(36px, 5vw, 64px); }
.page-hero h1 { font-size: clamp(2.5rem, 6vw, 4.8rem); max-width: 14em; }
.page-hero h1 em { display: block; font-style: italic; color: var(--olive); }
.page-hero .lead { max-width: 58ch; font-size: 1.16rem; color: var(--muted); margin-top: 1.6rem; }

.contact { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 96px); padding-bottom: clamp(64px, 9vw, 120px); align-items: start; }
.contact__info dl { margin: 0; }
.contact__info dt { font: 500 0.74rem/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--olive-l); margin: 0 0 10px; }
.contact__info dd { margin: 0 0 30px; font-size: 1.08rem; line-height: 1.6; }
.contact__info a { text-decoration: none; border-bottom: 1px solid var(--olive); }
.contact__info a:hover { border-bottom-color: var(--white); }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }

.form { background: var(--bg-2); padding: clamp(26px, 4vw, 48px); border-top: 3px solid var(--olive); }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 22px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font: 500 0.74rem/1.3 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--olive-l); }
.field label .req { color: var(--white); }
.field input, .field textarea { width: 100%; background: var(--bg); color: var(--white); border: 1px solid #7d8170; border-radius: 0; padding: 14px 16px; font: 400 1rem/1.4 var(--sans); transition: border-color 0.15s, box-shadow 0.15s; }
.field textarea { min-height: 170px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--olive); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--olive-l); box-shadow: 0 0 0 3px rgba(169, 170, 151, 0.32); }
.field input:user-invalid, .field textarea:user-invalid { border-color: #e0a58f; }
.consent { display: flex; gap: 14px; align-items: flex-start; font-size: 0.94rem; color: var(--muted); }
.consent input { flex: none; width: 20px; height: 20px; margin-top: 3px; accent-color: var(--olive); }
.consent a { color: var(--white); text-underline-offset: 3px; }
.form__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 28px; margin-top: 8px; }
.form__status { font-size: 0.98rem; min-height: 1.4em; }
.form__status.err { color: #f0b9a4; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
@media (max-width: 640px) { .form__grid { grid-template-columns: 1fr; } }

.legal { padding-bottom: clamp(64px, 9vw, 120px); }
.legal .prose { max-width: 74ch; }
.legal h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 2.1em 0 0.6em; color: var(--olive-d); }
.legal h3 { font-size: 1.28rem; margin: 1.6em 0 0.4em; }
.legal ul { list-style: disc; padding-left: 1.3em; margin-bottom: 1em; }
.legal li { margin-bottom: 0.4em; }
.legal a { text-underline-offset: 3px; }
.legal .back { display: inline-block; margin-bottom: 28px; font-size: 0.86rem; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid var(--olive); }
.legal table { border-collapse: collapse; width: 100%; margin: 1em 0 1.6em; font-size: 0.96rem; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(38, 42, 37, 0.18); vertical-align: top; }
.legal th { font-weight: 600; }
.center-page { min-height: 60vh; display: grid; align-content: center; padding: 80px 0; }

/* ---------- Banner cookie ---------- */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 300; max-width: 780px; margin-inline: auto; background: var(--bg-4); color: var(--muted); border: 1px solid var(--olive); padding: 22px 24px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); display: none; }
.cookie.show { display: block; }
.cookie p { margin: 0 0 16px; font-size: 0.94rem; line-height: 1.55; }
.cookie a { color: var(--white); text-underline-offset: 3px; }
.cookie__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cookie .btn { padding: 0.95rem 1.6rem; font-size: 0.72rem; }
.btn--ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1px var(--olive); clip-path: none; }
.btn--ghost:hover { background: rgba(134, 135, 117, 0.25); }
.btn--ghost:focus-visible { outline: 2px solid var(--olive-l); outline-offset: 3px; background: transparent; color: var(--white); }

/* ---------- Animazioni d'ingresso (solo con JS e senza reduced-motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; }
  .js .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media print {
  .site-header, .cookie, .hero__mark { display: none !important; }
  body { background: #fff; color: #000; }
}
