/* ============================================================
   CheClasse — sito pubblico (landing single-page)
   CSS autonomo (nessun framework). Palette e font del brand.
   ============================================================ */

/* Palette ufficiale CheClasse (vedi "loghi svg/README.txt"):
   primary #4069F6 · secondary #EF8837 · success #55AE82 · danger #EB5132
   warning #F3BE48 · info #51B2F4 · light #EDF2FC · dark #12243A */
:root {
  --blue:        #4069F6;
  --blue-dark:   #2A4FD0;
  --blue-soft:   #8CA5FA;
  --blue-tint:   #EDF2FC;
  --navy:        #12243A;
  --ink:         #1B2A3D;
  --muted:       #5B6B7F;
  --line:        #E4E9F2;
  --bg:          #FFFFFF;
  --bg-alt:      #F6F8FC;
  --green:       #55AE82;
  --green-tint:  #E6F4EE;
  --amber:       #F3BE48;
  --amber-tint:  #FDF4DF;
  --violet:      #8D63D8;
  --violet-tint: #EFE8FA;
  --teal:        #51B2F4;
  --teal-tint:   #E4F2FD;
  --coral:       #EB5132;
  --coral-tint:  #FCE7E2;
  --pink:        #EC4899;
  --pink-tint:   #FDE7F1;
  --radius:      16px;
  --radius-sm:   12px;
  --shadow:      0 18px 50px -20px rgba(12, 36, 60, .28);
  --shadow-sm:   0 8px 24px -12px rgba(12, 36, 60, .22);
  --maxw:        1120px;
  --font:        'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }

h1, h2, h3 { color: var(--navy); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.section { padding: 88px 0; }
.section--alt {
  background:
    radial-gradient(680px 340px at 88% 0%, var(--violet-tint), transparent 60%),
    radial-gradient(680px 340px at 6% 100%, var(--teal-tint), transparent 60%),
    var(--bg-alt);
}
.section__head { max-width: 680px; margin: 0 auto 52px; text-align: center; }
.section__head p { color: var(--muted); font-size: 1.08rem; margin: 0; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--blue); background: var(--blue-tint);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}
.eyebrow--violet { color: var(--violet); background: var(--violet-tint); }
.eyebrow--teal   { color: var(--teal);   background: var(--teal-tint); }
.eyebrow--coral  { color: var(--coral);  background: var(--coral-tint); }
.eyebrow--amber  { color: #B9770C;       background: var(--amber-tint); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font-family: var(--font); font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 14px 22px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 10px 22px -10px rgba(64,105,246,.7); }
.btn--primary:hover { background: var(--blue-dark); color: #fff; box-shadow: 0 14px 28px -10px rgba(64,105,246,.75); }
.btn--ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { color: var(--navy); border-color: var(--blue-soft); background: var(--blue-tint); }
.btn--light { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.35); }
.btn--light:hover { background: rgba(255,255,255,.24); color: #fff; }
.btn--lg { padding: 16px 28px; font-size: 1.05rem; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
/* Header più alto per dare aria al logo grande (48px liberi in verticale). */
.nav { display: flex; align-items: center; justify-content: space-between; height: 96px; gap: 20px; }
.nav__brand { display: flex; align-items: center; flex: none; }
.nav__brand .brand-logo { height: 68px; }

/* ---- Logo ufficiale (SVG inline) ---- */
/* Il contenitore dello sprite non deve occupare spazio nel flusso. */
.brand-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.brand-logo { display: block; height: 34px; width: auto; }
/* Il wordmark è un <text>: richiede Nunito Sans 800, caricata negli HTML. */
.brand-logo__word {
  font-family: 'Nunito Sans', 'Noto Sans', Arial, sans-serif;
  font-size: 168px; font-weight: 800; letter-spacing: -6px;
}
.nav__links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav__links a { color: var(--ink); font-weight: 500; font-size: .97rem; }
.nav__links a:hover { color: var(--blue); }
.nav__cta { display: flex; align-items: center; gap: 12px; }
/* Etichetta lunga di default, corta sotto i 720px (vedi media query). */
.cta-short { display: none; }
.nav__toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 8px;
  width: 44px; height: 44px; border-radius: 10px;
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: ''; display: block; width: 22px; height: 2px; background: var(--navy);
  border-radius: 2px; position: relative; transition: .2s ease;
}
.nav__toggle span::before { position: absolute; top: -7px; }
.nav__toggle span::after  { position: absolute; top: 7px; }
.nav.is-open .nav__toggle span { background: transparent; }
.nav.is-open .nav__toggle span::before { top: 0; transform: rotate(45deg); }
.nav.is-open .nav__toggle span::after  { top: 0; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 460px at 82% -8%, rgba(141,99,216,.55), transparent 62%),
    radial-gradient(760px 420px at 8% 108%, rgba(81,178,244,.42), transparent 60%),
    radial-gradient(1200px 500px at 50% -20%, rgba(140,165,250,.4), transparent 60%),
    linear-gradient(150deg, #4A72F7 0%, #3D66F3 42%, #2A4FD0 72%, #1E3595 100%);
}
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding: 84px 0 92px; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25);
  padding: 7px 14px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 { color: #fff; font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; margin-bottom: 18px; }
.hero__lead { color: rgba(255,255,255,.9); font-size: 1.18rem; max-width: 34ch; margin-bottom: 30px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.hero__note { font-size: .9rem; color: rgba(255,255,255,.78); display: flex; align-items: center; gap: 8px; }

/* device mock */
.hero__art { display: flex; justify-content: center; }
.phone {
  width: 288px; background: #0C1B33; border-radius: 40px; padding: 12px;
  box-shadow: 0 40px 80px -30px rgba(4,14,40,.7); border: 1px solid rgba(255,255,255,.14);
}
.phone__screen { background: var(--bg-alt); border-radius: 30px; overflow: hidden; }
.phone__bar { background: var(--blue); color: #fff; padding: 20px 18px 16px; }
.phone__bar small { opacity: .85; font-size: .72rem; }
.phone__bar strong { display: block; font-size: 1.05rem; font-weight: 700; }
.phone__body { padding: 16px; display: grid; gap: 12px; }
.mini-card { background: #fff; border-radius: 14px; padding: 13px 14px; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 12px; }
.mini-card i { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; font-style: normal; font-size: 1.1rem; }
.mini-card b { display: block; color: var(--navy); font-size: .92rem; }
.mini-card span { color: var(--muted); font-size: .78rem; }
.i-blue   { background: var(--blue-tint);   color: var(--blue); }
.i-green  { background: var(--green-tint);  color: var(--green); }
.i-amber  { background: var(--amber-tint);  color: var(--amber); }
.i-violet { background: var(--violet-tint); color: var(--violet); }
.i-teal   { background: var(--teal-tint);   color: var(--teal); }
.i-coral  { background: var(--coral-tint);  color: var(--coral); }
.i-pink   { background: var(--pink-tint);   color: var(--pink); }

/* ---------- Trust strip ---------- */
.trust { border-bottom: 1px solid var(--line); background: #fff; }
.trust__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 40px; padding: 26px 0; }
.trust__item { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .95rem; font-weight: 500; }
.trust__item .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; }
.trust__item:nth-child(1) .dot { background: var(--blue); }
.trust__item:nth-child(2) .dot { background: var(--violet); }
.trust__item:nth-child(3) .dot { background: var(--teal); }
.trust__item:nth-child(4) .dot { background: var(--coral); }

/* ---------- Feature grid ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px; overflow: hidden;
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--blue); opacity: .9; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.card__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px; font-style: normal; font-size: 1.5rem; box-shadow: var(--shadow-sm); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }

/* Varianti colore delle feature card: sfondo tinta soft + accento in alto + tile icona saturata */
.card--blue   { background: linear-gradient(180deg, var(--blue-tint),   #fff 78%); }
.card--green  { background: linear-gradient(180deg, var(--green-tint),  #fff 78%); }
.card--amber  { background: linear-gradient(180deg, var(--amber-tint),  #fff 78%); }
.card--violet { background: linear-gradient(180deg, var(--violet-tint), #fff 78%); }
.card--teal   { background: linear-gradient(180deg, var(--teal-tint),   #fff 78%); }
.card--coral  { background: linear-gradient(180deg, var(--coral-tint),  #fff 78%); }
.card--blue::before   { background: var(--blue); }
.card--green::before  { background: var(--green); }
.card--amber::before  { background: var(--amber); }
.card--violet::before { background: var(--violet); }
.card--teal::before   { background: var(--teal); }
.card--coral::before  { background: var(--coral); }
.card--blue   .card__icon { background: var(--blue); }
.card--green  .card__icon { background: var(--green); }
.card--amber  .card__icon { background: var(--amber); }
.card--violet .card__icon { background: var(--violet); }
.card--teal   .card__icon { background: var(--teal); }
.card--coral  .card__icon { background: var(--coral); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 30px 24px 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.step::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--blue); }
.step--blue::after   { background: var(--blue); }
.step--violet::after { background: var(--violet); }
.step--teal::after   { background: var(--teal); }
.step--coral::after  { background: var(--coral); }
.step__num {
  counter-increment: step; width: 42px; height: 42px; border-radius: 12px; background: var(--blue);
  color: #fff; font-weight: 800; display: grid; place-items: center; margin-bottom: 16px; font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
}
.step--blue   .step__num { background: var(--blue); }
.step--violet .step__num { background: var(--violet); }
.step--teal   .step__num { background: var(--teal); }
.step--coral  .step__num { background: var(--coral); }
.step__num::before { content: counter(step); }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); margin: 0; font-size: .96rem; }

/* ---------- Roles ---------- */
.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.role { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.role__tag { display: inline-block; font-size: .78rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; margin-bottom: 14px; }
.role--rep .role__tag  { background: var(--blue-tint); color: var(--blue); }
.role--aiut .role__tag { background: #FEF1DA; color: #B9770C; }
.role--gen .role__tag  { background: var(--green-tint); color: #2E7A58; }
.role p { color: var(--muted); font-size: .96rem; margin: 0; }

/* ---------- PWA install ---------- */
.pwa__intro { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.pwa__intro p { color: var(--muted); font-size: 1.08rem; }
.install { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.install__card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-sm); }
.install__head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.install__logo { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; flex: none; }
.install__logo svg { width: 26px; height: 26px; }
.install__logo.is-android { background: var(--green-tint); }
.install__logo.is-ios { background: var(--bg-alt); }
.install__head b { display: block; color: var(--navy); font-size: 1.15rem; }
.install__head span { color: var(--muted); font-size: .88rem; }
.install ol { margin: 0; padding: 0; list-style: none; counter-reset: istep; }
.install li { position: relative; padding: 0 0 18px 44px; counter-increment: istep; }
.install li:last-child { padding-bottom: 0; }
.install li::before {
  content: counter(istep); position: absolute; left: 0; top: -2px;
  width: 30px; height: 30px; border-radius: 9px; background: var(--blue-tint); color: var(--blue);
  font-weight: 700; font-size: .9rem; display: grid; place-items: center;
}
.install li:not(:last-child)::after {
  content: ''; position: absolute; left: 14px; top: 30px; bottom: 6px; width: 2px; background: var(--line);
}
.install li b { color: var(--navy); }
.install li span { color: var(--muted); font-size: .96rem; }
.kbd {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 7px;
  background: var(--bg-alt); border: 1px solid var(--line); font-size: .86rem; font-weight: 600; color: var(--navy);
}
.pwa__hint {
  margin-top: 26px; text-align: center; color: var(--muted); font-size: .92rem;
  background: var(--blue-tint); border-radius: var(--radius-sm); padding: 16px 20px;
}

/* ---------- CTA band ---------- */
.cta-band {
  color: #fff; text-align: center; position: relative; overflow: hidden;
  background:
    radial-gradient(700px 360px at 12% 0%, rgba(141,99,216,.6), transparent 60%),
    radial-gradient(700px 360px at 90% 110%, rgba(81,178,244,.5), transparent 60%),
    linear-gradient(150deg, #4A72F7, #2A4FD0 60%, #1E3595);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); max-width: 48ch; margin: 0 auto 28px; font-size: 1.1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.72); padding: 56px 0 30px; }
.footer__top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 32px; margin-bottom: 34px; }
.footer__brand .brand-logo { height: 34px; margin-bottom: 14px; }
.footer__brand p { max-width: 32ch; font-size: .95rem; color: rgba(255,255,255,.6); margin: 0; }
.footer__cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer__cols h4 { color: #fff; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 14px; }
.footer__cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer__cols a { color: rgba(255,255,255,.72); font-size: .95rem; }
.footer__cols a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .87rem; color: rgba(255,255,255,.5); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; padding: 64px 0; }
  .hero__art { order: -1; }
  .phone { width: 240px; }
  .grid--3, .steps, .roles { grid-template-columns: 1fr 1fr; }
  .install { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .section { padding: 64px 0; }
  .nav__links { display: none; }
  /* Sul telefono il logo si riduce e la CTA si compatta, così non si
     comprimono a vicenda (la nav è flex e il bottone è nowrap). */
  /* A 360px il trio logo+CTA+hamburger sfonda: logo più piccolo e gap ridotti. */
  .nav { height: 80px; gap: 12px; }
  .nav__brand .brand-logo { height: 42px; }
  .nav__cta { gap: 8px; }
  .nav__cta .btn--primary { padding: 12px 18px; font-size: .95rem; }
  .nav__cta .cta-full { display: none; }
  .nav__cta .cta-short { display: inline; }
  .nav__toggle { display: grid; place-items: center; }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
    position: absolute; left: 0; right: 0; top: 80px; background: #fff;
    border-bottom: 1px solid var(--line); padding: 12px 24px 20px; box-shadow: var(--shadow-sm);
  }
  .nav.is-open .nav__links li { width: 100%; }
  .nav.is-open .nav__links a { display: block; padding: 12px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav.is-open .nav__links li:last-child a { border-bottom: 0; }
  .grid--3, .grid--2, .steps, .roles { grid-template-columns: 1fr; }
  .footer__top { flex-direction: column; }
}

/* Blocco PWA: pulsante di installazione + nota */
.pwa__cta-riga { margin: 22px 0 10px; }
.pwa__nota {
  color: var(--muted);
  font-size: .93rem;
  max-width: 620px;
  margin: 0 auto;   /* il blocco .pwa__intro è centrato */
}
