/* Reset, tipografia di base, bottoni e utilità condivise */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--z0);
  color: var(--foam);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(28px, 4.2vw, 50px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding: 0;
}
ul {
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Evidenziazioni dentro le traduzioni (<hl> e <b>) */
.hl {
  text-decoration: underline var(--buoy) 3px;
  text-decoration-skip-ink: none;
  text-underline-offset: 0.2em;
}
.em {
  font-weight: 700;
  color: var(--foam);
}

/* ---------- Sezioni e zone di profondità ---------- */
.section {
  position: relative;
  padding-block: clamp(64px, 8vw, 104px);
  background: linear-gradient(180deg, var(--from), var(--to));
}
.section.section--tight {
  padding-top: 0;
}
.zone--1 {
  --from: var(--z1);
  --to: var(--z2);
}
.zone--2 {
  --from: var(--z2);
  --to: var(--z3);
}
.zone--3 {
  --from: var(--z3);
  --to: var(--z4);
}
.zone--4 {
  --from: var(--z4);
  --to: var(--z5);
}
.zone--5 {
  --from: var(--z5);
  --to: var(--z6);
}
.zone--6 {
  --from: var(--z6);
  --to: var(--z7);
}
.zone--7 {
  --from: var(--z7);
  --to: var(--z8);
}
.zone--8 {
  --from: var(--z8);
  --to: var(--z9);
}
.zone--9 {
  --from: var(--z9);
  --to: var(--z10);
}

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border: 0;
  border-radius: 999px;
  font: 700 14px/1 var(--font-display);
  letter-spacing: 0.01em;
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  transition:
    transform 0.25s var(--ease),
    filter 0.25s,
    box-shadow 0.25s;
}
.btn svg {
  width: 22px;
  height: 22px;
  flex: none;
}
.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}
.btn:active {
  transform: translateY(1px);
}
.btn--lg {
  padding: 19px 34px;
  font-size: 15px;
}
.btn--primary {
  background: var(--buoy);
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(245, 181, 58, 0.35);
}
.btn--discord {
  background: var(--discord);
  box-shadow: 0 10px 28px rgba(88, 101, 242, 0.4);
}
.btn--telegram {
  background: var(--telegram);
  box-shadow: 0 10px 28px rgba(22, 123, 176, 0.4);
}
.btn--ghost {
  background: var(--glass);
  box-shadow: inset 0 0 0 1.5px var(--line);
  backdrop-filter: blur(6px);
}

/* ---------- Icone colorate (pastiglie) ---------- */
.tone {
  display: grid;
  place-items: center;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--t) 20%, transparent);
  color: var(--t);
}
.tone svg {
  width: 24px;
  height: 24px;
}
.tone--lg {
  width: 64px;
  height: 64px;
  border-radius: 20px;
}
.tone--lg svg {
  width: 30px;
  height: 30px;
}
.tone--cyan {
  --t: var(--cyan);
}
.tone--leaf {
  --t: var(--leaf);
}
.tone--coral {
  --t: var(--coral);
}

/* Elenchi con spunta (requisiti) */
.checks {
  display: grid;
  gap: 10px;
}
.checks li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.checks svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  padding: 3px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--leaf) 25%, transparent);
  color: var(--leaf);
}
.checks a {
  font-weight: 700;
  text-underline-offset: 3px;
}

/* ---------- Luce che segue il cursore ---------- */
.glow {
  position: relative;
  isolation: isolate;
}
.glow::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, -40%),
    rgba(255, 255, 255, 0.16),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.glow:hover::before {
  opacity: 1;
}

/* ---------- Movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
.cms-preview-bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 9999;
  background: #f3c66b;
  color: #211805;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  gap: 16px;
  font:
    600 14px/1.4 system-ui,
    sans-serif;
  min-height: 52px;
}
.cms-preview-bar a {
  color: #211805;
  text-decoration: underline;
}
body:has(.cms-preview-bar) {
  padding-top: 72px;
}
body:has(.cms-preview-bar) .nav {
  top: 72px;
}
@media (max-width: 600px) {
  .cms-preview-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 10px 16px;
  }
}
