/* ============================================================
   MENTHORAI — DESIGN SYSTEM CONDIVISO  (menthorai-ui.css)
   Una sola fonte di verità per tutte le pagine pre-lezione.
   La pagina LEZIONE non usa questo file e non va toccata.
   PRODUZIONE: i font vanno serviti self-hosted da /fonts/ (GDPR DE).
   ============================================================ */

@font-face { font-family: 'OpenDyslexic'; src: url('/fonts/opendyslexic/OpenDyslexic-Regular.woff') format('woff'); font-weight: 400; }
@font-face { font-family: 'OpenDyslexic'; src: url('/fonts/opendyslexic/OpenDyslexic-Bold.woff') format('woff'); font-weight: 700; }

/* Lexend self-hosted (300–700) — da /fonts/lexend, sostituisce Google Fonts (CSP font-src 'self', GDPR DE) */
@font-face { font-family: 'Lexend'; font-weight: 300; font-display: swap; src: url('/fonts/lexend/Lexend-300.woff2') format('woff2'); }
@font-face { font-family: 'Lexend'; font-weight: 400; font-display: swap; src: url('/fonts/lexend/Lexend-400.woff2') format('woff2'); }
@font-face { font-family: 'Lexend'; font-weight: 500; font-display: swap; src: url('/fonts/lexend/Lexend-500.woff2') format('woff2'); }
@font-face { font-family: 'Lexend'; font-weight: 600; font-display: swap; src: url('/fonts/lexend/Lexend-600.woff2') format('woff2'); }
@font-face { font-family: 'Lexend'; font-weight: 700; font-display: swap; src: url('/fonts/lexend/Lexend-700.woff2') format('woff2'); }

/* Atkinson Hyperlegible self-hosted (400/700) — da /fonts/atkinson */
@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 400; font-display: swap; src: url('/fonts/atkinson/Atkinson-400.woff2') format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 700; font-display: swap; src: url('/fonts/atkinson/Atkinson-700.woff2') format('woff2'); }

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --font-body: 'Lexend', sans-serif;
  --font-display: 'DM Serif Display', serif;
  --line-height: 1.7;

  /* Brand blu/teal/arancio */
  --brand-900:#0B1D3A; --brand-800:#0F2A52; --brand-700:#14376A; --brand-600:#1A4B8C;
  --brand-500:#2563A8; --brand-400:#3B8DD4; --brand-300:#5DADE2; --brand-200:#85C7F2;
  --brand-100:#D4EFFF; --brand-50:#EFF8FF;
  --teal:#0EA5A5; --teal-light:#14D4D4; --cyan:#22D3EE;
  --orange:#F08C3A; --amber:#F5A623; --magenta:#E84393;
  --navy:#0B1D3A; --cream:#FFFAF3; --cream-alt:#FFF6EC;
  --text-dark:#0F1B2D; --text-body:#384860; --text-light:#6B7F99; --white:#fff;

  --shadow-xs:0 1px 3px rgba(11,29,58,.06);
  --shadow-sm:0 2px 12px rgba(11,29,58,.07);
  --shadow-md:0 8px 28px rgba(11,29,58,.09);
  --shadow-lg:0 16px 48px rgba(11,29,58,.12);
  --radius:16px; --radius-lg:20px;

  /* Accento di firma (spettro del logo) — usato con parsimonia */
  --spectrum: linear-gradient(90deg,#E84393 0%,#F08C3A 18%,#F5A623 34%,#0EA5A5 54%,#3B8DD4 74%,#2563A8 100%);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body); line-height: var(--line-height);
  color: var(--text-dark); background: var(--white);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}

/* ── Accessibilità ── */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px;
}
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{ animation:none!important; transition:none!important; scroll-behavior:auto!important; }
  .reveal{ opacity:1!important; transform:none!important; }
}
.skip-link{
  position:absolute; left:16px; top:-60px; z-index:300; background:var(--brand-900); color:#fff;
  padding:10px 18px; border-radius:10px; text-decoration:none; font-weight:600; font-size:.9rem; transition:top .2s;
}
.skip-link:focus{ top:16px; }
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }

.spectrum-rule{ height:4px; width:100%; background:var(--spectrum); }

/* ── Layout ── */
.container{ max-width:1080px; margin:0 auto; }
.section{ padding:96px 48px; }
.section-inner{ max-width:1080px; margin:0 auto; }
.section-tag{
  display:inline-flex; align-items:center; gap:10px; font-size:.78rem; font-weight:700;
  color:var(--brand-400); text-transform:uppercase; letter-spacing:3px; margin-bottom:14px;
}
.section-tag::before{ content:''; width:24px; height:3px; background:var(--spectrum); border-radius:2px; }
.section-heading{ font-size:2.3rem; font-weight:700; color:var(--navy); line-height:1.25; margin-bottom:18px; }
.section-body{ font-size:1.06rem; color:var(--text-body); line-height:1.85; max-width:640px; }

/* ── Navbar ── */
.navbar{
  position:fixed; top:0; left:0; right:0; z-index:100; padding:0 48px; height:68px;
  display:flex; align-items:center; justify-content:space-between;
  background:rgba(11,29,58,.92); backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(255,255,255,.08); transition:all .4s ease;
}
.navbar::after{ content:''; position:absolute; left:0; right:0; bottom:0; height:2px; background:var(--spectrum); opacity:.9; }
.nav-brand{ display:flex; align-items:center; gap:12px; text-decoration:none; }
.nav-brand img{ height:40px; border-radius:6px; }
.nav-brand span{ font-size:1.15rem; font-weight:700; color:#fff; letter-spacing:3px; }
.nav-links{ display:flex; align-items:center; gap:28px; }
.nav-links a{ text-decoration:none; color:rgba(255,255,255,.72); font-size:.92rem; font-weight:500; transition:color .2s; }
.nav-links a:hover{ color:#fff; }
.nav-cta{
  background:var(--orange)!important; color:#fff!important; padding:10px 24px; border-radius:50px;
  font-weight:600!important; box-shadow:0 4px 16px rgba(240,140,58,.3); transition:all .3s;
}
.nav-cta:hover{ transform:translateY(-2px); box-shadow:0 6px 24px rgba(240,140,58,.4); }

/* ── Bottoni ── */
.btn-warm,.btn-white,.btn-glass,.btn-dark{
  padding:15px 36px; border:none; border-radius:50px; cursor:pointer; text-decoration:none;
  font-family:var(--font-body); font-size:1.02rem; font-weight:600; transition:all .3s;
  display:inline-block;
}
.btn-warm{ background:var(--orange); color:#fff; box-shadow:0 6px 24px rgba(240,140,58,.42); }
.btn-warm:hover{ transform:translateY(-3px); box-shadow:0 10px 36px rgba(240,140,58,.55); }
.btn-white{ background:#fff; color:var(--navy); box-shadow:0 6px 24px rgba(0,0,0,.12); }
.btn-white:hover{ transform:translateY(-3px); box-shadow:0 10px 36px rgba(0,0,0,.18); }
.btn-dark{ background:var(--brand-900); color:#fff; }
.btn-dark:hover{ transform:translateY(-3px); box-shadow:var(--shadow-md); }
.btn-glass{ background:rgba(255,255,255,.1); backdrop-filter:blur(10px); color:#fff; border:1.5px solid rgba(255,255,255,.35); }
.btn-glass:hover{ background:rgba(255,255,255,.2); border-color:rgba(255,255,255,.55); transform:translateY(-3px); }

/* ── Box immagine (placeholder curati) ── */
.img-ph{
  position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:10px; text-align:center; padding:28px;
  background:linear-gradient(135deg,rgba(59,141,212,.06),rgba(14,165,165,.06)),
             repeating-linear-gradient(45deg,rgba(11,29,58,.015) 0 12px,transparent 12px 24px);
  border:2px dashed rgba(37,99,168,.35); border-radius:14px; color:var(--brand-500);
}
.img-ph.on-dark{ background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.28); color:rgba(255,255,255,.7); }
.img-ph svg{ width:38px; height:38px; opacity:.85; }
.img-ph .ph-label{ font-weight:600; font-size:.92rem; }
.img-ph .ph-size{ font-size:.76rem; opacity:.7; letter-spacing:.4px; }
.img-ph--hero{ aspect-ratio:16/9; } .img-ph--wide{ aspect-ratio:16/7; } .img-ph--portrait{ aspect-ratio:4/3; }

/* ── Mockup browser ── */
.mockup{ background:#0d2240; border-radius:16px; box-shadow:0 30px 80px rgba(0,0,0,.35); border:1px solid rgba(255,255,255,.12); overflow:hidden; }
.mockup-bar{ display:flex; align-items:center; gap:7px; padding:12px 16px; background:#122a4e; border-bottom:1px solid rgba(255,255,255,.06); }
.mockup-bar i{ width:11px; height:11px; border-radius:50%; display:inline-block; }
.mockup-bar i:nth-child(1){ background:#ff5f57; } .mockup-bar i:nth-child(2){ background:#febc2e; } .mockup-bar i:nth-child(3){ background:#28c840; }
.mockup-bar .url{ margin-left:12px; font-size:.78rem; color:rgba(255,255,255,.55); background:rgba(255,255,255,.06); padding:4px 14px; border-radius:50px; }

/* ── Intestazione pagina interna (privacy/info/prezzi/...) ── */
.page-hero{
  position:relative; padding:118px 48px 56px; text-align:center; color:#fff;
  background:linear-gradient(165deg,var(--brand-900) 0%,var(--brand-700) 60%,var(--brand-500) 100%);
}
.page-hero::after{ content:''; position:absolute; left:0; right:0; bottom:0; height:4px; background:var(--spectrum); }
.page-hero h1{ font-size:2.4rem; font-weight:700; letter-spacing:1px; margin-bottom:10px; }
.page-hero p{ font-size:1.05rem; color:rgba(255,255,255,.82); max-width:620px; margin:0 auto; line-height:1.7; }

/* ── read-box: contenitore di testo che il pannello lettura colora ── */
.read-box{ background:#faf8f1; border-radius:var(--radius); box-shadow:var(--shadow-xs); border:1px solid rgba(0,0,0,.04); }

/* ── Prose legale / informativa (DSA-friendly) ── */
.prose{ max-width:760px; margin:0 auto; padding:40px 36px; }
.prose h2{ font-size:1.4rem; color:var(--navy); font-weight:700; margin:30px 0 12px; }
.prose h2:first-child{ margin-top:0; }
.prose h3{ font-size:1.1rem; color:var(--brand-600); font-weight:700; margin:22px 0 8px; }
.prose p{ color:var(--text-body); line-height:1.9; margin-bottom:14px; }
.prose ul{ margin:0 0 16px 22px; } .prose li{ color:var(--text-body); line-height:1.85; margin-bottom:8px; }
.prose a{ color:var(--brand-500); text-decoration:underline; text-underline-offset:2px; }
.prose .meta{ font-size:.85rem; color:var(--text-light); margin-bottom:24px; }
.prose hr{ border:none; height:1px; background:rgba(11,29,58,.08); margin:28px 0; }

/* ── Form (login / registrazione) ── */
.form-card{ max-width:460px; margin:0 auto; padding:36px 32px; }
.field{ margin-bottom:18px; }
.field label{ display:block; font-size:.88rem; font-weight:600; color:var(--text-dark); margin-bottom:7px; }
.field input,.field select{
  width:100%; padding:13px 15px; font-family:var(--font-body); font-size:1rem; color:var(--text-dark);
  background:#f7f9fc; border:1.5px solid rgba(11,29,58,.1); border-radius:12px; transition:all .2s;
}
.field input:focus,.field select:focus{ background:#fff; border-color:var(--brand-400); }
.field .hint{ font-size:.78rem; color:var(--text-light); margin-top:6px; }
.checkbox-row{ display:flex; align-items:flex-start; gap:10px; font-size:.88rem; color:var(--text-body); line-height:1.5; }
.checkbox-row input{ width:18px; height:18px; margin-top:2px; flex-shrink:0; accent-color:var(--brand-500); }
.btn-block{ width:100%; text-align:center; margin-top:6px; }
.form-alt{ text-align:center; font-size:.9rem; color:var(--text-light); margin-top:20px; }
.form-alt a{ color:var(--brand-500); text-decoration:none; font-weight:600; }

/* ── Prezzi ── */
.price-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:24px; max-width:760px; margin:48px auto 0; }
.price-card{ padding:36px 30px; text-align:center; position:relative; }
.price-card.featured{ border:2px solid var(--brand-400); box-shadow:var(--shadow-md); }
.price-badge{ position:absolute; top:-13px; left:50%; transform:translateX(-50%); background:var(--orange); color:#fff; font-size:.74rem; font-weight:700; letter-spacing:1px; text-transform:uppercase; padding:5px 16px; border-radius:50px; }
.price-name{ font-weight:700; color:var(--navy); font-size:1.1rem; margin-bottom:6px; }
.price-amount{ font-size:2.6rem; font-weight:700; color:var(--navy); }
.price-amount span{ font-size:1rem; font-weight:500; color:var(--text-light); }
.price-list{ list-style:none; text-align:left; margin:22px 0; }
.price-list li{ display:flex; gap:10px; align-items:flex-start; color:var(--text-body); font-size:.93rem; line-height:1.5; margin-bottom:11px; }
.price-list li::before{ content:'✓'; color:var(--teal); font-weight:700; flex-shrink:0; }

/* ── FAQ / Supporto ── */
.faq{ max-width:760px; margin:40px auto 0; }
.faq-item{ padding:22px 24px; margin-bottom:14px; }
.faq-q{ font-weight:700; color:var(--navy); font-size:1.02rem; margin-bottom:8px; }
.faq-a{ color:var(--text-body); font-size:.95rem; line-height:1.75; }

/* ── Card generiche (feature/step/trust) ── */
.cards-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; margin-top:48px; }
.cards-2{ display:grid; grid-template-columns:repeat(2,1fr); gap:18px; margin-top:44px; }
.icon-tile{ width:54px; height:54px; border-radius:15px; display:flex; align-items:center; justify-content:center; margin-bottom:18px; box-shadow:0 8px 20px rgba(11,29,58,.18); }
.icon-tile svg{ width:27px; height:27px; stroke:#fff; }
.icon-tile.blue{ background:linear-gradient(135deg,var(--brand-400),var(--brand-600)); }
.icon-tile.teal{ background:linear-gradient(135deg,var(--teal),var(--teal-light)); }
.icon-tile.orange{ background:linear-gradient(135deg,var(--orange),var(--amber)); }

/* ── Footer ── */
.footer{ background:var(--brand-900); color:rgba(255,255,255,.4); padding:0; }
.footer .spectrum-rule{ opacity:.85; }
.footer-inner{ max-width:1080px; margin:0 auto; padding:36px 48px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:16px; }
.footer-links{ display:flex; gap:20px; flex-wrap:wrap; }
.footer-links a{ color:rgba(255,255,255,.4); text-decoration:none; font-size:.85rem; transition:color .2s; }
.footer-links a:hover{ color:var(--brand-200); }
.footer-copy{ font-size:.82rem; }
.footer-copy span{ color:var(--brand-200); }

/* ── Pannello "Scegli come leggere" ── */
.aa-toggle{
  position:fixed; bottom:24px; right:24px; z-index:200; background:var(--brand-900); color:#fff; border:none;
  border-radius:50px; padding:12px 20px; font-family:var(--font-body); font-size:.9rem; font-weight:600;
  cursor:pointer; box-shadow:0 4px 20px rgba(11,29,58,.25); display:flex; align-items:center; gap:8px; transition:all .3s;
}
.aa-toggle:hover{ transform:translateY(-2px); box-shadow:0 6px 28px rgba(11,29,58,.35); }
.aa-toggle .aa{ color:var(--amber); font-weight:700; font-size:1.1rem; }
.aa-panel{
  position:fixed; bottom:76px; right:24px; z-index:200; background:#fff; border-radius:var(--radius-lg);
  padding:24px; width:340px; box-shadow:var(--shadow-lg); border:1px solid rgba(0,0,0,.06); display:none; animation:panelSlide .25s ease-out;
}
.aa-panel.open{ display:block; }
@keyframes panelSlide{ from{opacity:0;transform:translateY(8px);} to{opacity:1;transform:translateY(0);} }
.aa-section{ margin-bottom:18px; } .aa-section:last-child{ margin-bottom:0; }
.aa-label{ font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:2px; color:var(--text-light); margin-bottom:10px; }
.aa-grid{ display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.aa-btn{ background:#f5f6fa; border:2px solid transparent; border-radius:10px; padding:10px; cursor:pointer; text-align:center; transition:all .2s; font-family:var(--font-body); }
.aa-btn:hover{ background:#eef0f6; } .aa-btn.active{ border-color:var(--brand-400); background:var(--brand-50); }
.aa-btn .label{ font-size:.88rem; font-weight:600; color:var(--text-dark); display:block; } .aa-btn .sub{ font-size:.68rem; color:var(--text-light); }
.aa-grid-3{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:6px; }
.aa-spacing{ background:#f5f6fa; border:2px solid transparent; border-radius:10px; padding:9px 8px; cursor:pointer; text-align:center; font-family:var(--font-body); font-size:.85rem; font-weight:500; color:var(--text-body); transition:all .2s; }
.aa-spacing:hover{ background:#eef0f6; } .aa-spacing.active{ border-color:var(--brand-400); background:var(--brand-50); }
/* DSA #876 — bottoni "Dimensione testo" (stesso look di .aa-spacing, classe distinta per il toggle JS) */
.aa-size{ background:#f5f6fa; border:2px solid transparent; border-radius:10px; padding:9px 8px; cursor:pointer; text-align:center; font-family:var(--font-body); font-size:.85rem; font-weight:500; color:var(--text-body); transition:all .2s; }
.aa-size:hover{ background:#eef0f6; } .aa-size.active{ border-color:var(--brand-400); background:var(--brand-50); }
.aa-colors{ display:grid; grid-template-columns:repeat(5,1fr); gap:6px; }
.aa-color{ width:100%; aspect-ratio:1; border-radius:10px; border:2px solid transparent; cursor:pointer; transition:all .2s; }
.aa-color:hover{ transform:scale(1.08); } .aa-color.active{ border-color:var(--brand-400); box-shadow:0 0 0 2px var(--brand-100); }
.aa-color[data-color="crema"]{ background:#faf8f1; }
.aa-color[data-color="giallo"]{ background:#fffde7; }
.aa-color[data-color="pesca"]{ background:#ffe8d6; }
.aa-color[data-color="azzurro"]{ background:#e3f2fd; }
.aa-color[data-color="verde"]{ background:#e8f5e9; }
.aa-reset{ display:block; width:100%; margin-top:14px; padding:8px; background:none; border:none; color:var(--brand-500); font-family:var(--font-body); font-size:.82rem; cursor:pointer; text-align:center; }
.aa-reset:hover{ text-decoration:underline; }

/* ── Animazioni ── */
@keyframes fadeUp{ from{opacity:0;transform:translateY(24px);} to{opacity:1;transform:translateY(0);} }
@keyframes fadeDown{ from{opacity:0;transform:translateY(-16px);} to{opacity:1;transform:translateY(0);} }
.reveal{ opacity:0; transform:translateY(30px); transition:all .7s cubic-bezier(.22,.61,.36,1); }
.reveal.vis{ opacity:1; transform:translateY(0); }

/* ── Responsive ── */
@media (max-width:900px){
  .navbar{ padding:0 20px; } .section{ padding:64px 20px; }
  .page-hero{ padding:100px 20px 44px; } .page-hero h1{ font-size:1.9rem; }
  .cards-3,.cards-2,.price-grid{ grid-template-columns:1fr; }
  .section-heading{ font-size:1.8rem; } .prose{ padding:28px 22px; }
  .footer-inner{ padding:28px 20px; }
}
@media (max-width:600px){
  .nav-links a:not(.nav-cta){ display:none; }
  .aa-panel{ width:calc(100vw - 32px); right:16px; }
}
