:root {
  --bg-main: #020617;
  --bg-elevated: rgba(15, 23, 42, 0.9);
  --bg-card: rgba(15, 23, 42, 0.8);
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.15);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.2);
  --radius-xl: 18px;
  --radius-2xl: 24px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.75);
  --shadow-subtle: 0 10px 30px rgba(15, 23, 42, 0.6);
}

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

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.22), transparent 55%),
    radial-gradient(circle at bottom, rgba(59, 130, 246, 0.18), transparent 55%),
    var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
}

/* Layout base */

.main-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Navbar */

.navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 60%),
              radial-gradient(circle at bottom, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: radial-gradient(circle, #38bdf8, #0ea5e9);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.9),
              0 0 25px rgba(56, 189, 248, 0.75);
}

.brand-mark span {
  font-weight: 700;
  font-size: 1.1rem;
  color: #0b1120;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text span:first-child {
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: 1.02rem;
}

.brand-text span:last-child {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--text-muted);
  position: relative;
  padding-bottom: 0.25rem;
}

.nav-links a:hover {
  color: var(--text-main);
}

.nav-links a.active {
  color: var(--accent);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #0ea5e9);
  transition: width 150ms ease-out;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 18px;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), rgba(15, 23, 42, 0.98));
  font-size: 0.82rem;
  color: var(--text-main);
  text-decoration: none;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.8);
}

.nav-cta span:last-child {
  font-size: 0.9rem;
}

.nav-cta:hover {
  border-color: rgba(56, 189, 248, 0.8);
}

/* Hero */

.hero {
  padding: 3.5rem 0 3.25rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr);
  gap: 2.75rem;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.85);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.hero-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  margin-right: 0.35rem;
  background: radial-gradient(circle, #22c55e, #16a34a);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.9);
}

.hero-title {
  font-size: clamp(2.1rem, 4vw, 2.7rem);
  letter-spacing: 0.01em;
  line-height: 1.12;
  margin: 0 0 0.9rem;
}

.hero-title span.highlight {
  background: linear-gradient(120deg, #38bdf8, #a855f7);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 0.98rem;
  max-width: 30rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #38bdf8);
  color: #0b1120;
  font-weight: 600;
  box-shadow: 0 16px 40px rgba(8, 47, 73, 0.95);
}

.btn-primary:hover {
  filter: brightness(1.03);
}

.btn-ghost {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-main);
}

.btn-ghost:hover {
  border-color: rgba(56, 189, 248, 0.7);
}

.hero-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.hero-meta strong {
  color: var(--text-main);
}

/* Hero card */

.hero-card {
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.96));
  box-shadow: var(--shadow-soft);
  padding: 1.6rem 1.5rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.12), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(168, 85, 247, 0.08), transparent 55%);
  opacity: 0.95;
  pointer-events: none;
}

.hero-card-inner {
  position: relative;
  z-index: 1;
}

.hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.1rem;
}

.hero-card-title {
  font-size: 0.95rem;
  font-weight: 500;
}

.hero-card-badge {
  font-size: 0.72rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: var(--text-muted);
}

.hero-card-body {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.98));
  padding: 1.15rem 1.1rem;
  margin-bottom: 1rem;
}

.hero-card-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.6rem;
}

.hero-card-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero-card-value {
  font-size: 0.95rem;
}

.hero-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Ad placeholder */

.ad-slot {
  border-radius: var(--radius-xl);
  border: 1px dashed rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  padding: 0.85rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.6rem;
}

/* Sections */

.section {
  padding: 2.75rem 0 2.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.7rem;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 500;
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Cards */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  padding: 1.15rem 1.1rem;
  box-shadow: var(--shadow-subtle);
}

.card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.card-title {
  font-size: 0.98rem;
  margin-bottom: 0.4rem;
}

.card-text {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.card-link {
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--accent);
}

/* Page layouts */

.page-header {
  padding: 2.4rem 0 1.7rem;
}

.page-title {
  font-size: 1.6rem;
  margin-bottom: 0.4rem;
}

.page-lead {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 40rem;
}

/* Content typography */

.prose {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.6;
}

.prose h2 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
}

.prose h3 {
  font-size: 1rem;
  margin-top: 1.2rem;
  margin-bottom: 0.4rem;
}

.prose p {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
}

.prose ul {
  margin: 0.2rem 0 0.9rem 1.2rem;
  padding: 0;
}

.prose li {
  margin-bottom: 0.3rem;
}

/* Contact form */

.form-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  padding: 1.4rem 1.3rem;
  max-width: 520px;
  box-shadow: var(--shadow-subtle);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
}

.form-label {
  font-size: 0.85rem;
  color: var(--text-main);
}

.form-input,
.form-textarea {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.9);
  padding: 0.55rem 0.65rem;
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: rgba(56, 189, 248, 0.9);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Footer */

.footer {
  margin-top: auto;
  padding: 1.6rem 0 1.8rem;
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.98));
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 0.95rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

.plain-link,
.plain-link:visited,
.plain-link:hover,
.plain-link:active {
  color: inherit;
  text-decoration: none;
}


/* Responsive */

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

  .hero-card {
    order: 0;
  }

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

  .navbar-inner {
    gap: 1rem;
  }

  .nav-links {
    display: none; /* versione super-minimal per mobile */
  }
}

@media (max-width: 640px) {
  .cards-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    padding-top: 2.5rem;
  }
}

/* Layout a 2 colonne che diventa 1 colonna su mobile */
.two-col {
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: start;
}

@media (max-width: 900px) {
  .two-col {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Se hai tabelle (esempio numerico), evita rotture su mobile */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
}
.table-wrap table {
  min-width: 520px; /* così non si “spacca” in modo brutto */
}


















.timeline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0 1.5rem;
  gap: 0.5rem;
}

.timeline-step {
  flex: 1;
  text-align: center;
  position: relative;
  color: #9ca3af;
  font-size: 0.8rem;
}

.timeline-step::before {
  content: "";
  position: absolute;
  top: 12px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: rgba(148,163,184,0.25);
  z-index: 0;
}

.timeline-step:first-child::before {
  display: none;
}

.timeline-step .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin: 0 auto 0.35rem;
  background: rgba(148,163,184,0.4);
  position: relative;
  z-index: 1;
}

/* stati */
.timeline-step.done {
  color: #e5e7eb;
}
.timeline-step.done .dot {
  background: #22c55e;
}

.timeline-step.active {
  color: #e5e7eb;
  font-weight: 600;
}
.timeline-step.active .dot {
  background: #38bdf8;
}

a.no-visited,
a.no-visited:visited {
  color: #1a73e8; /* stesso colore sempre */
}

@media (max-width: 600px) {
  .timeline {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline-step {
    display: flex;
    align-items: center;
    gap: 0.6rem;
  }

  .timeline-step::before {
    display: none;
  }
}
