/* ==========================================================================
   Termoidraulico di Successo — Design tokens
   ========================================================================== */
:root {
  --navy-900: #0a1628;
  --navy-800: #0f2038;
  --navy-700: #16304f;
  --blue-600: #1a56db;
  --blue-500: #2563eb;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --ink-900: #101828;
  --ink-700: #344054;
  --ink-500: #667085;
  --paper-0: #ffffff;
  --paper-50: #f8fafc;
  --paper-100: #f1f5f9;
  --border: #e2e8f0;
  --success-bg: #ecfdf5;
  --success-text: #047857;
  --danger: #dc2626;

  --font-display: 'Manrope', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 16px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, 0.14);
  --max-width: 1140px;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--paper-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink-900); margin: 0; line-height: 1.15; }
p { margin: 0; color: var(--ink-700); }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: var(--navy-900);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-ghost {
  background: transparent;
  color: var(--paper-0);
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-ghost:hover { border-color: var(--paper-0); }
.btn-lg { padding: 15px 30px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-header { display: none; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--paper-0);
  letter-spacing: -0.01em;
}
.logo span { color: var(--amber-500); }
.nav {
  display: none;
  gap: 28px;
}
.nav a {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 500;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.nav a:hover { color: var(--paper-0); }

.nav-toggle {
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--paper-0);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav.nav-open {
  display: flex;
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  flex-direction: column;
  background: var(--navy-800);
  padding: 16px 24px 24px;
  gap: 16px;
  box-shadow: var(--shadow-lg);
}

@media (min-width: 1100px) {
  .nav { display: flex; }
  .nav-toggle { display: none; }
  .btn-header { display: inline-flex; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background: radial-gradient(120% 140% at 15% 0%, var(--navy-700) 0%, var(--navy-900) 55%, #060d18 100%);
  padding: 88px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  max-width: 820px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.eyebrow {
  display: inline-block;
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber-500);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.hero h1 {
  color: var(--paper-0);
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero h1 .highlight { color: var(--amber-500); }
.hero-sub {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.1rem;
  max-width: 640px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}
.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 18px;
}
.hero-points li {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  padding-left: 22px;
  position: relative;
}
.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.18);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.08);
}
.hero-points li::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 6px;
  height: 3px;
  border-left: 2px solid var(--amber-500);
  border-bottom: 2px solid var(--amber-500);
  transform: rotate(-45deg);
}

/* ==========================================================================
   Trust marquee
   ========================================================================== */
.trust-marquee {
  background: var(--navy-800);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  padding: 14px 0;
}
.trust-track {
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  animation: trust-scroll 26s linear infinite;
}
.trust-item {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.trust-dot {
  color: var(--amber-500);
  font-size: 0.7rem;
}
@keyframes trust-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .trust-track { animation: none; }
}

/* ==========================================================================
   About / Chi sono
   ========================================================================== */
.about { background: var(--paper-50); }
.about-card {
  position: relative;
  overflow: hidden;
  background: var(--paper-0);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 44px 32px;
  box-shadow: var(--shadow-lg);
}
.about-quote {
  position: absolute;
  top: 28px;
  right: 32px;
  width: 64px;
  height: 64px;
  color: var(--paper-100);
  z-index: 0;
}
.about-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
}
.about-photo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  justify-self: center;
}
.about-photo-frame {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 526 / 990;
  border-radius: 16px;
  object-fit: cover;
  object-position: top center;
  box-shadow: var(--shadow-md);
}
.about-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amber-600);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  padding: 4px 12px;
}
.about-facts {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
}
.about-facts li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 220px;
  padding-left: 16px;
  border-left: 2px solid rgba(245, 158, 11, 0.4);
}
.about-facts strong {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--blue-600);
}
.about-facts span { font-size: 0.85rem; color: var(--ink-500); line-height: 1.4; }

@media (min-width: 800px) {
  .about-grid { grid-template-columns: 220px 1fr; align-items: start; }
}

/* ==========================================================================
   Sections generic
   ========================================================================== */
.section { padding: 84px 0; }
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  max-width: 720px;
}
.section-lead {
  margin-top: 14px;
  font-size: 1.05rem;
  max-width: 680px;
}
.eyebrow-dark {
  background: rgba(37, 99, 235, 0.1);
  color: var(--blue-600);
  border-color: rgba(37, 99, 235, 0.22);
  margin-bottom: 14px;
}

/* Problem */
.problem { background: var(--paper-50); }
.problem-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}
.problem-card {
  background: var(--paper-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.problem-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(220, 38, 38, 0.08);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.problem-icon svg { width: 22px; height: 22px; }
.problem-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.problem-card p { font-size: 0.92rem; }

/* System / pillars */
.system {
  background: linear-gradient(180deg, var(--navy-900), var(--navy-800));
  color: var(--paper-0);
}
.system .section-title { color: var(--paper-0); }
.system .section-lead { color: rgba(255, 255, 255, 0.72); }
.pillars {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}
.pillar {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
}
.pillar-num {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--amber-500);
  margin-bottom: 14px;
}
.pillar h3 { color: var(--paper-0); font-size: 1.15rem; margin-bottom: 10px; }
.pillar p { color: rgba(255, 255, 255, 0.68); font-size: 0.94rem; }

/* Timeline / process */
.timeline {
  margin-top: 44px;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 720px;
}
.timeline li {
  display: flex;
  gap: 22px;
  position: relative;
  padding-bottom: 40px;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 42px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline li:last-child::before { display: none; }
.timeline-step {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--blue-600);
  color: var(--paper-0);
  font-weight: 800;
  font-family: var(--font-display);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.timeline h3 { font-size: 1.05rem; margin-bottom: 6px; }
.timeline p { font-size: 0.94rem; }

/* Fit section */
.fit { background: var(--paper-50); }
.fit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.fit-card {
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border);
  background: var(--paper-0);
}
.fit-card h3 { font-size: 1.2rem; margin-bottom: 18px; }
.fit-card li {
  padding: 10px 0 10px 30px;
  position: relative;
  font-size: 0.95rem;
  color: var(--ink-700);
  border-top: 1px solid var(--paper-100);
}
.fit-card li:first-child { border-top: none; }
.fit-yes li::before { content: "✓"; position: absolute; left: 0; color: #059669; font-weight: 800; }
.fit-no li::before { content: "✕"; position: absolute; left: 0; color: var(--danger); font-weight: 800; }

/* FAQ / accordion */
.faq { background: var(--paper-50); }
.accordion { margin-top: 36px; max-width: 760px; }
.accordion-item {
  border-bottom: 1px solid var(--border);
}
.accordion-trigger {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 20px 4px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.accordion-icon {
  flex: none;
  font-size: 1.3rem;
  color: var(--blue-600);
  transition: transform 0.2s ease;
}
.accordion-trigger[aria-expanded="true"] .accordion-icon { transform: rotate(45deg); }
.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.accordion-panel p { padding: 0 4px 20px; font-size: 0.94rem; }

/* CTA final / form */
.cta-final {
  background: linear-gradient(180deg, var(--navy-900), var(--navy-800));
}
.cta-final-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
.cta-copy h2 { color: var(--paper-0); font-size: clamp(1.6rem, 3vw, 2.1rem); }
.cta-copy p { color: rgba(255, 255, 255, 0.72); margin-top: 14px; max-width: 460px; }

.lead-form {
  background: var(--paper-0);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-group label { font-size: 0.86rem; font-weight: 600; color: var(--ink-700); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 11px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--ink-900);
  background: var(--paper-0);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.form-group textarea { resize: vertical; }
.form-group.has-error input,
.form-group.has-error select {
  border-color: var(--danger);
}
.field-error {
  font-size: 0.78rem;
  color: var(--danger);
  min-height: 1em;
}
.form-submit-error {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--danger);
  text-align: center;
}
.form-note {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--ink-500);
  text-align: center;
}
.form-success {
  background: var(--success-bg);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
}
.form-success h3 { color: var(--success-text); font-size: 1.3rem; margin-bottom: 10px; }
.form-success p { color: var(--ink-700); }

@media (min-width: 700px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .cta-final-inner { grid-template-columns: 0.9fr 1.1fr; align-items: start; }
}

/* Footer */
.site-footer { background: var(--navy-900); padding: 28px 0; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.84rem;
}
.footer-inner a { color: rgba(255, 255, 255, 0.75); }
.footer-inner a:hover { color: var(--paper-0); }

/* Mobile sticky CTA */
.mobile-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  color: var(--navy-900);
  text-align: center;
  font-weight: 800;
  padding: 14px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
}
@media (min-width: 900px) {
  .mobile-sticky-cta { display: none; }
}

/* Reveal-on-scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
