/* NDATECH — reset e stili di base.
   Nessun framework: solo elementi, con il minimo indispensabile di classi. */

*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-m));
}

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--slate-900);
  background: var(--paper-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: inherit;
  text-wrap: balance;
}

h1 { font-size: var(--step-5); letter-spacing: -0.03em; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }
h5, h6 { font-size: var(--step-0); letter-spacing: 0; }

p, li { text-wrap: pretty; }
p { max-width: var(--measure); }

a {
  color: var(--brand-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--brand-900); }

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

ul, ol { padding-inline-start: 1.25em; }

code, kbd, samp, pre { font-family: var(--font-mono); font-size: 0.92em; }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 3px;
  border-radius: var(--radius-s);
}

hr {
  border: 0;
  border-top: 1px solid var(--paper-200);
}

/* --- Utility minime --- */
.shell { background: var(--ink-900); color: var(--ink-100); }
.shell a { color: var(--brand-300); }
.shell a:hover { color: var(--ink-100); }

.wrap {
  width: min(100% - (var(--gutter) * 2), var(--shell-max));
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Rivelazione allo scorrimento --- */
/* Senza JS tutto resta visibile: .js e' aggiunto da uno script inline nell'head. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(var(--reveal-shift));
  transition:
    opacity var(--dur-slow) var(--ease-out),
    transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}
.js [data-reveal="left"]  { transform: translateX(calc(var(--reveal-shift) * -1)); }
.js [data-reveal="right"] { transform: translateX(var(--reveal-shift)); }
.js [data-reveal="none"]  { transform: none; }
.js [data-reveal].is-in   { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}
