@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@300;400;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ─── Variables ─── */
:root {
  --brand: #0d9488;
  --brand-strong: #0f766e;
  --brand-light: #ccfbf1;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

/* ─── Reset ─── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ─── Typography ─── */
body {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
}

h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

p {
  line-height: 1.7;
  color: var(--muted);
}

a {
  color: var(--brand);
  text-decoration: none;
}

/* ─── Layout ─── */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section--alt {
  background: var(--surface);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}

.section-header p {
  margin-top: 14px;
}

/* ─── Navbar ─── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  transition: background 300ms ease, box-shadow 300ms ease;
}

.navbar.scrolled {
  background: var(--surface);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid var(--line);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.navbar-brand img,
.navbar-brand svg {
  width: 36px;
  height: 36px;
}

.navbar-brand span {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.navbar-menu {
  display: flex;
  gap: 32px;
  align-items: center;
  list-style: none;
}

.navbar-link {
  color: var(--text);
  font-weight: 500;
  font-size: 0.92rem;
  text-decoration: none;
  position: relative;
  transition: color 200ms ease;
}

.navbar-link:hover {
  color: var(--brand);
}

.navbar-link.active {
  color: var(--brand);
  font-weight: 600;
}

.navbar-cta {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, var(--brand), #14b8a6);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.navbar-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.35);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}

/* ─── Hero ─── */
.hero {
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 680px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.15rem;
  margin-bottom: 32px;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-bg {
  position: absolute;
  top: -120px;
  right: -200px;
  width: 900px;
  height: 900px;
  z-index: -1;
  background:
    radial-gradient(circle 400px at 60% 30%, rgba(13, 148, 136, 0.12) 0%, transparent 100%),
    radial-gradient(circle 300px at 80% 60%, rgba(20, 184, 166, 0.08) 0%, transparent 100%),
    radial-gradient(circle 250px at 40% 70%, rgba(204, 251, 241, 0.25) 0%, transparent 100%);
  pointer-events: none;
}

/* ─── Buttons ─── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), #14b8a6);
  color: #fff;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.3);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(13, 148, 136, 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid var(--brand);
  color: var(--brand);
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 200ms ease, color 200ms ease;
}

.btn-secondary:hover {
  background: var(--brand-light);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.88rem;
}

/* ─── Cards ─── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 28px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: transform 250ms ease, box-shadow 250ms ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--brand);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  font-size: 0.92rem;
}

/* ─── Feature Grid ─── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ─── Steps ─── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #14b8a6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 auto 16px;
}

.step::after {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(50% + 36px);
  width: calc(100% - 72px);
  height: 2px;
  background: var(--line);
}

.step:last-child::after {
  display: none;
}

.step h3 {
  margin-bottom: 8px;
}

.step p {
  font-size: 0.9rem;
  max-width: 280px;
  margin: 0 auto;
}

/* ─── Stats ─── */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-value {
  font-family: 'Fraunces', serif;
  font-size: 2.8rem;
  font-weight: 300;
  color: var(--brand);
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}

/* ─── Pricing ─── */
.pricing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}

.pricing-toggle-btn {
  padding: 8px 20px;
  border-radius: 999px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  transition: background 200ms ease, color 200ms ease;
}

.pricing-toggle-btn.active {
  background: var(--brand);
  color: #fff;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.pricing-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 32px;
  text-align: center;
  transition: transform 250ms ease, box-shadow 250ms ease;
}

.pricing-card.featured {
  border-color: var(--brand);
  box-shadow: 0 8px 30px rgba(13, 148, 136, 0.15);
  transform: scale(1.04);
  position: relative;
}

.pricing-card.featured::before {
  content: 'Più popolare';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: #fff;
  padding: 4px 16px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

.pricing-card h3 {
  margin-bottom: 4px;
}

.pricing-price {
  font-family: 'Fraunces', serif;
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--text);
  margin: 16px 0 8px;
}

.pricing-price span {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  color: var(--muted);
  font-weight: 400;
}

.pricing-features {
  list-style: none;
  padding: 0;
  text-align: left;
  margin: 24px 0;
}

.pricing-features li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--text);
}

.pricing-features li::before {
  content: '✓';
  color: var(--brand);
  font-weight: 800;
  margin-right: 8px;
}

.pricing-features li.disabled {
  color: var(--muted);
  opacity: 0.5;
}

.pricing-features li.disabled::before {
  content: '—';
  color: var(--muted);
}

/* ─── CTA Section ─── */
.cta-section {
  background: linear-gradient(135deg, var(--brand), #0f766e);
  padding: 64px 0;
  text-align: center;
}

.cta-section h2 {
  color: #fff;
  font-family: 'Fraunces', serif;
  margin-bottom: 14px;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 540px;
  margin: 0 auto 28px;
}

.cta-section .btn-primary {
  background: #fff;
  color: var(--brand-strong);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.cta-section .btn-primary:hover {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

/* ─── Footer ─── */
.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: #f8fafc;
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.footer-brand-col p {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.6;
}

.footer h4 {
  color: #f8fafc;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.footer ul {
  list-style: none;
  padding: 0;
}

.footer ul li {
  margin-bottom: 8px;
}

.footer a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.88rem;
  transition: color 200ms ease;
}

.footer a:hover {
  color: #5eead4;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 32px;
  padding-top: 20px;
  font-size: 0.8rem;
  text-align: center;
  color: #64748b;
}

/* ─── FAQ ─── */
.faq-list {
  max-width: 780px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  background: none;
  border: none;
  width: 100%;
  font-family: 'Outfit', sans-serif;
  text-align: left;
}

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--muted);
  transition: transform 200ms ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.open .faq-question::after {
  content: '−';
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-bottom: 20px;
}

.faq-answer p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ─── Feature Detail (alternating) ─── */
.feature-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0;
}

.feature-detail--reverse .feature-detail-visual {
  order: -1;
}

.feature-detail-content h2 {
  margin-bottom: 16px;
}

.feature-detail-content p {
  margin-bottom: 16px;
}

.feature-detail-content ul {
  padding-left: 20px;
}

.feature-detail-content li {
  margin-bottom: 8px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
}

.feature-detail-visual {
  background: var(--brand-light);
  border-radius: var(--radius-lg);
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Responsive: 1024px ─── */
@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .pricing-card.featured {
    transform: scale(1);
  }

  .feature-detail {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .feature-detail--reverse .feature-detail-visual {
    order: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .steps::after {
    display: none;
  }
}

/* ─── Responsive: 768px ─── */
@media (max-width: 768px) {
  .navbar-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--surface);
    padding: 20px 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    gap: 16px;
  }

  .navbar.menu-open .navbar-menu {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .steps {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin: 0 auto;
  }

  .step::after {
    display: none;
  }

  .stats-row {
    flex-direction: column;
    gap: 24px;
  }

  .hero {
    padding-top: 100px;
    text-align: center;
  }

  .hero-content {
    margin: 0 auto;
  }

  .hero p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .section {
    padding: 56px 0;
  }

  .contact-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ─── Contact page ─── */

.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.contact-form .form-row {
  display: grid;
  gap: 6px;
}

.contact-form label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 0.92rem;
  color: var(--text);
  background: #fff;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

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

.contact-info {
  display: grid;
  gap: 16px;
}

.contact-info .card {
  text-align: center;
}

.contact-info .card-icon {
  margin: 0 auto 12px;
}

.contact-success {
  padding: 14px;
  border-radius: var(--radius-md);
  background: #ecfdf5;
  color: #065f46;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  border: 1px solid #a7f3d0;
}

.contact-error {
  padding: 14px;
  border-radius: var(--radius-md);
  background: #fef2f2;
  color: #991b1b;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  border: 1px solid #fecaca;
}
