/* Base Styles & Custom Properties */
:root {
  /* Colors - 20ai Theme */
  --c-primary: #1E3A8A; /* Blue */
  --c-primary-light: #2563EB;
  --c-secondary: #10B981; /* Green Tech */
  --c-secondary-glow: rgba(16, 185, 129, 0.4);
  
  /* Background / Surface */
  --bg-color: #F8FAFC; /* Light Mode Bg */
  --surface-color: #FFFFFF;
  --text-color: #0F172A;
  --text-muted: #475569;
  --border-color: #E2E8F0;
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Layout */
  --max-width: 1280px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #0F172A; /* Slate 900 */
    --surface-color: #1E293B; /* Slate 800 */
    --text-color: #F8FAFC;
    --text-muted: #94A3B8;
    --border-color: #334155;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section-pad {
  padding: 6rem 0;
}
.center {
  text-align: center;
}
.mt-4 {
  margin-top: 2rem;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.2;
}
h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.05em;
  margin-bottom: 1.5rem;
}
h1 span {
  background: linear-gradient(135deg, var(--c-primary-light), var(--c-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
h2 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}
h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
p {
  font-size: 1.125rem;
  color: var(--text-muted);
}
.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: rgba(30, 58, 138, 0.1);
  color: var(--c-primary-light);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (prefers-color-scheme: dark) {
  .badge {
    background-color: rgba(30, 58, 138, 0.3);
    color: var(--c-secondary);
  }
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: rgba(248, 250, 252, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition-smooth);
}
@media (prefers-color-scheme: dark) {
  .navbar {
    background-color: rgba(15, 23, 42, 0.85);
  }
}
.navbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
}
.logo img {
  height: 40px;
  width: auto;
}
.nav-center .tel-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.1rem;
  transition: color var(--transition-fast);
}
.nav-center .tel-link:hover {
  color: var(--c-secondary);
}

/* Buttons */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  font-family: inherit;
  font-size: 1rem;
  text-decoration: none;
}
.cta-btn.primary {
  background-color: var(--c-primary);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(30, 58, 138, 0.39);
}
.cta-btn.primary:hover {
  background-color: var(--c-primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.23);
}
.cta-btn.secondary {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
}
.cta-btn.secondary:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}
.cta-btn.huge {
  padding: 1rem 2.5rem;
  font-size: 1.25rem;
  border-radius: var(--radius-md);
}
.link-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  text-decoration: none;
}
.link-btn:hover {
  color: var(--c-primary);
  text-decoration: underline;
}
.link-inline {
  background: none;
  border: none;
  color: var(--c-primary-light);
  cursor: pointer;
  font-weight: 500;
  text-decoration: underline;
  padding: 0;
}

/* Hover Glow & Scale Utility */
.hover-glow {
  transition: all var(--transition-smooth);
}
.hover-glow:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -10px var(--c-secondary-glow);
  border-color: var(--c-secondary);
}

/* Layout Utilities Grid */
.about-grid, .benefits-grid, .services-grid, .testimonials-grid {
  display: grid;
  gap: 2rem;
}

/* Hero Section */
.hero {
  padding-top: 10rem;
  padding-bottom: 6rem;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #F8FAFC;
}
.hero::before {
  content: "";
  display: none;
}
.hero-content {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  max-width: 600px;
  color: #E2E8F0;
}
.dashboard-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.3);
  transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
  transition: transform 0.6s ease;
  border: 1px solid rgba(255,255,255,0.1);
}
.dashboard-wrapper:hover {
  transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}
.dashboard-img {
  width: 100%;
  height: auto;
  display: block;
}
.hero-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.4), transparent);
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* Responsive Overrides */
@media (max-width: 991px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-subtitle, .about-text {
    margin-left: auto;
    margin-right: auto;
  }
}
@media (max-width: 768px) {
  .nav-container {
    padding: 0.75rem 1rem;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  .logo {
    flex: 1;
  }
  .nav-center {
    order: 3;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
    padding-bottom: 0.25rem;
  }
  .nav-center .tel-link {
    font-size: 1rem; /* Ben leggibile */
  }
  .cta-btn {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
  }
  .logo img {
    height: 32px;
  }
  h1 {
    font-size: 2.25rem;
  }
}
