/* mIAmente — foglio di stile condiviso. Palette derivata dai colori reali
   del logo (campionati da branding/logo/miamente-logo-full.png):
   blu elettrico dell'"IA" e dei nodi del cervello, navy scuro del testo
   "m...mente", blu profondo delle linee del circuito. */

:root {
  --navy: #242b47;
  --navy-soft: #4a5372;
  --blue: #0068da;
  --blue-deep: #0c2f73;
  --blue-pale: #eaf2fd;
  --bg: #ffffff;
  --bg-alt: #f5f8fc;
  --border: #e2e7f0;
  --text: #242b47;
  --text-light: #5a6478;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(12, 47, 115, 0.08);
  --maxw: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  text-decoration: underline;
}

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

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  height: 34px;
  width: auto;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

nav.main-nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.98rem;
}

nav.main-nav a:hover {
  color: var(--blue);
  text-decoration: none;
}

nav.main-nav a.current {
  color: var(--blue);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-cta .btn-ghost {
  display: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  position: relative;
  transition: 0.2s;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
}

.nav-toggle span::before {
  top: -7px;
}

.nav-toggle span::after {
  top: 7px;
}

/* Buttons */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(0, 104, 218, 0.28);
}

.btn-primary:hover {
  background: var(--blue-deep);
}

.btn-outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}

.btn-outline:hover {
  background: var(--blue-pale);
}

.btn-ghost {
  color: var(--navy);
  padding: 10px 16px;
}

.btn-small {
  padding: 8px 18px;
  font-size: 0.9rem;
}

.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.btn[aria-disabled="true"]:hover {
  transform: none;
}

/* Hero */

.hero {
  background: linear-gradient(180deg, var(--blue-pale) 0%, var(--bg) 65%);
  padding: 72px 0 64px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: 1.15;
  margin: 0 0 18px;
  color: var(--navy);
}

.hero h1 .accent {
  color: var(--blue);
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--text-light);
  margin: 0 0 28px;
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--text-light);
}

.hero-art {
  display: flex;
  justify-content: center;
}

.hero-art img {
  max-width: 420px;
}

/* Page hero (pagine interne) */

.page-hero {
  background: linear-gradient(180deg, var(--blue-pale) 0%, var(--bg) 100%);
  padding: 56px 0 40px;
  text-align: center;
}

.page-hero h1 {
  color: var(--navy);
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  margin: 0 0 14px;
}

.page-hero p {
  color: var(--text-light);
  max-width: 60ch;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* Sezioni generiche */

section {
  padding: 64px 0;
}

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

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 44px;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  color: var(--navy);
  margin: 0 0 14px;
}

.section-head p {
  color: var(--text-light);
  font-size: 1.05rem;
  margin: 0;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: 10px;
}

/* Contrasto (before/after) */

.contrast-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.contrast-card {
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--border);
}

.contrast-card.old {
  background: var(--bg-alt);
}

.contrast-card.new {
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow);
}

.contrast-card h3 {
  margin-top: 0;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.contrast-card.old h3 {
  color: var(--text-light);
}

.contrast-card.new h3 {
  color: #9dc2f5;
}

.contrast-card ul {
  padding-left: 20px;
  margin: 0;
}

.contrast-card li {
  margin-bottom: 12px;
}

/* Come funziona */

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

.step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
  margin-bottom: 16px;
}

.step h3 {
  margin: 0 0 10px;
  color: var(--navy);
}

.step p {
  margin: 0;
  color: var(--text-light);
}

/* 3 pilastri */

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

.pillar {
  text-align: center;
  padding: 8px;
}

.pillar .icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: var(--blue-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 1.6rem;
}

.pillar h3 {
  color: var(--navy);
  margin: 0 0 10px;
}

.pillar p {
  color: var(--text-light);
  margin: 0;
}

/* Tabella confronto Free/Pro */

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: stretch;
}

.plan-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.plan-card.featured {
  border-color: var(--blue);
  box-shadow: var(--shadow);
  position: relative;
}

.plan-badge {
  position: absolute;
  top: -14px;
  left: 32px;
  background: var(--blue);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: 0.03em;
}

.plan-card h3 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 1.4rem;
}

.plan-card .price {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--navy);
  margin: 6px 0 4px;
}

.plan-card .price small {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-light);
}

.plan-card .price-note {
  color: var(--text-light);
  font-size: 0.92rem;
  margin-bottom: 24px;
}

.plan-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  flex-grow: 1;
}

.plan-card li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  display: flex;
  gap: 10px;
}

.plan-card li:last-child {
  border-bottom: none;
}

.plan-card li .check {
  color: var(--blue);
  font-weight: 700;
}

.plan-card .btn {
  text-align: center;
}

/* Requisiti hardware */

.req-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.req-table th,
.req-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.req-table th {
  background: var(--navy);
  color: var(--white);
  font-weight: 600;
}

.req-table tr:last-child td {
  border-bottom: none;
}

.req-note {
  margin-top: 20px;
  color: var(--text-light);
  font-size: 0.95rem;
}

/* FAQ */

.faq-list {
  max-width: 780px;
  margin: 0 auto;
}

details.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 14px;
  background: var(--bg);
}

details.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

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

details.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--blue);
  flex-shrink: 0;
}

details.faq-item[open] summary::after {
  content: "\2212";
}

details.faq-item p {
  color: var(--text-light);
  margin: 14px 0 0;
}

/* Privacy — schema flusso dati */

.flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 40px 0;
}

.flow .node {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 22px;
  text-align: center;
  min-width: 150px;
  box-shadow: var(--shadow);
}

.flow .node strong {
  display: block;
  color: var(--navy);
  margin-bottom: 4px;
}

.flow .node span {
  color: var(--text-light);
  font-size: 0.88rem;
}

.flow .arrow {
  color: var(--blue);
  font-size: 1.4rem;
}

.flow .node.blocked {
  border-color: #d9484f;
}

.flow .node.blocked strong {
  color: #d9484f;
}

/* Callout / note box */

.callout {
  background: var(--blue-pale);
  border-left: 4px solid var(--blue);
  border-radius: 10px;
  padding: 20px 24px;
  color: var(--navy);
}

.callout.warn {
  background: #fff6ea;
  border-left-color: #d69023;
}

/* CTA finale */

.cta-band {
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  color: var(--white);
  text-align: center;
  border-radius: var(--radius);
  padding: 56px 32px;
}

.cta-band h2 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.cta-band p {
  margin: 0 0 28px;
  color: #dce9fb;
}

.cta-band .hero-actions {
  justify-content: center;
}

.cta-band .btn-outline {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.6);
}

.cta-band .btn-outline:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Footer */

footer.site-footer {
  background: var(--navy);
  color: #c7cfe2;
  padding: 48px 0 28px;
  margin-top: 40px;
}

footer.site-footer .foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

footer.site-footer .brand img {
  height: 30px;
}

footer.site-footer p {
  color: #9aa5c2;
  font-size: 0.92rem;
}

footer.site-footer h4 {
  color: var(--white);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 14px;
}

footer.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

footer.site-footer li {
  margin-bottom: 10px;
}

footer.site-footer a {
  color: #c7cfe2;
}

footer.site-footer a:hover {
  color: var(--white);
}

.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  font-size: 0.85rem;
  color: #8b96b4;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Pagina "Grazie" */

.receipt-box {
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px;
  text-align: center;
}

.receipt-box .icon-ok {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--blue-pale);
  color: var(--blue);
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.receipt-steps {
  text-align: left;
  margin: 28px 0;
  padding-left: 20px;
  color: var(--text);
}

.receipt-steps li {
  margin-bottom: 12px;
}

/* Mockup frame per screenshot/illustrazioni segnaposto */

.mockup-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  max-width: 720px;
  margin: 0 auto;
}

.mockup-frame img {
  width: 100%;
  display: block;
}

.mockup-caption {
  text-align: center;
  color: var(--text-light);
  font-size: 0.88rem;
  margin-top: 14px;
}

/* Animazioni in entrata */

@media (prefers-reduced-motion: no-preference) {
  .hero-copy {
    animation: fadeUp 0.7s ease both;
  }

  .hero-art {
    animation: fadeUp 0.7s ease 0.15s both;
  }

  .reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.75s ease, transform 0.75s ease;
  }

  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .stagger > .reveal:nth-child(1) { transition-delay: 0s; }
  .stagger > .reveal:nth-child(2) { transition-delay: 0.1s; }
  .stagger > .reveal:nth-child(3) { transition-delay: 0.2s; }
  .stagger > .reveal:nth-child(4) { transition-delay: 0.3s; }

  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(22px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Responsive */

@media (max-width: 860px) {
  nav.main-nav {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 20px;
    transform: translateX(100%);
    transition: transform 0.2s ease;
    border-top: 1px solid var(--border);
  }

  nav.main-nav.open {
    transform: translateX(0);
  }

  .nav-toggle {
    display: inline-block;
  }

  .nav-cta .btn-ghost {
    display: inline-block;
  }

  .hero .wrap {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero p.lead {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-art img {
    max-width: 280px;
    margin: 0 auto;
  }

  .contrast-grid,
  .steps,
  .pillars,
  .plans {
    grid-template-columns: 1fr;
  }

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