/* ==========================================================================
   Assi Tech — foglio di stile principale
   ========================================================================== */

:root {
  --brand: #ec6437;
  --brand-dark: #c94d22;
  --brand-soft: #fdeee8;
  --ink: #15181f;
  --ink-2: #2f2f30;
  --muted: #5d6270;
  --line: #e6e7eb;
  --bg: #ffffff;
  --bg-alt: #f6f6f8;
  --dark: #12151c;
  --dark-2: #1b1f29;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px -12px rgba(21, 24, 31, .18);
  --shadow-lg: 0 24px 50px -20px rgba(21, 24, 31, .28);
  --wrap: 1180px;
  --header-h: 76px;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset leggero ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { color: var(--brand); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -.01em; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1.1em; }
ul { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm); z-index: 200; }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .85em 1.6em;
  border-radius: 999px;
  font-weight: 600; font-size: 1rem; line-height: 1;
  border: 2px solid transparent;
  background: transparent;
  font-family: inherit;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-outline { border-color: var(--brand); color: var(--brand-dark); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 20px -14px rgba(0,0,0,.25); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.logo img { height: 34px; width: auto; }
.logo { display: flex; align-items: center; }

.nav { display: flex; align-items: center; gap: 8px; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav-list > li { position: relative; }
.nav-list a, .nav-list .nav-toggle-sub {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  color: var(--ink); font-weight: 600; font-size: .98rem;
  background: none; border: 0; font-family: inherit; cursor: pointer;
  border-radius: var(--radius-sm);
}
.nav-list a:hover, .nav-list .nav-toggle-sub:hover { color: var(--brand-dark); background: var(--brand-soft); }
.nav-list a[aria-current="page"], .nav-list .is-active > .nav-toggle-sub { color: var(--brand-dark); }
.nav-toggle-sub svg { width: 12px; height: 12px; transition: transform .2s; }

.submenu {
  list-style: none; margin: 0; padding: 8px;
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 290px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s, transform .18s, visibility .18s;
}
.submenu a { font-weight: 500; padding: 9px 12px; }
.has-sub:hover > .submenu,
.has-sub:focus-within > .submenu,
.has-sub.is-open > .submenu { opacity: 1; visibility: visible; transform: none; }
.has-sub:hover > .nav-toggle-sub svg, .has-sub.is-open > .nav-toggle-sub svg { transform: rotate(180deg); }

.header-cta { margin-left: 8px; padding: .7em 1.2em; font-size: .95rem; }

.menu-btn {
  display: none;
  width: 46px; height: 46px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-btn span, .menu-btn span::before, .menu-btn span::after {
  display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
  position: relative; transition: transform .25s, background .25s;
}
.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-open .menu-btn span { background: transparent; }
.menu-open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 980px) {
  /* backdrop-filter renderebbe l'header il contenitore del menu fisso */
  .site-header { backdrop-filter: none; background: #fff; }
  .menu-btn { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    background: #fff;
    flex-direction: column; align-items: stretch; gap: 16px;
    padding: 16px 24px 32px;
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .3s ease, visibility 0s linear .3s;
  }
  .menu-open .nav { transform: none; visibility: visible; transition: transform .3s ease, visibility 0s; }
  .menu-open { overflow: hidden; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list > li { border-bottom: 1px solid var(--line); }
  .nav-list a, .nav-list .nav-toggle-sub { padding: 14px 4px; font-size: 1.08rem; width: 100%; justify-content: space-between; }
  .nav-list a:hover, .nav-list .nav-toggle-sub:hover { background: none; }
  .submenu {
    position: static; min-width: 0; border: 0; box-shadow: none; padding: 0 0 10px 12px;
    opacity: 1; visibility: visible; transform: none; display: none;
  }
  .has-sub:hover > .submenu, .has-sub:focus-within > .submenu { display: none; }
  .has-sub.is-open > .submenu { display: block; }
  .submenu a { padding: 10px 4px; color: var(--muted); }
  .header-cta { margin: 8px 0 0; justify-content: center; }
}

/* ---------- Hero home ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: var(--dark) url("../images/assi-rid/3017.jpg") center/cover no-repeat;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(1200px 500px at 85% 20%, rgba(236,100,55,.35), transparent 60%),
    linear-gradient(100deg, rgba(18,21,28,.94) 0%, rgba(18,21,28,.82) 45%, rgba(18,21,28,.55) 100%);
}
.hero-inner { position: relative; padding: clamp(80px, 12vw, 150px) 0 clamp(70px, 10vw, 130px); max-width: 760px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; }
.hero h1 { color: #fff; margin-bottom: .4em; }
.hero h1 strong { color: var(--brand); font-weight: 700; }
.rotator { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; padding: 0; list-style: none; }
.rotator li {
  font-size: .95rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25); color: rgba(255,255,255,.75);
  transition: background .3s, color .3s, border-color .3s;
}
.rotator li.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.hero-lead { font-size: 1.2rem; color: rgba(255,255,255,.85); max-width: 600px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* ---------- Sezioni ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

.intro-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: start; }
.intro-grid p { color: var(--muted); }
.areas {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.areas h3 { font-size: 1.1rem; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips li { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .92rem; }
.phone-big { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.phone-big .ico { width: 48px; height: 48px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.phone-big .ico svg { width: 22px; height: 22px; }
.phone-big small { display: block; color: var(--muted); font-size: .85rem; }
.phone-big a { font-size: 1.35rem; font-weight: 700; color: var(--ink); }

/* ---------- Card servizi ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-media {
  aspect-ratio: 16 / 10; overflow: hidden;
  background: linear-gradient(135deg, var(--dark-2), #3a2a25);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: .45em; }
.card-body p { color: var(--muted); font-size: 1rem; flex: 1; }
.card-link { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }
.card-link svg { width: 16px; height: 16px; transition: transform .2s; }
.card:hover .card-link svg { transform: translateX(4px); }

/* ---------- Banda CTA ---------- */
.cta-band { background: var(--dark); color: rgba(255,255,255,.82); position: relative; overflow: hidden; }
.cta-band::after {
  content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -200px;
  background: radial-gradient(circle, rgba(236,100,55,.45), transparent 65%);
}
.cta-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.cta-band h2 { color: #fff; }
.cta-box { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 30px; }
.cta-box .btn { width: 100%; justify-content: center; margin-top: 10px; }
.cta-box p { margin: 0 0 4px; }
.cta-box strong { color: #fff; font-size: 1.5rem; display: block; margin-bottom: 12px; }

/* ---------- Pagine interne ---------- */
.page-hero {
  background: var(--dark); color: rgba(255,255,255,.8);
  padding: clamp(48px, 7vw, 84px) 0;
  position: relative; overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; width: 600px; height: 600px; right: -180px; top: -280px;
  background: radial-gradient(circle, rgba(236,100,55,.4), transparent 65%);
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 3rem); margin-bottom: .3em; }
.page-hero p { font-size: 1.15rem; max-width: 720px; margin: 0; }
.breadcrumb { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px; font-size: .9rem; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.breadcrumb a { color: rgba(255,255,255,.7); }
.breadcrumb a:hover { color: #fff; }

.page-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
.page-layout.no-aside { grid-template-columns: minmax(0, 1fr); max-width: 860px; }

.prose h2 { margin-top: 1.8em; padding-top: .2em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose .lead { font-size: 1.2rem; color: var(--ink); }
.prose ul { list-style: none; padding: 0; margin: 0 0 1.4em; }
.prose ul li { position: relative; padding-left: 32px; margin-bottom: .55em; }
.prose ul li::before {
  content: ""; position: absolute; left: 0; top: .42em;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ec6437' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/11px no-repeat;
}
.prose blockquote {
  margin: 1.6em 0; padding: 22px 26px;
  background: var(--brand-soft); border-left: 4px solid var(--brand); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 1.15rem; color: var(--ink); font-style: italic;
}
.prose dl { margin: 0 0 1.4em; }
.prose dt { font-weight: 700; color: var(--ink); margin-top: 1.1em; }
.prose dd { margin: .2em 0 0; }

.box {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; margin: 1.6em 0; background: #fff;
}
.box h3 { margin-top: 0; }
.box.highlight { background: var(--bg-alt); }
.box-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 1.6em 0; }
.box-grid .box { margin: 0; }
.box-grid .box ul { margin-bottom: 0; }

.steps { counter-reset: step; display: grid; gap: 16px; margin: 1.4em 0; }
.step { counter-increment: step; display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; }
.step::before {
  content: counter(step);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 1.1rem;
  display: grid; place-items: center;
}
.step h3 { margin: .35em 0 .3em; font-size: 1.15rem; }
.step p { margin: 0; }

/* ---------- Sidebar ---------- */
.aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 24px; }
.aside-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: #fff; }
.aside-box h3 { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.aside-nav { list-style: none; margin: 0; padding: 0; }
.aside-nav a { display: block; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--ink); font-weight: 500; }
.aside-nav a:hover { background: var(--bg-alt); color: var(--brand-dark); }
.aside-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.aside-contact { background: var(--dark); color: rgba(255,255,255,.8); border: 0; }
.aside-contact h3 { color: rgba(255,255,255,.6); }
.aside-contact strong { display: block; color: #fff; font-size: 1.4rem; }
.aside-contact .btn { width: 100%; justify-content: center; margin-top: 16px; }

/* ---------- Contatti ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.contact-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 30px;
  background: #fff; transition: box-shadow .25s, transform .25s;
}
.contact-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.contact-card .ico { width: 54px; height: 54px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 18px; }
.contact-card .ico svg { width: 26px; height: 26px; }
.contact-card h2 { font-size: 1.2rem; margin-bottom: .4em; }
.contact-card p { margin: 0; color: var(--muted); }
.contact-card a.big { font-size: 1.25rem; font-weight: 700; color: var(--ink); word-break: break-word; }
.contact-card a.big:hover { color: var(--brand-dark); }

/* ---------- Realizzazioni ---------- */
.works { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
.work { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; display: flex; flex-direction: column; transition: box-shadow .25s, transform .25s; }
.work:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.work-media { aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--dark-2), #3a2a25); overflow: hidden; }
.work-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.work-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.work-body h2 { font-size: 1.25rem; margin-bottom: .35em; }
.work-body p { color: var(--muted); font-size: 1rem; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 14px; }
.tags li { font-size: .8rem; font-weight: 600; color: var(--brand-dark); background: var(--brand-soft); padding: 3px 10px; border-radius: 999px; }

/* ---------- Chi siamo ---------- */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 8px; }
.value { padding: 28px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.value .ico { width: 48px; height: 48px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; margin-bottom: 16px; }
.value .ico svg { width: 24px; height: 24px; }
.value h3 { font-size: 1.2rem; }
.value p { color: var(--muted); margin: 0; font-size: 1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: rgba(255,255,255,.65); font-size: .98rem; }
.footer-top { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 40px; padding: 72px 0 48px; }
.footer-top h3 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }
.footer-top ul { list-style: none; margin: 0; padding: 0; }
.footer-top li { margin-bottom: 8px; }
.site-footer a { color: rgba(255,255,255,.75); }
.site-footer a:hover { color: var(--brand); }
.footer-logo { display: inline-block; background: #fff; padding: 10px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; }
.footer-logo img { height: 28px; width: auto; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact svg { width: 18px; height: 18px; flex: none; margin-top: 4px; color: var(--brand); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; font-size: .9rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; margin: 0; padding: 0; }

/* ---------- Animazioni di comparsa ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}

/* ---------- Banner cookie ---------- */
.cookie-banner {
  position: fixed; z-index: 150;
  left: 24px; bottom: 24px;
  width: min(440px, calc(100% - 48px));
  background: #fff; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 24px 60px -18px rgba(21, 24, 31, .4);
  padding: 24px 24px 22px;
  opacity: 0; transform: translateY(16px);
  transition: opacity .3s ease, transform .3s ease;
}
.cookie-banner.is-visible { opacity: 1; transform: none; }
.cookie-banner[hidden] { display: none; }
.cookie-title { font-weight: 700; color: var(--ink); font-size: 1.1rem; margin: 0 32px 8px 0; }
.cookie-text { font-size: .95rem; line-height: 1.55; color: var(--muted); margin: 0 0 18px; }
.cookie-text a { text-decoration: underline; }
.cookie-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cookie-actions .btn { justify-content: center; padding: .8em 1em; }
.cookie-close {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  display: grid; place-items: center;
}
.cookie-close:hover { background: var(--bg-alt); color: var(--ink); }
.cookie-close svg { width: 18px; height: 18px; }
.cookie-view[hidden] { display: none; }
.cookie-customize {
  display: block; width: 100%; margin-top: 12px; padding: 6px;
  background: none; border: 0; font: inherit; font-size: .92rem; font-weight: 600;
  color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.cookie-customize:hover { color: var(--brand-dark); }

/* Modulo preferenze */
.cookie-banner.is-prefs {
  width: min(560px, calc(100% - 48px));
  max-height: calc(100vh - 48px); overflow-y: auto; overscroll-behavior: contain;
}
.cookie-back {
  display: inline-flex; align-items: center; gap: 4px;
  margin: -6px 0 10px -6px; padding: 4px 6px;
  background: none; border: 0; border-radius: 6px; font: inherit; font-size: .9rem; font-weight: 600;
  color: var(--muted); cursor: pointer;
}
.cookie-back:hover { color: var(--ink); background: var(--bg-alt); }
.cookie-back svg { width: 16px; height: 16px; }
.cookie-cat { border: 0; margin: 0 0 18px; padding: 0; border-top: 1px solid var(--line); }
.cookie-row {
  display: flex; gap: 18px; align-items: flex-start; justify-content: space-between;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.cookie-row-title { display: block; font-weight: 700; color: var(--ink); margin-bottom: 2px; cursor: pointer; }
.cookie-row-text p { font-size: .9rem; line-height: 1.5; color: var(--muted); margin: 0; }
.cookie-details { margin-top: 6px; font-size: .88rem; }
.cookie-details summary { cursor: pointer; color: var(--brand-dark); font-weight: 600; width: max-content; }
.cookie-details p { margin-top: 6px; padding: 10px 12px; background: var(--bg-alt); border-radius: var(--radius-sm); }

/* Interruttore on/off */
.switch { position: relative; flex: none; width: 46px; height: 26px; margin-top: 2px; }
.switch input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: pointer; z-index: 1;
}
.switch input:disabled { cursor: not-allowed; }
.switch-track {
  position: absolute; inset: 0; border-radius: 999px;
  background: #c9ccd3; transition: background .2s;
}
.switch-track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s;
}
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track::after { transform: translateX(20px); }
.switch input:disabled + .switch-track { opacity: .55; }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--brand); outline-offset: 2px; }

.cookie-actions-3 { grid-template-columns: 1fr 1fr 1fr; }
.cookie-actions-3 .btn { font-size: .92rem; padding: .8em .6em; }

.link-btn {
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  color: rgba(255,255,255,.75);
}
.link-btn:hover { color: var(--brand); }
@media (max-width: 640px) {
  .cookie-banner, .cookie-banner.is-prefs { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 20px 18px 18px; }
  .cookie-banner.is-prefs { max-height: calc(100vh - 24px); }
  .cookie-actions-3 { grid-template-columns: 1fr 1fr; }
  .cookie-actions-3 .btn-primary { grid-column: 1 / -1; grid-row: 1; }
}
@media print { .cookie-banner { display: none !important; } }

/* ---------- Pagina 404 ---------- */
.notfound { text-align: center; padding: 120px 0; }
.notfound .code { font-size: clamp(5rem, 16vw, 9rem); font-weight: 700; color: var(--brand); line-height: 1; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .intro-grid, .cta-inner { grid-template-columns: 1fr; gap: 36px; }
  .page-layout { grid-template-columns: 1fr; gap: 40px; }
  .aside { position: static; }
  .contact-grid, .values { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .wrap { padding: 0 16px; }
  .cards, .box-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; padding-top: 56px; }
  .works { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

@media print {
  .site-header, .site-footer, .aside, .cta-band, .hero-actions { display: none !important; }
  .page-hero, .hero { background: none !important; color: #000; }
  .page-hero h1, .hero h1 { color: #000; }
}
