/* Design system condiviso: landing, login, area clienti.
   Direzione: sala di controllo notturna — nero caldo, linee sottilissime,
   mono per tutto ciò che è dato, un solo accento lime elettrico. */

:root {
  --bg: #07080a;
  --bg-2: #0c0e11;
  --panel: #0f1215;
  --panel-2: #14181c;
  --line: #1e2328;
  --line-2: #2a3138;
  --text: #e9ecef;
  --muted: #8a949e;
  --dim: #5b646d;
  --accent: #c8ff2e;
  --accent-ink: #0a1100;
  --accent-glow: rgba(200, 255, 46, .14);
  --danger: #ff5d5d;
  --warn: #ffb347;
  --ok: #4ade80;
  --radius: 10px;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --sans: "Geist", "Helvetica Neue", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
  min-height: 100vh; overflow-x: hidden;
}
body::before { /* griglia tecnica + grana */
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 80% -10%, var(--accent-glow), transparent 60%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 64px 64px;
  opacity: .5;
  mask-image: linear-gradient(to bottom, #000 0, #000 55%, transparent 100%);
}
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* ─── Bottoni ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 20px; border-radius: 8px; cursor: pointer;
  font: 500 14px/1 var(--mono); letter-spacing: .02em; white-space: nowrap;
  border: 1px solid var(--line-2); background: transparent;
  transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { border-color: var(--muted); background: var(--panel-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn-primary:hover { background: #d8ff63; border-color: #d8ff63; box-shadow: 0 0 0 4px var(--accent-glow), 0 8px 30px -8px var(--accent); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 12.5px; }
.btn-lg { height: 52px; padding: 0 28px; font-size: 15px; }
.btn-ghost { border-color: transparent; }
.btn-danger { color: var(--danger); border-color: rgba(255, 93, 93, .35); }
.btn-danger:hover { background: rgba(255, 93, 93, .08); border-color: var(--danger); }

/* ─── Header ─── */
.nav {
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(14px) saturate(1.3);
  background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 17px/1 var(--mono); letter-spacing: -.01em; }
.brand-mark { width: 28px; height: 37px; background: var(--accent); -webkit-mask: url(/static/logo-white.png) center / contain no-repeat; mask: url(/static/logo-white.png) center / contain no-repeat; flex: none; transition: filter .3s, transform .4s var(--ease); }
.brand:hover .brand-mark { filter: drop-shadow(0 0 9px rgba(200, 255, 46, .6)); transform: translateY(-1px) scale(1.04); }
.foot .brand-mark { width: 34px; height: 45px; }
.foot .brand { gap: 14px; }
/* sagoma del logo dietro al finale */
.cta::before { content: ""; position: absolute; left: 50%; top: 50%; height: 84%; max-width: 90vw; aspect-ratio: 387 / 512; transform: translate(-50%, -54%); background: url(/static/logo-white.png) center / contain no-repeat; opacity: .05; pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 55%, transparent 92%); mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 55%, transparent 92%); }
.nav-links { display: flex; gap: 28px; font: 400 13px/1 var(--mono); color: var(--muted); }
.nav-links a { transition: color .2s; padding: 8px 0; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.burger { display: none; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 8px; background: none; cursor: pointer; }

/* ─── Tipografia sezioni ─── */
.eyebrow { font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--accent); }
h1, h2, h3 { margin: 0; font-weight: 500; letter-spacing: -.025em; line-height: 1.04; }
h2 { font-size: clamp(32px, 4.6vw, 54px); }
h2 em, h1 em { font: italic 400 1.04em/1 var(--serif); letter-spacing: -.01em; color: var(--accent); }
.lead { color: var(--muted); font-size: 18px; max-width: 58ch; }
section { padding: 110px 0; position: relative; }
.sec-head { display: grid; gap: 20px; margin-bottom: 56px; max-width: 760px; }

/* ─── Card / pannelli ─── */
.card { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); }
.tag { display: inline-flex; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; padding: 6px 9px; border: 1px solid var(--line-2); border-radius: 99px; color: var(--muted); }
.tag-accent { color: var(--accent); border-color: rgba(200, 255, 46, .35); background: var(--accent-glow); }

/* ─── Form ─── */
.field { display: grid; gap: 8px; }
.field > label, .label { font: 500 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.input, select.input {
  height: 48px; width: 100%; padding: 0 14px; border-radius: 8px; background: var(--bg);
  border: 1px solid var(--line-2); font: 400 15px/1 var(--mono); transition: border-color .2s, box-shadow .2s;
  appearance: none;
}
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 19px) 21px, calc(100% - 14px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
.input::placeholder { color: var(--dim); }

.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 9px; }
.seg button { height: 36px; padding: 0 14px; border: 0; background: none; border-radius: 6px; cursor: pointer; font: 500 13px/1 var(--mono); color: var(--muted); transition: all .18s; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-2); background: none; cursor: pointer; font: 500 13px/1 var(--mono); color: var(--muted); transition: all .18s; }
.chip:hover { border-color: var(--muted); color: var(--text); }
.chip[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

.notice { padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line-2); font: 400 13.5px/1.5 var(--mono); }
.notice.err { border-color: rgba(255, 93, 93, .4); color: #ffb0b0; background: rgba(255, 93, 93, .06); }
.notice.ok { border-color: rgba(74, 222, 128, .4); color: #b6f2cd; background: rgba(74, 222, 128, .06); }

/* ─── Reveal on scroll ─── */
.rv { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } * { animation: none !important; scroll-behavior: auto; } }

/* ─── Footer ─── */
.foot { border-top: 1px solid var(--line); padding: 64px 0 40px; color: var(--muted); font: 400 13px/1.7 var(--mono); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; }
.foot h4 { margin: 0 0 14px; font: 500 11.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text); }
.foot a { display: block; padding: 4px 0; transition: color .2s; }
.foot a:hover { color: var(--accent); }
.foot-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

@media (max-width: 860px) {
  section { padding: 76px 0; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 12px 20px 20px; background: var(--bg); border-bottom: 1px solid var(--line); font-size: 15px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .burger { display: inline-grid; place-items: center; }
  .nav-cta .btn-ghost { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Barra di scorrimento: scrollbar nativa nascosta, progresso sopra la navbar (come nyxon) ── */
html { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }
.scrollbar { position: fixed; left: 0; right: 0; top: 0; height: 2px; z-index: 10000; pointer-events: none; }
.scrollbar i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); box-shadow: 0 0 10px var(--accent), 0 0 2px var(--accent); will-change: transform; }

/* campi numerici senza le freccine su/giù (si scrive il numero a mano) */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }

/* ── Menu "Prodotti" a tendina ── */
.dd { position: relative; display: flex; align-items: center; }
.dd-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 0; border: 0; background: none; cursor: pointer; font: inherit; color: inherit; transition: color .2s; }
.dd-btn:hover, .dd.open .dd-btn, .dd-btn.on { color: var(--text); }
.dd-btn svg { width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform .25s var(--ease); }
.dd.open .dd-btn svg { transform: rotate(180deg); }
.dd-menu { position: absolute; top: calc(100% + 10px); left: -14px; min-width: 250px; padding: 8px; border: 1px solid var(--line-2); border-radius: 12px; background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(14px); box-shadow: 0 24px 60px -20px #000; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .25s var(--ease), visibility .2s; display: grid; gap: 2px; z-index: 60; }
.dd::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 14px; }
.dd:hover .dd-menu, .dd.open .dd-menu, .dd:focus-within .dd-menu { opacity: 1; visibility: visible; transform: none; }
.nav-links .dd-menu a { display: grid; grid-template-columns: 34px 1fr; gap: 2px 12px; align-items: center; padding: 10px; border-radius: 8px; color: var(--text); }
.dd-menu a:hover { background: var(--panel-2); }
.dd-menu .di { grid-row: span 2; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; border: 1px solid rgba(200, 255, 46, .25); background: var(--accent-glow); color: var(--accent); }
.dd-menu .di svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dd-menu b { font: 500 13.5px/1.2 var(--sans); }
.dd-menu small { font: 400 11.5px/1.3 var(--mono); color: var(--muted); }
@media (max-width: 860px) {
  .dd { display: block; border-bottom: 1px solid var(--line); }
  .dd-btn { width: 100%; justify-content: space-between; padding: 14px 0; font-size: 15px; }
  .dd-menu { position: static; opacity: 1; visibility: visible; transform: none; display: none; min-width: 0; padding: 0 0 10px; border: 0; box-shadow: none; background: none; backdrop-filter: none; }
  .dd.open .dd-menu { display: grid; }
  .dd:hover .dd-menu { display: none; } .dd.open:hover .dd-menu { display: grid; }
  .nav-links .dd-menu a { border-bottom: 0; padding: 10px 6px; }
}

/* ─── Stile minimal: testi in sans, etichette sobre, bottoni e campi più puliti ─── */
.field > label, .label { font: 500 13px/1.35 var(--sans); letter-spacing: 0; text-transform: none; color: var(--text); }
.field > label .muted, .label .muted { font-weight: 400; color: var(--muted); }
.help { font: 400 12.5px/1.55 var(--sans); color: var(--muted); }
.btn { font: 500 13.5px/1 var(--sans); letter-spacing: 0; border-radius: 10px; }
.btn-sm { font-size: 13px; }
.btn-primary { font-weight: 600; }
.input, select.input { border-radius: 10px; }
.notice { font: 400 13px/1.5 var(--sans); border-radius: 10px; }
.tag { font: 500 10.5px/1 var(--mono); letter-spacing: .06em; }
