/* MetaCraft — Base styles (Typography, Layout, Color) */
/* Font strategy: 1 family (Manrope) with limited weights -> performance + consistency */
/* ============================
   Fonts: Manrope (self-hosted)
   ============================ */

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope/Manrope-ExtraLight.ttf") format("truetype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope/Manrope-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope/Manrope-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope/Manrope-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope/Manrope-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope/Manrope-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Manrope";
  src: url("/assets/fonts/manrope/Manrope-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette (chiara) — regola 60/30/10: background chiaro, superfici bianche, accento blu MetaCraft */
  --bg: #f6f8fb;
  /* 60% */
  --surface: #ffffff;
  /* 30% */
  --card: #ffffff;
  --text: #0b1220;
  --muted: #4b5563;

  --brand: #3492d6;
  /* 10% (CTA) */
  --brand-2: #1c5c9e;
  --accent: var(--brand);

  --line: rgba(11, 18, 32, .10);
  --line2: rgba(11, 18, 32, .06);
  --shadow: 0 18px 60px rgba(11, 18, 32, .12);

  --radius: 22px;
  --radius-sm: 16px;

  /* Spacing scale */
  --s1: 6px;
  --s2: 10px;
  --s3: 14px;
  --s4: 18px;
  --s5: 24px;
  --s6: 34px;
  --s7: 48px;

  /* Typography (1 font family, scala coerente) */
  --font: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --h1: clamp(2.2rem, 1.6rem + 3.2vw, 3.25rem);
  --h2: clamp(1.6rem, 1.25rem + 1.6vw, 2.2rem);
  --h3: 1.15rem;

  --container: 1160px;
}

* {
  box-sizing: border-box
}

html {
  scroll-behavior: smooth
}

body {
  margin: 0;
  /* background: radial-gradient(1200px 600px at 20% 0%, rgba(52, 146, 214, .22), transparent 60%),
    radial-gradient(900px 500px at 80% 10%, rgba(28, 89, 155, .20), transparent 60%),
    var(--bg); */
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Noto Sans", Arial, sans-serif;
  font-size: var(--fs-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  min-height: 100svh;
  /* meglio su mobile; puoi lasciare anche 100vh */
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

html,
body {
  height: 100%;
}

main {
  flex: 1 0 auto;
  /* prende lo spazio “vuoto” senza stirare il footer */
}


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

a {
  color: inherit
}

p {
  margin: 0 0 var(--s2)
}

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

.container {
  width: min(var(--container), calc(100% - 2*var(--s3)));
  margin-inline: auto
}

.section {
  padding: var(--s6) 0
}

.section--tight {
  padding: var(--s5) 0
}

.grid {
  display: grid;
  gap: var(--s3)
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr))
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr))
}

@media (max-width: 900px) {

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr
  }

  .section {
    padding: var(--s5) 0
  }
}

/* Accessibility: visible focus */
:focus-visible {
  outline: 3px solid rgba(74, 169, 255, .85);
  outline-offset: 3px;
  border-radius: 10px
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--brand);
  color: #06101f;
  padding: 10px 14px;
  border-radius: 12px;
  z-index: 9999;
}

.skip-link:focus {
  left: 12px
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--line2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .02em;
  font-size: .92rem;
}

.h1 {
  font-size: var(--fs-4);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s2)
}

.h2 {
  font-size: var(--fs-3);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s2)
}

.h3 {
  font-size: var(--fs-2);
  line-height: 1.18;
  margin: 0 0 var(--s1)
}

.lead {
  font-size: var(--fs-1);
  color: var(--muted)
}

.card {
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: var(--radius);
  padding: var(--s5);
  box-shadow: var(--shadow);
}

.card__inner {
  padding: var(--s4)
}

/* Buttons (Conversion-first) */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.01em;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease;
  will-change: transform;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  border-color: rgba(52, 146, 214, .35);
  box-shadow: 0 14px 34px rgba(52, 146, 214, .25);
}

.btn-primary:hover {
  box-shadow: 0 18px 46px rgba(52, 146, 214, .30);
}

.btn-ghost {
  background: rgba(255, 255, 255, .70);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(52, 146, 214, .10);
  border-color: rgba(52, 146, 214, .22);
}

.btn:active {
  transform: translateY(1px)
}

.btn--primary {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #06101f;
  border-color: rgba(255, 255, 255, .18);
  box-shadow: 0 16px 36px rgba(52, 146, 214, .25);
}

.btn--primary:hover {
  box-shadow: 0 20px 44px rgba(52, 146, 214, .33)
}

.btn--ghost {
  background: var(--line2);
  color: var(--text);
}

.btn--ghost:hover {
  background: var(--line2);
  border-color: rgba(52, 146, 214, .22)
}

.btn--small {
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 800
}

.btn-group {
  display: flex;
  gap: var(--s2);
  flex-wrap: wrap
}

.kbd {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .2);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 800;
  color: var(--muted);
}

/*  Nav */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  height: 90px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img {
  width: 60px;
  height: 60px
}

.brand span {
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: 1.6rem;
  color: var(--text)
}

.brand span em {
  font-style: normal;
  color: var(--brand)
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 18px
}

.nav__links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 800;
  padding: 10px 10px;
  border-radius: 12px;
}

.nav__links a[aria-current="page"] {
  color: var(--text);
  background: var(--line2)
}





/* Forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px
}

label {
  font-weight: 800
}

input,
textarea,
select {
  font: inherit;
  color: var(--text);
  background: var(--line2);
  border: 1px solid var(--line2);
  border-radius: 14px;
  padding: 12px 14px;
}

textarea {
  min-height: 140px;
  resize: vertical
}

.helper {
  color: var(--muted);
  font-size: .95rem
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s2)
}

@media (max-width: 900px) {
  .form-grid {
    grid-template-columns: 1fr
  }
}

/* ============================
   Cookie banner — accessibile + left aligned
   ============================ */

.cookie {
  position: fixed;
  left: 12px;
  right: auto;
  bottom: 12px;
  z-index: 3000;
  display: none;
  max-width: min(720px, calc(100vw - 24px));
}

.cookie.is-open {
  display: block;
}

.cookie .card {
  width: 100%;
  padding: 0;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(11, 18, 32, .10);
  box-shadow: 0 18px 50px rgba(11, 18, 32, .18);
  backdrop-filter: blur(10px);
}
.card_legal {
  width: 100%;
  padding: 0;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(11, 18, 32, .10);
  box-shadow:  unset !important;
  backdrop-filter: blur(10px);
  margin-bottom: 10px;
}

.cookie .card__inner {
  padding: var(--s4);
  display: grid;
  gap: 10px;
}

/* Header riga: titolo a sinistra + close a destra */
.cookie__head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cookie__icon {
  font-size: 20px;
  color: var(--brand-2);
}

.cookie__title {
  margin: 0;
  font-weight: 700;
  /* titolo ok, non eccessivo */
  color: var(--text);
  letter-spacing: -0.01em;
}

.cookie__close {
  margin-left: auto;
  border: 1px solid rgba(11, 18, 32, .10);
  background: rgba(11, 18, 32, .03);
  color: rgba(11, 18, 32, .70);
  border-radius: 12px;
  padding: 8px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}

.cookie__close:hover {
  background: rgba(11, 18, 32, .05);
}

.cookie__text {
  margin: 0;
  color: rgba(11, 18, 32, .74);
  font-weight: 500;
  line-height: 1.55;
}

.cookie__text a {
  color: var(--brand-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* CTA sotto la descrizione: non bold */
.cookie__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.cookie__btn {
  appearance: none;
  border: 1px solid rgba(11, 18, 32, .12);
  background: rgba(11, 18, 32, .03);
  color: rgba(11, 18, 32, .86);
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 600;
  /* non bold */
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.cookie__btn:hover {
  background: rgba(52, 146, 214, .08);
  border-color: rgba(52, 146, 214, .22);
}

.cookie__btn:active {
  transform: translateY(1px);
}

.cookie__btn--primary {
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  border-color: rgba(52, 146, 214, .28);
  color: #fff;
  box-shadow: 0 10px 26px rgba(28, 92, 158, .20);
}

.cookie__btn--primary:hover {
  box-shadow: 0 14px 34px rgba(28, 92, 158, .26);
}

/* Mobile: bottoni full width (molto accessibile) */
@media (max-width: 520px) {
  .cookie {
    left: 10px;
    bottom: 10px;
    max-width: calc(100vw - 20px);
  }

  .cookie__actions {
    flex-direction: column;
  }

  .cookie__btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================
   Cookie FAB (icona fissa)
   ============================ */
.cookie-fab {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 2999;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(11, 18, 32, .10);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 14px 40px rgba(11, 18, 32, .18);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.cookie-fab .material-symbols-outlined {
  font-size: 22px;
  color: var(--brand-2);
}

.cookie-fab:hover {
  background: rgba(52, 146, 214, .10);
  border-color: rgba(52, 146, 214, .22);
}



/* Utility */
.m0 {
  margin: 0
}

.mt2 {
  margin-top: var(--s2)
}

.mt3 {
  margin-top: var(--s3)
}

.mt4 {
  margin-top: var(--s4)
}

/* Utilities */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.u-flex {
  display: flex
}

.u-grid {
  display: grid
}

.u-items-center {
  align-items: center
}

.u-gap-12 {
  gap: 12px
}

.u-gap-10 {
  gap: 10px
}

.u-fw-900 {
  font-weight: 900
}

.u-ls-tight {
  letter-spacing: -.02em
}

.mb-10 {
  margin-bottom: 10px
}

.text-brand {
  color: var(--brand)
}

.text-accent {
  color: var(--accent)
}

.icon-inline {
  font-size: 18px;
  vertical-align: -4px
}

.max-ch {
  max-width: 66ch
}

.list-soft {
  display: grid;
  gap: 10px;
  color: var(--muted);
  padding-left: 18px;
}

.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  opacity: .9
}

.hero--light {
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(52, 146, 214, .22), transparent 60%),
    radial-gradient(900px 500px at 80% 10%, rgba(28, 89, 155, .20), transparent 60%),
    linear-gradient(180deg, #ffffff, var(--bg));
}

:root {
  --header-h: 90px;
}

/* usi già 90px nella nav */

/* Alza SOLO le macchie (radial) di 90px */
.hero--light {
  background:
    radial-gradient(900px 420px at 14% calc(10% - var(--header-h)), rgba(52, 146, 214, .18), transparent 60%),
    radial-gradient(800px 380px at 86% calc(18% - var(--header-h)), rgba(28, 92, 158, .14), transparent 55%),
    linear-gradient(180deg, #ffffff, var(--bg)) !important;
}

/* :root {
  --header-h: -90px;
} */

.hero--light {
  background-position: 100 calc(0px - var(--header-h));
  background-repeat: no-repeat;
}


@media (max-width: 900px) {
  .nav {
    position: relative;
  }

  .nav__links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 90px;
    /* sotto header */
    z-index: 4000;
    /* sopra tutto */
  }

  .nav__links.is-open {
    display: flex !important;
  }
}

/* Bottone dedicato: niente eredità da .btn */
.nl-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  min-height: 44px;            /* target touch */
  padding: 12px 16px;
  border-radius: 14px;

  border: 1px solid rgba(52,146,214,.30);
  color: #fff;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  box-shadow: 0 12px 28px rgba(28,92,158,.22);

  font: inherit;
  font-weight: 700;            /* NON bold “pesante” */
  letter-spacing: -0.01em;
  cursor: pointer;

  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  -webkit-tap-highlight-color: transparent;
}

.nl-btn .material-symbols-outlined{
  font-size: 18px;
}

/* Hover/Focus/Active: non deve MAI diventare bianco */
.nl-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(28,92,158,.26);
  filter: saturate(1.03);
}

.nl-btn:active{
  transform: translateY(0);
  box-shadow: 0 10px 22px rgba(28,92,158,.20);
}

/* Accessibilità focus */
.nl-btn:focus-visible{
  outline: 3px solid rgba(74,169,255,.75);
  outline-offset: 3px;
}
@media (max-width: 900px){
  .nav{ position: relative; }

  .nav__links{
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 90px;             /* sotto header (la tua nav è alta 90px) */
    z-index: 9999;         /* sopra TUTTO */
  }

  .nav__links.is-open{
    display: flex !important;
  }
}
