/* ============================================================
   EG Bau GmbH — Design System
   Architektonisch · brutalistisch · materiell
   Nessuna libreria esterna. Nessuna richiesta a terzi (DSGVO).
   ============================================================ */

/* ---------- Fonts self-hosted (nessun Google Fonts CDN) ---------- */
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-latin.woff2') format('woff2-variations');
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2192, U+2197, U+2212, U+2713, U+00D7;
}
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-latin-ext.woff2') format('woff2-variations');
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0100-017F, U+0180-024F;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin.woff2') format('woff2-variations');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2192, U+2197, U+2212, U+2713, U+00D7;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2-variations');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-017F, U+0180-024F;
}

/* ---------- Tokens ---------- */
:root {
  --ink:        #0B0E11;
  --ink-2:      #12171C;
  --ink-3:      #1A2128;
  --slate:      #2C363F;
  --bone:       #EDE9E3;
  --bone-dim:   #A8A6A2;
  --cyan:       #3FC1E8;
  --cyan-deep:  #1B8FB4;
  --line:       rgba(237, 233, 227, .14);
  --line-soft:  rgba(237, 233, 227, .07);

  --f-display: 'Archivo', 'Arial Narrow', Impact, sans-serif;
  --f-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --gut: clamp(1.25rem, 4vw, 4rem);
  --maxw: 1560px;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  --nav-h: 84px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; padding: 0; }
ul[role='list'], ol[role='list'] { list-style: none; }
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

body {
  font-family: var(--f-body);
  background: var(--ink);
  color: var(--bone);
  line-height: 1.62;
  font-size: clamp(1rem, .95rem + .25vw, 1.125rem);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-feature-settings: 'kern' 1, 'liga' 1;
}

/* Materia: grana di intonaco su tutto il fondo */
body::before {
  content: '';
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
/* Luce che segue il mouse */
body::after {
  content: '';
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(560px circle at var(--mx, 50%) var(--my, 30%),
              rgba(63, 193, 232, .10), transparent 62%);
  transition: opacity .5s var(--ease);
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); position: relative; z-index: 1; }
.sec { padding-block: clamp(5rem, 11vw, 11rem); position: relative; z-index: 1; }
.sec--tight { padding-block: clamp(3.5rem, 7vw, 7rem); }

.grid { display: grid; gap: clamp(1.5rem, 3vw, 3rem); }
.g-2 { grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); }
.g-3 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }

/* ---------- Tipografia brutalista ---------- */
.display {
  font-family: var(--f-display);
  font-weight: 800;
  font-stretch: 112%;
  line-height: .92;
  letter-spacing: -.028em;
  text-transform: uppercase;
  text-wrap: balance;
}
.d1 { font-size: clamp(2.5rem, 6.1vw, 6.4rem); }
.d2 { font-size: clamp(2.2rem, 5.6vw, 5.2rem); }
.d3 { font-size: clamp(1.6rem, 3vw, 2.9rem); }
.d4 { font-size: clamp(1.25rem, 1.8vw, 1.7rem); font-stretch: 100%; letter-spacing: -.01em; }

.kicker {
  font-family: var(--f-body);
  font-size: .72rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex; align-items: center; gap: .7rem;
}
.kicker::before { content: ''; width: 2.4rem; height: 1px; background: var(--cyan); opacity: .6; }

.lead { font-size: clamp(1.1rem, 1.5vw, 1.4rem); line-height: 1.55; color: #D5D1CB; max-width: 62ch; text-wrap: pretty; }
.muted { color: var(--bone-dim); }
.prose p { max-width: 68ch; margin-block: 1.1em; color: #CFCBC5; }
.prose h2 { margin-top: 2.6em; margin-bottom: .5em; }
.prose h3 { margin-top: 2em; margin-bottom: .4em; font-family: var(--f-display); font-weight: 700; font-size: clamp(1.3rem,2vw,1.75rem); letter-spacing: -.01em; }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; }

/* ---------- Preloader ---------- */
#pre {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--ink);
  display: grid; place-items: center;
  transition: clip-path 1.05s var(--ease);
  clip-path: inset(0 0 0 0);
}
#pre.done { clip-path: inset(0 0 100% 0); pointer-events: none; }
#pre .pmark { width: min(30vw, 190px); }
#pre .pmark path, #pre .pmark polyline, #pre .pmark line {
  stroke: var(--cyan); stroke-width: 3; fill: none;
  stroke-dasharray: 400; stroke-dashoffset: 400;
  animation: draw 1.5s var(--ease) forwards;
}
#pre .pnum {
  position: absolute; bottom: 8vh; right: var(--gut);
  font-family: var(--f-display); font-size: clamp(3rem, 12vw, 9rem);
  font-weight: 800; line-height: 1; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- Cursore custom ---------- */
.cur, .cur-dot { position: fixed; top: 0; left: 0; z-index: 9998; pointer-events: none; border-radius: 50%; }
.cur {
  width: 38px; height: 38px; margin: -19px 0 0 -19px;
  border: 1px solid rgba(237,233,227,.45);
  transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease),
              background-color .3s var(--ease), border-color .3s var(--ease), opacity .3s;
}
.cur-dot { width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; background: var(--cyan); }
body.cur-hot .cur {
  width: 84px; height: 84px; margin: -42px 0 0 -42px;
  background: rgba(63,193,232,.14); border-color: var(--cyan);
}
@media (hover: none), (pointer: coarse) { .cur, .cur-dot { display: none; } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background-color .45s var(--ease), backdrop-filter .45s, border-color .45s;
  border-bottom: 1px solid transparent;
}
.nav.stuck {
  background: rgba(11,14,17,.82);
  backdrop-filter: blur(18px) saturate(1.3);
  border-bottom-color: var(--line-soft);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: flex; align-items: center; gap: .8rem; font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em; font-size: 1.22rem; text-transform: uppercase; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand small { display: block; font-family: var(--f-body); font-size: .6rem; font-weight: 500; letter-spacing: .18em; color: var(--bone-dim); text-transform: uppercase; margin-top: 2px; }

.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2.2rem); }
.nav-links a { font-size: .84rem; font-weight: 500; letter-spacing: .04em; position: relative; padding-block: .4rem; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px;
  background: var(--cyan); transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease);
}
.nav-links a:hover::after, .nav-links a[aria-current]::after { transform: scaleX(1); transform-origin: left; }

.langs { display: flex; gap: .15rem; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: .2rem; }
.langs a { font-size: .68rem; font-weight: 700; letter-spacing: .08em; padding: .3rem .62rem; border-radius: 999px; color: var(--bone-dim); }
.langs a[aria-current] { background: var(--cyan); color: var(--ink); }

.burger { display: none; width: 44px; height: 44px; position: relative; }
.burger span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--bone); transition: transform .4s var(--ease), opacity .3s; }
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { bottom: 17px; }
body.menu-open .burger span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 1000px) {
  .burger { display: block; }
  .brand { font-size: 1.05rem; }
  .brand small { font-size: .55rem; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 0 0;
    background: var(--ink-2);
    flex-direction: column; justify-content: center; gap: 1.2rem;
    transform: translateY(-100%); visibility: hidden; opacity: 0;
    transition: transform .6s var(--ease), opacity .35s var(--ease), visibility 0s linear .6s;
    border-top: 1px solid var(--line-soft);
    overflow-y: auto;
  }
  body.menu-open .nav-links {
    visibility: visible; opacity: 1;
    transition: transform .6s var(--ease), opacity .35s var(--ease), visibility 0s;
  }
  body.menu-open { overflow: hidden; }
  .nav-links a { font-family: var(--f-display); font-size: 1.9rem; text-transform: uppercase; font-weight: 800; }
  body.menu-open .nav-links { transform: translateY(0); }
}

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: flex; align-items: flex-end; padding-top: var(--nav-h); position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg picture { display: block; width: 100%; height: 100%; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,14,17,.58) 0%, rgba(11,14,17,.30) 34%, rgba(11,14,17,.92) 100%);
}
.hero .wrap { padding-bottom: clamp(2.5rem, 5vw, 4.5rem); padding-top: 2rem; }
.hero h1 { max-width: 16ch; }
.hero .lead { max-width: 56ch; }
.hero-meta { display: flex; flex-wrap: wrap; gap: clamp(1.2rem, 3.4vw, 3.4rem); margin-top: 2.2rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.hero-meta div strong { display: block; font-family: var(--f-display); font-size: clamp(1.6rem, 2.6vw, 2.5rem); font-weight: 800; line-height: 1; }
.hero-meta div > span { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--bone-dim); }
.hero-meta div strong span { font: inherit; letter-spacing: inherit; text-transform: none; color: inherit; }

.scroll-hint { position: absolute; bottom: 2rem; right: var(--gut); writing-mode: vertical-rl; font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; color: var(--bone-dim); display: flex; align-items: center; gap: .8rem; }
.scroll-hint::after { content: ''; width: 1px; height: 54px; background: linear-gradient(var(--cyan), transparent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .75rem;
  padding: 1.05rem 2rem;
  font-size: .82rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid var(--bone); border-radius: 999px;
  position: relative; overflow: hidden; isolation: isolate;
  transition: color .4s var(--ease), border-color .4s var(--ease);
  will-change: transform;
}
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--bone);
  transform: translateY(101%); transition: transform .55s var(--ease);
}
.btn:hover { color: var(--ink); }
.btn:hover::before { transform: translateY(0); }
.btn--cyan { border-color: var(--cyan); color: var(--cyan); }
.btn--cyan::before { background: var(--cyan); }
.btn--solid { background: var(--cyan); border-color: var(--cyan); color: var(--ink); }
.btn--solid::before { background: var(--bone); }
.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }

/* ---------- Marquee ---------- */
.marq { overflow: hidden; border-block: 1px solid var(--line); padding-block: 1.4rem; background: var(--ink-2); position: relative; z-index: 1; }
.marq-in { display: flex; gap: 3.5rem; width: max-content; animation: slide 42s linear infinite; }
.marq span { font-family: var(--f-display); font-size: clamp(1.2rem, 2.4vw, 2.1rem); font-weight: 700; text-transform: uppercase; letter-spacing: -.01em; color: var(--bone-dim); display: flex; align-items: center; gap: 3.5rem; white-space: nowrap; }
.marq span::after { content: ''; width: 9px; height: 9px; background: var(--cyan); transform: rotate(45deg); flex: none; }
@keyframes slide { to { transform: translateX(-50%); } }
.marq:hover .marq-in { animation-play-state: paused; }

/* ---------- Cards servizi ---------- */
.svc { display: grid; border-top: 1px solid var(--line); }
.svc-item > span { min-width: 0; }
.svc-item {
  display: grid; grid-template-columns: 5rem 1fr auto; align-items: center; gap: clamp(1rem, 3vw, 3rem);
  padding-block: clamp(1.6rem, 3vw, 2.6rem);
  border-bottom: 1px solid var(--line);
  position: relative; isolation: isolate;
  transition: padding-inline .5s var(--ease), color .4s;
}
.svc-item::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(63,193,232,.12), transparent);
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease);
}
.svc-item:hover::before { transform: scaleX(1); }
.svc-item:hover { padding-inline: clamp(.5rem, 2vw, 2rem); }
.svc-num { font-family: var(--f-display); font-size: .95rem; font-weight: 700; color: var(--cyan); letter-spacing: .06em; }
.svc-name { display: block; font-family: var(--f-display); font-size: clamp(1.5rem, 3.6vw, 3.1rem); font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; line-height: 1.02; }
.svc-desc { display: block; font-size: .92rem; color: var(--bone-dim); margin-top: .5rem; max-width: 54ch; }
.svc-go { width: 3.4rem; height: 3.4rem; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; flex: none; transition: background .4s var(--ease), border-color .4s, transform .5s var(--ease); }
.svc-item:hover .svc-go { background: var(--cyan); border-color: var(--cyan); color: var(--ink); transform: rotate(45deg); }
@media (max-width: 720px) {
  .svc-item { grid-template-columns: 1fr auto; }
  .svc-num { grid-column: 1 / -1; }
}

/* ---------- Card generica ---------- */
.card {
  border: 1px solid var(--line); background: var(--ink-2);
  padding: clamp(1.6rem, 2.6vw, 2.6rem);
  position: relative; overflow: hidden;
  transition: border-color .45s var(--ease), transform .6s var(--ease);
}
.card:hover { border-color: rgba(63,193,232,.5); transform: translateY(-6px); }
.card h3 { font-family: var(--f-display); font-size: 1.35rem; font-weight: 700; text-transform: uppercase; letter-spacing: -.01em; margin-bottom: .7rem; }
.card p { color: var(--bone-dim); font-size: .95rem; }

/* ---------- Lista check ---------- */
.checks { display: grid; gap: .95rem; margin-top: 2rem; }
.checks li { display: grid; grid-template-columns: 1.5rem 1fr; gap: .9rem; align-items: start; color: #D5D1CB; }
.checks li::before {
  content: ''; width: 1.5rem; height: 1.5rem; margin-top: .18rem; flex: none;
  background: var(--cyan); clip-path: polygon(14% 46%, 0 60%, 40% 100%, 100% 22%, 86% 8%, 39% 71%);
}

/* ---------- Immagini reveal ---------- */
.shot { position: relative; overflow: hidden; background: var(--ink-3); }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.shot:hover img { transform: scale(1.045); }
.shot figcaption { position: absolute; left: 0; bottom: 0; right: 0; padding: 1.6rem; background: linear-gradient(transparent, rgba(11,14,17,.9)); font-size: .85rem; letter-spacing: .04em; }

/* ---------- Split / stat ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.stat { background: var(--ink); padding: clamp(1.6rem, 3vw, 2.6rem); }
.stat b { display: block; font-family: var(--f-display); font-size: clamp(2.2rem, 4.6vw, 4rem); font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.stat > span { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--bone-dim); }
.stat b span { font: inherit; letter-spacing: inherit; text-transform: none; color: inherit; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding-block: 1.5rem;
  display: flex; justify-content: space-between; align-items: center; gap: 2rem;
  font-family: var(--f-display); font-size: clamp(1.05rem, 1.9vw, 1.5rem); font-weight: 700; letter-spacing: -.01em;
  transition: color .3s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--cyan); }
.faq summary::after { content: '+'; font-size: 1.7rem; line-height: 1; color: var(--cyan); transition: transform .45s var(--ease); flex: none; }
.faq details[open] summary::after { transform: rotate(135deg); }
.faq details p { padding-bottom: 1.6rem; color: var(--bone-dim); max-width: 74ch; }

/* ---------- Aree / città ---------- */
.areas { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 2rem; }
.areas a {
  border: 1px solid var(--line); border-radius: 999px;
  padding: .5rem 1.05rem; font-size: .82rem; color: var(--bone-dim);
  transition: border-color .35s, color .35s, background-color .35s;
}
.areas a:hover { border-color: var(--cyan); color: var(--ink); background: var(--cyan); }

/* ---------- Form ---------- */
.form { display: grid; gap: 1.35rem; }
.field { display: grid; gap: .5rem; }
.field label { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--bone-dim); }
.field input, .field textarea, .field select {
  background: var(--ink-2); border: 1px solid var(--line); color: var(--bone);
  padding: .95rem 1.1rem; border-radius: 2px; width: 100%;
  transition: border-color .35s, background-color .35s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--cyan); background: var(--ink-3); }
.field textarea { min-height: 165px; resize: vertical; }
.hp { position: absolute !important; left: -9999px !important; }
.consent { display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: start; font-size: .86rem; color: var(--bone-dim); }
.consent input { width: 1.15rem; height: 1.15rem; margin-top: .28rem; accent-color: var(--cyan); }
.form-note { font-size: .8rem; color: var(--bone-dim); }
.alert { padding: 1rem 1.2rem; border-left: 3px solid var(--cyan); background: var(--ink-2); font-size: .92rem; }
.alert--err { border-left-color: #E8734F; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--ink-2); position: relative; z-index: 1; }
.foot-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: clamp(2rem, 4vw, 4rem); padding-block: clamp(3.5rem, 6vw, 6rem); }
.foot h4 { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--cyan); margin-bottom: 1.2rem; }
.foot ul { display: grid; gap: .6rem; list-style: none; }
.foot a { font-size: .92rem; color: var(--bone-dim); transition: color .3s; }
.foot a:hover { color: var(--bone); }
.foot-bot { border-top: 1px solid var(--line-soft); padding-block: 1.6rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .8rem; color: var(--bone-dim); }
.foot-mega { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: clamp(3rem, 15vw, 15rem); line-height: .8; letter-spacing: -.045em; color: var(--ink-3); padding-block: 1rem 2rem; user-select: none; overflow: hidden; }

/* ---------- Breadcrumb ---------- */
.crumb { font-size: .78rem; color: var(--bone-dim); padding-top: calc(var(--nav-h) + 2.5rem); display: flex; gap: .55rem; flex-wrap: wrap; }
.crumb a:hover { color: var(--cyan); }

/* ---------- Cookie banner ---------- */
#ck {
  position: fixed; left: var(--gut); right: var(--gut); bottom: 1.25rem; z-index: 9500;
  max-width: 640px; background: var(--ink-2); border: 1px solid var(--line);
  padding: 1.6rem; display: none; box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
#ck.show { display: block; animation: ckin .6s var(--ease); }
@keyframes ckin { from { transform: translateY(24px); opacity: 0; } }
#ck h3 { font-family: var(--f-display); text-transform: uppercase; font-size: 1.1rem; margin-bottom: .6rem; }
#ck p { font-size: .86rem; color: var(--bone-dim); margin-bottom: 1.1rem; }
#ck .ck-btns { display: flex; flex-wrap: wrap; gap: .6rem; }
#ck button { font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; padding: .8rem 1.3rem; border: 1px solid var(--line); transition: .3s; }
#ck button:hover { border-color: var(--cyan); }
#ck .ck-ok { background: var(--cyan); color: var(--ink); border-color: var(--cyan); }
#ck a { color: var(--cyan); text-decoration: underline; }

/* ---------- Scroll reveal ---------- */
.rv { transition: opacity .9s var(--ease), transform .9s var(--ease); }
html.js .rv { opacity: 0; transform: translateY(34px); }
html.js .rv.in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: .08s; } .rv-d2 { transition-delay: .16s; }
.rv-d3 { transition-delay: .24s; } .rv-d4 { transition-delay: .32s; }

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

/* ---------- Accessibilità ---------- */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gut); top: 1rem; z-index: 9999; background: var(--cyan); color: var(--ink); padding: .8rem 1.2rem; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .rv { opacity: 1; transform: none; }
  .line-mask > span { transform: none; }
  .cur, .cur-dot { display: none; }
  body::after { display: none; }
}

@media print {
  .nav, #ck, .cur, .cur-dot, #pre, .marq { display: none !important; }
  body { background: #fff; color: #000; }
}

@media (max-width: 430px) {
  .brand small { display: none; }
  .langs a { padding: .28rem .5rem; font-size: .64rem; }
  .nav .wrap { gap: .6rem; }
}

/* ---------- Immagini: rapporto fisso, niente salti di layout ---------- */
picture { display: block; }
.shot { position: relative; overflow: hidden; background: var(--ink-3); border: 1px solid var(--line); }
.shot picture, .shot img { width: 100%; height: 100%; object-fit: cover; }
.shot { aspect-ratio: var(--ar, 4 / 3); }
.shot img { transition: transform 1.5s var(--ease), filter 1.5s var(--ease); filter: saturate(.85) contrast(1.04); }
.shot:hover img { transform: scale(1.05); filter: saturate(1) contrast(1.08); }
.shot figcaption {
  position: absolute; inset: auto 0 0 0; padding: 1.4rem 1.5rem;
  background: linear-gradient(transparent, rgba(11,14,17,.92));
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--bone);
}

.gal { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px,100%), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.gal .shot { border: 0; }

/* Banda immagine a tutta larghezza */
.band { position: relative; margin: 0; overflow: hidden; }
.band img, .band picture { width: 100%; display: block; }
.band-img img { max-height: 78vh; object-fit: cover; filter: saturate(.86) contrast(1.05); }
.band::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(11,14,17,.55), rgba(11,14,17,0) 32%, rgba(11,14,17,.6)); }
.band figcaption {
  position: absolute; left: var(--gut); bottom: 1.6rem; z-index: 2;
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--bone-dim);
}

/* ---------- Palcoscenico 3D ---------- */
.sec--3d { position: relative; }
.stage {
  position: relative; aspect-ratio: 1 / 1; max-height: 68vh;
  border: 1px solid var(--line); background:
    radial-gradient(120% 90% at 30% 18%, rgba(63,193,232,.13), transparent 62%), var(--ink-2);
  overflow: hidden;
}
.stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.stage-fallback { position: absolute; inset: 0; transition: opacity .9s var(--ease); }
.stage-fallback img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.35) contrast(1.1) brightness(.72); }
.stage.is-live .stage-fallback { opacity: 0; }
.stage::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 120px 30px rgba(11,14,17,.75);
}

/* ---------- Mappa a due clic ---------- */
.mapbox { margin-top: 2rem; aspect-ratio: 16 / 8; border: 1px solid var(--line); position: relative; overflow: hidden; background: var(--ink-2); }
.map-ph { position: absolute; inset: 0; }
.map-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.map-in {
  position: absolute; inset: auto auto 0 0; margin: clamp(1rem, 3vw, 2.4rem);
  background: rgba(11,14,17,.9); border: 1px solid var(--line);
  padding: clamp(1.2rem, 2.4vw, 2rem); max-width: min(440px, 88%);
  backdrop-filter: blur(8px);
}
.map-adr { font-size: .96rem; line-height: 1.7; }
.map-note { font-size: .8rem; color: var(--bone-dim); margin-top: .8rem; }
.mapbox.is-loaded { aspect-ratio: 16 / 9; }

/* ---------- Chip quartieri ---------- */
.chip {
  display: inline-block; border: 1px solid var(--line); border-radius: 999px;
  padding: .45rem 1rem; font-size: .8rem; color: var(--bone-dim);
}

@media (max-width: 720px) {
  .stage { aspect-ratio: 4 / 3; }
  .mapbox { aspect-ratio: 3 / 4; }
  .map-in { max-width: 100%; inset: auto 0 0 0; margin: .8rem; }
}

/* ---------- Credit dello studio ---------- */
.credit {
  display: inline-flex; align-items: center; gap: .65rem;
  font-size: .72rem; line-height: 1.35; color: var(--bone-dim);
  opacity: .62; transition: opacity .35s var(--ease), color .35s var(--ease);
}
.credit img { width: 28px; height: 28px; flex: none; filter: grayscale(1) contrast(.9); transition: filter .4s var(--ease); }
.credit strong { color: var(--bone); font-weight: 600; letter-spacing: .02em; }
.credit:hover { opacity: 1; }
.credit:hover img { filter: none; }
@media (max-width: 700px) { .foot-bot { gap: 1.2rem; } .credit { width: 100%; } }

/* ---------- WhatsApp flottante ---------- */
.wa {
  position: fixed; right: clamp(1rem, 2.5vw, 2rem); bottom: clamp(1rem, 2.5vw, 2rem);
  z-index: 940; display: inline-flex; align-items: center; gap: .6rem;
  padding: .85rem 1.15rem; border-radius: 999px;
  background: #1FA855; color: #fff; font-size: .82rem; font-weight: 600;
  letter-spacing: .04em; box-shadow: 0 14px 34px rgba(0,0,0,.45);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), background-color .3s;
}
.wa svg { width: 20px; height: 20px; flex: none; }
.wa:hover { transform: translateY(-3px); background: #199447; box-shadow: 0 18px 44px rgba(0,0,0,.55); }
@media (max-width: 640px) {
  .wa span { display: none; }
  .wa { padding: .95rem; }
}
@media print { .wa { display: none; } }

/* ---------- Flächenrechner ---------- */
.calc { display: grid; gap: 1.1rem; }
.calc .field input { font-variant-numeric: tabular-nums; }
.calc-out { display: grid; gap: .1rem; margin-top: .6rem; border-top: 1px solid var(--line); padding-top: 1.1rem; }
.calc-out > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-block: .45rem; }
.calc-out dt { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--bone-dim); }
.calc-out dd { margin: 0; font-variant-numeric: tabular-nums; font-size: 1.02rem; }
.calc-out .is-total { border-top: 1px solid var(--line); margin-top: .5rem; padding-top: .9rem; }
.calc-out .is-total dt { color: var(--cyan); }
.calc-out .is-total dd {
  font-family: var(--f-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1; color: var(--bone);
}
.calc [data-calc-cta] { opacity: .38; pointer-events: none; transition: opacity .4s var(--ease); }
.calc.has-result [data-calc-cta] { opacity: 1; pointer-events: auto; }
