:root {
  --bg: #f5f0e8;
  --bg-alt: #ede9df;
  --fg: #1a2e1a;
  --fg-muted: #4a5a4a;
  --accent: #e8a838;
  --accent-dark: #c8891e;
  --green-deep: #1a3a2a;
  --green-mid: #2d4f2d;
  --white: #ffffff;
  --border: rgba(26,58,42,0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAVBAR ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-inner {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.nav-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  color: var(--green-deep);
  letter-spacing: -0.5px;
}
.nav-tagline {
  font-size: 13px;
  color: var(--fg-muted);
  font-weight: 400;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 60px 80px;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--green-mid);
  background: rgba(26,58,42,0.07);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}
.label-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 800;
  color: var(--green-deep);
  line-height: 1.0;
  letter-spacing: -2px;
  margin-bottom: 24px;
}
.hero-lede {
  font-size: 18px;
  color: var(--fg-muted);
  line-height: 1.6;
  max-width: 480px;
  margin-bottom: 40px;
}

/* ── HERO VISUAL ── */
.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.doc-stack {
  position: relative;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.doc-card {
  position: absolute;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 4px 24px rgba(26,58,42,0.08);
  border: 1px solid var(--border);
}
.doc-card-back {
  width: 240px; height: 300px;
  top: 10px; right: 20px;
  transform: rotate(6deg);
  opacity: 0.5;
}
.doc-card-mid {
  width: 250px; height: 300px;
  top: 0; right: 40px;
  transform: rotate(3deg);
  opacity: 0.75;
}
.doc-card-front {
  width: 260px; height: 320px;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  background: var(--green-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.doc-icon {
  width: 56px; height: 56px;
  background: var(--accent);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.doc-lines {
  flex: 1;
  width: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
  border-radius: 8px;
}

.outputs-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.output-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--green-deep);
  box-shadow: 0 2px 8px rgba(26,58,42,0.06);
}
.chip-icon {
  width: 20px; height: 20px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-deep);
}

.hero-bg-text {
  position: absolute;
  bottom: -40px;
  right: -20px;
  font-family: var(--font-display);
  font-size: 280px;
  font-weight: 800;
  color: rgba(26,58,42,0.04);
  letter-spacing: -10px;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

/* ── SECTIONS ── */
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 60px;
}
.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 16px;
}
.section-headline {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  color: var(--green-deep);
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 48px;
}

/* ── COME FUNZIONA ── */
.come-funziona {
  padding: 100px 0;
  background: var(--bg-alt);
}
.steps {
  display: flex;
  align-items: center;
  gap: 0;
}
.step {
  flex: 1;
  padding: 32px;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.step-number {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: -2px;
}
.step h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--green-deep);
  margin-bottom: 10px;
}
.step p {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.6;
}
.step-connector {
  width: 48px;
  height: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

/* ── FUNZIONI ── */
.funzioni {
  padding: 100px 0;
  background: var(--green-deep);
}
.funzioni .section-label { color: var(--accent); }
.funzioni .section-headline { color: var(--white); }
.funzioni-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.funzione-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
}
.funzione-icon {
  width: 48px; height: 48px;
  background: var(--accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-deep);
  margin-bottom: 20px;
}
.funzione-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}
.funzione-card p {
  font-size: 15px;
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
}

/* ── PERCHE ── */
.perche {
  padding: 100px 0;
  background: var(--bg);
}
.perche-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.perche-body {
  font-size: 17px;
  color: var(--fg-muted);
  margin-bottom: 28px;
  line-height: 1.7;
}
.perche-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pill {
  display: inline-block;
  padding: 6px 16px;
  background: var(--green-deep);
  color: var(--white);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
}
.perche-visual {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stat-block {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--green-deep);
  margin-bottom: 6px;
}
.stat-label {
  font-size: 13px;
  color: var(--fg-muted);
}

/* ── CHIUSURA ── */
.chiusura {
  padding: 120px 0;
  background: var(--green-deep);
  text-align: center;
}
.chiusura-headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}
.chiusura-sub {
  font-size: 18px;
  color: rgba(255,255,255,0.6);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── FOOTER ── */
.footer {
  padding: 32px 60px;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--green-deep);
}
.footer-tagline {
  font-size: 13px;
  color: var(--fg-muted);
}
.footer-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--fg-muted);
}

/* ── PDF UPLOAD ── */
.pdf-upload-section {
  padding: 80px 0;
  background: var(--bg-alt);
}
.pdf-upload-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 44px;
  box-shadow: 0 4px 24px rgba(26,58,42,0.06);
}
.pdf-upload-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 36px;
}
.pdf-upload-icon {
  width: 56px; height: 56px;
  background: var(--accent);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-deep);
  flex-shrink: 0;
}
.pdf-upload-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--green-deep);
  margin-bottom: 4px;
}
.pdf-upload-sub {
  font-size: 15px;
  color: var(--fg-muted);
}
.pdf-upload-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.drop-zone {
  position: relative;
  width: 100%;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}
.drop-zone.drag-over {
  border-color: var(--accent);
  background: rgba(232,168,56,0.05);
}
.drop-zone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 24px;
  color: var(--fg-muted);
  text-align: center;
  pointer-events: none;
}
.drop-label {
  font-size: 16px;
  font-weight: 500;
  color: var(--green-deep);
}
.drop-sub {
  font-size: 14px;
  color: var(--fg-muted);
}
.drop-browse {
  color: var(--accent-dark);
  font-weight: 600;
  cursor: pointer;
  pointer-events: auto;
  text-decoration: underline;
}
.drop-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.btn-genera {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-deep);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  padding: 14px 28px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-genera:hover { background: var(--green-mid); }
.btn-genera:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.pdf-status {
  font-size: 14px;
  color: var(--fg-muted);
  min-height: 20px;
  margin-top: 8px;
}
.summary-output {
  margin-top: 32px;
  padding: 28px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.summary-output p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg);
}
.flashcards-output {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  padding: 0;
}
.flashcard-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.flashcard-q {
  font-weight: 600;
  color: var(--green-deep);
  margin-bottom: 6px;
  font-size: 15px;
}
.flashcard-a {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.5;
}

/* ── ABBONAMENTO ── */
.abbonamento {
  padding: 100px 0;
  background: var(--bg);
}
.plans-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.plan-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
}
.plan-card-pro {
  border-color: var(--green-deep);
  position: relative;
}
.plan-highlight {
  display: inline-block;
  background: var(--accent);
  color: var(--green-deep);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
  align-self: flex-start;
}
.plan-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--green-deep);
  margin-bottom: 8px;
}
.plan-price {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 800;
  color: var(--green-deep);
  margin-bottom: 20px;
  line-height: 1;
}
.plan-price span {
  font-size: 16px;
  font-weight: 400;
  color: var(--fg-muted);
}
.plan-feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.plan-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--fg-muted);
}
.plan-feature-item::before {
  content: '';
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.5l3 3 6-6' stroke='%231a3a2a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}
.plan-card .btn {
  width: 100%;
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.btn-pro {
  background: var(--green-deep);
  color: var(--white);
}
.btn-pro:hover {
  background: var(--green-mid);
  color: var(--white);
}
.btn-free {
  background: transparent;
  border: 2px solid var(--green-deep);
  color: var(--green-deep);
}
.btn-free:hover {
  background: var(--green-deep);
  color: var(--white);
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  .navbar { padding: 16px 24px; }
  .hero { padding: 100px 24px 60px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-headline { font-size: 42px; letter-spacing: -1px; }
  .hero-bg-text { display: none; }
  .section-inner { padding: 0 24px; }
  .steps { flex-direction: column; gap: 16px; }
  .step-connector { width: 40px; height: 24px; transform: rotate(90deg); }
  .funzioni-grid { grid-template-columns: 1fr; }
  .perche-content { grid-template-columns: 1fr; gap: 40px; }
  .perche-visual { grid-template-columns: repeat(3, 1fr); }
  .plans-grid { grid-template-columns: 1fr; }
  .footer { padding: 24px; }
  .footer-inner { flex-direction: column; gap: 16px; align-items: flex-start; }
}