/* Zendarm IPStatus - foglio di stile locale (nessuna dipendenza esterna).
   Palette e componenti coerenti con zendarm.it e con la console. */

:root {
  --bg: #020617;
  --surface: #0f172a;
  --surface-2: #1e293b;
  --border: #1e293b;
  --border-soft: rgba(30, 41, 59, 0.6);
  --text: #f1f5f9;
  --muted: #bfbfbf;
  --muted-2: #94a3b8;

  --brand-400: #60a5fa;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --amber-400: #fbbf24;
  --red-400: #f87171;
  --emerald-400: #34d399;
  --mint: #05f6c9;

  --radius: 0.75rem;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--brand-500); color: #020617; }
[hidden] { display: none !important; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.container.narrow { max-width: 720px; }

/* Navbar */
.navbar {
  position: sticky; top: 0; z-index: 50;
  height: 4rem;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-mark {
  width: 2rem; height: 2rem; border-radius: 0.5rem;
  background: var(--brand-500);
  display: flex; align-items: center; justify-content: center;
}
.brand-mark svg { width: 1.25rem; height: 1.25rem; color: #020617; }
.brand-name { font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; }
.brand-name span { color: var(--brand-500); }
.nav-right { display: flex; align-items: center; gap: 1.25rem; }
.nav-link { font-size: 0.875rem; font-weight: 500; color: var(--muted); }
.nav-link:hover { color: var(--text); }
.lang { display: flex; border: 1px solid var(--border); border-radius: 0.5rem; overflow: hidden; }
.lang a { padding: 0.3rem 0.7rem; font-size: 0.75rem; font-weight: 600; color: var(--muted-2); }
.lang a:hover { color: var(--text); }
.lang a.on { background: var(--surface-2); color: var(--text); }

/* Hero */
.hero { padding: 4.5rem 0 0.5rem; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.35rem 0.85rem; border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, .35);
  background: rgba(59, 130, 246, .1);
  color: var(--brand-400);
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 1.6rem;
}
.dot { width: 0.5rem; height: 0.5rem; border-radius: 999px; background: var(--brand-500); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.hero h1 { font-size: 2.25rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; line-height: 1.15; max-width: 640px; margin: 0 auto; }
@media (min-width: 640px) { .hero h1 { font-size: 3rem; } }
.accent {
  background: linear-gradient(90deg, var(--brand-500), var(--amber-400));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub { margin: 1.1rem auto 0; max-width: 520px; color: var(--muted); font-size: 1.05rem; }

/* Card di verifica */
.wrap { max-width: 580px; margin: 2.25rem auto 0; padding: 0 1.25rem 3rem; }
.card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: 0 20px 40px -25px rgba(0, 0, 0, .6);
}
label, .label {
  display: block;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin-bottom: 0.5rem;
}
.row { display: flex; gap: 0.7rem; }
input.ip, .field input, .field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--surface-2);
  border-radius: 0.6rem;
  color: var(--text);
  padding: 0.75rem 0.9rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
}
input.ip { font-family: var(--font-mono); font-size: 1.15rem; font-weight: 500; color: var(--mint); min-width: 0; }
input.ip::placeholder { color: var(--muted-2); opacity: .6; }
input:focus, textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(59, 130, 246, .15); }
.hint { font-size: 0.78rem; color: var(--muted-2); margin: 0.75rem 0 0; }
.hint.err { color: var(--red-400); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.8rem 1.4rem;
  border-radius: 0.6rem;
  font-family: var(--font-sans);
  font-weight: 600; font-size: 0.95rem;
  border: 1px solid transparent;
  background: var(--brand-500); color: #020617;
  cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, transform .05s ease;
}
.btn:hover { background: var(--brand-600); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: var(--surface); color: #e2e8f0; border-color: var(--border); }
.btn.ghost:hover { background: var(--surface-2); }

.bar { height: 3px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 1rem; }
.bar i { display: block; height: 100%; width: 40%; background: var(--brand-500); border-radius: 999px; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }

/* Esito */
.res {
  margin-top: 1rem;
  border: 1px solid;
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  display: flex; gap: 0.9rem; align-items: flex-start;
}
.res svg { width: 1.7rem; height: 1.7rem; flex: none; margin-top: 0.1rem; }
.res h3 { margin: 0; font-size: 1.1rem; font-weight: 700; color: #fff; }
.res p { margin: 0.4rem 0 0; font-size: 0.9rem; color: #cbd5e1; }
.res .res-body { flex: 1; min-width: 0; }
.res-ok, .res-sent { background: rgba(52, 211, 153, .08); border-color: rgba(52, 211, 153, .35); }
.res-ok svg, .res-sent svg { color: var(--emerald-400); }
.res-blocked { background: rgba(248, 113, 113, .08); border-color: rgba(248, 113, 113, .35); }
.res-blocked svg { color: var(--red-400); }
.res-recent, .res-limit { background: rgba(251, 191, 36, .08); border-color: rgba(251, 191, 36, .35); }
.res-recent svg, .res-limit svg { color: var(--amber-400); }
.res-error { background: rgba(148, 163, 184, .08); border-color: rgba(148, 163, 184, .3); }
.res-error svg { color: var(--muted-2); }
.res .btn { margin-top: 1rem; }

/* Form di richiesta */
.reqform { margin-top: 1rem; display: grid; gap: 1rem; text-align: left; }
.reqform h2 { margin: 0; font-size: 1.1rem; color: #fff; }
.field label { margin-bottom: 0.4rem; }
.field textarea { resize: vertical; min-height: 110px; }
.chk { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.8rem; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted-2); margin: 0; cursor: pointer; }
.chk input { margin-top: 0.2rem; accent-color: var(--brand-500); }
.chk a { color: var(--brand-400); text-decoration: underline; }
.ferr { margin: 0; font-size: 0.85rem; color: var(--red-400); }
.form-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.sla { font-size: 0.78rem; color: var(--muted-2); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Pagine di testo */
.doc { padding: 3rem 0 4rem; }
.doc-title { font-size: 1.9rem; font-weight: 800; color: #fff; margin: 0 0 1.5rem; letter-spacing: -0.01em; }
.doc h2 { font-size: 1.05rem; color: #fff; margin: 1.75rem 0 0.5rem; }
.doc p { color: var(--muted); font-size: 0.95rem; margin: 0 0 0.75rem; }
.doc a { color: var(--brand-400); }
.back { margin-top: 2rem; }

/* Footer */
.foot { border-top: 1px solid var(--border-soft); padding: 1.5rem 0; font-size: 0.75rem; color: var(--muted-2); }
.foot-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.foot a:hover { color: var(--text); }

@media (max-width: 520px) {
  .row { flex-direction: column; }
  .btn { width: 100%; }
  .nav-link { display: none; }
  .hero { padding-top: 3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .dot, .bar i { animation: none; }
}
