/* ==========================================================
   Luigi Corte Rappis — Consulenza AI per PMI
   Stile mobile-first. Nessuna risorsa esterna: font locali.
   ========================================================== */

@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Adventor"; font-weight: 700; font-style: normal; font-display: swap;
  src: url("../fonts/adventor-700.woff2") format("woff2"); }

:root {
  --cobalt: #1F3BFF;
  --ink: #0D1233;
  --paper: #F4F6FA;
  --sun: #FFE14D;
  --mute: #4F587A;
  --line: #D3D9E8;
  --body: #2b3254;
  --focus: #1F3BFF;

  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-head: "Adventor", "Avenir Next", "Century Gothic", "Inter", system-ui, sans-serif;

  --gutter: clamp(16px, 5vw, 48px);
  --maxw: 1120px;
  --radius: 22px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.6;
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.h { font-family: var(--f-head); font-weight: 700; letter-spacing: -.012em; line-height: 1.07; text-wrap: balance; }
.sym { position: absolute; width: 0; height: 0; overflow: hidden; }
.glyph { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Pulsanti ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 48px;
  padding: .7rem 1.5rem; border-radius: 999px; font: inherit; font-weight: 600; font-size: 1rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn--sun { background: var(--sun); color: var(--ink); }
.btn--sun:hover { background: #fff; }
.btn--ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--cobalt); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--cobalt); }
.btn--line { border-color: var(--ink); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: #fff; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); }
.brand { font-family: var(--f-head); font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; text-decoration: none; color: var(--ink); line-height: 1.1; }
.brand small { display: block; font-family: var(--f-body); font-weight: 400; font-size: .72rem; letter-spacing: 0; color: var(--mute); margin-top: 2px; }
.nav { display: none; }
.nav a { text-decoration: none; font-weight: 600; font-size: .95rem; padding: .5rem .75rem; border-radius: 8px; color: var(--ink); }
.nav a:hover { color: var(--cobalt); }
.site-header .btn { min-height: 42px; padding: .4rem 1.1rem; font-size: .95rem; }
@media (min-width: 900px) {
  .nav { display: flex; gap: .25rem; margin-left: auto; margin-right: 1rem; }
}

/* ---------- Hero ---------- */
.hero { background: var(--cobalt); color: #fff; --focus: var(--sun); overflow: hidden; }
.hero__top { padding-block: clamp(40px, 8vw, 96px) clamp(24px, 4vw, 40px); }
.hero h1 { font-size: clamp(2.3rem, 7.4vw, 4.6rem); max-width: 15ch; }
.hero__sub { margin-top: clamp(18px, 3vw, 32px); font-size: clamp(1.1rem, 2.4vw, 1.45rem); line-height: 1.4; max-width: 34rem; }
.hero__cta { margin-top: clamp(22px, 3.5vw, 36px); display: flex; flex-wrap: wrap; gap: .75rem; }

.tangle { position: relative; margin-top: clamp(8px, 2vw, 24px); }
.tangle svg { width: 100%; height: clamp(150px, 30vw, 340px); }
.tangle path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.tangle .w { stroke: #fff; stroke-width: 1.1; opacity: .8; }
.tangle .sun { stroke: var(--sun); stroke-width: 2.4; }
.tangle .gate { stroke: #fff; stroke-width: 1; stroke-dasharray: 3 4; opacity: .75; vector-effect: non-scaling-stroke; }
.tangle__cap { display: flex; justify-content: space-between; gap: 1rem; font-size: .82rem; opacity: .92; padding-block: .4rem 0; }

.hero__intro { padding-block: clamp(28px, 5vw, 56px) clamp(32px, 5vw, 56px); display: grid; gap: .9rem; max-width: 44rem; }
.hero__intro p:last-child { font-weight: 600; }

.index { list-style: none; padding: 0; display: grid; gap: 0; padding-bottom: clamp(40px, 6vw, 72px); }
.index a { display: grid; grid-template-columns: auto 1fr; gap: 0 1rem; text-decoration: none;
  border-top: 2px solid #fff; padding-block: 1.1rem 1.3rem; }
.index a:hover h2 { text-decoration: underline; text-underline-offset: 4px; }
.index .glyph { color: var(--sun); width: 36px; height: 36px; grid-row: span 3; }
.index h2 { font-family: var(--f-head); font-weight: 700; font-size: 1.3rem; line-height: 1.12; letter-spacing: -.01em; }
.index p { font-size: .98rem; line-height: 1.45; opacity: .93; margin-top: .35rem; }
.index .pg { font-size: .8rem; opacity: .85; margin-top: .5rem; }
@media (min-width: 760px) {
  .index { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .index a { grid-template-columns: 1fr; padding-top: 1.1rem; }
  .index .glyph { grid-row: auto; margin-bottom: .9rem; }
}

/* ---------- Sezioni comuni ---------- */
.sec { padding-block: clamp(56px, 9vw, 112px); }
.kicker { display: flex; align-items: center; gap: .7rem; font-size: .92rem; font-weight: 600; color: var(--mute); }
.kicker .glyph { color: var(--cobalt); width: 30px; height: 30px; }
.sec h2.h { font-size: clamp(1.9rem, 5vw, 3.3rem); margin-top: clamp(18px, 3vw, 28px); max-width: 20ch; }
.sec h3.sub { font-size: 1.05rem; font-weight: 600; margin-bottom: 1.4rem; }

/* ---------- 1. Colli di bottiglia ---------- */
.split { display: grid; gap: clamp(32px, 5vw, 56px); margin-top: clamp(32px, 5vw, 56px); }
@media (min-width: 900px) { .split { grid-template-columns: 1.25fr 1fr; align-items: stretch; } }

.steps { list-style: none; padding: 0; counter-reset: s; position: relative; display: grid; gap: 1.9rem; }
.steps::before { content: ""; position: absolute; left: 17px; top: 18px; bottom: 54px; width: 2px; background: var(--cobalt); opacity: .3; }
.steps > li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 1.1rem; position: relative; }
.steps > li::before { content: counter(s); width: 36px; height: 36px; border-radius: 50%; background: var(--cobalt); color: #fff;
  font-family: var(--f-head); font-weight: 700; display: grid; place-items: center; }
.steps h4 { font-family: var(--f-head); font-weight: 700; font-size: 1.3rem; line-height: 1.15; letter-spacing: -.01em; margin-top: 4px; }
.steps p { color: var(--body); margin-top: .4rem; }
.tags { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .8rem; }
.tags li { display: block; border: 1.5px solid var(--cobalt); color: var(--cobalt); border-radius: 999px; padding: .1rem .85rem; font-size: .88rem; font-weight: 600; }
.tags li::before { content: none; }

.panel { background: var(--cobalt); color: #fff; border-radius: var(--radius); padding: clamp(24px, 4vw, 36px); display: flex; flex-direction: column; }
.panel h3 { font-size: 1rem; font-weight: 600; opacity: .95; margin-bottom: .6rem; }
.panel ul { list-style: none; padding: 0; display: flex; flex-direction: column; flex: 1; }
.panel li { flex: 1; display: flex; align-items: center; border-top: 1px solid rgba(255,255,255,.45); padding-block: 1.1rem;
  font-family: var(--f-head); font-weight: 700; font-size: clamp(1.15rem, 2.4vw, 1.4rem); line-height: 1.2; letter-spacing: -.01em; }

.change { background: var(--sun); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); margin-top: clamp(32px, 5vw, 56px); display: grid; gap: 1.5rem; }
.change h3 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.change b { display: block; font-family: var(--f-head); font-size: 1.2rem; line-height: 1.15; margin-bottom: .3rem; letter-spacing: -.01em; }
.change span { font-size: .98rem; line-height: 1.45; }
@media (min-width: 900px) { .change { grid-template-columns: 11rem repeat(3, 1fr); gap: 2rem; align-items: start; } }
@media (min-width: 600px) and (max-width: 899px) { .change { grid-template-columns: repeat(3, 1fr); } .change h3 { grid-column: 1 / -1; } }

/* ---------- 2. Gestionali ---------- */
.sec--white { background: #fff; }
.pair { display: grid; gap: 1.6rem; margin-top: clamp(28px, 4vw, 48px); }
.pair h3 { font-size: 1rem; font-weight: 600; color: var(--mute); margin-bottom: .4rem; }
.pair .sol h3 { color: var(--cobalt); }
.pair .sol p { font-size: clamp(1.15rem, 2.2vw, 1.4rem); line-height: 1.45; }
@media (min-width: 760px) { .pair { grid-template-columns: 1fr 1.4fr; gap: 3rem; } }

.vis { display: grid; gap: 1.1rem; margin-top: clamp(28px, 4vw, 48px); }
@media (min-width: 760px) { .vis { grid-template-columns: 17rem 1fr; gap: 1.5rem; } }
.years { background: var(--cobalt); color: #fff; border-radius: var(--radius); padding: clamp(22px, 3vw, 30px); display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; }
.years strong { font-family: var(--f-head); font-weight: 700; font-size: clamp(4rem, 9vw, 5.6rem); line-height: .9; letter-spacing: -.03em; }
.years strong small { font-size: .45em; letter-spacing: 0; }
.times { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 30px); }
.times h3 { font-size: 1rem; font-weight: 600; margin-bottom: 1.2rem; }
.bar { margin-bottom: 1.2rem; }
.bar p { font-size: .92rem; font-weight: 600; margin-bottom: .35rem; }
.bar__t { height: 34px; border-radius: 8px; background: var(--line); }
.bar__f { height: 100%; border-radius: 8px; display: flex; align-items: center; justify-content: flex-end; padding-inline: .8rem;
  font-family: var(--f-head); font-weight: 700; }
.bar--old .bar__f { width: 100%; background: #AEB6CE; color: var(--ink); }
.bar--new .bar__f { width: 16%; min-width: 4.4rem; background: var(--cobalt); color: #fff; justify-content: center; padding-inline: .4rem; }
.times small { font-size: .82rem; color: var(--mute); }

.why { margin-top: clamp(36px, 5vw, 60px); }
.why h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: .8rem; }
.why dl { display: grid; }
.why .row { display: grid; gap: .2rem 2rem; padding-block: .95rem; border-top: 1px solid var(--line); }
.why .row:last-child { border-bottom: 1px solid var(--line); }
.why dt { font-family: var(--f-head); font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }
.why dd { color: var(--body); }
@media (min-width: 700px) { .why .row { grid-template-columns: 13rem 1fr; align-items: baseline; } }

.pull { margin-top: clamp(32px, 5vw, 56px); border-left: 6px solid var(--sun); padding-left: 1.3rem;
  font-family: var(--f-head); font-weight: 700; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.2; letter-spacing: -.01em; max-width: 36rem; text-wrap: balance; }

/* ---------- 3. Company Brain ---------- */
.dark { background: var(--ink); color: #fff; --focus: var(--sun); }
.dark .kicker { color: #aab2d0; }
.dark .kicker .glyph { color: var(--sun); }
.lead { margin-top: clamp(18px, 3vw, 28px); font-size: clamp(1.05rem, 2vw, 1.25rem); line-height: 1.55; color: #dfe3f5; max-width: 42rem; }

.diagram { margin-top: clamp(32px, 5vw, 56px); }
.diagram__wide { display: none; width: 100%; height: auto; }
.diagram__wide text { font-family: var(--f-body); }
.diagram__wide .hd { font-family: var(--f-head); font-weight: 700; }
@media (min-width: 800px) { .diagram__wide { display: block; } .diagram__flow { display: none; } }
.diagram__flow { display: grid; gap: .6rem; justify-items: stretch; list-style: none; padding: 0; }
.diagram__flow .src { display: flex; flex-wrap: wrap; gap: .5rem; }
.diagram__flow .src span { border: 1.5px solid #fff; border-radius: 999px; padding: .25rem 1rem; font-weight: 600; font-size: .95rem; }
.diagram__flow .arrow { justify-self: center; color: var(--sun); font-size: 1.4rem; line-height: 1; }
.diagram__flow .core { justify-self: center; background: var(--cobalt); border-radius: 50%; width: 8.5rem; height: 8.5rem; display: grid; place-items: center; text-align: center;
  font-family: var(--f-head); font-weight: 700; font-size: 1.15rem; line-height: 1.1; outline: 2px dashed rgba(255,255,255,.55); outline-offset: 6px; margin-block: .6rem; }
.diagram__flow .q { border: 1.5px solid #fff; border-radius: 18px; padding: .9rem 1.1rem; }
.diagram__flow .a { background: var(--sun); color: var(--ink); border-radius: 18px; padding: .9rem 1.1rem; }

.examples { margin-top: clamp(28px, 4vw, 44px); }
.examples p { font-weight: 600; color: #aab2d0; font-size: .95rem; margin-bottom: .5rem; }
.examples blockquote { font-family: var(--f-head); font-weight: 700; font-size: clamp(1.15rem, 2.4vw, 1.45rem); line-height: 1.25; letter-spacing: -.01em; margin-top: .5rem; }
.examples blockquote::before { content: "\201C"; } .examples blockquote::after { content: "\201D"; }

.adv { margin-top: clamp(36px, 5vw, 60px); }
.adv h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1.1rem; }
.adv ul { list-style: none; padding: 0; display: grid; gap: 1.1rem 3rem; }
.adv li { display: grid; grid-template-columns: 14px 1fr; gap: .8rem; color: #dfe3f5; }
.adv li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--sun); margin-top: .5rem; }
.adv b { color: #fff; font-weight: 600; }
@media (min-width: 760px) { .adv ul { grid-template-columns: 1fr 1fr; } }

/* ---------- Contatti ---------- */
.contact { background: var(--sun); color: var(--ink); padding-block: clamp(48px, 8vw, 96px); }
.contact__grid { display: grid; gap: 2rem; align-items: center; }
.contact h2 { font-size: clamp(2rem, 5vw, 3.2rem); }
.contact p { margin-top: .8rem; font-size: 1.12rem; max-width: 30rem; }
.contact ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
.contact li { display: grid; grid-template-columns: 5.2rem 1fr; align-items: baseline; font-weight: 600; font-size: 1.1rem; }
.contact li span { font-weight: 400; font-size: .85rem; color: #3b4163; }
.contact li a { text-underline-offset: 4px; overflow-wrap: anywhere; }
.contact .btn { margin-top: 1.4rem; }
@media (min-width: 860px) { .contact__grid { grid-template-columns: 1.2fr 1fr; gap: 4rem; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c4cae3; font-size: .9rem; padding-block: clamp(32px, 5vw, 48px); --focus: var(--sun); }
.site-footer .wrap { display: grid; gap: 1.6rem; }
.site-footer strong { color: #fff; font-weight: 600; }
.site-footer address { font-style: normal; line-height: 1.7; }
.site-footer nav ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.site-footer a { color: #fff; text-underline-offset: 3px; }
.site-footer .copy { font-size: .82rem; color: #9aa2c4; }
@media (min-width: 860px) { .site-footer .wrap { grid-template-columns: 1.5fr 1fr; } .site-footer .copy { grid-column: 1 / -1; } }

/* ---------- Pagine legali ---------- */
.legal { padding-block: clamp(40px, 7vw, 88px); }
.legal .wrap { max-width: calc(46rem + 2 * var(--gutter)); }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: .6rem; }
.legal .upd { color: var(--mute); font-size: .95rem; margin-bottom: 2rem; }
.legal h2 { font-family: var(--f-head); font-weight: 700; font-size: 1.4rem; letter-spacing: -.01em; margin: 2.2rem 0 .6rem; line-height: 1.2; }
.legal p, .legal li { color: var(--body); }
.legal p + p { margin-top: .8rem; }
.legal ul { padding-left: 1.3rem; margin-top: .6rem; display: grid; gap: .35rem; }
.legal a { color: var(--cobalt); text-underline-offset: 3px; }
.legal .back { display: inline-block; margin-bottom: 1.6rem; font-weight: 600; text-decoration: none; }
.legal table { width: 100%; border-collapse: collapse; margin-top: .8rem; font-size: .95rem; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: .6rem .7rem; border-bottom: 1px solid var(--line); }
.legal th { color: var(--mute); font-weight: 600; width: 34%; }
.legal .box { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.3rem; margin-top: 1rem; }
/* Segnaposto da compilare: evidenziati finché non vengono sostituiti */
.todo { background: var(--sun); color: var(--ink); padding: 0 .3em; border-radius: 4px; font-weight: 600; }

/* il flusso verticale è solo per schermi stretti (deve stare dopo la sua definizione) */
@media (min-width: 800px) { .diagram__flow { display: none; } }
