/* =========================================================================
   Luca D'Apice — landing SaaS minimal
   Light + Dark mode con CSS variables, toggle persistito in localStorage.
   ========================================================================= */

:root {
  /* Colors — LIGHT (default) */
  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --bg-alt: #f7f7f5;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --border: #e8e8e3;
  --border-strong: #d4d4cf;
  --text: #0a0a0a;
  --text-muted: #525252;
  --text-subtle: #737373;
  --text-faint: #a3a3a3;
  --accent: #047857;
  --accent-strong: #065f46;
  --accent-soft: #ecfdf5;
  --accent-glow: rgba(4, 120, 87, 0.10);
  --shadow-sm: 0 1px 2px 0 rgba(10, 10, 10, 0.04);
  --shadow-md: 0 4px 14px -2px rgba(10, 10, 10, 0.06), 0 2px 4px -1px rgba(10, 10, 10, 0.04);
  --shadow-lg: 0 12px 40px -8px rgba(10, 10, 10, 0.10), 0 4px 12px -2px rgba(10, 10, 10, 0.06);

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter Tight", "Inter", -apple-system, sans-serif;

  /* Layout */
  --max: 1200px;
  --gut: clamp(20px, 5vw, 48px);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
}

[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-subtle: #0f0f0f;
  --bg-alt: #131313;
  --bg-card: #141414;
  --bg-elevated: #1a1a1a;
  --border: #262626;
  --border-strong: #404040;
  --text: #fafafa;
  --text-muted: #a3a3a3;
  --text-subtle: #737373;
  --text-faint: #525252;
  --accent: #34d399;
  --accent-strong: #10b981;
  --accent-soft: rgba(52, 211, 153, 0.08);
  --accent-glow: rgba(52, 211, 153, 0.15);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 14px -2px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 40px -8px rgba(0, 0, 0, 0.6), 0 4px 12px -2px rgba(0, 0, 0, 0.4);
}

/* ---------- BASE ---------- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color-scheme: light dark;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.2s ease, color 0.2s ease;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
p { margin: 0 0 1em; }
em { font-style: italic; }

::selection { background: var(--accent); color: var(--bg); }

.accent { color: var(--accent); }

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px var(--gut);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.015em;
  font-size: 16px;
}
.logo-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--text);
  position: relative;
  display: inline-block;
}
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 5px 5px auto auto;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover {
  background: var(--bg-alt);
  color: var(--text);
  border-color: var(--border-strong);
}
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-alt); border-color: var(--text); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
  padding-left: 4px;
  padding-right: 4px;
}
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: 8px 14px; font-size: 13.5px; }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: clamp(64px, 10vh, 120px) var(--gut) clamp(64px, 10vh, 120px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  max-width: 880px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}
.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0 0 24px;
}
.hero-title-accent {
  color: var(--text-muted);
  font-weight: 600;
}

.hero-sub {
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}

.hero-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  font-size: 13.5px;
  color: var(--text-subtle);
}
.hero-bullets li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.hero-bullets svg { width: 14px; height: 14px; color: var(--accent); }

/* ---------- SECTIONS ---------- */
.section {
  padding: clamp(80px, 12vh, 140px) var(--gut);
  position: relative;
}
.section-alt {
  background: var(--bg-subtle);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: var(--max);
  margin: 0 auto 64px;
  text-align: center;
}
.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
  padding: 5px 12px;
  background: var(--accent-soft);
  border-radius: 999px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0 0 20px;
}
.section-sub {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto;
}

/* ---------- GRIDS ---------- */
.grid-3, .grid-2 {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 20px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ---------- CARDS (problem) ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.card-icon svg { width: 20px; height: 20px; }
.card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
}
.card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- NOT-LIST (what's different) ---------- */
.not-list {
  max-width: var(--max);
  gap: 12px;
}
.not-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  transition: border-color 0.2s ease;
}
.not-row:hover { border-color: var(--border-strong); }
.not-headline {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 0 8px;
  text-decoration: line-through;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
}
.not-body {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- STEPS ---------- */
.steps {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.step:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.step-num {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}
.step-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.018em;
  margin: 0 0 12px;
}
.step-body {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 24px;
}
.step-tag {
  display: inline-block;
  padding: 6px 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* ---------- FILTERS ---------- */
.filters {
  max-width: var(--max);
  gap: 24px;
}
.filter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}
.filter-yes { border-color: var(--accent); }
.filter-yes .filter-label { color: var(--accent); }
.filter-no .filter-label { color: var(--text-faint); }
.filter-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.filter-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 20px;
}
.filter-card li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 14px;
  align-items: start;
}
.filter-card svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 1px;
  padding: 2px;
  border-radius: 999px;
}
.filter-yes svg {
  background: var(--accent-soft);
  color: var(--accent);
}
.filter-no svg {
  background: var(--bg-alt);
  color: var(--text-faint);
}
.filter-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 4px;
}
.filter-no strong { color: var(--text-muted); }
.filter-card span {
  display: block;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ---------- CASE STUDY ---------- */
.case {
  max-width: 880px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px;
  box-shadow: var(--shadow-sm);
}
.case-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-subtle);
  margin: 0 0 24px;
  font-weight: 500;
}
.case-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: var(--text-faint);
}
.case-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 24px;
  max-width: 28ch;
}
.case-lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 36px;
  max-width: 65ch;
}
.case-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.metric-value {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
  margin: 0 0 6px;
}
.metric-label {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-subtle);
  margin: 0;
}
.case-note {
  font-size: 12.5px;
  font-style: italic;
  color: var(--text-faint);
  margin: 0;
}

/* ---------- PRICING ---------- */
.pricing {
  max-width: 920px;
  gap: 20px;
}
.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.price-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.price-card-featured {
  border-color: var(--text);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
}
[data-theme="dark"] .price-card-featured { background: var(--bg-elevated); }

.price-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin: 0 0 12px;
}
.price-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
}
.price-amount {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  margin: 0 0 10px;
}
.price-amount span {
  font-size: 28px;
  font-weight: 500;
  margin-left: 4px;
  color: var(--text-muted);
  letter-spacing: -0.02em;
}
.price-meta {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0 0 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.price-features {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: grid;
  gap: 12px;
}
.price-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text);
}
.price-features svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 3px;
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  gap: 8px;
}
.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg {
  width: 16px;
  height: 16px;
  color: var(--text-faint);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details p {
  padding: 0 26px 24px;
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
}

/* ---------- CTA SECTION ---------- */
.cta-section {
  padding: clamp(80px, 14vh, 160px) var(--gut);
  text-align: center;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle at center, var(--accent-glow) 0%, transparent 60%);
  pointer-events: none;
}
.cta-inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.cta-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 600;
  margin: 0 0 20px;
}
.cta-body {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 36px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.cta-note {
  font-size: 13px;
  color: var(--text-faint);
  margin-top: 24px;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 64px var(--gut) 40px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 64px;
}
.footer-brand .logo { margin-bottom: 16px; }
.footer-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  max-width: 28ch;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.footer-cols div { display: flex; flex-direction: column; gap: 8px; }
.footer-cols a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color 0.15s ease;
}
.footer-cols a:hover { color: var(--text); }
.footer-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 4px !important;
}
.footer-note {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-subtle);
  margin: 0 !important;
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */

@media (max-width: 920px) {
  .nav-links { display: none; }
  .grid-3, .steps { grid-template-columns: 1fr; gap: 16px; }
  .grid-2 { grid-template-columns: 1fr; gap: 16px; }
  .case { padding: 36px 28px; }
  .case-metrics { grid-template-columns: 1fr; gap: 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 560px) {
  .nav-inner { gap: 12px; padding: 12px 20px; }
  .logo-text { font-size: 15px; }
  .hero { padding-top: 48px; padding-bottom: 64px; }
  .hero-title { font-size: 38px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; min-width: 180px; }
  .hero-bullets { gap: 14px 20px; }
  .section { padding: 64px var(--gut); }
  .section-head { margin-bottom: 40px; }
  .card, .not-row, .step, .filter-card { padding: 24px; }
  .case { padding: 28px 22px; }
  .price-card { padding: 32px 24px; }
  .price-amount { font-size: 44px; }
  .footer-cols { grid-template-columns: 1fr; }
}

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