/* ===== Design tokens ===== */
:root {
  --accent: #cd1719;
  --accent-dark: #ff6b5f;
  --ink: #242424;
  --ink-soft: #3a3a3a;
  --text-body: #5b5b5b;
  --text-muted: #6a6a6a;
  --bg: #f4f4f2;
  --bg-alt: #f0f1ef;
  --neu: #eceeeb;
  --font-title: 'Sora', sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: clip;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
::selection { background: var(--accent); color: #fff; }
i[data-lucide] { display: inline-flex; }

.container { max-width: 1240px; margin: 0 auto; }
.container-relative { position: relative; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  border-radius: 100px;
  white-space: nowrap;
  transition: filter .2s, transform .2s;
}
.btn .icon { width: 17px; height: 17px; }
.btn-primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 26px rgba(205, 23, 25, 0.28);
}
.btn-primary:hover { filter: brightness(0.9); transform: translateY(-2px); }
.btn-lg { font-size: 15.5px; padding: 15px 28px; }
.btn-neu {
  color: #2a2a2a;
  background: var(--neu);
  box-shadow: 5px 5px 12px rgba(0, 0, 0, 0.06), -5px -5px 12px rgba(255, 255, 255, 0.9);
  transition: transform .2s;
}
.btn-neu:hover { transform: translateY(-2px); }

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 244, 242, 0.72);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}
.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px clamp(18px, 4vw, 56px);
  display: flex;
  flex-wrap: wrap;
  row-gap: 10px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.header-logo { display: flex; align-items: center; flex: 0 0 auto; min-width: 0; }
.header-logo img { height: 44px; width: auto; max-width: 100%; display: block; }

@media (max-width: 480px) {
  .header-logo img { height: 32px; }
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 34px);
  flex-wrap: wrap;
}
.nav-link {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.nav-link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.btn-nav { font-size: 14.5px; padding: 11px 22px; letter-spacing: .2px; box-shadow: 0 6px 18px rgba(205, 23, 25, 0.28); }
.btn-nav:hover { transform: translateY(-1px); }

.nav-mobile-bar { display: none; align-items: center; gap: 10px; flex: 0 0 auto; }
.btn-nav-mobile { font-size: 14px; padding: 11px 18px; box-shadow: 0 6px 18px rgba(205, 23, 25, 0.28); }

.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--neu);
  flex: 0 0 auto;
  cursor: pointer;
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.06), -3px -3px 8px rgba(255, 255, 255, 0.9);
}
.hamburger-bar {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .25s, opacity .2s;
}
.hamburger[aria-expanded="true"] .hamburger-bar-top { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] .hamburger-bar-mid { opacity: 0; }
.hamburger[aria-expanded="true"] .hamburger-bar-bot { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile-dropdown {
  display: none;
  flex-direction: column;
  padding: 8px clamp(18px, 4vw, 56px) 20px;
  gap: 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  background: rgba(244, 244, 242, 0.98);
}
.nav-mobile-dropdown.is-open { display: flex; }
.nav-mobile-dropdown a {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 13px 4px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.btn-nav-dropdown {
  display: inline-flex;
  justify-content: center;
  margin-top: 14px;
  font-size: 15.5px;
  padding: 14px 22px;
  box-shadow: 0 6px 18px rgba(205, 23, 25, 0.28);
  border-bottom: none !important;
}

@media (max-width: 860px) {
  .nav-desktop { display: none; }
  .nav-mobile-bar { display: flex; }
}

/* ===== Eyebrow labels ===== */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow-dark { color: var(--accent-dark); }
.eyebrow-hero {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  letter-spacing: 1px;
  background: rgba(205, 23, 25, 0.07);
  border: 1px solid rgba(205, 23, 25, 0.18);
  padding: 7px 14px;
  border-radius: 100px;
  margin-bottom: 26px;
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.section-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(26px, 3.6vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.8px;
  color: var(--ink);
}
.section-title-light { color: #fff; }
.section-body { font-size: clamp(15.5px, 1.4vw, 18px); line-height: 1.6; color: var(--text-body); }
.section-body-dark { color: #b6b6b8; }

.accent { color: var(--accent); }

/* ===== Sections ===== */
.section { padding: clamp(56px, 8vw, 110px) clamp(18px, 4vw, 56px); }
.section-alt { background: var(--bg-alt); border-top: 1px solid rgba(0, 0, 0, 0.06); }

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ===== Hero ===== */
.hero { position: relative; padding: clamp(48px, 7vw, 96px) clamp(18px, 4vw, 56px) clamp(56px, 7vw, 104px); }
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1100px 520px at 12% -8%, rgba(205, 23, 25, 0.07), transparent 60%),
    radial-gradient(900px 500px at 108% 12%, rgba(205, 23, 25, 0.06), transparent 55%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -1.6px;
  color: var(--ink);
  margin-bottom: 22px;
}
.hero-title-italic { font-style: italic; font-weight: 600; }
.hero-sub { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.62; color: var(--text-body); max-width: 520px; margin-bottom: 34px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-visual { position: relative; }
.hero-img {
  display: block;
  width: 100%;
  max-width: 538px;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 100% center;
  border-radius: 26px;
  box-shadow: 0 30px 70px -22px rgba(120, 10, 12, 0.55);
}
.glass-badge {
  position: absolute;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.3);
  animation: floaty 6s ease-in-out infinite;
}
.glass-badge-top { left: -14px; top: 34px; }
.glass-badge-bottom { right: 0; bottom: 44px; animation-duration: 7s; animation-delay: .6s; }
.glass-badge-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 1px;
  color: #fff;
  opacity: .85;
  text-transform: uppercase;
}
.glass-badge-title { font-family: var(--font-title); font-weight: 600; font-size: 16px; color: #fff; }

/* ===== Chi Siamo ===== */
.chi-siamo { border-top: 1px solid rgba(0, 0, 0, 0.06); }
.chi-siamo-inner { max-width: 1000px; margin: 0 auto; text-align: center; }
.section-lead { font-size: clamp(16px, 1.5vw, 18.5px); line-height: 1.68; color: var(--text-body); max-width: 720px; margin: 0 auto; text-wrap: balance; }

/* ===== Section head (title/body + image) ===== */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: clamp(30px, 4vw, 48px);
}
.section-head-copy { max-width: 640px; }
.section-head-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 18px;
  flex: 1 1 320px;
}
.section-head-img-red { max-width: 563px; box-shadow: 0 22px 44px -20px rgba(120, 10, 12, 0.5); }
.section-head-img-dark { max-width: 462px; box-shadow: 0 22px 44px -18px rgba(0, 0, 0, 0.6); }

/* ===== Cards grid ===== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(288px, 1fr)); gap: 18px; }
.card-grid-steps { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.service-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  padding: 28px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.service-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px -22px rgba(0, 0, 0, 0.28); border-color: rgba(205, 23, 25, 0.25); }
.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--neu);
  color: var(--accent);
  box-shadow: 5px 5px 11px rgba(0, 0, 0, 0.07), -5px -5px 11px rgba(255, 255, 255, 0.95);
  margin-bottom: 20px;
}
.service-icon i { width: 24px; height: 24px; }
.service-card h3 { font-family: var(--font-title); font-weight: 600; font-size: 18px; color: var(--ink); margin-bottom: 9px; line-height: 1.25; }
.service-card p { font-size: 14.5px; line-height: 1.55; color: var(--text-muted); }

/* ===== Automazione (dark) ===== */
.section-dark { position: relative; overflow: hidden; background: #1a1a1c; }
.section-dark-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(900px 500px at 88% 0%, rgba(205, 23, 25, 0.22), transparent 55%);
  pointer-events: none;
}
.step-card {
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 20px;
  padding: 26px;
  transition: transform .25s, border-color .25s;
}
.step-card:hover { transform: translateY(-5px); border-color: rgba(255, 107, 95, 0.45); }
.step-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.step-number { font-family: var(--font-title); font-weight: 700; font-size: 15px; color: var(--accent-dark); }
.step-card-head i { width: 22px; height: 22px; color: #fff; }
.step-card h3 { font-family: var(--font-title); font-weight: 600; font-size: 16.5px; color: #fff; margin-bottom: 8px; }
.step-card p { font-size: 14px; line-height: 1.55; color: #a9a9ac; }

/* ===== Perché Aitema ===== */
.perche-head { max-width: 640px; margin-bottom: clamp(30px, 4vw, 48px); }
.value-card { background: var(--neu); border-radius: 20px; padding: 30px 28px; box-shadow: 7px 7px 18px rgba(0, 0, 0, 0.05), -7px -7px 18px rgba(255, 255, 255, 0.9); }
.value-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  margin-bottom: 18px;
  box-shadow: 0 8px 18px rgba(205, 23, 25, 0.28);
}
.value-icon i { width: 22px; height: 22px; }
.value-card h3 { font-family: var(--font-title); font-weight: 600; font-size: 17.5px; color: var(--ink); margin-bottom: 9px; }
.value-card p { font-size: 14.5px; line-height: 1.55; color: var(--text-muted); }

/* ===== Contatti ===== */
.contatti-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(28px, 4vw, 52px);
  align-items: start;
}
.contatti-lead { font-size: 16px; line-height: 1.6; color: var(--text-body); margin-bottom: 30px; max-width: 440px; }
.contatti-cta { margin-top: 22px; }

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 20px;
  padding: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border-radius: 13px;
  transition: background .2s;
}
a.contact-row:hover { background: #f6f6f4; }
.contact-icon { width: 19px; height: 19px; color: var(--accent); flex: 0 0 auto; }
.contact-row-title { font-weight: 600; color: var(--ink); font-size: 15px; }
.contact-row-sub { font-size: 14px; color: var(--text-muted); }

.contatti-map {
  display: block;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 20px 44px -26px rgba(0, 0, 0, 0.35);
  min-height: 380px;
  height: 100%;
  position: relative;
}
.contatti-map img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
  display: block;
  transition: transform .35s;
}
.contatti-map:hover img { transform: scale(1.03); }

/* ===== Legal pages (privacy / cookie policy) ===== */
.legal-hero { max-width: 780px; margin: 0 auto clamp(24px, 4vw, 40px); text-align: center; }
.legal-content { max-width: 780px; margin: 0 auto; }
.legal-content h2 { font-family: var(--font-title); font-weight: 600; font-size: 22px; color: var(--ink); margin: 36px 0 12px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { font-size: 15.5px; line-height: 1.7; color: var(--text-body); margin-bottom: 14px; }
.legal-content ul, .legal-content ol { color: var(--text-body); font-size: 15.5px; line-height: 1.7; padding-left: 22px; margin-bottom: 14px; }
.legal-content a { color: var(--accent); text-decoration: underline; }
.legal-content table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 14px; }
.legal-content table th, .legal-content table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(0, 0, 0, 0.08); }

/* ===== Footer ===== */
.site-footer { background: #151517; padding: clamp(48px, 6vw, 72px) clamp(18px, 4vw, 56px) 32px; }
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 36px;
  flex-wrap: wrap;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-brand { max-width: 300px; }
.footer-logo { height: 42px; width: auto; display: block; margin-bottom: 18px; filter: brightness(0) invert(1); opacity: 0.95; }
.footer-brand p { font-size: 14px; line-height: 1.6; color: #8a8a8e; }
.footer-cols { display: flex; gap: clamp(40px, 6vw, 80px); flex-wrap: wrap; }
.footer-col-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: #6a6a6e; margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 11px; }
.footer-links a { font-size: 14.5px; color: #c4c4c8; transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-social { display: flex; gap: 12px; }
.social-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e4e4e6;
  transition: background .2s, transform .2s;
}
.social-btn:hover { background: var(--accent); transform: translateY(-2px); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
  font-size: 13px;
  color: #7a7a7e;
}
.footer-payoff { font-style: italic; color: #a0a0a4; }
