/* =========================================================
   NETLAND - foglio di stile
   Ispirazione: pannelli scuri arrotondati con angoli intagliati,
   titoli grandi in Sora, sfumatura rosso -> blu.
   ========================================================= */

@font-face {
  font-family: "Sora";
  src: url("../fonts/sora.woff2") format("woff2");
  font-weight: 100 800; font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope.woff2") format("woff2");
  font-weight: 200 800; font-display: swap;
}

:root {
  --bg: #F0F2F4;
  --surface: #FFFFFF;
  --ink: #1F1F1F;
  --ink-2: #5B6168;
  --line: #DDE1E6;
  --red: #E5484D;
  --blue: #2F6BD8;
  --grad: linear-gradient(100deg, var(--blue) 0%, #8B5BC4 52%, var(--red) 100%);
  --dark-text: #F5F5F5;
  --dark-muted: #A3A8AF;
  --dark-line: rgba(255, 255, 255, .14);

  --display: "Sora", "Segoe UI", Arial, sans-serif;
  --body: "Manrope", "Segoe UI", Arial, sans-serif;

  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
  --wrap: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 140px);
  --ease: cubic-bezier(.22, .8, .24, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; letter-spacing: -.03em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--blue); color: #fff; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip:focus { left: 8px; }

.kicker { font-size: .9375rem; color: var(--ink-2); margin-bottom: 18px; }
.panel-dark .kicker { color: var(--dark-muted); }
.h2 { font-size: clamp(2.1rem, 4.6vw, 3.75rem); line-height: 1.05; margin-bottom: 22px; }
.h3 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); line-height: 1.2; margin-bottom: 18px; }
.section-lead { font-size: 1.125rem; color: var(--ink-2); max-width: 58ch; }
.panel-dark .section-lead { color: var(--dark-muted); }
.section-head { margin-bottom: clamp(36px, 5vw, 64px); }

.grad-text > span, .grad-fill {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ---------- Pannelli scuri ---------- */
.panel-dark {
  position: relative;
  background: var(--ink);
  color: var(--dark-text);
  border-radius: var(--r-lg);
  overflow: hidden;
  isolation: isolate;
}
.lines-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

/* Immagine di sfondo (se presente in static/img/) con velatura per la leggibilità */
.panel-dark.has-img[style] { background: linear-gradient(180deg, rgba(31,31,31,.35) 0%, rgba(31,31,31,.88) 100%), var(--img) center / cover no-repeat, var(--ink); }
.panel-dark.has-img[style] .lines-canvas { opacity: .55; }

/* ---------- Angoli intagliati (notch) ----------
   Una "linguetta" del colore della pagina ritaglia l'angolo del pannello. */
.notch {
  --n: 22px;
  position: absolute; z-index: 2;
  background: var(--bg);
  color: var(--ink);
  padding: 16px 24px;
  font-size: .9375rem; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  margin: 0;
}
.notch::before, .notch::after { content: ""; position: absolute; width: var(--n); height: var(--n); }
.notch-br { right: 0; bottom: 0; border-top-left-radius: var(--r-lg); }
.notch-br::before { right: 0; top: calc(var(--n) * -1); background: radial-gradient(circle at 0 0, transparent calc(var(--n) - .5px), var(--bg) var(--n)); }
.notch-br::after { left: calc(var(--n) * -1); bottom: 0; background: radial-gradient(circle at 0 0, transparent calc(var(--n) - .5px), var(--bg) var(--n)); }
.notch-bl { left: 0; bottom: 0; border-top-right-radius: var(--r-lg); }
.notch-bl::before { left: 0; top: calc(var(--n) * -1); background: radial-gradient(circle at 100% 0, transparent calc(var(--n) - .5px), var(--bg) var(--n)); }
.notch-bl::after { right: calc(var(--n) * -1); bottom: 0; background: radial-gradient(circle at 100% 0, transparent calc(var(--n) - .5px), var(--bg) var(--n)); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #2FBF71; box-shadow: 0 0 0 0 rgba(47, 191, 113, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(47, 191, 113, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 191, 113, 0); } }

/* ---------- Bottoni ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px;
  border: 1px solid var(--ink); border-radius: 14px;
  background: var(--ink); color: #fff;
  font: 600 1rem/1 var(--body); text-decoration: none; cursor: pointer;
  transition: border-color .4s var(--ease), color .3s;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--grad);
  transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); transform-origin: left; }
.btn:hover { border-color: transparent; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-small { min-height: 44px; padding: 0 20px; font-size: .9375rem; }
.panel-dark .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; }
/* La sfocatura sta su uno pseudo-elemento: su .site-header bloccherebbe il menu mobile a schermo intero */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(240, 242, 244, .82);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  transition: box-shadow .3s, background .3s;
}
.site-header.is-scrolled::before { box-shadow: 0 1px 0 var(--line); background: rgba(240, 242, 244, .94); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 84px; transition: height .3s var(--ease); }
.is-scrolled .header-inner { height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.3rem/1 var(--display); letter-spacing: .04em; }
.logo-mark { width: auto; height: 42px; transition: transform .5s var(--ease); }
.brand:hover .logo-mark { transform: translateY(-3px) rotate(-4deg); }
.is-scrolled .logo-mark { height: 36px; }
.nav { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 36px); }
.nav a:not(.btn) { position: relative; text-decoration: none; font-weight: 500; padding: 6px 0; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--grad); transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease);
}
.nav a:not(.btn):hover::after { transform: scaleX(1); transform-origin: left; }
.menu-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { padding: clamp(28px, 4vw, 56px) 0 clamp(56px, 7vw, 96px); }
.hero-grid { display: grid; grid-template-columns: 1.08fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: stretch; }
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 20px 0; }
.hero-title { font-size: clamp(2.6rem, 6vw, 5.25rem); line-height: 1.04; letter-spacing: -.04em; margin-bottom: 28px; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > span { display: inline-block; }
.js .hero-title .line > span { transform: translateY(110%); animation: rise 1s var(--ease) forwards; animation-delay: calc(.12s * var(--i) + .1s); }
@keyframes rise { to { transform: none; } }
.hero-lead { font-size: 1.1875rem; color: var(--ink-2); max-width: 54ch; margin-bottom: 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: .9375rem; color: var(--ink-2); }
.hero-checks li, .ticks li { display: flex; gap: 10px; align-items: center; }
.hero-checks li::before, .ticks li::before, .feature-list li::before {
  content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--grad);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10.5'/%3E%3Cpath d='M7.5 12.5l3 3 6-6.5'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10.5'/%3E%3Cpath d='M7.5 12.5l3 3 6-6.5'/%3E%3C/svg%3E") center/contain no-repeat;
}

.hero-panel { border-bottom-right-radius: 0; min-height: 580px; display: flex; align-items: center; justify-content: center; padding: 40px 32px 96px; }
.chat { transition: transform .8s var(--ease); display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 420px; }
.bubble { margin: 0; padding: 14px 18px; border-radius: 18px; font-size: .9688rem; line-height: 1.5; max-width: 86%; box-shadow: 0 12px 30px rgba(0,0,0,.25); }
.bubble-user { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 6px; }
.bubble-ai { align-self: flex-start; background: #303236; color: var(--dark-text); border: 1px solid rgba(255,255,255,.16); border-bottom-left-radius: 6px; }
.bubble-ai:nth-child(4) { background: var(--red); border-color: transparent; color: #fff; }
.js .bubble { opacity: 0; transform: translateY(16px) scale(.96); animation: pop .6s var(--ease) forwards; animation-delay: calc(1.1s * var(--i) + .7s); }
.js .bubble-typing { animation-delay: 5.3s; }
@keyframes pop { to { opacity: 1; transform: none; } }
.bubble-typing { display: flex; gap: 5px; padding: 16px 18px; }
.bubble-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--dark-muted); animation: blink 1.2s infinite; }
.bubble-typing span:nth-child(2) { animation-delay: .2s; }
.bubble-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; contain: paint; max-width: 100vw; padding: clamp(8px, 2vw, 24px) 0 clamp(40px, 6vw, 80px); user-select: none; }
.marquee-track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.marquee-track > span { font: 400 clamp(3.5rem, 11vw, 9.5rem)/1 var(--display); letter-spacing: -.05em; white-space: nowrap; padding-right: .3em; }
.marquee-track i { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 .1em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Servizi (bento) ---------- */
.services { padding-bottom: var(--section); }
.bento { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.bento-feature { grid-column: span 2; grid-row: span 2; }
.card {
  position: relative; isolation: isolate; overflow: hidden;
  height: 100%; min-height: 270px;
  display: flex; flex-direction: column; gap: 12px;
  padding: 30px; border-radius: var(--r-lg);
  background: var(--surface); text-decoration: none;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(47, 107, 216, .13), transparent 60%);
  transition: opacity .4s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -24px rgba(31, 31, 31, .35); }
.card:hover::before { opacity: 1; }
.card-icon { width: 60px; height: 60px; border-radius: 16px; background: var(--bg); display: grid; place-items: center; margin-bottom: 18px; transition: background .4s, color .4s; }
.card-icon .icon { width: 30px; height: 30px; }
.card:hover .card-icon { background: var(--grad); color: #fff; }
.card-title { font: 400 1.6rem/1.15 var(--display); letter-spacing: -.03em; }
.card-text { color: var(--ink-2); max-width: 46ch; }
.card-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 12px; padding-right: 64px; }
.card-tags span { font-size: .8125rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: var(--bg); }
.card-go {
  position: absolute; right: 24px; bottom: 24px; width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line);
  transition: background .4s, border-color .4s, color .4s;
}
.card-go .icon { width: 22px; height: 22px; transform: rotate(-45deg); transition: transform .5s var(--ease); }
.card:hover .card-go { background: var(--ink); border-color: var(--ink); color: #fff; }
.card:hover .card-go .icon { transform: rotate(0); }

.bento-feature .card { background: var(--ink); padding: clamp(30px, 4vw, 48px); justify-content: flex-end; min-height: 560px; }
.bento-feature .card-title { font-size: clamp(2.2rem, 4.4vw, 3.6rem); }
.bento-feature .card-text { color: var(--dark-muted); font-size: 1.125rem; }
.bento-feature .card-icon { background: rgba(255,255,255,.1); margin-bottom: auto; }
.bento-feature .card-tags span { background: rgba(255,255,255,.1); color: var(--dark-text); }
.bento-feature .card-go { border-color: rgba(255,255,255,.3); }
.bento-feature .card:hover .card-go { background: var(--grad); border-color: transparent; }
.bento-feature .card::before { background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 50%), rgba(229, 72, 77, .18), transparent 60%); }

/* ---------- IA locale ---------- */
.ai { padding-bottom: var(--section); }
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.ai-visual { position: relative; margin: 0; border-bottom-left-radius: 0 !important; background: var(--surface); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 40px) clamp(20px, 3vw, 40px) 90px; }
.ai-diagram { width: 100%; height: auto; }
.ai-diagram .office { fill: var(--bg); stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 6 6; }
.ai-diagram .node rect:first-child { fill: var(--surface); stroke: var(--ink); stroke-width: 1.6; }
.ai-diagram .node path, .ai-diagram .node circle { fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ai-diagram .node-core rect:first-child { fill: var(--ink); }
.ai-diagram .node-core rect:not(:first-child) { fill: none; stroke: rgba(255,255,255,.7); stroke-width: 1.4; }
.ai-diagram .node-core circle { stroke: none; fill: #2FBF71; }
.ai-diagram .node-label { font: 600 13px var(--body); fill: var(--ink-2); }
.ai-diagram .flow { stroke: url(#g-flow); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 4 9; animation: flow 1.2s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -26; } }
.ai-diagram .cloud-off path { fill: none; stroke: #A3A8AF; stroke-width: 2; stroke-linecap: round; }
.ai-diagram .cloud-off path + path { stroke: var(--red); stroke-width: 2.6; }
.ai-diagram .cloud-off text { font: 500 13px var(--body); fill: #A3A8AF; }
.feature-list { list-style: none; margin: 8px 0 36px; padding: 0; display: grid; gap: 22px; }
.feature-list li { display: grid; grid-template-columns: 26px 1fr; column-gap: 14px; }
.feature-list li::before { grid-row: span 2; width: 24px; height: 24px; margin-top: 3px; }
.feature-list h3 { font-size: 1.25rem; letter-spacing: -.02em; margin-bottom: 4px; }
.feature-list p { color: var(--ink-2); margin: 0; }

/* ---------- Metodo ---------- */
.method { padding-bottom: var(--section); }
.method-panel { padding: clamp(32px, 6vw, 80px); }
.steps-track { height: 2px; background: var(--dark-line); border-radius: 2px; margin-bottom: 36px; overflow: hidden; }
.steps-fill { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--grad); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 40px); }
.step { position: relative; }
.step-n {
  display: block; margin-bottom: 18px;
  font: 400 clamp(3rem, 5vw, 4.5rem)/1 var(--display); letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.45);
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  background-size: 0% 100%; background-repeat: no-repeat;
  transition: background-size .7s var(--ease), -webkit-text-stroke-color .4s;
}
.step:hover .step-n, .step.is-in .step-n { background-size: 100% 100%; -webkit-text-stroke-color: transparent; }
.step h3 { font-size: 1.4rem; margin-bottom: 10px; }
.step p { color: var(--dark-muted); margin: 0; }

/* ---------- Chi siamo ---------- */
.about { padding-bottom: var(--section); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.about-visual { min-height: 460px; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(28px, 4vw, 48px); }
.about-year { font: 300 clamp(6rem, 15vw, 12rem)/.9 var(--display); letter-spacing: -.06em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.about-year-label { color: var(--dark-muted); margin-top: 14px; }
.people { list-style: none; margin: 32px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px 36px; }
.people li { display: flex; align-items: center; gap: 14px; }
.people small { display: block; color: var(--ink-2); font-size: .875rem; }
.avatar { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font: 500 1.05rem var(--display); }

/* ---------- Contatti ---------- */
.contact { padding-bottom: var(--section); }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 20px; align-items: stretch; }
.contact-card { padding: clamp(30px, 4vw, 52px); display: flex; flex-direction: column; }
.contact-info { margin: auto 0 0; padding-top: 28px; display: grid; gap: 18px; }
.contact-info div { border-top: 1px solid var(--dark-line); padding-top: 16px; }
.contact-info dt { color: var(--dark-muted); font-size: .875rem; margin-bottom: 4px; }
.contact-info dd { margin: 0; }
.contact-info a { color: #fff; text-underline-offset: 3px; }
.form { background: var(--surface); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 48px); display: grid; gap: 18px; align-content: start; }
.field { display: grid; gap: 8px; margin: 0; border: 0; padding: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label, .field legend { font-weight: 600; font-size: .9375rem; padding: 0; }
.opt { font-weight: 400; color: var(--ink-2); }
input, textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid transparent; border-radius: 14px;
  padding: 14px 16px; transition: border-color .25s, box-shadow .25s, background .25s;
}
textarea { resize: vertical; min-height: 140px; }
input:focus, textarea:focus { outline: none; background: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47, 107, 216, .14); }
.is-invalid { border-color: var(--red) !important; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { margin-bottom: 10px; width: 100%; }
.chip { position: relative; }
.chip input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.chip span { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; font-size: .9375rem; transition: background .25s, color .25s, border-color .25s; }
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .9375rem; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--ink); padding: 0; }
.err { color: var(--red); font-size: .875rem; min-height: 0; }
.err:empty { display: none; }
.hp { position: absolute; left: -9999px; }
.form-status { padding: 14px 18px; border-radius: 14px; font-weight: 600; }
.form-status p { margin: 0; }
.form-status.is-ok { background: #E3F6EC; color: #17633A; }
.form-status.is-error { background: #FDECEC; color: #A3262A; }
.btn-submit { justify-self: start; }
.btn-submit[aria-busy="true"] { opacity: .7; pointer-events: none; }

/* ---------- Pagine interne ---------- */
.page-hero { padding: clamp(20px, 3vw, 40px) 0 clamp(48px, 6vw, 80px); }
.page-panel { padding: clamp(36px, 6vw, 80px); min-height: 380px; display: flex; flex-direction: column; justify-content: flex-end; }
.page-panel .hero-lead { color: var(--dark-muted); margin: 0; }
.crumbs { font-size: .9375rem; color: var(--dark-muted); margin-bottom: auto; padding-bottom: 40px; }
.crumbs a { color: var(--dark-text); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.page-icon { width: 64px; height: 64px; border-radius: 18px; background: var(--grad); color: #fff; display: grid; place-items: center; margin-bottom: 22px; }
.page-icon .icon { width: 32px; height: 32px; }
.page-title { font-size: clamp(2.4rem, 6vw, 4.75rem); line-height: 1.04; letter-spacing: -.04em; margin-bottom: 20px; }
.detail { padding-bottom: clamp(48px, 7vw, 96px); }
.detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.detail-grid > div, .detail-aside { background: var(--surface); border-radius: var(--r-lg); padding: clamp(26px, 4vw, 44px); }
.detail-aside p { color: var(--ink-2); margin-bottom: 26px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ticks li { align-items: flex-start; }
.ticks li::before { margin-top: 2px; }
.more { padding-bottom: var(--section); }
.more-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.more-list a { display: flex; align-items: center; gap: 14px; padding: 18px 20px; background: var(--surface); border-radius: var(--r-md); text-decoration: none; font-weight: 600; transition: transform .4s var(--ease), background .3s, color .3s; }
.more-list .icon { width: 26px; height: 26px; flex: none; }
.more-list a:hover { transform: translateY(-4px); background: var(--ink); color: #fff; }
.prose { max-width: 760px; }
.prose p { color: var(--ink-2); margin-bottom: 32px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--dark-text); border-radius: var(--r-lg) var(--r-lg) 0 0; padding: clamp(48px, 6vw, 80px) 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer-claim { color: var(--dark-muted); margin-top: 18px; max-width: 32ch; }
.footer-h { font: 600 .9375rem var(--body); letter-spacing: 0; color: var(--dark-muted); margin-bottom: 16px; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-footer address { font-style: normal; line-height: 1.9; }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid var(--dark-line); padding-top: 24px; font-size: .875rem; color: var(--dark-muted); }
.footer-legal p { margin: 0; }

/* ---------- Torna su con anello di avanzamento ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--ink); color: #fff; display: grid; place-items: center;
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity .35s, transform .35s var(--ease), background .3s;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--red); }
.to-top-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.to-top-ring circle { fill: none; stroke: var(--red); stroke-width: 2.5; stroke-dasharray: 138.2; stroke-dashoffset: calc(138.2 * (1 - var(--p, 0))); }
.to-top:hover .to-top-ring circle { stroke: #fff; }
.to-top-arrow { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Comparsa allo scorrimento ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(36px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-feature { grid-row: auto; }
  .bento-feature .card { min-height: 420px; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
}

@media (max-width: 900px) {
  .menu-toggle {
    display: grid; place-content: center; gap: 6px;
    width: 48px; height: 48px; border: 0; border-radius: 14px; background: var(--ink); cursor: pointer; z-index: 60;
  }
  .menu-toggle span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: transform .35s var(--ease); }
  .menu-open .menu-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-open .menu-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav {
    position: fixed; inset: 0; z-index: 55;
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px;
    padding: 100px var(--gutter) 40px;
    background: var(--ink); color: #fff;
    clip-path: circle(0 at calc(100% - 44px) 42px);
    transition: clip-path .6s var(--ease); visibility: hidden;
  }
  .menu-open .nav { clip-path: circle(150% at calc(100% - 44px) 42px); visibility: visible; }
  .nav a:not(.btn) { font: 400 2.2rem/1.2 var(--display); letter-spacing: -.03em; }
  .nav .btn { margin-top: 20px; background: var(--grad); border: 0; }
  .menu-open { overflow: hidden; }
  .brand { position: relative; z-index: 60; transition: color .3s; }
  .menu-open .brand { color: #fff; }

  .hero-grid, .ai-grid, .about-grid, .contact-grid, .detail-grid { grid-template-columns: 1fr; }
  .hero-panel { min-height: 480px; }
  .about-visual { min-height: 320px; }
  .ai-visual { order: 2; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .header-inner { height: 70px; }
  .bento { grid-template-columns: 1fr; }
  .bento-feature { grid-column: auto; }
  .bento-feature .card { min-height: 380px; }
  .card { min-height: 0; padding: 26px; }
  .steps { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1 1 100%; }
  .hero-panel { padding: 28px 18px 90px; min-height: 0; }
  .notch { padding: 14px 18px; font-size: .875rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .btn-submit { justify-self: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}
