/* ═══════════════════════════════════════════════════════════════
   Ancilladomina — home
   Nessuna dipendenza esterna: font di sistema, grafici in SVG.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg:        #05070a;
  --bg-2:      #080b11;
  --panel:     #0c1118;
  --panel-2:   #111923;
  --line:      rgba(255, 255, 255, .09);
  --line-soft: rgba(255, 255, 255, .05);

  --text:  #e9eef4;
  --dim:   #a9b6c6;
  --muted: #74839a;

  --accent:      #04ff00;
  --accent-deep: #00c94d;
  --accent-soft: rgba(4, 255, 0, .12);
  --accent-glow: rgba(4, 255, 0, .35);
  --cyan:        #22d3ee;
  --amber:       #fbbf24;
  --red:         #f87171;

  --radius:    18px;
  --radius-sm: 11px;
  --wrap:      1220px;

  --font: "Century Gothic", "Questrial", "Futura", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;

  --ease: cubic-bezier(.22, .8, .28, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0; font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: 1.22rem; }
p  { margin: 0 0 1.05em; }

kbd {
  font-family: var(--mono); font-size: .82em;
  background: var(--panel-2); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 5px; padding: .1em .42em;
}

.wrap { width: min(100% - 2.6rem, var(--wrap)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  background: var(--accent); color: #000; padding: .7rem 1.1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ─── testo condiviso ─────────────────────────────────────────── */

.eyebrow {
  font-size: .74rem; letter-spacing: .19em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 .9rem; font-weight: 700;
}

.grad {
  background: linear-gradient(104deg, var(--accent) 0%, var(--cyan) 52%, #a78bfa 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ─── bottoni ─────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .82rem 1.5rem; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: .95rem; letter-spacing: .01em;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background .25s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
}
.btn-sm { padding: .58rem 1.15rem; font-size: .87rem; }
.btn-xs { padding: .4rem .9rem;  font-size: .8rem; }
.btn-lg { padding: 1.02rem 2.1rem; font-size: 1.06rem; }

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #001b06;
  box-shadow: 0 8px 30px -8px var(--accent-glow);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 16px 42px -10px var(--accent-glow); }

.btn-ghost {
  border-color: var(--line); background: rgba(255, 255, 255, .03); color: var(--text);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: rgba(4, 255, 0, .45); background: var(--accent-soft); }

/* ─── barra superiore ─────────────────────────────────────────── */

.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 500;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.topbar.is-stuck {
  background: rgba(5, 7, 10, .82);
  backdrop-filter: blur(16px) saturate(150%);
  border-bottom-color: var(--line);
}
.topbar-inner {
  width: min(100% - 2.6rem, var(--wrap)); margin-inline: auto;
  height: 72px; display: flex; align-items: center; gap: 1.6rem;
}

.brand { display: flex; align-items: center; gap: .55rem; font-weight: 700; letter-spacing: -.01em; }
.brand-mark {
  width: 30px; height: 30px; flex: none;
  transition: transform .3s var(--ease), filter .3s var(--ease);
}
.brand:hover .brand-mark {
  transform: scale(1.08);
  filter: drop-shadow(0 0 9px var(--accent-glow));
}
.brand-name { font-size: 1.06rem; }

.topnav { display: flex; gap: 1.7rem; margin-left: auto; font-size: .93rem; }
.topnav a { color: var(--dim); position: relative; padding: .25rem 0; transition: color .2s; }
.topnav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--accent); border-radius: 2px; transition: width .28s var(--ease);
}
.topnav a:hover { color: var(--text); }
.topnav a:hover::after, .topnav a.is-active::after { width: 100%; }
.topnav a.is-active { color: var(--text); }

.burger { display: none; background: none; border: 0; padding: .5rem; flex-direction: column; gap: 5px; }
.burger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .28s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.topnav-mobile {
  display: none; flex-direction: column; gap: .3rem; padding: .8rem 1.3rem 1.4rem;
  background: rgba(5, 7, 10, .96); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line);
}
.topnav-mobile a { padding: .72rem .2rem; border-bottom: 1px solid var(--line-soft); color: var(--dim); }

/* ─── hero ────────────────────────────────────────────────────── */

.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding: 8rem 0 5rem; overflow: hidden;
}
.hero-mesh {
  position: absolute; inset: -25%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(38% 40% at 18% 26%, rgba(4, 255, 0, .17),  transparent 62%),
    radial-gradient(34% 38% at 82% 22%, rgba(34, 211, 238, .15), transparent 64%),
    radial-gradient(42% 44% at 62% 84%, rgba(167, 139, 250, .12), transparent 66%);
  filter: blur(28px);
  animation: drift 26s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(2.5%, -2%, 0) scale(1.07); }
  100% { transform: translate3d(-2%, 2.5%, 0) scale(1.03); }
}
.hero-grid-lines {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .35;
  background-image:
    linear-gradient(to right,  var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 78px 78px;
  mask-image: radial-gradient(ellipse 74% 62% at 50% 44%, #000 30%, transparent 78%);
}
.hero-inner { position: relative; z-index: 1; }

.hero-title { font-size: clamp(2.4rem, 6.2vw, 4.7rem); margin-bottom: 1.5rem; }
.hero-sub {
  font-size: clamp(1.02rem, 1.6vw, 1.24rem); color: var(--dim);
  max-width: 60ch; margin-bottom: 2.4rem;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 4rem; }

.hero-stats {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 2.6rem;
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats b {
  font-size: clamp(1.7rem, 3.2vw, 2.5rem); font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
  background: linear-gradient(160deg, #fff, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stats span { font-size: .84rem; color: var(--muted); max-width: 22ch; line-height: 1.4; }

.scroll-hint {
  position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%);
  width: 24px; height: 38px; border: 1.5px solid var(--line); border-radius: 12px; z-index: 1;
}
.scroll-hint span {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 7px; border-radius: 2px;
  background: var(--accent); transform: translateX(-50%);
  animation: wheel 1.9s ease-in-out infinite;
}
@keyframes wheel { 0%,100% { opacity: 0; transform: translate(-50%, 0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translate(-50%, 13px); } }

/* ─── sezioni ─────────────────────────────────────────────────── */

.section { padding: clamp(5rem, 10vw, 8.5rem) 0; position: relative; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line-soft); }

.section-head { max-width: 76ch; margin-bottom: 3.6rem; }
.section-lead { color: var(--dim); font-size: 1.06rem; margin-top: 1.3rem; }

/* ─── le due strade sbagliate ─────────────────────────────────── */

.two-wrong { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 1.5rem; }

.wrong-card {
  position: relative; padding: 2.3rem 2rem 1.9rem;
  background: linear-gradient(170deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform .35s var(--ease), border-color .35s var(--ease);
}
.wrong-card::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius); padding: 1px;
  background: linear-gradient(160deg, rgba(248, 113, 113, .4), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s;
}
.wrong-card:hover { transform: translateY(-4px); }
.wrong-card:hover::before { opacity: 1; }
.wrong-num {
  font-family: var(--mono); font-size: .82rem; color: var(--red);
  letter-spacing: .12em; margin-bottom: .8rem;
}
.wrong-card h3 { margin-bottom: 1rem; font-size: 1.42rem; }
.wrong-card p { color: var(--dim); font-size: .98rem; }
.wrong-punch { color: var(--text) !important; font-weight: 600; margin-bottom: 0 !important; }

.third-way {
  margin-top: 3.4rem; padding: clamp(2.2rem, 5vw, 3.6rem);
  border-radius: var(--radius); border: 1px solid var(--line);
  background:
    radial-gradient(60% 100% at 12% 0%, rgba(4, 255, 0, .09), transparent 62%),
    linear-gradient(150deg, var(--panel-2), var(--bg-2));
}
.third-title { font-size: clamp(1.8rem, 4.4vw, 3.2rem); margin-bottom: 1.8rem; }
.third-body { columns: 2; column-gap: 2.6rem; color: var(--dim); }
.third-body p { break-inside: avoid; }

.pull {
  margin: 2rem 0 0; padding: 1.4rem 0 0 1.5rem;
  border-top: 1px solid var(--line); border-left: 2px solid var(--accent);
  font-size: 1.1rem; color: var(--text);
}
.pull b { color: var(--accent); }

/* ─── cornice demo ────────────────────────────────────────────── */

.demo-frame {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  background: var(--panel);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .02) inset;
}
.demo-chrome {
  display: flex; align-items: center; gap: .5rem;
  padding: .78rem 1.1rem; background: var(--panel-2); border-bottom: 1px solid var(--line);
}
.dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.dot-r { background: #ff5f57; } .dot-y { background: #febc2e; } .dot-g { background: #28c840; }
.demo-title { margin-left: .8rem; font-size: .84rem; color: var(--muted); }
.demo-badge {
  margin-left: auto; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--amber); border: 1px solid rgba(251, 191, 36, .35);
  background: rgba(251, 191, 36, .09); padding: .2rem .6rem; border-radius: 999px; font-weight: 700;
}
.demo-body { padding: clamp(1.1rem, 2.4vw, 1.7rem); display: grid; gap: 1.1rem; }
/* I figli di una griglia hanno min-width:auto e non scendono sotto la larghezza
   del proprio contenuto: senza questo, KPI e grafici sfondano la cornice. */
.demo-body > *, .chart-grid > * { min-width: 0; }

/* ─── KPI ─────────────────────────────────────────────────────── */

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .8rem; }
.kpi {
  padding: 1.05rem 1.15rem; border-radius: var(--radius-sm);
  background: linear-gradient(155deg, var(--panel-2), rgba(12, 17, 24, .6));
  border: 1px solid var(--line-soft);
  transition: border-color .28s var(--ease), transform .28s var(--ease);
}
.kpi:hover { border-color: rgba(4, 255, 0, .34); transform: translateY(-3px); }
.kpi-label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kpi-value {
  font-size: clamp(1.4rem, 2.6vw, 1.95rem); font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin-top: .3rem;
}
.kpi-sub { font-size: .78rem; color: var(--muted); }
.kpi-accent .kpi-value { color: var(--accent); }

/* ─── pannelli grafici ────────────────────────────────────────── */

.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.panel {
  margin: 0; padding: 1.15rem 1.25rem 1.3rem;
  background: linear-gradient(160deg, var(--panel-2), rgba(12, 17, 24, .5));
  border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
}
.panel-wide { grid-column: span 2; }
.panel figcaption, .panel > figcaption {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.panel h3 { font-size: .98rem; font-weight: 700; }

.legend { display: flex; gap: 1rem; font-size: .78rem; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: .38rem; }
.lg::before { content: ""; width: 9px; height: 9px; border-radius: 3px; }
.lg-1::before { background: var(--cyan); }
.lg-2::before { background: var(--accent); }

.seg { display: inline-flex; background: rgba(0, 0, 0, .35); border: 1px solid var(--line-soft); border-radius: 999px; padding: 3px; }
.seg-btn {
  border: 0; background: none; color: var(--muted); font-size: .76rem; font-weight: 600;
  padding: .3rem .78rem; border-radius: 999px; transition: color .2s, background .2s;
}
.seg-btn.is-on { background: var(--accent-soft); color: var(--accent); }

.chart-host { width: 100%; }
.chart-host svg { width: 100%; height: auto; display: block; overflow: visible; }

/* animazioni dei grafici */
.bar-fill { transform-origin: left center; transform: scaleX(0); transition: transform .9s var(--ease); }
.is-drawn .bar-fill { transform: scaleX(1); }
.line-path { stroke-dasharray: 1400; stroke-dashoffset: 1400; transition: stroke-dashoffset 1.5s var(--ease); }
.is-drawn .line-path { stroke-dashoffset: 0; }
.area-fill { opacity: 0; transition: opacity 1s .35s var(--ease); }
.is-drawn .area-fill { opacity: 1; }
.fn-step { transform-origin: center; transform: scaleX(0); transition: transform .75s var(--ease); }
.is-drawn .fn-step { transform: scaleX(1); }

.tick { font-size: 10px; fill: var(--muted); font-family: var(--font); }
.val-label { font-size: 11px; fill: var(--text); font-family: var(--font); font-variant-numeric: tabular-nums; }
.grid-line { stroke: var(--line-soft); stroke-width: 1; }

.hit { fill: transparent; cursor: crosshair; }
.hit:hover ~ .hover-mark, .bar-group:hover .bar-fill { filter: brightness(1.25); }

/* ─── tabelle ─────────────────────────────────────────────────── */

.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.data-table th, .data-table td { padding: .58rem .7rem; text-align: left; white-space: nowrap; }
.data-table thead th {
  font-size: .71rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line); font-weight: 700;
}
.data-table tbody tr { border-bottom: 1px solid var(--line-soft); transition: background .18s; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, .028); }
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table td.strong { font-weight: 700; }

.meter { position: relative; width: 108px; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent-deep), var(--accent)); }
.meter.over i { background: linear-gradient(90deg, var(--cyan), #a78bfa); }

/* ─── nota demo ───────────────────────────────────────────────── */

.demo-note {
  margin: 1.8rem auto 0; max-width: 66ch; text-align: center;
  color: var(--muted); font-size: .95rem;
}
.demo-note b { color: var(--accent); }

/* ─── quattro motivi ──────────────────────────────────────────── */

.reasons { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 1.5rem; }
.reason {
  position: relative; padding: 2.2rem 1.9rem 1.7rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(168deg, var(--panel), var(--bg-2));
  overflow: hidden; transition: transform .35s var(--ease), border-color .35s var(--ease);
}
.reason::after {
  content: ""; position: absolute; inset: auto -30% -55% auto; width: 260px; height: 260px;
  background: radial-gradient(circle, var(--accent-soft), transparent 68%);
  opacity: 0; transition: opacity .45s var(--ease); pointer-events: none;
}
.reason:hover { transform: translateY(-4px); border-color: rgba(4, 255, 0, .28); }
.reason:hover::after { opacity: 1; }
.reason-n {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent-soft); border: 1px solid rgba(4, 255, 0, .3);
  color: var(--accent); font-weight: 700; font-size: .95rem; margin-bottom: 1.1rem;
}
.reason h3 { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; font-size: 1.35rem; }
.reason h3 em { font-style: normal; font-size: .88rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.reason p { color: var(--dim); font-size: .96rem; position: relative; z-index: 1; }
.reason-punch { color: var(--text) !important; font-weight: 600; margin-bottom: 0 !important; }

/* ─── console SQL ─────────────────────────────────────────────── */

.sql-console { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.sql-tabs { display: flex; overflow-x: auto; background: var(--panel-2); border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.sql-tab {
  border: 0; background: none; color: var(--muted); padding: .85rem 1.15rem;
  font-size: .84rem; font-weight: 600; white-space: nowrap;
  border-bottom: 2px solid transparent; transition: color .2s, border-color .2s, background .2s;
}
.sql-tab:hover { color: var(--text); background: rgba(255, 255, 255, .03); }
.sql-tab.is-on { color: var(--accent); border-bottom-color: var(--accent); background: var(--accent-soft); }

.sql-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.sql-pane { border-right: 1px solid var(--line); min-width: 0; }
.sql-out { min-width: 0; }
.sql-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .55rem .9rem; border-bottom: 1px solid var(--line-soft); background: rgba(0, 0, 0, .28);
  min-height: 44px;
}
.sql-file, .sql-status { font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.sql-timing { font-family: var(--mono); font-size: .76rem; color: var(--accent); font-weight: 700; }

.sql-code {
  margin: 0; padding: 1.1rem 1.2rem; overflow-x: auto;
  font-family: var(--mono); font-size: .8rem; line-height: 1.75;
  max-height: 430px; overflow-y: auto; color: var(--dim); tab-size: 4;
}
.sql-code .k  { color: #7dd3fc; font-weight: 700; }   /* keyword   */
.sql-code .f  { color: #c4b5fd; }                     /* funzione  */
.sql-code .s  { color: #86efac; }                     /* stringa   */
.sql-code .n  { color: #fca5a5; }                     /* numero    */
.sql-code .c  { color: #64748b; font-style: italic; } /* commento  */

.sql-result { max-height: 430px; overflow-y: auto; padding: .3rem .5rem .8rem; }
.sql-placeholder { color: var(--muted); font-size: .87rem; padding: 1.4rem 1rem; margin: 0; }
.sql-result .data-table { font-size: .8rem; }
.sql-result .data-table th { position: sticky; top: 0; background: var(--panel); z-index: 1; }
.sql-note { margin: 0; padding: .8rem 1.1rem; border-top: 1px solid var(--line-soft); font-size: .85rem; color: var(--muted); background: rgba(0, 0, 0, .22); }

.row-in { animation: rowIn .34s var(--ease) both; }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.is-running .sql-status::after {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-left: .5rem;
  border-radius: 50%; background: var(--accent); animation: blink .6s steps(2) infinite;
}
@keyframes blink { 50% { opacity: .15; } }

/* ─── ambiti ──────────────────────────────────────────────────── */

.ambiti-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.4rem; }
.ambito {
  position: relative; padding: 2.1rem 1.9rem 1.6rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(168deg, var(--panel), var(--bg-2));
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.ambito::before {
  content: ""; position: absolute; left: 1.9rem; right: 1.9rem; top: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.ambito:hover { transform: translateY(-5px); border-color: rgba(34, 211, 238, .3); box-shadow: 0 26px 60px -34px rgba(0, 0, 0, .9); }
.ambito:hover::before { transform: scaleX(1); }
.ambito-wide { grid-column: 1 / -1; }
.ambito h3 { font-size: 1.3rem; margin-bottom: .35rem; }
.ambito-claim { color: var(--accent); font-weight: 600; font-size: .95rem; margin-bottom: 1.1rem; }
.ambito p { color: var(--dim); font-size: .96rem; }
.ambito-proof {
  margin-bottom: 0 !important; padding-top: .9rem; border-top: 1px solid var(--line-soft);
  color: var(--text) !important; font-weight: 600;
}
.ambito-proof b { color: var(--accent); }

/* ─── recensioni ──────────────────────────────────────────────── */

.disclosure {
  display: flex; align-items: flex-start; gap: .7rem; margin-top: 1.4rem;
  padding: .85rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .022); color: var(--muted); font-size: .85rem; line-height: 1.55;
  max-width: 68ch;
}
.disclosure-ic {
  flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--muted); font-size: .7rem; font-weight: 700; font-style: italic; margin-top: .12rem;
}

.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.3rem; }
.review {
  display: flex; flex-direction: column; padding: 1.8rem 1.7rem 1.5rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(168deg, var(--panel), var(--bg-2));
  transition: transform .32s var(--ease), border-color .32s var(--ease);
}
.review:hover { transform: translateY(-4px); border-color: rgba(4, 255, 0, .25); }
.review-stars { color: var(--accent); font-size: .95rem; letter-spacing: .14em; margin-bottom: .9rem; }
.review-text { color: var(--dim); font-size: .98rem; flex: 1; }
.review-text.is-placeholder { color: var(--muted); font-style: italic; }
.review-who { display: flex; align-items: center; gap: .8rem; padding-top: 1.1rem; border-top: 1px solid var(--line-soft); }
.review-av {
  flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent-soft), rgba(34, 211, 238, .12));
  border: 1px solid var(--line); font-weight: 700; font-size: .92rem; color: var(--accent);
}
.review-name { font-weight: 700; font-size: .92rem; }
.review-role { font-size: .8rem; color: var(--muted); }

.review-cta {
  margin-top: 2.2rem; display: flex; align-items: center; justify-content: center;
  gap: 1.1rem; flex-wrap: wrap; color: var(--muted); font-size: .95rem;
}
.review-cta p { margin: 0; }

/* ─── perché me ───────────────────────────────────────────────── */

.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.3rem; }
.why {
  padding: 1.9rem 1.7rem 1.5rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: linear-gradient(168deg, var(--panel), var(--bg-2));
  transition: transform .32s var(--ease), border-color .32s var(--ease);
}
.why:hover { transform: translateY(-4px); border-color: rgba(4, 255, 0, .28); }
.why h3 { margin-bottom: .8rem; font-size: 1.16rem; color: var(--accent); }
.why p { color: var(--dim); font-size: .96rem; margin: 0; }
.why-flag {
  border-color: rgba(4, 255, 0, .3);
  background:
    radial-gradient(70% 100% at 0% 0%, rgba(4, 255, 0, .09), transparent 60%),
    linear-gradient(168deg, var(--panel), var(--bg-2));
}

/* ─── chiusura ────────────────────────────────────────────────── */

.closing { position: relative; overflow: hidden; text-align: center; padding-block: clamp(6rem, 12vw, 10rem); }
.closing-mesh {
  position: absolute; inset: -30%; pointer-events: none;
  background:
    radial-gradient(36% 42% at 26% 44%, rgba(4, 255, 0, .16), transparent 64%),
    radial-gradient(34% 40% at 74% 56%, rgba(34, 211, 238, .13), transparent 66%);
  filter: blur(34px); animation: drift 22s ease-in-out infinite alternate;
}
.closing-inner { position: relative; }

/* Il logo grande che chiude la pagina: respira lentamente, come un'insegna accesa. */
.closing-logo {
  width: clamp(150px, 22vw, 230px); height: auto;
  margin: 0 auto 2.2rem;
  animation: respiro 6s ease-in-out infinite;
}
@keyframes respiro {
  0%, 100% { opacity: .92; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.035); }
}

.closing h2 { font-size: clamp(2.1rem, 5.4vw, 3.8rem); margin-bottom: 1.3rem; }
.closing-sub { color: var(--dim); max-width: 56ch; margin: 0 auto 2.6rem; font-size: 1.06rem; }
.closing-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3.2rem; }

.socials { display: flex; gap: 1.1rem; justify-content: center; }
.socials a {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
  transition: transform .28s var(--ease), border-color .28s var(--ease), background .28s;
}
.socials a:hover { transform: translateY(-4px); border-color: rgba(4, 255, 0, .45); background: var(--accent-soft); }
.socials img { width: 26px; height: 26px; object-fit: contain; }

/* ─── footer ──────────────────────────────────────────────────── */

.footer { border-top: 1px solid var(--line); padding: 2.2rem 0; background: var(--bg-2); }
.footer-inner {
  display: flex; justify-content: space-between; align-items: center; gap: 1.4rem;
  flex-wrap: wrap; font-size: .82rem; color: var(--muted);
}
.footer-note { max-width: 52ch; }

/* ─── reveal allo scroll ──────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ─── responsive ──────────────────────────────────────────────── */

@media (max-width: 940px) {
  .topnav { display: none; }
  .topbar-inner > .btn { margin-left: auto; }
  .burger { display: flex; }
  .topnav-mobile { display: none; }
  .topnav-mobile.is-open { display: flex; }
  .third-body { columns: 1; }
  .sql-main { grid-template-columns: 1fr; }
  .sql-pane { border-right: 0; border-bottom: 1px solid var(--line); }
  .sql-code, .sql-result { max-height: 300px; }
}

@media (max-width: 760px) {
  .chart-grid { grid-template-columns: 1fr; }
  .panel-wide { grid-column: span 1; }
  .hero-stats { gap: 1.6rem; }
  .hero { min-height: auto; padding-top: 7rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .bar-fill, .fn-step { transform: scaleX(1); }
  .line-path { stroke-dashoffset: 0; }
  .area-fill { opacity: 1; }
}
