/* NestD Second Brain. Terza unità di NestD, con una faccia sua: Fraunces per i titoli
   (serif morbida, le parole chiave in corsivo), IBM Plex Sans per il testo e IBM Plex Mono
   per il "registro di lavoro", blu inchiostro come accento, carta avorio come fondo.
   Nell'hero un registro della giornata che si scrive da solo: l'AI dentro il lavoro,
   con una persona che approva. Solo chiaro. */
:root {
  color-scheme: only light;
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --bg: #faf8f3;
  --bg-card: #ffffff;
  --bg-soft: #f1ede3;
  --ink: #171a2b;
  --text: #171a2b;
  --text-dim: #4b4f63;
  --text-muted: #7b7f91;
  --border: #e3ded1;
  --blue: #2544d9;
  --blue-deep: #1b33ad;
  --blue-soft: #e6eafc;
  --blue-glow: rgba(37, 68, 217, 0.14);
  --purple: #7c3aed;
  --green: #15803d;
  --amber: #b45309;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.015em; line-height: 1.1; margin: 0; font-weight: 600; font-variation-settings: "opsz" 96, "SOFT" 50; }
h3 { font-size: 1.2rem; }
p { margin: 0; }
a { color: inherit; }
::selection { background: var(--blue); color: #fff; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

/* Parola chiave in corsivo: la firma tipografica */
.acc { font-style: italic; font-weight: 400; color: var(--blue); }
.mono { font-family: var(--font-mono); }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.wrap-narrow { max-width: 52rem; margin: 0 auto; padding: 0 1.5rem; }

/* Navbar */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: rgba(250, 248, 243, 0.88); backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav.scrolled { border-bottom-color: var(--border); }
.nav .wrap { height: 4rem; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.brand small { font-style: italic; font-weight: 400; font-size: 1.05rem; color: var(--blue); margin-left: .1rem; }
.nav-links { display: none; gap: 1.75rem; align-items: center; }
.nav-links a { text-decoration: none; font-size: .9rem; color: var(--text-dim); }
.nav-links a:hover { color: var(--text); }
/* il bottone nel menu resta bianco su fondo pieno: la regola dei link sopra non deve vincere */
.nav-links a.btn-primary, .nav-links a.btn-primary:hover { color: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .85rem 1.5rem; border-radius: .6rem; font-weight: 600; font-size: .95rem; text-decoration: none; border: 1px solid transparent; transition: transform .15s, box-shadow .15s, background .15s; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 10px 28px rgba(37, 68, 217, 0.25); }
.btn-primary:hover { background: var(--blue-deep); transform: translateY(-1px); }
.btn-ghost { background: var(--bg-card); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: #c9c2b0; }
.btn-sm { padding: .55rem 1.1rem; font-size: .85rem; }
.burger { display: inline-flex; background: none; border: 1px solid var(--border); border-radius: .6rem; padding: .45rem .6rem; cursor: pointer; color: var(--text); }
.menu-mobile { display: none; border-top: 1px solid var(--border); background: var(--bg); }
.menu-mobile.open { display: block; }
.menu-mobile a { display: block; padding: .9rem 1.5rem; text-decoration: none; border-bottom: 1px solid var(--border); }
@media (min-width: 768px) { .nav-links { display: flex; } .burger, .menu-mobile { display: none !important; } }

/* Hero */
.hero { position: relative; padding: 8.5rem 0 4rem; overflow: hidden; }
.hero .bg-halo { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 55% 60% at 85% 15%, rgba(37, 68, 217, 0.12), transparent 70%), radial-gradient(ellipse 40% 40% at 5% 95%, rgba(124, 58, 237, 0.07), transparent 70%); }
.hero .wrap { position: relative; display: grid; gap: 3rem; align-items: center; }
@media (min-width: 980px) { .hero .wrap { grid-template-columns: 1fr 1fr; gap: 4rem; } .hero { padding: 10rem 0 5rem; } }
.badge { display: inline-flex; align-items: center; gap: .55rem; padding: .4rem 1rem .4rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 600; color: var(--blue-deep); background: var(--blue-soft); border: 1px solid rgba(37, 68, 217, 0.22); margin-bottom: 1.75rem; }
.dot { width: .45rem; height: .45rem; border-radius: 999px; background: var(--blue); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .3 } }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.2rem); margin-bottom: 1.5rem; }
.hero .lead { font-size: 1.2rem; color: var(--text-dim); max-width: 34rem; margin-bottom: 1rem; }
.hero .sub { font-size: 1.02rem; color: var(--text-muted); max-width: 34rem; margin-bottom: 2.25rem; }
.hero .cta { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; }
.hero .note { margin-top: 1.25rem; font-size: .8rem; color: var(--text-muted); max-width: 34rem; }

/* Il registro della giornata: l'AI dentro il lavoro, la persona che approva */
.registro { position: relative; max-width: 32rem; margin: 0 auto; width: 100%; font-family: var(--font-mono); }
.registro .scheda { background: var(--ink); color: #eef0f7; border-radius: 1rem; padding: 1.1rem 1.25rem 1.25rem; box-shadow: 0 30px 70px rgba(23, 26, 43, 0.28); transform: rotate(.8deg); }
.registro .testa { display: flex; justify-content: space-between; align-items: center; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: #9aa0bd; margin-bottom: .9rem; padding-bottom: .6rem; border-bottom: 1px dashed #353a55; }
.registro .testa .vivo { display: inline-flex; align-items: center; gap: .4rem; color: #8fd3a5; }
.registro .testa .vivo::before { content: ""; width: .45rem; height: .45rem; border-radius: 999px; background: #4ade80; animation: pulse 1.2s infinite; }
.registro .riga { display: grid; grid-template-columns: 3.2rem 1fr; gap: .6rem; font-size: .84rem; line-height: 1.45; padding: .38rem 0; opacity: 0; animation: appare 14s linear infinite; }
.registro .riga:nth-child(2) { animation-delay: .3s }
.registro .riga:nth-child(3) { animation-delay: 1.6s }
.registro .riga:nth-child(4) { animation-delay: 2.9s }
.registro .riga:nth-child(5) { animation-delay: 4.2s }
.registro .riga:nth-child(6) { animation-delay: 5.5s }
.registro .riga:nth-child(7) { animation-delay: 6.8s }
@keyframes appare { 0% { opacity: 0; transform: translateY(6px) } 3% { opacity: 1; transform: none } 86% { opacity: 1 } 92%, 100% { opacity: 0 } }
.registro .ora { color: #9aa0bd; }
.registro .ai { color: #a5b4ff; }
.registro .ok { color: #8fd3a5; }
.registro .persona { color: #ffd38a; }
.registro .fonte { margin-top: .9rem; text-align: center; font-family: var(--font-sans); font-size: .78rem; color: var(--text-muted); }

/* Dati con fonte */
.dati { background: var(--ink); color: #fff; padding: 2.5rem 0; border-top: 1px solid var(--border); }
.dati .wrap { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .dati .wrap { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.dato { border-left: 2px solid var(--blue); padding-left: 1rem; }
.dato b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 2.4rem; line-height: 1; margin-bottom: .4rem; font-variation-settings: "opsz" 96; }
.dato p { font-size: .92rem; color: #c9cde0; }
.dato small { display: block; margin-top: .4rem; font-size: .72rem; color: #858ba8; }

/* Sezioni */
section { padding: 5rem 0; }
.section-title { text-align: center; margin-bottom: 3rem; }
.eyebrow { display: block; font-family: var(--font-mono); font-size: .75rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); margin-bottom: .75rem; }
.section-title h2 { font-size: clamp(1.85rem, 4vw, 2.7rem); margin-bottom: .75rem; }
.section-title p { color: var(--text-dim); max-width: 40rem; margin: 0 auto; }
.soft { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* Casi d'uso */
.griglia { display: grid; gap: 1.25rem; }
@media (min-width: 768px) { .griglia { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .griglia.tre { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 1rem; padding: 1.6rem; }
.card h3 { margin-bottom: .5rem; }
.card p { font-size: .92rem; color: var(--text-dim); }
.card .esempio { margin-top: .9rem; font-family: var(--font-mono); font-size: .78rem; color: var(--blue-deep); background: var(--blue-soft); border-radius: .5rem; padding: .55rem .7rem; }
.card.no { border-color: #ecdcc5; background: #fdf8ef; }
.card.no h3 { color: var(--amber); }
.card.no h3::before { content: "\2715\00a0"; font-size: .8em; }
.perchi .card { border-top: 3px solid var(--blue); }

/* Le fasi: numeri grandi in serif, linea verticale */
.fasi { display: grid; gap: 1.25rem; counter-reset: fase; }
@media (min-width: 900px) { .fasi { grid-template-columns: repeat(4, 1fr); } }
.fase { position: relative; background: var(--bg-card); border: 1px solid var(--border); border-radius: 1rem; padding: 1.5rem 1.4rem 1.4rem; }
.fase::before { counter-increment: fase; content: counter(fase, decimal-leading-zero); font-family: var(--font-display); font-style: italic; font-size: 2.2rem; line-height: 1; color: var(--blue); display: block; margin-bottom: .75rem; }
.fase h3 { margin-bottom: .45rem; }
.fase p { font-size: .9rem; color: var(--text-dim); }
.fase .ricevi { margin-top: .75rem; font-size: .85rem; color: var(--text); padding-left: .75rem; border-left: 2px solid var(--blue); }
.fase .ricevi b { color: var(--blue-deep); font-weight: 600; }

/* Modelli e macchina: tabella del registro Local AI */
.section-title p a { color: var(--blue-deep); }
.tabella { background: var(--bg-card); border: 1px solid var(--border); border-radius: 1.25rem; padding: 1rem 1.25rem 1.1rem; box-shadow: 0 20px 50px rgba(23, 26, 43, 0.07); overflow-x: auto; margin-bottom: 1.5rem; }
.tabella table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 46rem; }
.tabella thead th { text-align: left; font-family: var(--font-mono); font-size: .7rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); padding: .5rem .6rem; border-bottom: 1px solid var(--border); }
.tabella tbody th { text-align: left; font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--blue-deep); padding: .9rem .6rem .35rem; }
.tabella td { padding: .5rem .6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.tabella td:nth-child(3) { font-family: var(--font-mono); font-weight: 500; color: var(--text); white-space: nowrap; width: 8rem; }
.tabella td:nth-child(4) { color: var(--text-dim); font-size: .85rem; }
.tabella td:nth-child(3) small { font-weight: 400; color: var(--text-muted); font-size: .78em; }
.tabella td[rowspan] { vertical-align: middle; font-family: var(--font-mono); color: var(--text-muted); border-left: 1px dashed var(--border); }
.tabella tr:last-child td { border-bottom: 0; }
.tabella .cap { font-size: .8rem; color: var(--text-muted); margin-top: .8rem; }
.tabella .cap a { color: var(--blue-deep); }
.punteggi table.mini { width: 100%; border-collapse: collapse; font-size: .85rem; margin-top: .75rem; }
.punteggi table.mini th { text-align: left; font-family: var(--font-mono); font-size: .68rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); padding: .35rem .4rem; border-bottom: 1px solid var(--border); }
.punteggi table.mini td { padding: .35rem .4rem; border-bottom: 1px solid var(--border); }
.punteggi table.mini td:not(:first-child) { font-family: var(--font-mono); text-align: right; }
.punteggi table.mini tr:last-child td { border-bottom: 0; }

/* FAQ */
.faq { max-width: 48rem; margin: 0 auto; }
.faq details { border: 1px solid var(--border); border-radius: 1rem; background: var(--bg-card); margin-bottom: .75rem; padding: 0 1.25rem; }
.faq summary { cursor: pointer; font-weight: 600; padding: 1rem 0; list-style: none; display: flex; justify-content: space-between; gap: 1rem; font-family: var(--font-display); font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-weight: 700; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 1rem; color: var(--text-dim); font-size: .95rem; }

/* Contatti */
.contatti { text-align: center; }
.contatti .box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 1.5rem; padding: 3rem 1.5rem; box-shadow: 0 30px 80px rgba(37, 68, 217, 0.10); }
.contatti h2 { font-size: clamp(1.85rem, 4vw, 2.5rem); margin-bottom: 1rem; }
.contatti p { color: var(--text-dim); max-width: 38rem; margin: 0 auto 2rem; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 2.5rem 0; text-align: center; font-size: .78rem; color: var(--text-muted); }
footer .brand { justify-content: center; margin-bottom: .75rem; }
footer a { text-decoration: underline; }

/* Entrata morbida */
@keyframes entra { from { opacity: 0; transform: translateY(20px) } to { opacity: 1; transform: none } }
.entra { animation: entra .5s cubic-bezier(.22,.61,.36,1) both; }
.entra.d1 { animation-delay: .08s } .entra.d2 { animation-delay: .16s } .entra.d3 { animation-delay: .24s } .entra.d4 { animation-delay: .32s } .entra.d5 { animation-delay: .4s }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
  .entra, .dot, .registro .testa .vivo::before { animation: none }
  .registro .riga { animation: none; opacity: 1; }
}

/* Pagina calendario raggiunta dalle mail (meetup-evolutivo): niente menu, solo invito e calendario */
body.landing { display: flex; flex-direction: column; min-height: 100vh; }
.landing-testa { display: flex; justify-content: center; align-items: center; height: 4rem; border-bottom: 1px solid var(--border); background: var(--bg); }
.landing-corpo { position: relative; flex: 1; padding: 3rem 0 4rem; overflow: hidden; }
.landing-corpo .bg-halo { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 60% 50% at 50% 0%, var(--blue-glow), transparent 70%); }
.landing-intro { text-align: center; margin-bottom: 2rem; }
.landing-intro h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin-bottom: 1rem; }
.landing-intro p { color: var(--text-dim); font-size: 1.05rem; max-width: 40rem; margin: 0 auto; }
.landing .box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 1.5rem; padding: 2rem 1.5rem; box-shadow: 0 30px 80px rgba(37, 68, 217, 0.10); }
.landing .pw { margin-top: 0; }
.landing footer { margin-top: auto; }

/* Banner cookie (cookie.js) */
.ck { position: fixed; left: 0; right: 0; bottom: 0; z-index: 100; display: flex; justify-content: center; padding: .75rem; pointer-events: none; }
@media (min-width: 640px) { .ck { padding: 1rem; } }
.ck-scheda { position: relative; width: 100%; max-width: 56rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: 1rem; padding: .85rem 1.1rem; box-shadow: 0 12px 40px rgba(23, 26, 43, 0.22); pointer-events: auto; }
.ck-scheda.ck-prefs { max-width: 28rem; }
.ck-x { position: absolute; top: .5rem; right: .5rem; width: 1.75rem; height: 1.75rem; border-radius: 999px; border: 0; background: var(--bg-soft); color: var(--text-dim); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.ck-x:hover { color: var(--text); }
.ck-corpo { display: flex; flex-direction: column; gap: .75rem; padding-right: 1.75rem; }
@media (min-width: 640px) { .ck-corpo { flex-direction: row; align-items: center; gap: 1.25rem; } }
.ck-testo { flex: 1; font-size: .8rem; line-height: 1.4; color: var(--text-dim); }
.ck-testo b { color: var(--text); }
.ck-testo a { font-weight: 600; color: var(--blue-deep); }
.ck-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; text-decoration: underline; color: var(--text-dim); cursor: pointer; }
.ck-bottoni { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
@media (min-width: 640px) { .ck-corpo .ck-bottoni { display: flex; flex-shrink: 0; } }
.ck-bottoni .btn { box-shadow: none; }
.ck-titolo { font-size: .9rem; font-weight: 700; margin-bottom: .5rem; padding-right: 2rem; }
.ck-riga { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.ck-riga:last-of-type { border-bottom: 0; }
.ck-t { font-size: .78rem; font-weight: 700; }
.ck-d { font-size: .75rem; color: var(--text-muted); }
.ck-sempre { font-size: .75rem; font-weight: 700; color: var(--blue-deep); white-space: nowrap; }
.ck-sw { position: relative; display: inline-block; width: 2.75rem; height: 1.5rem; flex-shrink: 0; cursor: pointer; }
.ck-sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.ck-sw-fondo { position: absolute; inset: 0; border-radius: 999px; background: var(--border); transition: background .2s; }
.ck-sw-pomello { position: absolute; top: .125rem; left: .125rem; width: 1.25rem; height: 1.25rem; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.ck-sw input:checked ~ .ck-sw-fondo { background: var(--blue); }
.ck-sw input:checked ~ .ck-sw-pomello { transform: translateX(1.25rem); }
.ck-due { margin-top: .75rem; }
footer button.ck-link { font-size: inherit; }

/* Calendario di prenotazione (prenota.js) */
.pw { text-align: left; margin-top: .5rem; }
.pw-msg { text-align: center; color: var(--text-muted); font-size: .95rem; }
.pw-err { color: #b91c1c; font-size: .9rem; min-height: 1.2em; margin: .25rem 0; }
.pw-nota { font-size: .8rem; color: var(--text-muted); margin-top: .75rem; }
.pw-cols { display: grid; gap: 1.25rem; }
@media (min-width: 720px) { .pw-cols { grid-template-columns: 15rem 1fr; } }
.pw-giorni { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .25rem; }
@media (min-width: 720px) { .pw-giorni { flex-direction: column; overflow: visible; max-height: 22rem; overflow-y: auto; padding-right: .25rem; } }
.pw-giorno { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; padding: .6rem .9rem; border-radius: .75rem; border: 1px solid var(--border); background: var(--bg-card); cursor: pointer; font: inherit; color: var(--text); text-align: left; min-width: 8.5rem; }
.pw-giorno:hover { border-color: #c9c2b0; }
.pw-giorno.attivo { border-color: var(--blue); background: var(--blue-soft); }
.pw-giorno-nome { font-weight: 600; font-size: .9rem; text-transform: capitalize; }
.pw-giorno-n { font-size: .75rem; color: var(--text-muted); }
.pw-orari { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 1rem; padding: 1.1rem 1.1rem 1rem; }
.pw-orari-titolo { font-weight: 600; margin-bottom: .75rem; text-transform: capitalize; }
.pw-orari-griglia { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr)); gap: .5rem; }
.pw-ora { padding: .55rem .5rem; border-radius: .6rem; border: 1px solid var(--border); background: var(--bg-card); font: inherit; font-weight: 600; font-size: .9rem; color: var(--text); cursor: pointer; }
.pw-ora:hover { border-color: var(--blue); color: var(--blue-deep); }
.pw-form { display: flex; flex-direction: column; gap: .9rem; }
.pw-riepilogo { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1rem; border-radius: .75rem; background: var(--blue-soft); border: 1px solid rgba(37, 68, 217, 0.22); }
.pw-riep-label { display: block; font-size: .75rem; color: var(--blue-deep); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.pw-riepilogo strong { text-transform: capitalize; }
.pw-link { background: none; border: 0; color: var(--blue-deep); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
.pw-campo { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; font-weight: 600; color: var(--text-dim); }
.pw-input { font: inherit; padding: .7rem .85rem; border-radius: .6rem; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); width: 100%; }
.pw-input:focus { border-color: var(--blue); }
.pw-consenso { display: flex; gap: .6rem; align-items: flex-start; font-size: .82rem; color: var(--text-dim); font-weight: 400; }
.pw-consenso input { margin-top: .25rem; accent-color: var(--blue); }
.pw-form .btn { align-self: center; }
.pw-ok { text-align: center; padding: 1rem 0; }
.pw-ok-icona { width: 3rem; height: 3rem; border-radius: 999px; background: #dcfce7; color: var(--green); font-size: 1.5rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; margin-bottom: .75rem; }
.pw-ok h3 { font-size: 1.4rem; margin-bottom: .5rem; }
.pw-ok p { margin-bottom: .5rem; text-transform: none; }
.pw-ok p:first-of-type::first-letter { text-transform: uppercase; }
.contatti .box p.pw-nota { margin-bottom: 1rem; }
