:root {
  /* Colori principali */
  --primary: #0e3a5c;
  --secondary: #177e89;
  --accent: #e76f51;
  --accent-light: #f4a261;
  --light: #f7f9fb;
  --dark: #243441;
  --gray: #5d6d7c;
  --gray-light: #e0e7ef;
  
  /* Tipografia */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  
  /* Spazi */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  
  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  /* Transizioni */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Ombre */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.16);
}

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

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

body {
  font-family: var(--font-primary);
  color: var(--dark);
  background-color: var(--light);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Import font (self-hosted fallback) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* Tipografia */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); margin-bottom: var(--space-md); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); margin-bottom: var(--space-sm); }
h4 { font-size: 1.125rem; }

p {
  margin-bottom: var(--space-md);
  font-size: 1rem;
}

strong {
  font-weight: 600;
  color: var(--primary);
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-2xl) 0;
}

/* Header */
header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
}

#logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  cursor: default;
  user-select: none;
  transition: transform var(--transition-fast);
}

#logo:hover {
  transform: scale(1.02);
}

#logo span {
  color: var(--secondary);
}

nav a {
  color: var(--gray);
  font-weight: 500;
  margin-left: var(--space-lg);
  font-size: 0.95rem;
  position: relative;
  padding: var(--space-xs) 0;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: width var(--transition-base);
}

nav a:hover {
  color: var(--secondary);
}

nav a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  text-align: center;
  padding: var(--space-2xl) var(--space-md);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
  pointer-events: none;
}

.hero h1 {
  color: white;
  margin-bottom: var(--space-md);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.125rem;
  max-width: 700px;
  margin: 0 auto var(--space-xl);
}

/* Buttons */
.btn {
  display: inline-block;
  background: white;
  color: var(--primary);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
  border: none;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--gray-light);
}

.btn:active {
  transform: translateY(0);
}

.btn-ghost {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.4);
  margin-left: var(--space-md);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
  color: white;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  border: none;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card .ico {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card h3 {
  color: var(--secondary);
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.card p {
  color: var(--gray);
  font-size: 0.95rem;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  counter-reset: step;
}

.step {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: all var(--transition-base);
}

.step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -16px;
  left: var(--space-md);
  background: var(--accent);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-primary);
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: var(--shadow-md);
}

.step p {
  color: var(--gray);
  font-size: 1rem;
}

/* Reveal Animation */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Footer */
footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  font-size: 0.9rem;
}

footer a {
  color: rgba(255, 255, 255, 0.8);
  margin: 0 var(--space-xs);
}

footer a:hover {
  color: white;
  text-decoration: underline;
}

footer a.sep {
  color: inherit;
  text-decoration: none;
  padding: 0 var(--space-xs);
  font-size: 1.2rem;
}

footer a.sep:hover {
  text-decoration: none;
  color: inherit;
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-md { margin-top: var(--space-md); }
.mb-md { margin-bottom: var(--space-md); }

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .btn-ghost {
    margin-left: 0;
    margin-top: var(--space-md);
  }
  
  nav a {
    margin-left: var(--space-md);
    font-size: 0.9rem;
  }
  
  .cards {
    grid-template-columns: 1fr;
  }
  
  .steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .nav {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  nav a {
    margin-left: 0;
    margin: 0 var(--space-sm);
  }
  
  .hero {
    padding: var(--space-xl) var(--space-md);
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Focus states */
:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background: var(--secondary);
  color: white;
}
