/*
 * Demy — landing pubblica (/, /en). Foglio dedicato: le altre pagine e il
 * pannello restano su style.css, cosi' il restyling non tocca la dashboard.
 *
 * Identita': carta crema, inchiostro verde-nero, terracotta (l'accento storico)
 * e le finestre di chat scure "alla Discord" per le dimostrazioni.
 * Niente librerie: CSS puro, animazioni spente con prefers-reduced-motion.
 */

/* Fallback con metriche vicine ai font del brand: quando Instrument Serif e
   Outfit arrivano, il testo non cambia ingombro (meno layout shift). Rapporti
   di larghezza misurati: Instrument Serif / Georgia = 0,76; Outfit / Arial = 0,99. */
@font-face {
  font-family: "Instrument Serif Fallback";
  src: local("Georgia");
  size-adjust: 76%;
  ascent-override: 118%;
  descent-override: 30%;
}

@font-face {
  font-family: "Outfit Fallback";
  src: local("Arial");
  size-adjust: 99%;
}

:root {
  --paper: #f3f0e8;
  --paper-2: #e9e3d4;
  --card: #fbf9f4;
  --ink: #14201c;
  --ink-soft: #3d4c45;
  --muted: #5b6862;
  --line: rgba(20, 32, 28, 0.12);
  --accent: #e4572e;
  --accent-ink: #b33a17; /* testo/bordi su crema: contrasto AA */
  --accent-soft: rgba(228, 87, 46, 0.12);
  --cap: #c9b48a; /* cappellino beige */
  --ok: #2f6f4e;
  --chat-bg: #2b2d31;
  --chat-bg-2: #1e1f22;
  --chat-ink: #dbdee1;
  --chat-muted: #949ba4;
  --blurple: #5865f2;
  --shadow-1: 0 1px 2px rgba(20, 32, 28, 0.06), 0 8px 24px rgba(20, 32, 28, 0.07);
  --shadow-2: 0 2px 6px rgba(20, 32, 28, 0.08), 0 24px 60px rgba(20, 32, 28, 0.14);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: "Instrument Serif", "Instrument Serif Fallback", Georgia, serif;
  --font-body: "Outfit", "Outfit Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141816;
    --paper-2: #1b201e;
    --card: #1d2320;
    --ink: #f1ede4;
    --ink-soft: #cfd6d1;
    --muted: #a3ada8;
    --line: rgba(241, 237, 228, 0.12);
    --accent: #f0794f;
    --accent-ink: #f59472;
    --accent-soft: rgba(240, 121, 79, 0.14);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.35), 0 24px 60px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 84px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

p a,
li a,
dd a {
  color: var(--accent-ink);
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: min(var(--wrap), calc(100% - 40px));
  margin-inline: auto;
}

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

/* ---------------------------------------------------------------- header */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.top.is-scrolled {
  border-bottom-color: var(--line);
}

.top-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.01em;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--cap);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.97rem;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-soft);
}

.nav a:hover {
  color: var(--ink);
  background: var(--accent-soft);
}

.lang {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
  margin-left: 6px;
}

.nav .lang a {
  padding: 4px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav .lang a[aria-current="true"] {
  background: var(--ink);
  color: var(--paper);
}

.nav .btn {
  margin-left: 6px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 920px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 20px 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-2);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  }

  .nav.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .nav a {
    padding: 12px 14px;
    font-size: 1.05rem;
  }

  .lang {
    align-self: flex-start;
    margin: 8px 0 4px;
  }

  .nav .btn {
    margin: 8px 0 0;
    justify-content: center;
  }
}

/* --------------------------------------------------------------- buttons */

.btn {
  --b-bg: var(--card);
  --b-ink: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--b-bg);
  color: var(--b-ink);
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-1);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  --b-bg: var(--blurple);
  --b-ink: #fff;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(88, 101, 242, 0.32);
}

.btn-primary:hover {
  --b-bg: #4752c4;
  box-shadow: 0 10px 26px rgba(88, 101, 242, 0.4);
}

.btn-ink {
  --b-bg: var(--ink);
  --b-ink: var(--paper);
  border-color: transparent;
}

.btn-sm {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 0.93rem;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  padding: 56px 0 40px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -68px 0 0 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 85% 20%, rgba(201, 180, 138, 0.35), transparent 70%),
    radial-gradient(40% 40% at 10% 0%, var(--accent-soft), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 48px;
  align-items: start;
}

.hero-copy {
  padding-top: 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
}

.dot.is-on {
  background: #23a55a;
  box-shadow: 0 0 0 4px rgba(35, 165, 90, 0.18);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.9rem);
}

.hero h1 em {
  font-style: italic;
  color: var(--accent-ink);
}

.lead {
  margin: 22px 0 0;
  font-size: clamp(1.08rem, 1.6vw, 1.22rem);
  color: var(--ink-soft);
  max-width: 34em;
  text-wrap: pretty;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.free-note {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  color: var(--muted);
}

.free-note li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.free-note svg {
  width: 17px;
  height: 17px;
  color: var(--ok);
  flex: none;
}

/* ritratto + finestra di chat */
.hero-art {
  position: relative;
  display: grid;
  justify-items: center;
}

.portrait {
  position: relative;
  width: min(340px, 80%);
  margin-right: -6%;
  justify-self: end;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, rgba(255, 255, 255, 0.55), transparent),
    linear-gradient(160deg, #eadfc6, #d9c7a1);
  box-shadow: inset 0 -20px 40px rgba(20, 32, 28, 0.08);
}

.portrait picture,
.portrait img {
  position: absolute;
  left: 50%;
  bottom: -2%;
  width: 82%;
  transform: translateX(-50%);
}

.portrait img {
  position: static;
  width: 100%;
  transform: none;
  filter: drop-shadow(0 18px 24px rgba(20, 32, 28, 0.18));
}

@media (prefers-reduced-motion: no-preference) {
  .portrait picture {
    animation: bob 6s ease-in-out infinite;
  }

  @keyframes bob {
    0%,
    100% {
      transform: translate(-50%, 0);
    }

    50% {
      transform: translate(-50%, -6px);
    }
  }
}

.float-chat {
  position: relative;
  z-index: 1;
  justify-self: start;
  width: min(390px, 100%);
  margin-top: -92px;
}

.tag-demo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--card);
  border: 1px dashed var(--line);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* -------------------------------------------------------- chat (Discord) */

.chat {
  background: var(--chat-bg);
  color: var(--chat-ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  font-size: 0.95rem;
  line-height: 1.45;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  background: var(--chat-bg-2);
  color: var(--chat-muted);
  font-weight: 600;
  font-size: 0.88rem;
}

.chat-head b {
  color: var(--chat-ink);
}

.chat-head .hash {
  font-size: 1.15rem;
  line-height: 1;
}

.chat-log {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 16px 38px;
  min-height: 120px;
}

#demo-log {
  min-height: 330px;
}

.msg {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
}

.av {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background: #6d6f78;
  overflow: hidden;
}

.av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.av.u1 { background: #c27c0e; }
.av.u2 { background: #3ba55d; }
.av.u3 { background: #ed4245; }
.av.u4 { background: #5865f2; }

.who {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #f2f3f5;
  font-size: 0.93rem;
}

.who.demy {
  color: #e6c38f;
}

.badge-app {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--blurple);
  color: #fff;
  letter-spacing: 0.02em;
}

.msg p {
  margin: 2px 0 0;
}

.msg code {
  background: var(--chat-bg-2);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.86em;
}

.mention {
  background: rgba(88, 101, 242, 0.3);
  color: #c9cdfb;
  padding: 0 3px;
  border-radius: 3px;
  font-weight: 500;
}

.embed {
  margin-top: 6px;
  padding: 10px 12px;
  border-left: 4px solid var(--accent);
  background: var(--chat-bg-2);
  border-radius: 4px;
}

.embed b {
  display: block;
  color: #f2f3f5;
  margin-bottom: 2px;
}

.sys {
  margin: 0;
  padding-left: 50px;
  font-size: 0.85rem;
  color: var(--chat-muted);
}

.typing {
  /* sovrapposto al fondo della chat: comparire e sparire non sposta nulla */
  position: absolute;
  left: 16px;
  bottom: 12px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 50px;
  font-size: 0.82rem;
  color: var(--chat-muted);
  min-height: 18px;
}

.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--chat-muted);
  animation: blink 1.2s infinite ease-in-out;
}

.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes blink {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

/* riproduzione: i messaggi entrano uno alla volta (solo con JS) */
.js .chat-log[data-play] > .msg,
.js .chat-log[data-play] > .sys {
  opacity: 0;
  transform: translateY(6px);
}

.js .chat-log[data-play] > .is-shown {
  opacity: 1;
  transform: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

@media (prefers-reduced-motion: reduce) {
  .js .chat-log[data-play] > .msg,
  .js .chat-log[data-play] > .sys {
    opacity: 1;
    transform: none;
  }

  .typing i {
    animation: none;
  }
}

/* ----------------------------------------------------------- proof bar */

.proof {
  padding: 8px 0 24px;
}

.proof-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.proof-item {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
}

.proof-item[hidden] {
  display: none;
}

.proof-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.proof-label {
  display: block;
  margin-top: 4px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.35;
}

.proof-note {
  margin: 10px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

/* -------------------------------------------------------------- sections */

.section {
  padding: 84px 0;
}

.section-alt {
  background: var(--paper-2);
}

.kicker {
  display: inline-block;
  margin: 0 0 12px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.section h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.3rem);
  max-width: 18ch;
}

.section-lead {
  margin: 16px 0 0;
  max-width: 40em;
  font-size: 1.12rem;
  color: var(--ink-soft);
}

.head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px 40px;
  margin-bottom: 40px;
}

/* problemi */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  padding: 26px 24px 24px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}

.card h3 {
  font-size: 1.55rem;
  margin: 14px 0 8px;
}

.card p {
  margin: 0;
  color: var(--ink-soft);
}

.card .icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.card .icon svg {
  width: 24px;
  height: 24px;
}

.card .problem {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 16px;
}

/* demo a schede */
.demo {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 36px;
  align-items: start;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-soft);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

.tab svg {
  width: 18px;
  height: 18px;
}

.tab[aria-selected="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.tab .pill {
  font-size: 0.7rem;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.tab[aria-selected="true"] .pill {
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
}

.panel[hidden] {
  display: none;
}

.panel h3 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.panel > p {
  margin: 0 0 16px;
  color: var(--ink-soft);
}

.facts {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
}

.facts svg {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  color: var(--ok);
}

.limit {
  margin: 18px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.limit b {
  color: var(--ink);
}

.plan-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
  background: var(--ink);
  color: var(--paper);
}

.plan-chip.free {
  background: var(--ok);
  color: #fff;
}

.demo-stage {
  position: sticky;
  top: 92px;
}

.replay {
  margin-top: 12px;
  font-size: 0.9rem;
}

.linkish {
  background: none;
  border: 0;
  padding: 6px 0;
  font: inherit;
  font-weight: 600;
  color: var(--accent-ink);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* passi */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  counter-increment: step;
  padding: 26px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.steps h3 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.steps p {
  margin: 0;
  color: var(--ink-soft);
}

.center-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

/* prezzi */
.pricing {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 980px;
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 30px 28px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-1);
}

.plan-pro {
  border: 2px solid var(--ink);
}

.plan h3 {
  font-size: 1.9rem;
}

.price {
  margin: 14px 0 4px;
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
}

.price small {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--muted);
  margin-left: 4px;
}

.price-sub {
  margin: 0 0 18px;
  font-weight: 600;
  color: var(--ok);
}

.plan ul {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.plan li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
}

.plan li svg {
  width: 20px;
  height: 20px;
  margin-top: 3px;
  color: var(--ok);
}

.plan li.off {
  color: var(--muted);
}

.plan li.off svg {
  color: var(--muted);
}

.plan .btn {
  margin-top: auto;
  justify-content: center;
}

.plan-note {
  margin: 12px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.durations {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--paper);
  border: 1px solid var(--line);
}

.durations legend {
  padding: 0 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.durations label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 4px;
  cursor: pointer;
}

.durations input {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
}

.durations .d-price {
  margin-left: auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pricing-foot {
  margin: 22px 0 0;
  max-width: 980px;
  font-size: 0.95rem;
  color: var(--muted);
}

/* FAQ */
.faq {
  max-width: 860px;
  display: grid;
  gap: 10px;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
}

.faq summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.faq details > div {
  padding: 0 20px 18px;
  color: var(--ink-soft);
}

.faq details p {
  margin: 0 0 10px;
}

.faq details p:last-child {
  margin-bottom: 0;
}

/* onesta' */
.honest {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.honest li {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px dashed var(--line);
}

.honest b {
  display: block;
  margin-bottom: 6px;
}

/* chiusura */
.final {
  text-align: center;
  padding: 90px 0;
}

.final img {
  width: 96px;
  height: 96px;
  margin: 0 auto 18px;
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 5px var(--cap);
}

.final h2 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  margin-inline: auto;
}

.final p {
  margin: 14px auto 0;
  max-width: 36em;
  color: var(--ink-soft);
}

.topgg {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-soft);
}

.topgg img {
  width: 22px;
  height: 22px;
}

.topgg:hover {
  color: var(--ink);
}

/* footer */
.foot {
  padding: 56px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}

.foot h2 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}

.foot ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.foot a {
  text-decoration: none;
  color: var(--ink-soft);
}

.foot a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.foot .brand {
  margin-bottom: 12px;
}

.foot-small {
  margin: 36px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

/* reveal allo scroll (solo con JS e senza riduzione movimento) */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .js .reveal.is-in {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------- mini chat "Chiedile" */

.ask-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  width: 60px;
  height: 60px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  box-shadow: var(--shadow-2);
  cursor: pointer;
  overflow: hidden;
}

.ask-fab img {
  width: 100%;
  height: 100%;
}

.ask-fab[aria-expanded="true"] {
  outline: 3px solid var(--accent);
}

.ask-pop {
  position: fixed;
  right: 18px;
  bottom: 90px;
  z-index: 60;
  width: min(380px, calc(100vw - 36px));
}

.ask-pop[hidden] {
  display: none;
}

.ask-pop .chat {
  display: flex;
  flex-direction: column;
  max-height: min(520px, calc(100vh - 140px));
}

.ask-pop .chat-head {
  justify-content: space-between;
}

.ask-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--chat-ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.ask-close:hover {
  background: rgba(255, 255, 255, 0.08);
}

.ask-log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
}

.ask-log .chat-msg {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
}

.ask-log .chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  background: #6d6f78;
  color: #fff;
}

.ask-log .chat-avatar.d {
  background: #8a6a3e;
}

.ask-log .chat-msg b {
  color: #f2f3f5;
  font-size: 0.9rem;
}

.ask-log .chat-msg p {
  margin: 2px 0 0;
  font-size: 0.93rem;
  overflow-wrap: anywhere;
}

.ask-log a {
  color: #c9cdfb;
}

.ask-log .chat-tag {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--blurple);
  color: #fff;
}

.ask-log .chat-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  margin: 0;
  font-size: 0.8rem;
  color: var(--chat-muted);
}

.ask-log .chat-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--chat-muted);
}

.ask-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: var(--chat-bg-2);
}

.ask-form input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #383a40;
  color: var(--chat-ink);
  font: inherit;
  font-size: 0.95rem;
}

.ask-form input::placeholder {
  color: var(--chat-muted);
}

.ask-form button {
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--blurple);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ask-form button:disabled {
  opacity: 0.6;
  cursor: default;
}

.ask-note {
  margin: 0;
  padding: 0 12px 10px;
  background: var(--chat-bg-2);
  font-size: 0.75rem;
  color: var(--chat-muted);
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1020px) {
  .hero-grid,
  .demo {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 0;
    display: grid;
    gap: 18px;
  }

  .portrait {
    width: min(260px, 64%);
    margin: 0 auto;
    justify-self: center;
  }

  .float-chat {
    justify-self: center;
    width: 100%;
    max-width: 520px;
    margin-top: -70px;
  }

  .demo-stage {
    position: static;
  }

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

@media (max-width: 760px) {
  .section {
    padding: 64px 0;
  }

  .cards-3,
  .steps,
  .pricing,
  .honest {
    grid-template-columns: 1fr;
  }

  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    padding-top: 32px;
  }

  .cta-row .btn {
    flex: 1 1 100%;
    justify-content: center;
  }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-inline: -20px;
    padding: 2px 20px 8px;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .tab {
    flex: none;
  }

  .ask-fab {
    width: 54px;
    height: 54px;
  }
}

@media (max-width: 420px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .proof-list {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .proof-item {
    padding: 12px 14px;
  }

  .proof-num {
    font-size: 1.6rem;
  }

  .foot-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  .top,
  .ask-fab,
  .ask-pop {
    display: none !important;
  }
}
