/* ============================================================
   ALFAPROTEC SpA — Design System
   Style: Trust & Authority · Light Mode
   Primary: #005373 · Accent: #EE2F27 · Base: #FFFFFF
   Source: ui-ux-pro-max-skill / Trust & Authority
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  /* Brand */
  --primary:          #005373;
  --primary-dark:     #003D56;
  --primary-light:    #006E97;
  --primary-tint:     rgba(0, 83, 115, 0.07);
  --primary-border:   rgba(0, 83, 115, 0.18);

  --accent:           #EE2F27;
  --accent-dark:      #C72520;
  --accent-tint:      rgba(238, 47, 39, 0.07);
  --accent-border:    rgba(238, 47, 39, 0.22);

  /* Surface */
  --bg-primary:       #FFFFFF;
  --bg-secondary:     #F4F7F9;
  --bg-tertiary:      #EBF2F6;
  --bg-card:          #FFFFFF;

  /* Text */
  --text-primary:     #0C1F28;
  --text-secondary:   #3D5A68;
  --text-muted:       #7A96A4;

  /* Border & Shadow */
  --border:           #DDE6EB;
  --border-strong:    #B8CDD6;
  --shadow-xs:        0 1px 2px rgba(0,0,0,0.06);
  --shadow-sm:        0 1px 4px rgba(0,0,0,0.07), 0 2px 8px rgba(0,0,0,0.05);
  --shadow-md:        0 4px 12px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.05);
  --shadow-lg:        0 8px 32px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.06);
  --shadow-primary:   0 4px 20px rgba(0, 83, 115, 0.22);

  /* Typography */
  --font-heading:     'Lexend', sans-serif;
  --font-body:        'Source Sans 3', sans-serif;

  /* Grid */
  --base-unit:        8px;
  --gap:              1.5rem;
  --section-pad:      5.5rem;
  --max-width:        1180px;

  /* Shape */
  --radius-xs:        3px;
  --radius-sm:        6px;
  --radius-md:        10px;
  --radius-lg:        14px;
  --radius-xl:        20px;

  /* Motion */
  --transition:       160ms ease;
  --transition-md:    260ms ease;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── Typography ──────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.15;
  color: var(--text-primary);
}
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.625rem, 3.5vw, 2.25rem); font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 1.1875rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p  { color: var(--text-secondary); max-width: 65ch; line-height: 1.7; }

/* ── Layout ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 2rem;
}
.section { padding-block: var(--section-pad); }
.section--alt { background: var(--bg-secondary); }
.section--primary { background: var(--primary); }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}

/* ── UI Components ───────────────────────────────────────── */
.label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.label::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.divider {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  border-radius: 2px;
  margin-block: 1.25rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all var(--transition-md);
  white-space: nowrap;
}
.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-primary);
  transform: translateY(-1px);
}
.btn--accent {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn--accent:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}
.btn--outline {
  border: 1.5px solid var(--primary-border);
  color: var(--primary);
  background: transparent;
}
.btn--outline:hover {
  background: var(--primary-tint);
  border-color: var(--primary);
}
.btn--outline-white {
  border: 1.5px solid rgba(255,255,255,0.4);
  color: #fff;
}
.btn--outline-white:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.7);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3125rem 0.875rem;
  border-radius: 100px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  width: fit-content;
}
.badge--primary {
  background: var(--primary-tint);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}
.badge--accent {
  background: var(--accent-tint);
  color: var(--accent-dark);
  border: 1px solid var(--accent-border);
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }

/* ── About Intro ─────────────────────────────────────────── */
.about-intro {
  padding-block: 4rem;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
}
.about-intro__text {
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  color: var(--text-secondary);
  max-width: 780px;
  margin-inline: auto;
  margin-bottom: 1.25rem;
  line-height: 1.75;
  text-align: center;
}
.about-intro__text strong {
  color: var(--text-primary);
  font-weight: 600;
}
.about-intro__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 780px;
  margin-inline: auto;
}
.about-intro__list li {
  padding-left: 1.25rem;
  position: relative;
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 1.6vw, 1.05rem);
  line-height: 1.7;
}
.about-intro__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ── Stats Band ──────────────────────────────────────────── */
.stats-band {
  padding-block: 4rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}
.stats-band__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.stats-band__item {
  text-align: center;
  padding: 2rem 2.5rem;
  border-right: 1px solid var(--border);
}
.stats-band__item:last-child {
  border-right: none;
}
.stats-band__number {
  font-family: var(--font-heading);
  font-size: clamp(3.5rem, 6vw, 5rem);
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stats-band__label {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}
.stats-band__sub {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}

@media (max-width: 640px) {
  .stats-band__grid {
    grid-template-columns: 1fr;
  }
  .stats-band__item {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .stats-band__item:last-child {
    border-bottom: none;
  }
}

/* ── Map Section ─────────────────────────────────────────── */
.map-section {
  padding-block: 4rem;
  background: var(--bg-secondary);
}
.map-section__inner {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 420px;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.map-section__info {
  background: var(--primary-dark);
  color: #fff;
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  justify-content: center;
}
.map-section__city {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.map-section__address {
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.80);
}
.map-section__contact {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.70);
}
.map-section__contact a {
  color: rgba(255,255,255,0.90);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.map-section__link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity var(--transition);
}
.map-section__link:hover { opacity: 0.75; }
.map-section__map {
  position: relative;
  min-height: 420px;
}
.map-section__map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 700px) {
  .map-section__inner {
    grid-template-columns: 1fr;
    padding-inline: 0;
  }
  .map-section__map {
    min-height: 280px;
  }
}

/* ── Services Mosaic ─────────────────────────────────────── */
.svc-mosaic {
  padding-block: 5rem;
  background: var(--bg-secondary);
}
.svc-mosaic__header {
  margin-bottom: 2.5rem;
}
.svc-mosaic__header h2 {
  margin-top: 0.25rem;
}
.svc-mosaic__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* Card */
.svc-card {
  position: relative;
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-md), box-shadow var(--transition-md);
}
.svc-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.svc-card__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Gradient overlay — stronger at bottom for text, lighter at top for icon */
.svc-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.70) 0%,
    rgba(0, 0, 0, 0.20) 45%,
    rgba(0, 0, 0, 0.08) 100%
  );
  pointer-events: none;
}
.svc-card__body {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 1.4rem;
}
.svc-card__icon {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
  transition: transform var(--transition-md);
}
.svc-card:hover .svc-card__icon {
  transform: scale(1.08) translateY(-2px);
}
.svc-card__icon svg {
  width: 100%;
  height: 100%;
}
.svc-card__tag {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.60);
  margin-bottom: 0.2rem;
}
.svc-card__title {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 0.25rem;
}
.svc-card__sub {
  font-size: 0.80rem;
  color: rgba(255,255,255,0.68);
  max-width: none;
  line-height: 1.4;
  margin: 0;
}

/* Software strip */
.svc-mosaic__software {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 1rem 1.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: fit-content;
}
.svc-mosaic__software-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}
.svc-mosaic__software-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
}
.svc-mosaic__software-dot {
  color: var(--border-strong);
  font-size: 1.1rem;
}

@media (max-width: 860px) {
  .svc-mosaic__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .svc-mosaic__grid { grid-template-columns: 1fr; }
}
