/* Pagina pubblica TeloComando. Colori e contrasti: vedi scripts/check-contrast.mjs (testo 4,5:1, elementi 3:1). */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/inter-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/inter-latin-700-normal.woff2') format('woff2');
}

:root {
  color-scheme: light dark;
  --bg: #f4f5fb;
  --surface: #ffffff;
  --surface-2: #e9ebf6;
  --text: #14173f;
  --text-muted: #4a4e75;
  --border: #6a6e96;
  --border-soft: #c5c8e0;
  --primary: #1b1e5a;
  --accent: #e0620a;
  --accent-text: #b04a00;
  --btn-bg: #b04a00;
  --btn-text: #ffffff;
  --focus: #1b1e5a;
  --code-bg: #e9ebf6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f2b;
    --surface: #161a40;
    --surface-2: #1f2452;
    --text: #e8eaff;
    --text-muted: #b3b8e0;
    --border: #8a90c8;
    --border-soft: #2e3466;
    --primary: #e8eaff;
    --accent: #ff9a3c;
    --accent-text: #ff9a3c;
    --btn-bg: #ff9a3c;
    --btn-text: #0d0f2b;
    --focus: #ff9a3c;
    --code-bg: #0d0f2b;
  }
}

*,
*::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 1rem/1.6 'Inter',
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
}
a {
  color: var(--accent-text);
  text-underline-offset: 0.2em;
}
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
.wrap {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1rem;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--surface);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  z-index: 2;
}
.skip:focus {
  top: 0.5rem;
}

header.top {
  border-bottom: 1px solid var(--border-soft);
}
header.top .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}
.brand img {
  display: block;
  height: 2rem;
  width: auto;
}
nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav a {
  display: inline-block;
  padding: 0.5rem 0;
  min-height: 2.75rem;
  line-height: 1.75rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
}
nav a:hover {
  color: var(--accent-text);
  text-decoration: underline;
}

.hero {
  padding: 3.5rem 0 3rem;
}
h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.875rem, 6vw, 3rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 22ch;
}
.lead {
  margin: 0 0 1.75rem;
  max-width: 40rem;
  font-size: 1.125rem;
  color: var(--text-muted);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.btn {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  min-height: 3rem;
  border-radius: 8px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 700;
  text-decoration: none;
}
.btn:hover {
  filter: brightness(1.08);
}
.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--border);
}
.btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-soft);
}
h2 {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h3 {
  margin: 0 0 0.375rem;
  font-size: 1.0625rem;
  line-height: 1.35;
  font-weight: 700;
}
p {
  margin: 0 0 1rem;
  max-width: 42rem;
}
.intro {
  color: var(--text-muted);
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 1.25rem;
}
.card p {
  margin: 0;
  color: var(--text-muted);
}
.card h3 {
  color: var(--text);
}
.num {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.75rem;
  border: 2px solid var(--accent);
  border-radius: 50%;
  color: var(--accent-text);
  font-weight: 700;
}

.limits {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  max-width: 42rem;
}
.limits li {
  margin-bottom: 0.5rem;
}

dl.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}
dl.facts dt {
  font-weight: 600;
  color: var(--text-muted);
}
dl.facts dd {
  margin: 0;
  min-width: 0;
}
code,
.hash {
  font:
    400 0.875rem/1.5 ui-monospace,
    'Cascadia Mono',
    Consolas,
    Menlo,
    monospace;
  background: var(--code-bg);
  border-radius: 4px;
  padding: 0.125rem 0.375rem;
  overflow-wrap: anywhere;
  word-break: break-all;
}
pre {
  margin: 0 0 1rem;
  padding: 0.875rem 1rem;
  background: var(--code-bg);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  overflow-x: auto;
  max-width: 42rem;
}
pre code {
  padding: 0;
  background: none;
  word-break: normal;
  overflow-wrap: normal;
}
ol.steps {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  max-width: 42rem;
}
ol.steps li {
  margin-bottom: 0.625rem;
}

footer {
  border-top: 1px solid var(--border-soft);
  padding: 1.5rem 0 2.5rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}
footer p {
  margin: 0;
}

@media (max-width: 30rem) {
  dl.facts {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  dl.facts dd {
    margin-bottom: 0.75rem;
  }
  .hero {
    padding-top: 2.25rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
