/* ==========================================================================
   Nice B2B — base: font, reset, tipografia, layout, utility
   ========================================================================== */

/* Font self-hosted (variabili, latin + latin-ext) */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../../fonts/plus-jakarta-sans-latin-wght.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../../fonts/plus-jakarta-sans-latin-ext-wght.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("../../fonts/jetbrains-mono-latin-wght.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("../../fonts/jetbrains-mono-latin-ext-wght.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fredoka"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("../../fonts/fredoka-latin-wght.woff2") format("woff2"); }
@font-face { font-family: "Fredoka"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("../../fonts/fredoka-latin-ext-wght.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF; }

/* Rete di sicurezza: l'attributo hidden vince sempre su display (overlay e pannelli lo tolgono prima di animare) */
[hidden] { display: none !important; }

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, picture, svg, video { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
:where(ul[role="list"], ol[role="list"]) { list-style: none; padding: 0; }
table { border-collapse: collapse; }
::selection { background: var(--accent-soft); color: var(--ink); }

/* Focus: anello orchidea visibile solo da tastiera */
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-sm); }
.n-btn:focus-visible, .n-chip:focus-visible, .n-icon-btn:focus-visible { border-radius: var(--r-pill); }

/* Tipografia */
h1, h2, h3, h4, h5 { font-weight: var(--fw-semibold); line-height: var(--lh-snug); letter-spacing: -0.01em; }
.n-display { font-size: var(--fs-display); font-weight: var(--fw-semibold); letter-spacing: -2px; line-height: 1.05; }
.n-h1 { font-size: var(--fs-h1); font-weight: var(--fw-semibold); letter-spacing: -1.4px; line-height: 1.15; }
.n-h2 { font-size: var(--fs-h2); font-weight: var(--fw-semibold); letter-spacing: -0.8px; line-height: 1.2; }
.n-h3 { font-size: var(--fs-h3); font-weight: var(--fw-semibold); letter-spacing: -0.6px; line-height: 1.25; }
.n-h4 { font-size: var(--fs-h4); font-weight: var(--fw-semibold); letter-spacing: -0.3px; }
.n-h5 { font-size: var(--fs-h5); font-weight: var(--fw-semibold); }
.n-eyebrow { font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
.n-lead { font-size: var(--fs-xl); line-height: 1.55; color: var(--ink-2); }
.n-text { font-size: var(--fs-base); color: var(--ink-2); }
.n-small { font-size: var(--fs-md); color: var(--ink-2); }
.n-caption { font-size: var(--fs-sm); color: var(--muted); }
.n-muted { color: var(--muted); }
.n-mono { font-family: var(--font-mono); font-weight: var(--fw-semibold); }
.n-link { font-weight: var(--fw-bold); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color var(--dur-1) var(--ease); }
.n-link:hover { color: var(--accent-ink); }
.n-link--accent { color: var(--accent-ink); }
.n-num { font-variant-numeric: tabular-nums; }

/* Layout */
.n-page { display: flex; flex-direction: column; min-height: 100vh; }
.n-main { flex: 1; }
.n-page { padding-bottom: var(--cartbar-h); }
.n-container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.n-section { padding-top: var(--section-gap); }
.n-stack { display: flex; flex-direction: column; gap: var(--gap, var(--s-4)); }
.n-row { display: flex; align-items: center; gap: var(--gap, var(--s-3)); }
.n-row--between { justify-content: space-between; }
.n-row--end { align-items: flex-end; }
.n-row--wrap { flex-wrap: wrap; }
.n-grow { flex: 1 1 auto; min-width: 0; }
.n-grid { display: grid; gap: var(--gap, var(--s-6)); grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
@media (max-width: 1024px) { .n-grid { --cols: var(--cols-md, 2); } }
@media (max-width: 600px) { .n-grid { --cols: var(--cols-sm, 1); } }

/* Scorrimento orizzontale (caroselli su mobile) */
.n-scroller { display: flex; gap: var(--gap, var(--s-3)); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.n-scroller::-webkit-scrollbar { display: none; }
.n-scroller > * { scroll-snap-align: start; flex: 0 0 auto; }

/* Utility */
.n-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.n-skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--r-pill); background: var(--ink); color: #fff; font-weight: var(--fw-bold); transition: top var(--dur-2) var(--ease); }
.n-skip:focus { top: 12px; }
.n-only-mobile, .n-only-mobile-flex, .n-only-mobile-block { display: none !important; }
@media (max-width: 600px) {
  .n-only-mobile { display: revert !important; }
  .n-btn.n-only-mobile, .n-row.n-only-mobile { display: inline-flex !important; }
  .n-hide-mobile { display: none !important; }
  .n-only-mobile-flex { display: flex !important; }
  .n-only-mobile-block { display: block !important; }
}
@media (max-width: 1024px) { .n-hide-tablet { display: none !important; } }
.n-divider { height: 1px; background: var(--line); border: 0; }
