/* ============================================================
   BASE CSS — Landing Page System · Lorenzo DM Software
   ============================================================ */

:root {
  --page-max: 1180px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-soft: 0 18px 60px rgba(0,0,0,.12);
  --shadow-card: 0 10px 34px rgba(0,0,0,.10);
  --font-ui: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --speed: 220ms;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-ui);
  background: var(--color-base);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

.landing-shell { min-height: 100vh; overflow-x: clip; }

/* ===== Container ===== */
.container {
  width: min(var(--page-max), calc(100% - 32px));
  margin: 0 auto;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.header-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--color-text);
}
.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  color: var(--color-text-muted);
  transition: background var(--speed), color var(--speed);
}
.nav a:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
}
.nav-cta {
  background: var(--color-accent) !important;
  color: var(--color-on-accent) !important;
  border-radius: var(--radius-sm) !important;
}
.nav-cta:hover {
  opacity: .9;
  background: var(--color-accent-strong) !important;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 8px; color: var(--color-text);
}
.nav-toggle svg { width: 24px; height: 24px; }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 120px 0 80px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.hero-kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .76rem;
}
.hero-title {
  margin: 22px 0 18px;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: .94;
  letter-spacing: -0.05em;
  font-weight: 900;
}
.hero-subtitle {
  font-size: clamp(1.02rem, 1.8vw, 1.28rem);
  line-height: 1.55;
  color: var(--color-text-muted);
  max-width: 62ch;
}

/* ===== Badges ===== */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.badge {
  padding: 8px 13px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: .85rem;
}

/* ===== Buttons ===== */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--speed), box-shadow var(--speed), background var(--speed);
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
  box-shadow: 0 14px 32px var(--color-accent-shadow);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 46px var(--color-accent-shadow);
  text-decoration: none;
  color: var(--color-on-accent);
}
.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-secondary:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  border-color: var(--color-accent);
}
.btn-download-xl {
  width: min(100%, 520px);
  min-height: 78px;
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  border-radius: var(--radius-lg);
  letter-spacing: -.01em;
}

/* ===== App Card / Mockup ===== */
.app-card {
  border: 1px solid var(--color-border);
  background: linear-gradient(180deg, var(--color-surface), var(--color-elevated));
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-soft);
}
.mock-window {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--color-border);
  background: var(--color-base);
}
.mock-toolbar {
  height: 40px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 16px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.mock-toolbar span {
  width: 11px; height: 11px;
  border-radius: 999px;
}
.mock-toolbar span:nth-child(1) { background: #ff5f57; }
.mock-toolbar span:nth-child(2) { background: #febc2e; }
.mock-toolbar span:nth-child(3) { background: #28c840; }
.mock-content {
  padding: 28px;
}
.mock-content h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-accent-strong);
  margin: 0 0 6px;
}
.mock-content p {
  font-size: .88rem;
  color: var(--color-text-muted);
  margin: 0 0 18px;
}
.mock-bars i {
  display: block;
  height: 11px;
  margin: 12px 0;
  border-radius: 999px;
  background: var(--color-accent-soft);
}
.mock-bars i:nth-child(1) { width: 88%; }
.mock-bars i:nth-child(2) { width: 62%; }
.mock-bars i:nth-child(3) { width: 76%; }

/* ===== Sections ===== */
.section {
  padding: 80px 0;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.05;
  margin: 14px 0 18px;
}
.section-copy {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  max-width: 70ch;
}

/* ===== Problem → Promise ===== */
.problem-section {
  padding: 80px 0;
  border-top: 1px solid var(--color-border);
}
.problem-card {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 54px);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}
.problem-card .section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

/* ===== Slide Deck ===== */
.slide-deck {
  padding: 80px 0;
  border-top: 1px solid var(--color-border);
}
.slide-card {
  display: none;
  min-height: 320px;
  padding: clamp(28px, 5vw, 54px);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
}
.slide-card.is-active {
  display: grid;
  gap: 16px;
  animation: fadeUp .35s ease both;
}
.slide-title {
  font-size: clamp(1.8rem, 3.5vw, 3.2rem);
  line-height: 1.0;
  letter-spacing: -.04em;
  font-weight: 900;
  margin: 0;
}
.slide-copy {
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  max-width: 70ch;
  margin: 0;
}
.slide-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}
.slide-dots {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.slide-dot {
  width: 10px; height: 10px;
  border-radius: 999px;
  background: var(--color-border);
  border: none; cursor: pointer;
  transition: background var(--speed);
}
.slide-dot.is-current {
  background: var(--color-accent);
  width: 28px;
}

/* ===== Feature Grid ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 36px;
}
.feature-card {
  padding: 28px;
  border-radius: 22px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: transform var(--speed), box-shadow var(--speed);
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}
.feature-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-accent-strong);
}
.feature-card p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.55;
  font-size: .95rem;
}

/* ===== Open Source Section ===== */
.open-card {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px);
  text-align: center;
}
.open-card .section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.open-card p {
  margin: 0 auto 24px;
  max-width: 60ch;
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* ===== Ufficio Zero Band ===== */
.uzero-band {
  margin: 84px 0;
  padding: clamp(32px, 5vw, 56px);
  border-radius: 34px;
  background: var(--color-band);
  color: var(--color-band-text);
  border: 1px solid var(--color-border);
  text-align: center;
}
.uzero-band .section-title {
  color: inherit;
}
.uzero-band p {
  max-width: 68ch;
  margin: 0 auto;
  line-height: 1.65;
  font-size: 1.08rem;
  opacity: .92;
}

/* ===== Final CTA ===== */
.final-cta {
  padding: 80px 0;
  text-align: center;
  border-top: 1px solid var(--color-border);
}
.final-cta .section-title {
  max-width: 16ch;
  margin-left: auto;
  margin-right: auto;
}
.final-cta .hero-subtitle {
  max-width: 52ch;
  margin: 0 auto 32px;
}
.final-cta .btn-download-xl {
  margin: 0 auto;
}

/* ===== Footer ===== */
.footer {
  padding: 40px 0;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  font-size: .88rem;
  text-align: center;
  line-height: 1.8;
}
.footer p { margin: 0; }
.footer a {
  color: var(--color-accent-strong);
  text-decoration: none;
}
.footer a:hover { text-decoration: underline; }

/* ===== Animations ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 920px) {
  .hero-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .hero { padding: 90px 0 60px; }
  .app-card { display: none; }
  .nav { display: none; }
  .nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
  }
  .nav-toggle { display: block; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .feature-grid { grid-template-columns: 1fr; }
  .hero { padding: 80px 0 48px; }
  .slide-card { min-height: auto; }
  .btn-download-xl { min-height: 64px; }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
