/* Font ospitati localmente (copiati da ../2AD/fonts): solo latin e latin-ext.
   Dichiarati qui e non in fonts/fonts.css per evitare un secondo CSS
   bloccante nel rendering (fonts.css resta come copia di riferimento).
   Space Grotesk e JetBrains Mono sono file variabili: un solo woff2 per subset
   copre tutti i pesi usati, quindi si dichiara un intervallo di peso. */

/* JetBrains Mono — latin-ext */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/f1.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* JetBrains Mono — latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url(fonts/f2.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Space Grotesk — latin-ext */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(fonts/f7.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Space Grotesk — latin */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(fonts/f8.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================
   NASIP METAJ — sito vetrina
   Struttura e pattern ripresi da 2AD (../2AD/styles.css), palette "blu oceano".
   CSS mobile-first: breakpoint min-width 640 / 960 / 1200.
   I contrasti della palette sono misurati (WCAG 2.1 AA): se cambi un esadecimale
   ricalcola i contrasti (vedi MEMORIA-SITO.md).
   ============================================ */

:root {
    --bg: #061826;
    --bg-alt: #0A2235;
    --surface: #0F2E45;
    --surface-2: #12344D;
    --border: #1B3F5C;          /* solo decorativo, mai bordo di un componente */
    --border-ui: #4F84AA;       /* bordi di componenti interattivi (>= 3:1) */
    --text: #E6F1F8;
    --text-muted: #8FB0C6;
    --accent: #2EC4D6;
    --accent-hover: #5FD6E4;
    --accent-dim: rgba(46, 196, 214, 0.14);
    --on-accent: #04131F;
    --wa: #34D399;
    --on-wa: #04131F;
    --warn: #F2B84B;
    --focus: #7FE3F0;
    --nav-bg: rgba(6, 24, 38, 0.85);
    --nav-bg-scrolled: rgba(6, 24, 38, 0.95);
    --card-shadow: rgba(0, 0, 0, 0.5);

    --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

    --maxw: 1140px;
    --pad-x: clamp(1.25rem, 4vw, 2.5rem);
    --gap: clamp(1rem, 2.5vw, 2rem);
    --section-y: clamp(4rem, 9vw, 7.5rem);
    --radius: 4px;
    --nav-h: 64px;
    --cta-bar-h: 72px;
}

html.light {
    --bg: #F7FBFD;
    --bg-alt: #EDF5FA;
    --surface: #E4EFF6;
    --surface-2: #DCEBF4;
    --border: #D3E4EE;
    --border-ui: #5A7D94;
    --text: #0B2233;
    --text-muted: #46657A;
    --accent: #0A6AA1;
    --accent-hover: #08557F;
    --accent-dim: rgba(10, 106, 161, 0.10);
    --on-accent: #FFFFFF;
    --wa: #0B7A55;
    --on-wa: #FFFFFF;
    --warn: #8A5208;
    --focus: #0A6AA1;
    --nav-bg: rgba(247, 251, 253, 0.85);
    --nav-bg-scrolled: rgba(247, 251, 253, 0.95);
    --card-shadow: rgba(11, 34, 51, 0.12);
}

/* Cambio tema: fallback senza View Transitions (come 2AD) */
html.theme-anim,
html.theme-anim *,
html.theme-anim *::before,
html.theme-anim *::after {
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, fill 0.35s ease !important;
}

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 0.45s;
    animation-timing-function: ease-in-out;
}
::view-transition-old(root) { animation-name: none; }
::view-transition-new(root) { animation-name: theme-reveal; }
@keyframes theme-reveal {
    from { clip-path: circle(0px at var(--vt-x, 50vw) var(--vt-y, 50vh)); }
    to   { clip-path: circle(150vmax at var(--vt-x, 50vw) var(--vt-y, 50vh)); }
}

/* ============================================
   BASE
   ============================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.65;
    background-color: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    padding-bottom: var(--cta-bar-h);
}

a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--accent-hover); }

abbr[title] { text-decoration: underline dotted; text-underline-offset: 0.2em; cursor: help; }

:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
    border-radius: 2px;
}

main:focus { outline: none; }

section[id], [id="main"] { scroll-margin-top: 80px; }

.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.skip-link {
    position: fixed;
    top: 0.75rem; left: 0.75rem;
    z-index: 300;
    padding: 0.75rem 1.25rem;
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius);
    transform: translateY(-200%);
}
.skip-link:focus { transform: none; color: var(--on-accent); }

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--pad-x);
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}

::selection { background: var(--accent); color: var(--on-accent); }

/* ============================================
   NAVIGATION
   ============================================ */

.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--nav-h);
    background: var(--nav-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.nav--scrolled { background: var(--nav-bg-scrolled); }

.nav__inner {
    max-width: var(--maxw);
    height: 100%;
    margin: 0 auto;
    padding: 0 var(--pad-x);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav__logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 44px;
    color: var(--text);
    text-decoration: none;
}
.nav__logo:hover { color: var(--text); }

.nav__mono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: -0.04em;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    border-radius: var(--radius);
}
.nav__mono span, .contact__mono span { color: var(--text); }

.nav__logo-text {
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.nav__menu { display: none; }

.nav__list { display: flex; list-style: none; gap: 1.75rem; }

.nav__link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    position: relative;
    justify-content: center;
    min-width: 44px;
    transition: color 0.2s ease;
}
.nav__link:hover, .nav__link[aria-current="true"] { color: var(--text); }
.nav__link::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 8px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}
.nav__link:hover::after, .nav__link[aria-current="true"]::after { transform: scaleX(1); }

.nav__actions { display: flex; align-items: center; gap: 0.5rem; }
.nav__actions .nav__cta { display: none; } /* specificita' > .btn */

/* Theme switch: target 44x44, binario 16x32 disegnato dentro (come 2AD) */
.theme-switch {
    position: relative;
    width: 44px; height: 44px;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.theme-switch::before {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: 16px; height: 32px;
    transform: translate(-50%, -50%);
    border: 1px solid var(--border-ui);
    border-radius: 999px;
    transition: border-color 0.2s ease;
}
.theme-switch:hover::before { border-color: var(--accent); }
.theme-switch__knob {
    position: absolute;
    left: 50%; top: 50%;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    transform: translate(-50%, 5px);
    transition: transform 0.25s ease, background-color 0.25s ease;
}
.theme-switch[aria-checked="true"] .theme-switch__knob {
    transform: translate(-50%, -13px);
    background: var(--accent);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 48px;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.btn--sm { min-height: 44px; padding: 0.5rem 1.1rem; font-size: 0.9375rem; }

.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); color: var(--on-accent); transform: translateY(-2px); }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-ui); }
.btn--ghost:hover { color: var(--text); border-color: var(--accent); background: var(--accent-dim); }

.btn--wa { background: var(--wa); color: var(--on-wa); }

.btn__arrow { display: inline-block; transition: transform 0.2s ease; }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ============================================
   HERO
   ============================================ */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(var(--nav-h) + 2.5rem) var(--pad-x) 3.5rem;
    overflow: hidden;
    isolation: isolate;
}

/* Griglia di fondo come 2AD */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.35;
    -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 40%, transparent 100%);
    pointer-events: none;
}

.hero__content {
    max-width: var(--maxw);
    width: 100%;
    margin: 0 auto;
}

.hero__eyebrow { margin-bottom: 1.5rem; }

.hero__title {
    font-size: clamp(2.25rem, 1.6rem + 3.2vw, 4rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.75rem;
}
.hero__name, .hero__role, .hero__nick { display: block; }
/* Soprannome sotto il nome (come .hero__nick di 2AD): piccolo, mono, caldo */
.hero__nick {
    margin-top: 0.55rem;
    font-family: var(--font-mono);
    font-size: clamp(0.8125rem, 0.75rem + 0.3vw, 0.9375rem);
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.hero__nick strong { color: var(--accent); font-weight: 700; letter-spacing: 0.2em; }
.hero__name-accent { color: var(--accent); }
.hero__role {
    margin-top: 0.6rem;
    font-size: clamp(1.25rem, 1rem + 1.2vw, 1.875rem);
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text);
}

.hero__divider {
    width: 60px; height: 2px;
    background: var(--accent);
    margin-bottom: 1.75rem;
}

.hero__statement {
    font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.625rem);
    font-weight: 600;
    line-height: 1.35;
    max-width: 30ch;
    margin-bottom: 1rem;
}

.hero__subtitle {
    color: var(--text-muted);
    max-width: 58ch;
    margin-bottom: 2rem;
}

.hero__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.hero__qualifica {
    font-size: 0.875rem;
    color: var(--text);
    max-width: 68ch;
    padding-left: 0.875rem;
    border-left: 2px solid var(--accent);
    margin-bottom: 0.75rem;
}
.hero__note {
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 68ch;
}

/* Brand reveal dell'h1 (versione sobria del segno di 2AD) */
@media (prefers-reduced-motion: no-preference) {
    .hero__name, .hero__nick, .hero__role, .hero__divider {
        animation: rise-in 0.6s cubic-bezier(.22, .8, .2, 1) both;
    }
    .hero__nick { animation-delay: 0.06s; }
    .hero__role { animation-delay: 0.12s; }
    .hero__divider { animation-name: grow-x; animation-delay: 0.24s; transform-origin: left; }
}
@keyframes rise-in {
    from { opacity: 0; transform: translateY(0.25em); }
    to   { opacity: 1; transform: none; }
}
@keyframes grow-x {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

/* Visual "oceano": dot-matrix di 2AD + onde */
.hero__visual {
    position: absolute;
    z-index: -1;
    right: -6rem;
    bottom: -2rem;
    width: 360px; height: 360px;
    opacity: 0.35;
    pointer-events: none;
    -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 100%);
    mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 100%);
}
.dot-matrix {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, var(--accent) 1.2px, transparent 1.6px);
    background-size: 24px 24px;
    -webkit-mask-image: radial-gradient(circle at 60% 40%, #000 0%, transparent 70%);
    mask-image: radial-gradient(circle at 60% 40%, #000 0%, transparent 70%);
    opacity: 0.8;
}
.hero__waves { position: absolute; inset: 0; width: 100%; height: 100%; }
.wave { fill: var(--accent); }
.wave--1 { opacity: 0.10; }
.wave--2 { opacity: 0.16; }
.wave--3 { opacity: 0.24; }
@media (prefers-reduced-motion: no-preference) {
    .wave--1 { animation: bob 9s ease-in-out infinite; }
    .wave--2 { animation: bob 7s ease-in-out -2s infinite; }
    .wave--3 { animation: bob 5.5s ease-in-out -1s infinite; }
}
@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ============================================
   SECTIONS
   ============================================ */

.section { padding: var(--section-y) 0; background: var(--bg); }
.section--alt {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}
.section-header__index {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 0.08em;
}
.section-header__title {
    font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.section-lead {
    max-width: 68ch;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}
.section-note {
    max-width: 68ch;
    margin-top: 2rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ---------- Servizi: griglia card di 2AD (gap 2px, barra accent in hover) */
.cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    background: var(--border);
    border: 1px solid var(--border);
}
.card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    background: var(--bg);
    transition: background-color 0.2s ease;
}
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 0;
    background: var(--accent);
    transition: height 0.3s ease;
}
.card:hover { background: var(--bg-alt); }
.card:hover::before { height: 100%; }
.card__index {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--accent);
    margin-bottom: 1rem;
}
.card__title {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}
.card__desc {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; }
.tag {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    padding: 0.3rem 0.7rem;
    background: var(--surface);
    color: var(--text-muted);
    border-radius: var(--radius);
    letter-spacing: 0.02em;
}

/* ---------- Come funziona */
.steps {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap);
    counter-reset: none;
}
.step {
    position: relative;
    padding: 1.75rem 1.5rem;
    background: var(--surface);
    border-radius: var(--radius);
    border-top: 3px solid var(--accent);
}
.step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--on-accent);
    background: var(--accent);
    border-radius: 50%;
}
.step__title { font-size: 1.25rem; font-weight: 500; margin-bottom: 0.5rem; }
.step p { color: var(--text-muted); font-size: 1rem; }

/* ---------- Perché me */
.why { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.why__lead {
    font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
    line-height: 1.7;
    max-width: 60ch;
    margin-bottom: 2rem;
}
.stat {
    display: inline-flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1.5rem 1.75rem;
    background: var(--surface);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
}
.stat__number {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 500;
    line-height: 1;
    color: var(--accent);
}
.stat__label {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.points { list-style: none; display: grid; gap: 2px; background: var(--border); border: 1px solid var(--border); }
.point { padding: 1.5rem; background: var(--bg); }
.point__title { font-size: 1.25rem; font-weight: 500; margin-bottom: 0.4rem; }
.point p { color: var(--text-muted); font-size: 1rem; }

/* ---------- Pratiche: rapporti con le parti + caso reale anonimo */
.pratiche { display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: start; }
.case {
    padding: clamp(1.5rem, 3vw, 2.25rem);
    background: var(--surface);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
}
.case .eyebrow { margin-bottom: 0.75rem; }
.case__title { font-size: 1.25rem; font-weight: 500; line-height: 1.3; margin-bottom: 1rem; }
.case p { font-size: 1rem; }
.case p + p { margin-top: 0.875rem; }
.case .case__def {
    padding: 0.875rem 1rem;
    background: var(--bg);
    border-radius: var(--radius);
    color: var(--text-muted);
    font-size: 0.9375rem;
}
.case__def dfn { font-style: normal; font-weight: 600; color: var(--text); }
.case .case__note { font-size: 0.875rem; color: var(--text-muted); }
.pratiche__cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    margin-top: 2.5rem;
}
.pratiche__cta p { max-width: 60ch; font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); }

/* ---------- FAQ */
.faq { max-width: 860px; border-top: 1px solid var(--border-ui); }
.faq__item { border-bottom: 1px solid var(--border-ui); }
.faq__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 56px;
    padding: 1rem 0;
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
    content: '+';
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--accent);
    border: 1px solid var(--border-ui);
    border-radius: 50%;
    transition: transform 0.2s ease;
}
.faq__item[open] summary::after { content: '−'; }
.faq__item summary:hover { color: var(--accent); }
.faq__item p { max-width: 68ch; padding: 0 0 1.5rem; color: var(--text-muted); }

/* ---------- Contatti */
.contact { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.contact__mono {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 2.25rem;
    font-weight: 500;
    letter-spacing: -0.06em;
    color: var(--accent);
    line-height: 1;
    margin-bottom: 1rem;
}
.contact__name { font-size: 1.25rem; font-weight: 600; }
.contact__role { color: var(--text-muted); font-size: 1rem; margin-bottom: 1.5rem; }

.map-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    max-width: 420px;
}
.map-card__svg { display: block; width: 100%; height: auto; border-radius: 2px; }
.map-card__bg { fill: var(--surface-2); }
.map-card__road { stroke: var(--border-ui); stroke-width: 8; stroke-linecap: round; opacity: 0.45; fill: none; }
.map-card__road--thin { stroke-width: 4; opacity: 0.3; }
.map-card__pin { fill: var(--accent); }
.map-card__pin-dot { fill: var(--surface-2); }
.map-card__pulse { fill: none; stroke: var(--accent); stroke-width: 2; opacity: 0.5; transform-origin: 170px 110px; }
@media (prefers-reduced-motion: no-preference) {
    .map-card__pulse { animation: pin-pulse 2.4s ease-out infinite; }
}
@keyframes pin-pulse {
    0% { transform: scale(0.6); opacity: 0.6; }
    100% { transform: scale(2.2); opacity: 0; }
}
.map-card__address { font-style: normal; font-weight: 600; }

.channels { list-style: none; display: grid; gap: 2px; background: var(--border); border: 1px solid var(--border); align-self: start; }
.channel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    min-height: 64px;
    padding: 1.25rem 1.5rem;
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
    transition: background-color 0.2s ease;
    position: relative;
}
.channel::before {
    content: '';
    position: absolute; top: 0; left: 0;
    width: 3px; height: 0;
    background: var(--accent);
    transition: height 0.3s ease;
}
.channel:hover { background: var(--bg-alt); color: var(--text); }
.channel:hover::before { height: 100%; }
.channel__label {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.channel__value { font-size: 1.0625rem; font-weight: 500; overflow-wrap: anywhere; }
.channel__hint { font-size: 0.875rem; color: var(--text-muted); }

.contact__foot { margin-top: 2rem; color: var(--text-muted); }

/* ---------- Avvertenza credito */
.credit-notice-wrap { padding: 0 0 var(--section-y); background: var(--bg); }
.credit-notice {
    padding: 1.5rem clamp(1.25rem, 3vw, 2rem);
    background: var(--surface);
    border-left: 4px solid var(--warn);
    border-radius: var(--radius);
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--text);
}
.credit-notice p + p { margin-top: 0.75rem; }
.credit-notice__title { font-size: 1rem; }

/* ============================================
   FOOTER
   ============================================ */

.footer {
    padding: 3.5rem 0 2rem;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--text-muted);
}
.footer__grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-bottom: 2.5rem; }
.footer__title {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 0.75rem;
}
.footer__col p + p { margin-top: 0.75rem; }
.footer a { color: var(--accent); }
.footer__ext {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 600;
}
.footer__bottom {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.footer__copy { font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.7; }
.footer .credit-link { font-weight: 600; color: var(--text); border-bottom: 1px solid var(--border); text-decoration: none; }
.footer .credit-link:hover, .footer .credit-link:focus-visible { color: var(--accent); border-bottom-color: var(--accent); }
.footer__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer__link {
    min-height: 44px;
    background: none;
    border: 0;
    padding: 0;
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    cursor: pointer;
}
.footer__link:hover { color: var(--text); }

/* ============================================
   DIALOG LEGALI (da 2AD)
   ============================================ */

.legal-modal {
    width: min(680px, calc(100% - 2rem));
    max-height: 85vh;
    margin: auto;
    padding: 0;
    border: 1px solid var(--border-ui);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    box-shadow: 0 30px 90px var(--card-shadow);
}
.legal-modal::backdrop { background: rgba(2, 10, 18, 0.7); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.legal-modal__inner { position: relative; padding: clamp(1.5rem, 4vw, 3rem); padding-top: 4rem; }
.legal-modal__close {
    position: absolute;
    top: 1rem; right: 1rem;
    min-width: 44px; min-height: 44px;
    padding: 0 1rem;
    border: 1px solid var(--border-ui);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
}
.legal-modal__close:hover { border-color: var(--accent); }
.legal-modal h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem); margin: 0.5rem 0 1.25rem; }
.legal-modal p { color: var(--text-muted); font-size: 0.9375rem; line-height: 1.7; margin-bottom: 1rem; }
.legal-modal strong { color: var(--text); }

/* ============================================
   BARRA CTA MOBILE
   ============================================ */

.cta-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 90;
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem var(--pad-x) calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: var(--nav-bg-scrolled);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
}
.cta-bar__btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 999px;
    color: var(--text);
    border: 1px solid var(--border-ui);
}
.cta-bar__btn:hover { color: var(--text); }
.cta-bar__btn--primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.cta-bar__btn--primary:hover { color: var(--on-accent); background: var(--accent-hover); }

/* ============================================
   REVEAL (attivo solo con html.js, impostato da script.js)
   ============================================ */

@media (prefers-reduced-motion: no-preference) {
    html.js [data-reveal] {
        opacity: 0;
        transform: translateY(16px);
        transition: opacity 0.6s ease, transform 0.6s cubic-bezier(.22, .8, .2, 1);
    }
    html.js [data-reveal].in { opacity: 1; transform: none; }
}

/* ============================================
   SCROLLBAR
   ============================================ */

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-ui); border-radius: 4px; }

/* ============================================
   BREAKPOINT (mobile-first)
   ============================================ */

@media (min-width: 640px) {
    .hero__actions { flex-direction: row; flex-wrap: wrap; }
    .cards { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .footer__bottom { flex-direction: row; align-items: center; justify-content: space-between; }
    .nav__actions .nav__cta { display: inline-flex; }
}

@media (min-width: 960px) {
    body { padding-bottom: 0; }
    .cta-bar { display: none !important; }
    .nav__menu { display: block; }
    .nav__logo-text { font-size: 1.1rem; }
    .hero__visual { right: 2rem; top: 50%; bottom: auto; width: 420px; height: 420px; transform: translateY(-50%); opacity: 0.55; }
    .hero__content > * { max-width: 640px; }
    .why { grid-template-columns: 1.1fr 1fr; gap: 4rem; align-items: start; }
    .pratiche { grid-template-columns: 1fr 1.1fr; gap: 4rem; }
    .pratiche__cta { flex-direction: row; align-items: center; justify-content: space-between; gap: 2rem; }
    .contact { grid-template-columns: 1fr 1.1fr; gap: 4rem; }
    .footer__grid { grid-template-columns: minmax(0, 46rem); gap: 3rem; }
}

@media (min-width: 1200px) {
    .cards { grid-template-columns: repeat(3, 1fr); }
    .steps { grid-template-columns: repeat(4, 1fr); }
    .hero__visual { right: calc((100vw - var(--maxw)) / 2); }
}

/* Nav desktop stretta: tra 960 e 1100 riduco gli spazi */
@media (min-width: 960px) and (max-width: 1099px) {
    .nav__list { gap: 1.1rem; }
    .nav__logo-text { display: none; }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .btn--primary:hover { transform: none; }
    ::view-transition-old(root),
    ::view-transition-new(root) { animation: none; }
}
