@charset "utf-8";
/* ==========================================================================
   BR Consulting — foglio di stile unico
   Ordine: token · reset · tipografia · layout · componenti · pagine · utility
   ========================================================================== */

/* ---------- FONT ---------------------------------------------------------- */
@font-face {
  font-family: 'Space Grotesk';
  src: url('/assets/fonts/spacegrotesk-var-latin.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'InterVar';
  src: url('/assets/fonts/inter-var-latin.woff2') format('woff2-variations');
  font-weight: 300 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

/* ---------- TOKEN --------------------------------------------------------- */
:root {
  --ink: #0a1019;
  --ink-2: #111b29;
  --ink-3: #1b2738;
  --paper: #fff;
  --paper-2: #f5f6f8;
  --paper-3: #e9ecf1;

  --text: #0f1722;
  --text-2: #566179;
  --text-3: #8590a6;

  --accent: #ffb020;
  --accent-2: #ffc659;
  --accent-d: #d98b00;
  --brick: #c2562f;
  --ok: #0f9d58;

  --line: #e3e7ee;
  --line-d: rgba(255, 255, 255, 0.11);

  --f-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'InterVar', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --r-xl: 32px;

  --wrap: 1240px;
  --gut: clamp(18px, 4vw, 40px);
  --sect: clamp(64px, 9vw, 128px);

  --sh-s: 0 1px 2px rgba(13, 22, 38, 0.06), 0 2px 8px rgba(13, 22, 38, 0.05);
  --sh-m: 0 4px 12px rgba(13, 22, 38, 0.07), 0 14px 36px rgba(13, 22, 38, 0.09);
  --sh-l: 0 10px 24px rgba(13, 22, 38, 0.1), 0 30px 70px rgba(13, 22, 38, 0.16);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);

  --hdr-h: 74px;
}

/* ---------- RESET --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hdr-h) + 16px);
}
body {
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--ink); }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 999;
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 0 0 10px 10px;
  transition: top .2s;
}
.skip:focus { top: 0; }

/* ---------- TIPOGRAFIA ---------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 4.7vw, 4.1rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p { text-wrap: pretty; }
.lead { font-size: clamp(1.06rem, 1.7vw, 1.3rem); color: var(--text-2); line-height: 1.6; }
.eyebrow {
  font-family: var(--f-display);
  font-size: .765rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-d); display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 26px; height: 2px; background: var(--accent); flex: none; }
.on-dark .eyebrow { color: var(--accent); }
.hl { color: var(--accent-d); }
.on-dark .hl { color: var(--accent); }

/* ---------- LAYOUT -------------------------------------------------------- */
.wrap { width: min(var(--wrap), 100% - var(--gut) * 2); margin-inline: auto; }
.sect { padding-block: var(--sect); position: relative; }
.sect-sm { padding-block: clamp(44px, 6vw, 80px); }
.on-dark { background: var(--ink); color: #fff; }
.on-dark p, .on-dark .lead { color: #a9b4c7; }
.on-paper2 { background: var(--paper-2); }

.sect-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.sect-head.center { margin-inline: auto; text-align: center; }
.sect-head.center .eyebrow { justify-content: center; }
.sect-head p { margin-top: 18px; }

.grid { display: grid; gap: clamp(18px, 2.4vw, 30px); }
.g-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g-3 { grid-template-columns: repeat(auto-fit, minmax(272px, 1fr)); }
.g-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* ---------- BOTTONI ------------------------------------------------------- */
.btn {
  --bg: var(--ink); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 28px; border-radius: 100px;
  background: var(--bg); color: var(--fg);
  font-family: var(--f-display); font-weight: 600; font-size: .97rem; letter-spacing: .01em;
  border: 1.5px solid transparent; white-space: nowrap;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .2s, color .2s, border-color .2s;
  position: relative; isolation: isolate;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--sh-m); }
.btn:active { transform: translateY(0); }
.btn .ico { flex: none; }
.btn-accent { --bg: var(--accent); --fg: var(--ink); }
.btn-accent:hover { --bg: var(--accent-2); }
.btn-dark { --bg: var(--ink); --fg: #fff; }
.btn-light { --bg: #fff; --fg: var(--ink); }
.btn-wa { --bg: #25d366; --fg: #04301a; }
.btn-ghost {
  --bg: transparent; --fg: inherit;
  border-color: var(--line);
}
.on-dark .btn-ghost { border-color: var(--line-d); }
.btn-ghost:hover { background: rgba(0, 0, 0, .04); box-shadow: none; }
.on-dark .btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-sm { padding: 11px 18px; font-size: .88rem; }
.btn-lg { padding: 18px 36px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-display); font-weight: 600; color: var(--accent-d);
  border-bottom: 1.5px solid currentColor; padding-bottom: 2px;
}
.on-dark .link-arrow { color: var(--accent); }
.link-arrow .ico { transition: transform .3s var(--ease); }
.link-arrow:hover .ico { transform: translateX(5px); }

/* ---------- HEADER -------------------------------------------------------- */
.hdr {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.hdr.is-stuck { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(13, 22, 38, .06); }
.hdr.is-hidden { transform: translateY(-100%); }
.hdr { transition: transform .4s var(--ease), border-color .3s, background .3s, box-shadow .3s; }

.hdr-in { display: flex; align-items: center; gap: 22px; height: var(--hdr-h); }
.hdr-logo { flex: none; color: var(--ink); }
.logo { overflow: visible; }
.logo-br { font-family: var(--f-display); }
.logo-sub { font-family: var(--f-body); }

.nav { margin-inline: auto; }
.nav-list { display: flex; align-items: center; gap: 4px; }
.nav-a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 15px; border-radius: 100px;
  font-family: var(--f-display); font-weight: 600; font-size: .94rem;
  transition: background .2s, color .2s;
}
.nav-a:hover, .nav-a[aria-expanded='true'] { background: var(--paper-2); }
.nav-a[aria-current='page'] { color: var(--accent-d); }
.nav-btn .chev { transition: transform .3s var(--ease); transform: rotate(90deg); }
.nav-btn[aria-expanded='true'] .chev { transform: rotate(-90deg); }
.dot-new {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 176, 32, .7); animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 176, 32, .65); }
  70% { box-shadow: 0 0 0 9px rgba(255, 176, 32, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 176, 32, 0); }
}

.hdr-cta { display: flex; align-items: center; gap: 10px; flex: none; }

/* Mega menu */
.has-mega { position: static; }
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--paper); border-top: 1px solid var(--line);
  box-shadow: var(--sh-l);
  padding-block: 34px 40px;
  animation: megaIn .32s var(--ease);
}
@keyframes megaIn { from { opacity: 0; transform: translateY(-10px); } }
.mega-in { display: grid; grid-template-columns: 250px 1fr; gap: 44px; }
.mega-head .mega-title { font-size: 1.5rem; margin-bottom: 16px; }
.mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.mega-item {
  display: flex; gap: 13px; align-items: center;
  padding: 12px 14px; border-radius: var(--r-m);
  transition: background .2s, transform .2s var(--ease);
}
.mega-item:hover { background: var(--paper-2); transform: translateX(3px); }
.mega-ico {
  flex: none; width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--paper-2); color: var(--accent-d);
  transition: background .2s, color .2s;
}
.mega-item:hover .mega-ico { background: var(--accent); color: var(--ink); }
.mega-tx { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.mega-tx strong { font-family: var(--f-display); font-size: .93rem; font-weight: 600; }
.mega-tx small { font-size: .78rem; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.scroll-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.scroll-progress i {
  display: block; height: 100%; width: var(--sp, 0%);
  background: linear-gradient(90deg, var(--accent), var(--brick));
}

/* Burger + menu mobile */
.burger { display: none; width: 44px; height: 44px; border-radius: 12px; position: relative; }
.burger span {
  position: absolute; left: 11px; width: 22px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .34s var(--ease), opacity .2s;
}
.burger span:nth-child(1) { top: 15px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 27px; }
.burger[aria-expanded='true'] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded='true'] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mnav {
  position: fixed; inset: var(--hdr-h) 0 0; z-index: 88;
  background: var(--paper); overflow-y: auto; padding: 22px var(--gut) 40px;
  animation: mnavIn .3s var(--ease);
}
@keyframes mnavIn { from { opacity: 0; transform: translateY(-8px); } }
.mnav-list > li > a, .mnav-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 16px 4px; border-bottom: 1px solid var(--line);
  font-family: var(--f-display); font-weight: 600; font-size: 1.14rem;
}
.mnav-toggle .chev { transition: transform .3s; transform: rotate(90deg); }
.mnav-toggle[aria-expanded='true'] .chev { transform: rotate(-90deg); }
.mnav-sub { display: none; padding: 6px 0 12px; }
.mnav-sub.open { display: block; }
.mnav-sub a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px 12px 14px; color: var(--text-2); font-size: 1rem;
  border-left: 2px solid var(--line);
}
.mnav-sub a:hover { color: var(--accent-d); border-left-color: var(--accent); }
.mnav-cta { display: grid; gap: 12px; margin-top: 28px; }

/* ---------- BRICIOLE ------------------------------------------------------ */
.crumbs { background: var(--paper-2); border-bottom: 1px solid var(--line); font-size: .85rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 13px; color: var(--text-3); }
.crumbs li + li::before { content: '›'; margin-right: 8px; opacity: .5; }
.crumbs a:hover { color: var(--accent-d); }

/* ---------- HERO ---------------------------------------------------------- */
.hero {
  position: relative; min-height: min(94vh, 880px);
  display: grid; align-items: center;
  background: var(--ink); color: #fff; overflow: hidden;
  padding-block: clamp(70px, 11vw, 130px);
}
.hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity 1.4s ease .2s;
}
.hero-canvas.ready { opacity: 1; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(1100px 620px at 78% 12%, rgba(255, 176, 32, .17), transparent 62%),
    radial-gradient(800px 520px at 8% 88%, rgba(194, 86, 47, .15), transparent 60%);
  pointer-events: none;
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 35%, transparent 78%);
}
.hero .wrap { position: relative; z-index: 2; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(34px, 5vw, 70px); align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero h1 .ln { display: block; overflow: hidden; }
.hero h1 .ln > span { display: block; }
.hero-sub { font-size: clamp(1.05rem, 1.6vw, 1.26rem); color: #b3bdcd; max-width: 54ch; margin-bottom: 32px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px;
  padding: 8px 16px 8px 10px; border-radius: 100px;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--line-d);
  font-size: .84rem; color: #cfd7e4;
}
.hero-badge b { color: #fff; font-weight: 600; }
.hero-badge .ico { color: var(--accent); }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 34px; font-size: .87rem; color: #9aa6b9; }
.hero-trust li { display: flex; align-items: center; gap: 8px; }
.hero-trust .ico { color: var(--accent); flex: none; }

.hero-card {
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line-d);
  border-radius: var(--r-xl); padding: 8px; backdrop-filter: blur(10px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}
.hero-card > .cmp { border-radius: 26px; }
.hero-cap { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 16px 8px; }
.hero-cap strong { font-family: var(--f-display); font-size: .96rem; }
.hero-cap span { font-size: .78rem; color: #94a0b3; }

/* ---------- CONFRONTO PRIMA/DOPO ------------------------------------------ */
.cmp {
  position: relative; overflow: hidden; border-radius: var(--r-l);
  background: var(--ink-2); touch-action: pan-y; cursor: ew-resize;
  user-select: none; -webkit-user-select: none;
}
.cmp img { width: 100%; height: 100%; object-fit: cover; object-position: var(--of, center); display: block; pointer-events: none; }
/* Le foto verticali riempirebbero tutto lo schermo: qui si impone una proporzione. */
.cmp-fixed { aspect-ratio: var(--ar, 4 / 3); }
.cmp-fixed .cmp-a, .cmp-fixed .cmp-a img { height: 100%; }
.cmp-a { position: relative; }
.cmp-b { position: absolute; inset: 0; width: 100%; clip-path: inset(0 0 0 var(--x, 50%)); }
.cmp-b img { position: absolute; inset: 0; width: 100%; height: 100%; }
.cmp-handle {
  position: absolute; top: 0; bottom: 0; left: var(--x, 50%);
  width: 3px; background: #fff; transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 0 26px rgba(0, 0, 0, .45);
  pointer-events: none;
}
.cmp-knob {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 54px; height: 54px; border-radius: 50%;
  background: #fff; color: var(--ink);
  display: grid; place-items: center; grid-auto-flow: column; gap: 3px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .4);
  transition: transform .25s var(--ease);
}
.cmp:hover .cmp-knob { transform: translate(-50%, -50%) scale(1.08); }
.cmp-knob svg { width: 15px; height: 15px; }
.cmp-knob svg:first-child { transform: rotate(180deg); }
.cmp-tag {
  position: absolute; top: 14px; z-index: 3;
  padding: 6px 13px; border-radius: 100px;
  font-family: var(--f-display); font-size: .74rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  background: rgba(10, 16, 25, .72); color: #fff; backdrop-filter: blur(6px);
  pointer-events: none;
}
.cmp-tag.is-before { left: 14px; }
.cmp-tag.is-after { right: 14px; background: var(--accent); color: var(--ink); }
.cmp-range {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: ew-resize; margin: 0;
}
.cmp-hint {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  font-size: .76rem; color: #fff; background: rgba(10, 16, 25, .6);
  padding: 6px 14px; border-radius: 100px; backdrop-filter: blur(6px);
  pointer-events: none; transition: opacity .4s;
}
.cmp.touched .cmp-hint { opacity: 0; }

/* ---------- STATISTICHE --------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 2px; background: var(--line); border-radius: var(--r-l); overflow: hidden; }
.on-dark .stats { background: var(--line-d); }
.stat { background: var(--paper); padding: clamp(24px, 3vw, 38px) 24px; text-align: center; }
.on-dark .stat { background: var(--ink); }
.stat b {
  display: block; font-family: var(--f-display); font-weight: 700;
  font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1; letter-spacing: -.03em;
  color: var(--accent-d);
}
.on-dark .stat b { color: var(--accent); }
.stat span { display: block; margin-top: 10px; font-size: .88rem; color: var(--text-2); }
.on-dark .stat span { color: #93a0b5; }

/* ---------- SCHEDE SERVIZIO ----------------------------------------------- */
.svc {
  position: relative; display: flex; flex-direction: column;
  padding: clamp(24px, 2.6vw, 34px); border-radius: var(--r-l);
  background: var(--paper); border: 1px solid var(--line);
  overflow: hidden; isolation: isolate;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s;
}
.svc::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(160deg, rgba(255, 176, 32, .13), transparent 52%);
  opacity: 0; transition: opacity .45s;
}
.svc:hover { transform: translateY(-7px); box-shadow: var(--sh-l); border-color: transparent; }
.svc:hover::before { opacity: 1; }
.svc-ico {
  width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center;
  background: var(--ink); color: var(--accent); margin-bottom: 20px;
  transition: transform .45s var(--ease), background .3s;
}
.svc:hover .svc-ico { transform: rotate(-8deg) scale(1.07); }
.svc h3 { margin-bottom: 10px; }
.svc p { color: var(--text-2); font-size: .95rem; flex: 1; }
.svc-more {
  margin-top: 20px; display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-display); font-weight: 600; font-size: .9rem; color: var(--accent-d);
}
.svc-more .ico { transition: transform .3s var(--ease); }
.svc:hover .svc-more .ico { transform: translateX(5px); }
.svc-link { position: absolute; inset: 0; z-index: 2; }
.svc-num {
  position: absolute; top: 18px; right: 22px;
  font-family: var(--f-display); font-weight: 700; font-size: 3.4rem;
  color: var(--paper-3); line-height: 1; z-index: -1;
}

/* ---------- PROCESSO ------------------------------------------------------ */
.steps { counter-reset: s; display: grid; gap: 2px; }
.step {
  counter-increment: s; position: relative;
  display: grid; grid-template-columns: 84px 1fr; gap: clamp(16px, 3vw, 34px); align-items: start;
  padding: clamp(24px, 3vw, 36px) 0; border-top: 1px solid var(--line);
}
.on-dark .step { border-top-color: var(--line-d); }
.step:last-child { border-bottom: 1px solid var(--line); }
.on-dark .step:last-child { border-bottom-color: var(--line-d); }
.step::before {
  content: '0' counter(s);
  font-family: var(--f-display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.3rem);
  color: var(--accent-d); line-height: 1; letter-spacing: -.03em;
}
.on-dark .step::before { color: var(--accent); }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--text-2); max-width: 62ch; }

/* ---------- ELENCHI CON SPUNTA -------------------------------------------- */
.checks { display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: 26px 1fr; gap: 13px; align-items: start; }
.checks .ico {
  width: 24px; height: 24px; padding: 5px; border-radius: 50%;
  background: var(--accent); color: var(--ink); flex: none; stroke-width: 3;
}

/* ---------- GALLERIA ------------------------------------------------------ */
.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 30px; }
.filter {
  padding: 9px 20px; border-radius: 100px; border: 1.5px solid var(--line);
  font-family: var(--f-display); font-weight: 600; font-size: .88rem;
  text-transform: capitalize; transition: all .25s;
}
.filter:hover { border-color: var(--ink); }
.filter[aria-pressed='true'] { background: var(--ink); color: #fff; border-color: var(--ink); }

.gal { columns: 3; column-gap: 18px; }
.gal-item {
  break-inside: avoid; margin-bottom: 18px; position: relative;
  border-radius: var(--r-m); overflow: hidden; cursor: zoom-in;
  background: var(--paper-2);
  transition: opacity .4s, transform .4s var(--ease);
}
.gal-item img { width: 100%; transition: transform .7s var(--ease), filter .5s; }
.gal-item:hover img { transform: scale(1.05); }
.gal-item.hide { display: none; }
.gal-cap {
  position: absolute; inset: auto 0 0 0; padding: 34px 18px 16px; color: #fff;
  background: linear-gradient(transparent, rgba(6, 11, 19, .88));
  font-family: var(--f-display); font-weight: 600; font-size: .95rem;
  transform: translateY(8px); opacity: 0; transition: all .35s var(--ease);
}
.gal-item:hover .gal-cap { transform: none; opacity: 1; }

/* Lightbox */
.lbox {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: rgba(6, 10, 17, .95); padding: 3vw;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.lbox.open { opacity: 1; pointer-events: auto; }
.lbox img { max-width: 100%; max-height: 84vh; border-radius: var(--r-m); object-fit: contain; }
.lbox-cap { color: #cbd4e1; text-align: center; margin-top: 16px; font-size: .92rem; }
.lbox-x, .lbox-nav {
  position: absolute; width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255, 255, 255, .11); color: #fff; display: grid; place-items: center;
  transition: background .2s;
}
.lbox-x:hover, .lbox-nav:hover { background: rgba(255, 255, 255, .24); }
.lbox-x { top: 20px; right: 20px; font-size: 1.5rem; }
.lbox-nav.prev { left: 18px; top: 50%; transform: translateY(-50%) rotate(180deg); }
.lbox-nav.next { right: 18px; top: 50%; transform: translateY(-50%); }

/* ---------- SCHEDE PROGETTO ----------------------------------------------- */
.proj { display: grid; gap: clamp(26px, 4vw, 56px); }
.proj-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 54px); align-items: center; }
.proj-row:nth-child(even) .proj-media { order: 2; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tag {
  padding: 6px 14px; border-radius: 100px; background: var(--paper-2);
  font-size: .8rem; font-weight: 500; color: var(--text-2);
}
.on-dark .tag { background: rgba(255, 255, 255, .08); color: #b7c1d1; }

/* ---------- TESTIMONIANZE ------------------------------------------------- */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }
.quote {
  padding: clamp(26px, 3vw, 36px); border-radius: var(--r-l);
  background: var(--paper); border: 1px solid var(--line); position: relative;
}
.on-dark .quote { background: var(--ink-2); border-color: var(--line-d); }
.quote-stars { display: flex; gap: 3px; color: var(--accent); margin-bottom: 16px; }
.quote-stars .ico { fill: currentColor; stroke: none; }
.quote blockquote { font-size: 1.04rem; line-height: 1.6; }
.quote figcaption { margin-top: 18px; font-family: var(--f-display); font-weight: 600; font-size: .92rem; }
.quote figcaption small { display: block; font-weight: 400; color: var(--text-3); font-size: .82rem; }

/* ---------- FAQ ----------------------------------------------------------- */
.faq { max-width: 860px; border-top: 1px solid var(--line); }
.on-dark .faq { border-top-color: var(--line-d); }
.faq details { border-bottom: 1px solid var(--line); }
.on-dark .faq details { border-bottom-color: var(--line-d); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 22px 0; cursor: pointer; list-style: none;
  font-family: var(--f-display); font-weight: 600; font-size: clamp(1rem, 1.6vw, 1.14rem);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; flex: none; width: 22px; height: 22px;
  background: currentColor; transition: transform .3s var(--ease);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center/contain no-repeat;
}
.faq details[open] summary::after { transform: rotate(135deg); }
.faq-a { padding-bottom: 24px; color: var(--text-2); max-width: 72ch; }
.on-dark .faq-a { color: #a2aec1; }

/* ---------- CTA ----------------------------------------------------------- */
.cta {
  position: relative; overflow: hidden; border-radius: var(--r-xl);
  background: var(--ink); color: #fff;
  padding: clamp(40px, 6vw, 76px);
  text-align: center;
}
.cta::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(700px 420px at 50% -10%, rgba(255, 176, 32, .24), transparent 62%);
}
.cta > * { position: relative; }
.cta h2 { margin-bottom: 16px; }
.cta .lead { margin-inline: auto; max-width: 58ch; }
.cta .btn-row { justify-content: center; margin-top: 32px; }
.cta-note { margin-top: 22px; font-size: .85rem; color: #8c98ac; }

/* ---------- FORM ---------------------------------------------------------- */
.field { display: grid; gap: 7px; }
.field > label { font-family: var(--f-display); font-weight: 600; font-size: .88rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: 14px 16px; border-radius: var(--r-m);
  border: 1.5px solid var(--line); background: var(--paper);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255, 176, 32, .18);
}
.field textarea { resize: vertical; min-height: 128px; }
.field-hint { font-size: .8rem; color: var(--text-3); }
.field-err { font-size: .82rem; color: #c62828; display: none; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #c62828; }
.field.invalid .field-err { display: block; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: .85rem; color: var(--text-2); }
.consent input { width: 20px; height: 20px; accent-color: var(--accent-d); margin-top: 2px; }
.consent a { text-decoration: underline; }

/* ---------- FOOTER -------------------------------------------------------- */
.ftr { background: var(--ink); color: #93a0b5; padding-block: clamp(50px, 7vw, 84px) 0; }
.ftr-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.35fr; gap: clamp(24px, 3vw, 44px); padding-bottom: 50px; }
.ftr-brand .logo { color: #fff; margin-bottom: 20px; }
.ftr-claim { font-family: var(--f-display); font-weight: 600; color: var(--accent); margin-bottom: 12px; }
.ftr-desc { font-size: .9rem; max-width: 38ch; }
.ftr-badges { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 100px; font-size: .78rem;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line-d); color: #c2ccdb;
}
.badge .ico { color: var(--accent); }
.ftr-col h3 { font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 18px; }
.ftr-col ul { display: grid; gap: 11px; font-size: .92rem; }
.ftr-col a { transition: color .2s; display: inline-flex; gap: 8px; align-items: baseline; }
.ftr-col a:hover { color: var(--accent); }
.ftr-contact a small { display: block; font-size: .76rem; color: #6c7a91; }
.ftr-hours { display: flex; gap: 8px; font-size: .9rem; }
.ftr-hours small { display: block; color: #6c7a91; font-size: .78rem; margin-top: 4px; }

.ftr-zones { padding-block: 28px; border-top: 1px solid var(--line-d); }
.ftr-zones h3 { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: #6c7a91; margin-bottom: 12px; }
.ftr-zones p { display: flex; flex-wrap: wrap; gap: 7px; }
.ftr-zones span { font-size: .79rem; color: #7d8a9f; }
.ftr-zones span:not(:last-child)::after { content: '·'; margin-left: 7px; opacity: .5; }

.ftr-bot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px;
  padding-block: 24px; border-top: 1px solid var(--line-d); font-size: .83rem;
}
.ftr-legal { display: flex; gap: 20px; }
.ftr-legal a:hover { color: var(--accent); }

/* ---------- BARRA MOBILE -------------------------------------------------- */
.stickybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: none;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.stickybar a {
  display: grid; place-items: center; gap: 3px; padding: 10px 4px 9px;
  font-size: .72rem; font-weight: 600; font-family: var(--f-display);
}
.stickybar a + a { border-left: 1px solid var(--line); }
.sticky-hi { color: var(--accent-d); }

/* ---------- ANIMAZIONI D'INGRESSO ----------------------------------------- */
/* Tutto parte visibile. Si nasconde solo se il JS è attivo (classe .js sull'html),
   così un errore di script o un browser esotico non lasciano mai la pagina bianca. */
.js [data-reveal] { opacity: 0; transform: translateY(26px); }
.js [data-reveal].in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js [data-reveal][data-d='1'].in { transition-delay: .09s; }
.js [data-reveal][data-d='2'].in { transition-delay: .18s; }
.js [data-reveal][data-d='3'].in { transition-delay: .27s; }
.js [data-reveal][data-d='4'].in { transition-delay: .36s; }
.js [data-reveal][data-d='5'].in { transition-delay: .45s; }

.mask-line { display: block; overflow: hidden; }
.js .mask-line > span { display: block; transform: translateY(105%); transition: transform 1s var(--ease); }
.js .in .mask-line > span, .js .mask-line.in > span { transform: none; }

/* ---------- STRISCIA SCORREVOLE ------------------------------------------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line-d); padding-block: 18px; }
.marquee-in { display: flex; gap: 46px; width: max-content; animation: mq 42s linear infinite; }
.marquee:hover .marquee-in { animation-play-state: paused; }
@keyframes mq { to { transform: translateX(-50%); } }
.marquee span {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--f-display); font-weight: 600; font-size: 1.02rem; color: #7d8a9f;
  white-space: nowrap;
}
.marquee span::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- UTILITY ------------------------------------------------------- */
.sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.center { text-align: center; }
.mt-l { margin-top: clamp(30px, 4vw, 52px); }
.noise::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .035; z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- RESPONSIVE ---------------------------------------------------- */
@media (max-width: 1100px) {
  .ftr-top { grid-template-columns: 1fr 1fr 1fr; }
  .ftr-brand { grid-column: 1 / -1; }
  .mega-in { grid-template-columns: 1fr; gap: 24px; }
  .mega-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  :root { --hdr-h: 66px; }
  .nav { display: none; }
  .burger { display: block; }
  .hdr-cta .btn-ghost span { display: none; }
  .hdr-cta .btn-ghost { padding: 11px; }
  .hero-in { grid-template-columns: 1fr; }
  .hero-card { max-width: 560px; }
  .proj-row { grid-template-columns: 1fr; }
  .proj-row:nth-child(even) .proj-media { order: 0; }
  .gal { columns: 2; }
  .stickybar { display: grid; }
  body { padding-bottom: 62px; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  /* etichette lunghe come "Invia la configurazione su WhatsApp" vanno a capo
     invece di uscire dallo schermo */
  .btn { white-space: normal; text-align: center; line-height: 1.3; }
  .ftr-top { grid-template-columns: 1fr; }
  .gal { columns: 1; }
  .mega-grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; gap: 8px; }
  .hdr-cta .btn-accent { display: none; }
  .btn { padding: 14px 22px; }
  .ftr-bot { flex-direction: column; }
}

/* ---------- PREFERENZE UTENTE --------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .mask-line > span { transform: none; }
  .hero-canvas { display: none; }
}

@media print {
  .hdr, .stickybar, .mnav, .hero-canvas, .btn, .ftr-zones { display: none !important; }
  body { color: #000; font-size: 11pt; }
  a[href^='http']::after { content: ' (' attr(href) ')'; font-size: 9pt; }
}

/* ---------- MAPPA A CARICAMENTO SU CLICK ---------------------------------- */
/* La mappa di Google installa cookie di terze parti. Caricandola solo dopo un
   clic esplicito il sito resta senza cookie e non serve alcun banner. */
.mapgate {
  position: relative; min-height: 440px; border-radius: var(--r-l); overflow: hidden;
  border: 1px solid var(--line); display: grid; place-items: center;
  background:
    linear-gradient(rgba(10, 16, 25, .55), rgba(10, 16, 25, .55)),
    repeating-linear-gradient(45deg, var(--paper-3) 0 22px, var(--paper-2) 22px 44px);
}
.mapgate-in { text-align: center; color: #fff; padding: 34px 24px; max-width: 46ch; }
.mapgate-in .ico { margin: 0 auto 14px; color: var(--accent); }
.mapgate-in h3 { margin-bottom: 10px; }
.mapgate-in p { color: #ccd5e2; font-size: .92rem; margin-bottom: 22px; }
.mapgate iframe { width: 100%; height: 440px; border: 0; display: block; }
.mapgate.loaded { background: none; place-items: stretch; }
/* ==========================================================================
   CONFIGURATORE 3D E PREVENTIVATORE
   ========================================================================== */

.spin {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .14); border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.cfg-figure {
  font-family: var(--f-display); font-weight: 700; letter-spacing: -.03em;
  font-size: clamp(1.5rem, 2.6vw, 2.05rem); line-height: 1.1; color: var(--ink);
  display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap;
}
.cfg-figure i { font-style: normal; color: var(--text-3); font-weight: 400; }

/* --- cursore superficie --- */
.cfg-range { display: flex; align-items: center; gap: 14px; }
.cfg-range input[type='range'] { flex: 1; -webkit-appearance: none; appearance: none; background: none; height: 26px; }
.cfg-range input[type='range']::-webkit-slider-runnable-track { height: 5px; border-radius: 3px; background: var(--paper-3); }
.cfg-range input[type='range']::-moz-range-track { height: 5px; border-radius: 3px; background: var(--paper-3); }
.cfg-range input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; margin-top: -8.5px;
  background: var(--ink); border: 3px solid var(--accent); cursor: grab;
}
.cfg-range input[type='range']::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--accent);
  background: var(--ink); cursor: grab;
}
.cfg-range output {
  flex: none; min-width: 68px; text-align: right;
  font-family: var(--f-display); font-weight: 700; font-size: .95rem;
}
.cfg-actions { display: grid; gap: 9px; }
.cfg-actions .btn[data-done] { background: var(--ok); color: #fff; border-color: transparent; }

/* --- preventivatore generale --- */
.calc {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: clamp(22px, 3vw, 42px); align-items: start;
  background: var(--paper); border-radius: var(--r-xl);
  padding: clamp(22px, 3vw, 40px); border: 1px solid var(--line);
}
.calc-in { display: grid; gap: 22px; }
.calc-in fieldset { border: 0; padding: 0; margin: 0; }
.calc-in legend { font-family: var(--f-display); font-weight: 600; font-size: .88rem; padding: 0; margin-bottom: 9px; }
.calc-out {
  background: var(--paper-2); border-radius: var(--r-l);
  padding: clamp(20px, 2.4vw, 28px); position: sticky; top: calc(var(--hdr-h) + 16px);
}
.calc-per { font-size: .9rem; color: var(--text-2); margin-top: 6px; }
.calc-per b { font-family: var(--f-display); color: var(--ink); }

.calc-radios { display: grid; gap: 8px; }
.calc-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.calc-radios label, .calc-checks label {
  display: flex; align-items: flex-start; gap: 11px; cursor: pointer;
  padding: 11px 13px; border-radius: var(--r-m);
  background: var(--paper-2); border: 1.5px solid transparent;
  transition: border-color .2s, background .2s;
}
.calc-radios label:hover, .calc-checks label:hover { background: var(--paper-3); }
.calc-radios input, .calc-checks input { margin-top: 3px; accent-color: var(--accent-d); width: 18px; height: 18px; flex: none; }
.calc-radios label:has(input:checked), .calc-checks label:has(input:checked) {
  border-color: var(--ink); background: var(--paper);
}
.calc-radios span, .calc-checks span { display: flex; flex-direction: column; font-size: .88rem; font-weight: 500; line-height: 1.35; }
.calc-radios small { font-weight: 400; font-size: .77rem; color: var(--text-3); }

/* --- pagine legali --- */
.legal h2 { font-size: clamp(1.15rem, 2vw, 1.4rem); margin: 34px 0 12px; }
.legal h2:first-child { margin-top: 0; }
.legal p { color: var(--text-2); margin-bottom: 12px; }
.legal a { color: var(--accent-d); text-decoration: underline; }
.legal mark { background: #fff3cd; padding: 1px 6px; border-radius: 5px; }
.legal-list { display: grid; gap: 9px; margin: 6px 0 16px; padding-left: 4px; }
.legal-list li { display: grid; grid-template-columns: 8px 1fr; gap: 12px; color: var(--text-2); }
.legal-list li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: 11px; }

@media (max-width: 1040px) {
.calc { grid-template-columns: minmax(0, 1fr); }
.calc-out { position: static; max-height: none; }
}
@media (max-width: 560px) {
.calc-checks { grid-template-columns: 1fr; }
}

/* Campo trappola anti-spam: fuori dallo schermo e fuori dal percorso di tab.
   Nascosto con display:none verrebbe ignorato da alcuni bot. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Pagina di conferma invio */
.esito { max-width: 620px; margin-inline: auto; text-align: center; }
.esito-ico {
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  margin: 0 auto 26px; background: var(--ok); color: #fff;
}
.esito-ico.ko { background: #c62828; }
.esito-ico svg { width: 42px; height: 42px; stroke-width: 2.6; }

/* ---------- FASCIA ANTEPRIMA --------------------------------------------- */
/* Compare solo nelle build fatte con `node build.mjs --demo <url>`.
   Serve a evitare che qualcuno scambi la copia di prova per il sito vero. */
.demo-bar {
  position: relative; z-index: 95;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px;
  padding: 9px 16px; text-align: center;
  background: repeating-linear-gradient(135deg, #1b2738 0 14px, #141d2b 14px 28px);
  color: #d5dde9; font-size: .8rem; line-height: 1.4;
  border-bottom: 2px solid var(--accent);
}
.demo-bar b {
  color: var(--ink); background: var(--accent);
  padding: 2px 9px; border-radius: 100px;
  font-family: var(--f-display); font-size: .72rem; letter-spacing: .1em;
}
.demo-bar a { color: var(--accent); text-decoration: underline; }

/* ---------- AVVISI SULLA STIMA E FONTE DEI PREZZI ------------------------ */
.cfg-avviso {
  font-size: .8rem; line-height: 1.5; color: var(--text-2);
  padding: 10px 13px; border-radius: var(--r-m);
  background: #fff8e6; border: 1px solid #f2dfae; margin-top: 12px;
}
.cfg-avviso-forte { color: var(--text); border-color: var(--accent); background: #fff6e0; }
/* Qui il testo deve scorrere come un normale paragrafo: con `display:flex`
   ogni figlio diventava una colonna e il link si incolonnava da solo. */
.cfg-fonte {
  font-size: .76rem; line-height: 1.5; color: var(--text-3); margin-top: 12px;
  padding-left: 20px; position: relative;
}
.cfg-fonte .ico {
  position: absolute; left: 0; top: 2px; color: var(--ok);
}
.cfg-fonte a { color: var(--accent-d); text-decoration: underline; }
@keyframes selIn { from { opacity: 0; transform: translate(-50%, 8px); } }

@media (max-width: 620px) {
  .cfg-figure { font-size: 1.35rem; }
}

/* ==========================================================================
   TELEFONO: la scena grande, i comandi piccoli
   Su uno schermo da 6 pollici lo spazio va alla stanza che si sta progettando.
   Ogni pulsante tolto dalla scena è spazio guadagnato per vedere cosa si fa.
   ========================================================================== */

.tx-corto { display: none; }

@media (max-width: 720px) {
  .tx-lungo { display: none; }
  .tx-corto { display: inline; }
}

@media (max-width: 480px) {
  .cfg-figure { font-size: 1.4rem; }

  .cfg-avviso { font-size: .75rem; padding: 9px 11px; }
  .cfg-fonte { font-size: .7rem; }
}

/* ==========================================================================
   RIQUADRO DEL PROGETTISTA 3D
   L'applicativo vive in /configuratore/ e ha una sua interfaccia completa:
   qui serve solo una cornice che non gli rubi spazio. Sul telefono resta
   volutamente sotto l'altezza dello schermo, così sopra e sotto rimane
   pagina da scorrere: dentro la scena il dito ruota il modello e non
   scorrerebbe più nulla.
   ========================================================================== */
.cfgx-sect { padding-block: 0 clamp(26px, 4vw, 44px); }

.cfgx-bar {
  background: var(--ink); color: #fff;
  padding: 11px 0; margin-bottom: 0;
}
.cfgx-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.cfgx-bar-tx { display: flex; align-items: center; gap: 9px; font-size: .86rem; margin: 0; flex-wrap: wrap; }
.cfgx-bar-tx .ico { color: var(--accent); flex: none; }
.cfgx-bar-tx strong { font-family: var(--f-display); font-weight: 600; }
.cfgx-bar-tx span { color: #97a3b5; }
.cfgx-full {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  font-size: .82rem; font-weight: 600; color: var(--ink);
  background: var(--accent); border-radius: 999px; padding: 8px 16px;
}
.cfgx-full:hover { background: var(--accent-2); }

/* Il progettista non tocca i bordi della finestra: così la barra di
   scorrimento del suo catalogo non finisce attaccata a quella della pagina.
   Gli angoli arrotondati richiedono overflow:hidden, altrimenti il riquadro
   sborda dagli spigoli. */
.cfgx-box {
  margin-inline: clamp(6px, 1.1vw, 20px);
  border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden;
}
.cfgx-bar-in { max-width: none; padding-inline: clamp(14px, 1.5vw, 26px); }

.cfgx-frame {
  display: block; width: 100%; border: 0;
  /* Praticamente tutta l'altezza della finestra: sopra resta solo la
     striscia scura, che è alta una quarantina di pixel. Scorrendo fin qui il
     progettista riempie lo schermo. Il minimo di 670 non va abbassato: sotto
     i 634 l'applicazione non ci sta e tornerebbe la barra di scorrimento. */
  height: min(calc(100dvh - 44px), 1100px); min-height: 670px;
  background: #f3f2ee;
}

.cfgx-note {
  font-size: .82rem; color: var(--text-3); line-height: 1.65;
  max-width: 78ch; margin: 18px auto 0; position: relative; padding-left: 22px;
}
.cfgx-note .ico { position: absolute; left: 0; top: .35em; color: var(--ok); }
.cfgx-note a { color: var(--accent-d); text-decoration: underline; }
.cfgx-note strong { color: var(--text-2); }

@media (max-width: 720px) {
  .cfgx-bar { padding: 9px 0; }
  .cfgx-bar-tx { font-size: .8rem; gap: 7px; }
  .cfgx-bar-tx span { display: none; }
  .cfgx-full { font-size: .78rem; padding: 7px 13px; }
  /* Sotto l'altezza dello schermo di proposito: sopra e sotto deve restare
     pagina da toccare per scorrere, perché dentro la scena il dito ruota. */
  /* 520 non bastava: dentro, l'applicazione ne chiede 523 sui telefoni
     più corti (48+43+72 di barre, più 360 di area minima) e tornava una
     barra di scorrimento nel riquadro. */
  .cfgx-frame { height: calc(100dvh - 190px); min-height: 535px; }
  .cfgx-note { font-size: .78rem; margin-top: 14px; }
}
