/* Sito pubblico (landing, iscrizione, pagine legali). Palette e font coerenti con l'applicazione. */
:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-soft: #eef2ff;
  --accent: #06b6d4;
  --success: #16a34a;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --border: #e2e8f0;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius: 18px;
  --wrap: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > main {
  flex: 1;
}

[hidden] {
  display: none !important;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-dark);
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.01em;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.wrap.narrow {
  max-width: 820px;
}

.center {
  text-align: center;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
}

.skip-link:focus {
  left: 8px;
}

:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.45);
  outline-offset: 2px;
}

/* ------------------------------------------------------------ pulsanti */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.28);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(79, 70, 229, 0.35);
}

.btn-ghost {
  background: var(--surface);
  color: var(--primary-dark);
  border-color: #c7d2fe;
}

.btn-ghost:hover {
  background: var(--primary-soft);
}

.btn-light {
  background: #fff;
  color: var(--primary-dark);
}

.btn-light:hover {
  transform: translateY(-1px);
}

.btn-lg {
  padding: 14px 24px;
  font-size: 16px;
  border-radius: 14px;
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

/* ------------------------------------------------------------ intestazione */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.brand-name {
  font-weight: 800;
  font-size: 17px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.site-nav > a:not(.btn) {
  color: var(--text-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.site-nav > a:not(.btn):hover {
  color: var(--primary-dark);
}

.site-nav .btn {
  padding: 8px 16px;
  font-size: 14px;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}

/* ------------------------------------------------------------ hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 88px;
  background:
    radial-gradient(900px 480px at 85% 10%, rgba(6, 182, 212, 0.14), transparent 60%),
    radial-gradient(800px 500px at 10% 0%, rgba(79, 70, 229, 0.12), transparent 60%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.hero h1 {
  font-size: clamp(32px, 3.7vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.grad {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: 19px;
  color: var(--text-2);
  margin: 20px 0 28px;
  max-width: 560px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.hero-points li::before,
.checks li::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -3px;
  border-radius: 50%;
  background: var(--success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 11px no-repeat;
}

.hero-login {
  margin: 18px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--primary-soft);
  display: inline-block;
}

.hero-visual {
  position: relative;
  padding-bottom: 40px;
}

.frame-browser {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
  transform-origin: left center;
}

.frame-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
}

.frame-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
}

.frame-bar span {
  margin-left: 10px;
  font-size: 11px;
  color: var(--muted);
}

.frame-browser img {
  aspect-ratio: 1124 / 700;
  object-fit: cover;
  object-position: top left;
}

.frame-phone {
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 34%;
  margin: 0;
  padding: 8px;
  border-radius: 30px;
  background: #0f172a;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.35);
}

.frame-phone img {
  border-radius: 22px;
}

/* ------------------------------------------------------------ sezioni */

.section {
  padding: 88px 0;
}

.section-tint {
  background: linear-gradient(180deg, #eef2ff 0%, #f7f8fc 100%);
}

.section-title {
  text-align: center;
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 800;
  margin: 0 auto 48px;
  max-width: 760px;
}

.eyebrow.center {
  text-align: center;
}

/* problemi */

.problems {
  padding-top: 24px;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.problem {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.problem-q {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-dark);
}

.problem p:last-child {
  margin: 0;
  color: var(--text-2);
}

/* funzionalità */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: center;
  margin-bottom: 96px;
}

.feature-reverse .feature-copy {
  order: 2;
}

.feature h3 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 14px;
}

.feature-copy > p {
  font-size: 17px;
  color: var(--text-2);
  margin: 0 0 18px;
}

.checks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  color: var(--text-2);
}

.checks li {
  display: flex;
  align-items: flex-start;
}

.checks li::before {
  flex-shrink: 0;
  margin-top: 5px;
}

.feature-shot {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}

.feature-shot img {
  max-height: 520px;
  width: 100%;
  object-fit: cover;
  object-position: top left;
}

.feature-shot-phone {
  justify-self: center;
  width: min(300px, 80%);
  padding: 8px;
  border: 0;
  border-radius: 32px;
  background: #0f172a;
}

.feature-shot-phone img {
  max-height: none;
  border-radius: 24px;
}

.feature-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.mini {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.mini h4 {
  font-size: 17px;
  margin-bottom: 6px;
}

.mini p {
  margin: 0;
  color: var(--text-2);
  font-size: 15px;
}

/* passi */

.steps {
  list-style: none;
  padding: 0;
  margin: 0 0 36px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: none;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.step-n {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 12px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.step h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.step p {
  margin: 0;
  color: var(--text-2);
}

/* settori */

.sectors {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.sectors li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
}

.sectors span {
  color: var(--muted);
  font-size: 14px;
}

/* prezzi */

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 420px));
  justify-content: center;
  gap: 24px;
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.plan-free {
  border: 2px solid var(--primary);
  box-shadow: 0 20px 50px rgba(79, 70, 229, 0.16);
}

.plan h3 {
  font-size: 22px;
}

.plan-price {
  margin: 0;
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
}

.plan-sub {
  margin: -6px 0 6px;
  color: var(--muted);
}

.plan .checks {
  flex: 1;
  margin-bottom: 8px;
}

.plan-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* FAQ */

.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 20px;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 28px 18px 0;
  font-weight: 700;
  font-size: 17px;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 14px;
  font-size: 24px;
  font-weight: 400;
  color: var(--primary);
}

.faq details[open] summary::after {
  content: "–";
}

.faq details p {
  margin: 0 0 18px;
  color: var(--text-2);
}

/* CTA finale */

.cta-final {
  background: linear-gradient(135deg, var(--primary), #0e7490);
  color: #fff;
}

.cta-final h2 {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
  margin-bottom: 10px;
}

.cta-final p {
  margin: 0 0 26px;
  color: #e0e7ff;
  font-size: 18px;
}

/* ------------------------------------------------------------ piè di pagina */

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 56px 0 24px;
  font-size: 14px;
}

.site-footer a {
  color: #e2e8f0;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}

.site-footer h4 {
  color: #fff;
  font-size: 14px;
  margin-bottom: 10px;
}

.site-footer p {
  margin: 0;
  line-height: 1.9;
}

.brand-footer {
  color: #fff;
  margin-bottom: 12px;
}

.footer-bottom {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid #1e293b;
  color: #94a3b8;
  font-size: 13px;
}

/* ------------------------------------------------------------ pagine interne (iscrizione, legali) */

.page-hero {
  padding: 56px 0 24px;
}

.page-hero h1 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
}

.page-hero p {
  color: var(--muted);
  margin: 10px 0 0;
}

.legal {
  padding: 0 0 72px;
}

.legal article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 40px;
}

.legal h2 {
  font-size: 20px;
  margin: 28px 0 10px;
}

.legal h2:first-child {
  margin-top: 0;
}

.legal p,
.legal li {
  color: var(--text-2);
}

.legal .updated {
  color: var(--muted);
  font-size: 14px;
}

.signup {
  padding: 40px 0 80px;
}

.signup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: 56px;
  align-items: start;
}

.signup-aside h1 {
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 800;
  margin-bottom: 16px;
}

.signup-aside .checks {
  margin: 24px 0;
}

.signup-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field label {
  font-weight: 700;
  font-size: 14px;
}

.field .opt {
  font-weight: 400;
  color: var(--muted);
}

.field input {
  font: inherit;
  font-size: 16px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
  color: var(--text);
}

.field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.14);
}

.field input[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-error {
  min-height: 0;
  margin: 0;
  font-size: 13px;
  color: var(--danger);
}

.field-hint {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.strength {
  height: 6px;
  border-radius: 6px;
  background: #e2e8f0;
  overflow: hidden;
}

.strength span {
  display: block;
  height: 100%;
  width: 0;
  transition: width 0.2s ease, background 0.2s ease;
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
  font-size: 14px;
  color: var(--text-2);
}

.consent input {
  margin-top: 4px;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  accent-color: var(--primary);
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--danger-soft);
  color: #991b1b;
  font-size: 14px;
}

.signup-foot {
  margin: 16px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.signup-done {
  text-align: center;
}

.signup-done .big-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 30px;
}

.signup-done h2 {
  margin-bottom: 10px;
}

.signup-done p {
  color: var(--text-2);
}

/* ------------------------------------------------------------ animazioni leggere */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .frame-browser {
    transform: none;
  }
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1000px) {
  .hero-grid,
  .feature,
  .signup-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .feature-reverse .feature-copy {
    order: 0;
  }

  .feature {
    margin-bottom: 72px;
  }

  .problem-grid,
  .steps,
  .feature-mini-grid {
    grid-template-columns: 1fr;
  }

  .plans {
    grid-template-columns: minmax(0, 480px);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .frame-browser {
    transform: none;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 16px 18px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav > a:not(.btn) {
    padding: 10px 6px;
  }

  .site-nav .btn {
    margin-top: 6px;
    padding: 12px;
  }
}

@media (max-width: 560px) {
  .wrap {
    padding: 0 16px;
  }

  .hero {
    padding: 44px 0 64px;
  }

  .lead {
    font-size: 17px;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .section {
    padding: 64px 0;
  }

  .section-title {
    margin-bottom: 32px;
  }

  .plan,
  .signup-card {
    padding: 24px 20px;
  }

  .legal article {
    padding: 24px 20px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Pagine con navigazione ridotta (iscrizione, legali): nessun menu a scomparsa */
.visually-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 20px;
}

@media (max-width: 820px) {
  .site-nav.site-nav-simple {
    position: static;
    display: flex;
    flex-direction: row;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .site-nav.site-nav-simple .btn {
    margin: 0;
    padding: 8px 12px;
    font-size: 13px;
    white-space: normal;
    text-align: center;
  }
}
