/* Irrigazione AI – sito di presentazione */

:root {
  --bg: #000;
  --bg-2: #0b0d10;
  --panel: #14171c;
  --panel-2: #1b1f26;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --dim: #6e6e73;
  --blue: #2f8cff;
  --cyan: #4fd1ff;
  --green: #5cc26b;
  --amber: #ffb300;
  --red: #ff5a52;
  --radius: 28px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.88em; background: rgba(255,255,255,.08); padding: 2px 6px; border-radius: 6px; }

/* Lingua: si mostra solo quella attiva */
html[data-lang="it"] [lang="en"]:not(html),
html[data-lang="en"] [lang="it"]:not(html) { display: none !important; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }

/* ---------- Navigazione ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 52px; }
.nav .brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 16px; }
.nav .brand img { width: 26px; height: 26px; }
.nav .brand:hover { text-decoration: none; }
.nav .links { display: flex; gap: 22px; margin-left: auto; font-size: 13px; }
.nav .links a { color: #d2d2d7; }
.nav .links a:hover { color: #fff; text-decoration: none; }
.nav .lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.nav .lang button {
  background: none; border: 0; color: var(--muted); font: 600 12px var(--font);
  padding: 5px 10px; cursor: pointer;
}
.nav .lang button.on { background: #fff; color: #000; }
.nav .cta { background: var(--blue); color: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 600; }
.nav .cta:hover { text-decoration: none; filter: brightness(1.1); }
@media (max-width: 860px) { .nav .links { display: none; } .nav .lang { margin-left: auto; } }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px;
  font-weight: 600; font-size: 17px; border: 0; cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: #4a9bff; }
.btn.ghost { color: var(--blue); }
.btn.ghost:hover { text-decoration: underline; }
.btns { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; align-items: center; }

/* ---------- Hero ---------- */
.hero { padding: 140px 0 40px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; left: 50%; top: -260px; width: 1100px; height: 760px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(47,140,255,.35), rgba(79,209,255,.12) 45%, transparent 75%);
  pointer-events: none;
}
.hero .logo { width: min(440px, 80vw); margin: 0 auto 26px; position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--green);
  border: 1px solid rgba(92,194,107,.35); background: rgba(92,194,107,.08);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px; position: relative;
}
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
.hero h1 { font-size: clamp(44px, 8vw, 88px); line-height: 1.04; font-weight: 700; position: relative; }
.grad {
  background: linear-gradient(90deg, #4fd1ff, #2f8cff 45%, #5cc26b);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: clamp(19px, 2.4vw, 26px); color: var(--muted); max-width: 760px; margin: 22px auto 34px; line-height: 1.35; position: relative; }
.hero .shot {
  margin: 70px auto 0; max-width: 1200px; padding: 0 24px; position: relative;
  transform: perspective(1600px) rotateX(var(--tilt, 10deg)) scale(var(--zoom, .92));
  transform-origin: top center; transition: transform .1s linear;
}
.hero .shot img { border-radius: 22px; box-shadow: 0 40px 120px rgba(47,140,255,.25), 0 0 0 1px var(--line); }
.caption { color: var(--dim); font-size: 13px; margin-top: 14px; text-align: center; }

/* ---------- Strip numeri ---------- */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border-radius: 22px; overflow: hidden; margin: 140px auto 0; position: relative; z-index: 2; }
.stats div { background: var(--bg-2); padding: 26px 12px; text-align: center; }
.stats b { display: block; font-size: 40px; font-weight: 700; letter-spacing: -0.03em; }
.stats span { color: var(--muted); font-size: 14px; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } .stats div:last-child { grid-column: span 2; } }

/* ---------- Sezioni ---------- */
section.block { padding: 150px 0; position: relative; }
section.alt { background: var(--bg-2); }
.kicker { font-size: 17px; font-weight: 600; margin-bottom: 12px; }
.kicker.blue { color: var(--cyan); } .kicker.green { color: var(--green); } .kicker.amber { color: var(--amber); } .kicker.red { color: var(--red); }
h2.big { font-size: clamp(38px, 6vw, 72px); line-height: 1.05; font-weight: 700; }
p.sub { font-size: clamp(19px, 2vw, 23px); color: var(--muted); max-width: 720px; line-height: 1.4; margin: 22px 0 0; }
.center p.sub { margin-left: auto; margin-right: auto; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; margin-top: 70px; }
.split > * { min-width: 0; }
.split.rev > :first-child { order: 2; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 40px; } .split.rev > :first-child { order: 0; } }

/* Comparsa allo scorrimento */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; } .reveal.d2 { transition-delay: .2s; } .reveal.d3 { transition-delay: .3s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Pannelli ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; }
.grid { display: grid; gap: 20px; }
.grid.g2 { grid-template-columns: repeat(2, 1fr); }
.grid.g3 { grid-template-columns: repeat(3, 1fr); }
.grid.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid.g3, .grid.g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid.g2, .grid.g3, .grid.g4 { grid-template-columns: 1fr; } }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 28px; }
.tile h3 { font-size: 22px; margin: 16px 0 8px; }
.tile p { color: var(--muted); margin: 0; font-size: 16px; }
.icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; }
.icon svg { width: 26px; height: 26px; }
.icon.blue { background: rgba(47,140,255,.16); color: var(--blue); }
.icon.cyan { background: rgba(79,209,255,.14); color: var(--cyan); }
.icon.green { background: rgba(92,194,107,.15); color: var(--green); }
.icon.amber { background: rgba(255,179,0,.15); color: var(--amber); }
.icon.red { background: rgba(255,90,82,.15); color: var(--red); }

.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.chip { border: 1px solid var(--line); background: var(--panel-2); color: #d2d2d7; padding: 8px 14px; border-radius: 999px; font-size: 14px; }
.list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.list li { display: flex; gap: 12px; color: #d2d2d7; }
.list li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 9px; border-radius: 50%; background: var(--blue); }
.list.green li::before { background: var(--green); }
.list.amber li::before { background: var(--amber); }

/* Card della dashboard come "prodotto" */
.device { border-radius: 26px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px var(--line); background: #10202b; }
.device img { width: 100%; }
.device.small { max-width: 420px; margin: 0 auto; }

/* ---------- Racconto con immagine fissa (card) ---------- */
.story > * { min-width: 0; }
.kicker { overflow-wrap: anywhere; }
.story { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-top: 60px; }
.story .media { position: sticky; top: 90px; height: calc(100vh - 120px); display: flex; align-items: center; justify-content: center; }
.story .media .frame { position: relative; width: 100%; max-width: 440px; height: 100%; }
.story .media img {
  position: absolute; inset: 0; margin: auto; max-height: 100%; width: auto; max-width: 100%;
  border-radius: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px var(--line);
  opacity: 0; transform: scale(.96); transition: opacity .6s ease, transform .6s ease;
}
.story .media img.on { opacity: 1; transform: none; }
.story .steps .step { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; opacity: .25; transition: opacity .5s; }
.story .steps .step.on { opacity: 1; }
.story .steps .step h3 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; }
.story .steps .step p { color: var(--muted); font-size: 19px; margin: 16px 0 0; }
.story .steps .step .m { display: none; }
@media (max-width: 900px) {
  .story { grid-template-columns: 1fr; }
  .story .media { display: none; }
  .story .steps .step { min-height: auto; opacity: 1; padding: 30px 0; }
  .story .steps .step .m { display: block; margin-top: 24px; border-radius: 20px; box-shadow: 0 0 0 1px var(--line); max-width: 440px; }
}

/* ---------- Live Activity ---------- */
.phone {
  width: 330px; max-width: 100%; aspect-ratio: 9 / 19.5; margin: 0 auto; border-radius: 54px; padding: 12px;
  background: linear-gradient(145deg, #2a2d33, #0d0f12); box-shadow: 0 50px 120px rgba(47,140,255,.18), inset 0 0 0 2px #3a3d44;
}
.phone .screen {
  height: 100%; border-radius: 44px; overflow: hidden; position: relative;
  background: radial-gradient(120% 80% at 30% 10%, #2a4f7a, #0b1a2c 55%, #060a12);
  padding: 18px 14px; display: flex; flex-direction: column; align-items: center;
}
.phone .island { width: 120px; height: 34px; background: #000; border-radius: 20px; margin-top: 2px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; font-size: 12px; font-weight: 600; }
.phone .island .dot { width: 18px; height: 18px; border-radius: 50%; background: rgba(47,140,255,.25); display: grid; place-items: center; font-size: 11px; }
.phone .date { margin-top: 26px; font-size: 16px; font-weight: 600; color: rgba(255,255,255,.85); }
.phone .clock { font-size: 82px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; color: rgba(255,255,255,.92); }
.phone .la {
  margin-top: auto; margin-bottom: 26px; width: 100%; border-radius: 24px; padding: 14px 16px;
  background: rgba(20, 22, 26, .78); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  font-size: 13px;
}
.phone .la .top { display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.phone .la .top span:last-child { color: var(--cyan); }
.phone .la .row { color: #d2d2d7; padding: 2px 0; }
.phone .la .bar { height: 5px; border-radius: 3px; background: rgba(255,255,255,.12); margin-top: 10px; overflow: hidden; }
.phone .la .bar i { display: block; height: 100%; width: 38%; background: linear-gradient(90deg, var(--cyan), var(--blue)); border-radius: 3px; animation: fill 6s ease-in-out infinite alternate; }
@keyframes fill { to { width: 72%; } }
.phone .la .sum { color: #d2d2d7; padding: 2px 0; }

/* ---------- Autoapprendimento ---------- */
.learn-chart svg { width: 100%; height: auto; display: block; }
.learn-chart .target { stroke: var(--green); stroke-dasharray: 6 6; stroke-width: 2; }
.learn-chart .barv { fill: url(#gb); transform-origin: bottom; transform-box: fill-box; transform: scaleY(0); transition: transform 1s cubic-bezier(.2,.7,.2,1); }
.learn-chart.in .barv { transform: scaleY(1); }
.learn-chart .lbl { fill: var(--muted); font-size: 13px; font-family: var(--font); }
.learn-chart .fac { fill: #fff; font-size: 15px; font-weight: 700; font-family: var(--font); }

/* ---------- Codice ---------- */
pre.code {
  background: #0d1117; border: 1px solid var(--line); border-radius: 20px; padding: 24px; overflow-x: auto;
  font: 14px/1.6 var(--mono); color: #c9d1d9; margin: 0;
}
pre.code .c { color: #8b949e; } pre.code .k { color: #ff7b72; } pre.code .v { color: #79c0ff; } pre.code .n { color: #a5d6ff; }
.preview { margin-top: 16px; display: grid; gap: 10px; }
.preview div { display: flex; justify-content: space-between; background: var(--panel-2); border-radius: 14px; padding: 12px 16px; font-size: 15px; }
.preview b { color: var(--cyan); }

/* ---------- Tabelle ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.table td:first-child { font-weight: 600; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

/* ---------- Installazione ---------- */
.steps-n { counter-reset: s; display: grid; gap: 18px; margin-top: 40px; }
.steps-n li { list-style: none; counter-increment: s; display: flex; gap: 18px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.steps-n li::before { content: counter(s); flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 700; }
.steps-n { padding: 0; }

/* ---------- FAQ ---------- */
details { border-bottom: 1px solid var(--line); padding: 22px 0; }
details summary { cursor: pointer; font-size: 20px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 20px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--blue); font-size: 26px; line-height: 1; transition: transform .3s; }
details[open] summary::after { transform: rotate(45deg); }
details p, details ul { color: var(--muted); margin: 14px 0 0; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 50px 0 70px; color: var(--dim); font-size: 13px; }
footer .row { display: flex; flex-wrap: wrap; gap: 26px; justify-content: space-between; align-items: center; }
footer .links { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--muted); }
.coffee img { height: 44px; }

.final { text-align: center; padding: 160px 0; background: radial-gradient(60% 60% at 50% 40%, rgba(47,140,255,.22), transparent 70%); }
.final img.ic { width: 110px; margin: 0 auto 30px; }
@media (max-width: 700px) { section.block { padding: 90px 0; } .hero { padding-top: 100px; } .final { padding: 100px 0; } }
