/* ============================================
   SUPPORTCRACY — Global Styles
   Palette: Nero + Arancione + Bianco
   ============================================ */

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

:root {
  /* Colori principali */
  --black: #0a0a0a;
  --dark: #141414;
  --dark-light: #1e1e1e;
  --orange: #ff6b00;
  --orange-light: #ff8c33;
  --orange-glow: rgba(255, 107, 0, 0.25);
  --white: #ffffff;
  --gray-100: #f5f5f5;
  --gray-200: #e5e5e5;
  --gray-400: #999999;
  --gray-600: #666666;
  --gray-800: #333333;

  /* Tipografia */
  --font-main: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing */
  --section-padding: 80px 0;
  --container-width: 1120px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--orange);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--orange-light);
}

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

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

/* Bottoni */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--orange-light);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.05);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.navbar-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}

.navbar-logo span {
  color: var(--orange);
}

.navbar-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.navbar-links a {
  color: var(--gray-400);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.navbar-links a:hover {
  color: var(--white);
}

.navbar-cta .btn {
  padding: 10px 24px;
  font-size: 0.9rem;
}

/* Mobile menu */
.navbar-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}

.navbar-toggle span {
  display: block;
  width: 22px;
  height: 3px;
  background: var(--white);
  border-radius: 2px;
  margin: 3px 0;
  transition: all 0.3s;
}

/* Hero Section */
.hero {
  background: var(--black);
  color: var(--white);
  padding: 160px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 0, 0.3), transparent);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 107, 0, 0.1);
  border: 1px solid rgba(255, 107, 0, 0.25);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--orange);
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-badge .pulse {
  width: 8px;
  height: 8px;
  background: var(--orange);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
  position: relative;
}

.hero h1 .highlight {
  color: var(--orange);
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--gray-400);
  max-width: 600px;
  margin: 0 auto 48px;
  line-height: 1.6;
}

/* --- Counter globale --- */
.global-counter {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-bottom: 48px;
  position: relative;
}

.counter-item {
  text-align: center;
}

.counter-number {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--orange);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.counter-label {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: 6px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Come Funziona */
.how-it-works {
  padding: var(--section-padding);
  background: var(--white);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--orange);
  font-weight: 700;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.step {
  text-align: left;
  padding: 32px 28px;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  transition: border-color 0.2s;
}

.step:hover {
  border-color: var(--orange);
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--black);
  color: var(--orange);
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.step h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--black);
}

.step p {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* Casi Attivi */
.active-cases {
  padding: var(--section-padding);
  background: var(--gray-100);
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.case-card {
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--gray-200);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  overflow: hidden;
}

.case-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  border-color: var(--orange);
  color: inherit;
}

.case-card:hover .case-card-image img {
  transform: scale(1.05);
}

.case-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.case-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: transform 0.4s ease;
}

.case-card-body {
  padding: 28px 32px 32px;
}

.case-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.case-card-status {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.case-card-status.active {
  background: rgba(255, 107, 0, 0.1);
  color: var(--orange);
}

.case-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--black);
}

.case-card p {
  font-size: 0.9rem;
  color: var(--gray-600);
  margin-bottom: 24px;
  line-height: 1.6;
}

.case-card-stats {
  display: flex;
  gap: 32px;
}

.case-card-stat {
  display: flex;
  flex-direction: column;
}

.case-card-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--black);
}

.case-card-stat-label {
  font-size: 0.75rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* CTA Section */
.cta-section {
  padding: var(--section-padding);
  background: var(--black);
  color: var(--white);
  text-align: center;
  border-top: 1px solid rgba(255, 107, 0, 0.15);
}

.cta-section .section-title {
  color: var(--white);
  margin-bottom: 16px;
}

.cta-section p {
  color: var(--gray-400);
  margin-bottom: 32px;
  font-size: 1.1rem;
}

/* Footer */
.footer {
  background: var(--dark);
  color: var(--gray-400);
  padding: 48px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-brand p {
  font-size: 0.85rem;
  max-width: 320px;
  margin-top: 12px;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  gap: 48px;
}

.footer-links-group h4 {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-links-group ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-group a {
  color: var(--gray-400);
  font-size: 0.85rem;
}

.footer-links-group a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.footer-legal {
  display: flex;
  gap: 24px;
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--dark);
  color: var(--gray-400);
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: none;
  animation: slideUp 0.4s ease;
}

.cookie-banner.show {
  display: block;
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cookie-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  min-width: 280px;
}

.cookie-text p {
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
}

.cookie-text a {
  color: var(--orange);
  text-decoration: underline;
}

.cookie-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.cookie-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: var(--font-main);
  transition: all 0.2s;
}

.cookie-btn-accept {
  background: var(--orange);
  color: var(--white);
}

.cookie-btn-accept:hover {
  background: var(--orange-light);
}

.cookie-btn-decline {
  background: transparent;
  color: var(--gray-400);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.cookie-btn-decline:hover {
  border-color: var(--gray-400);
  color: var(--white);
}

@media (max-width: 480px) {
  .cookie-inner {
    flex-direction: column;
    text-align: center;
  }

  .cookie-actions {
    width: 100%;
    justify-content: center;
  }
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
  }

  .navbar-links,
  .navbar-cta {
    display: none;
  }

  .navbar-toggle {
    display: flex;
    flex-direction: column;
  }

  /* Mobile menu open state */
  .navbar.menu-open .navbar-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .navbar.menu-open .navbar-cta {
    display: flex;
    position: absolute;
    top: calc(100% + 140px);
    left: 0;
    right: 0;
    padding: 0 24px 24px;
    background: var(--dark);
  }

  .hero {
    padding: 120px 0 80px;
  }

  .global-counter {
    gap: 32px;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

  .footer-content {
    flex-direction: column;
  }

  .footer-links {
    flex-direction: column;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-legal {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .counter-number {
    font-size: 1.8rem;
  }

  .global-counter {
    gap: 20px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: none;
  }

  .case-card-image {
    height: 160px;
  }

  .case-card-body {
    padding: 20px;
  }
}
