/* ==========================================================================
   e-pmi.it - Design system
   ========================================================================== */

:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f4f7fb;
  --color-dark: #0f1729;
  --color-dark-alt: #16213c;
  --color-text: #1e2433;
  --color-text-muted: #5b6478;
  --color-text-on-dark: #e7ecf7;
  --color-text-on-dark-muted: #9aa5c1;
  --color-accent: #2f6fed;
  --color-accent-2: #06b6d4;
  --gradient-accent: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-2) 100%);
  --font-heading: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  --shadow-soft: 0 20px 45px -20px rgba(15, 23, 41, 0.25);
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--color-dark);
  margin: 0;
}

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

.accent {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Navbar ---------- */
.site-navbar {
  padding: 1rem 0;
  background: rgba(15, 23, 41, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: background-color .25s ease, padding .25s ease, box-shadow .25s ease;
}

.site-navbar.scrolled {
  padding: 0.6rem 0;
  background: rgba(15, 23, 41, 0.94);
  box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.5);
}

.site-navbar .navbar-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  color: #fff;
}

.site-navbar .nav-link {
  color: var(--color-text-on-dark-muted);
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: color .2s ease;
}

.site-navbar .nav-link:hover {
  color: #fff;
}

.site-navbar .nav-link-cta {
  color: #fff;
  background: var(--gradient-accent);
  border-radius: 999px;
  padding: 0.5rem 1.25rem;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.5rem;
  padding-left: 1rem;
}

.lang-link {
  color: var(--color-text-on-dark-muted);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.lang-link:hover {
  color: #fff;
}

.lang-link.active {
  color: #fff;
}

.lang-sep {
  color: var(--color-text-on-dark-muted);
  font-size: 0.8rem;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 9.5rem 0 6rem;
  background: radial-gradient(circle at 15% 20%, #1c2a4f 0%, var(--color-dark) 55%);
  color: var(--color-text-on-dark);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(circle at 30% 30%, black, transparent 70%);
  mask-image: radial-gradient(circle at 30% 30%, black, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 760px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-accent-2);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.15;
  color: #fff;
  margin-bottom: 1.5rem;
}

.hero-lead {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--color-text-on-dark-muted);
  margin-bottom: 2.25rem;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-cta {
  background: var(--gradient-accent);
  color: #fff;
  border: none;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, box-shadow .2s ease;
}

.btn-cta:hover {
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 25px 50px -20px rgba(47, 111, 237, 0.6);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  transition: border-color .2s ease, background-color .2s ease;
}

.btn-ghost:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
  background-color: rgba(255, 255, 255, 0.06);
}

/* ---------- Sections ---------- */
.section {
  padding: 6rem 0;
}

.section-dark {
  background: var(--color-dark);
  color: var(--color-text-on-dark);
}

.section-dark .section-title,
.section-dark h3 {
  color: #fff;
}

.section-dark .section-text {
  color: var(--color-text-on-dark-muted);
}

.section-eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  margin-bottom: 1.5rem;
}

.section-text {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

/* ---------- Chi siamo stats ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.stat-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  border: 1px solid rgba(15, 23, 41, 0.06);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.4rem;
}

.stat-label {
  color: var(--color-text-muted);
  font-size: 0.92rem;
}

/* ---------- Services ---------- */
.service-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  height: 100%;
  transition: transform .25s ease, border-color .25s ease, background-color .25s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 111, 237, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.service-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-accent);
  color: #fff;
  margin-bottom: 1.25rem;
}

.service-icon svg {
  width: 24px;
  height: 24px;
}

.service-title {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.service-text {
  color: var(--color-text-on-dark-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin: 0;
}

/* ---------- Perché noi ---------- */
.reason-item {
  height: 100%;
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--color-bg-alt);
  border: 1px solid rgba(15, 23, 41, 0.06);
}

.reason-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--color-accent);
  margin-bottom: 0.75rem;
}

.reason-title {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.reason-text {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* ---------- Contatti ---------- */
.contact-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-list a {
  color: #fff;
  font-weight: 500;
}

.contact-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent-2);
  margin-bottom: 0.25rem;
}

.map-frame {
  width: 100%;
  min-height: 340px;
  height: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-dark-alt);
  color: var(--color-text-on-dark-muted);
  padding: 4rem 0 1.5rem;
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 0.75rem;
}

.footer-tagline {
  max-width: 320px;
  line-height: 1.6;
}

.footer-heading {
  color: #fff;
  font-weight: 600;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.footer-text {
  line-height: 1.7;
  font-size: 0.92rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: var(--color-text-on-dark-muted);
  font-size: 0.92rem;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- Scroll-reveal animation ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
  .hero {
    padding: 7.5rem 0 4rem;
  }

  .section {
    padding: 4rem 0;
  }

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

/* ---------- Accessibility ---------- */
.btn:focus, .btn:active:focus, .form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(47, 111, 237, 0.35);
}
