/* ===== Reset base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1c2430;
  background: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

:root {
  --accent: #3233ff;
  --accent-dark: #201fb0;
  --orange: #ff6600;
  --orange-text: #b34700;
  --ink: #1c2430;
  --muted: #5b6472;
  --bg-alt: #f5f7fa;
  --border: #e6e9ee;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
}
.logo-img {
  height: 52px;
  width: auto;
}

.main-nav {
  display: flex;
  gap: 32px;
}
.main-nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease;
}
.main-nav a:hover { color: var(--orange-text); }

.nav-cta { white-space: nowrap; }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.menu-toggle span {
  display: block;
  height: 2px;
  width: 24px;
  background: var(--ink);
  margin: 0 auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s ease, transform 0.1s ease, color 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--orange); color: var(--orange-text); }

/* ===== Hero ===== */
.hero {
  padding: 96px 0 88px;
  background: linear-gradient(160deg, #f2f3ff 0%, #fff8f2 55%, #ffffff 100%);
}
.hero-inner { max-width: 680px; }
.hero h1 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin-bottom: 20px;
  color: var(--ink);
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 32px;
  max-width: 560px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===== Sections ===== */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  color: var(--ink);
  position: relative;
  padding-top: 18px;
}
.section-title::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 48px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--orange));
}
.section-sub {
  color: var(--muted);
  margin-bottom: 48px;
  max-width: 560px;
}

/* ===== Servizi cards ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  padding: 32px 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover {
  box-shadow: 0 12px 28px rgba(28,36,48,0.08);
  transform: translateY(-2px);
}
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #eaeaff;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card:nth-child(even) .card-icon {
  background: #fff1e6;
  color: var(--orange-text);
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--ink);
}
.card p { color: var(--muted); font-size: 0.95rem; }

/* ===== Chi siamo ===== */
.about-inner { max-width: 720px; }
.about-text p { color: var(--muted); margin-bottom: 24px; }
.about-points li {
  padding-left: 28px;
  position: relative;
  margin-bottom: 10px;
  color: var(--ink);
  font-weight: 500;
}
.about-points li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--orange-text);
  font-weight: 700;
}

/* ===== Contatti ===== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.contact-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}
.contact-card h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 8px;
}
.contact-card p { font-size: 1.05rem; font-weight: 600; color: var(--ink); }
.contact-card a:hover { color: var(--orange-text); }

.map-wrap {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.map-wrap iframe {
  display: block;
  width: 100%;
  height: 320px;
  border: 0;
}
.map-fallback {
  padding: 40px 28px;
  text-align: center;
  background: var(--bg-alt);
  line-height: 1.6;
}
.map-fallback p {
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 20px;
  font-size: 0.95rem;
}
.map-fallback-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.map-fallback-link {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
}
.map-fallback-link:hover { color: var(--accent-dark); }

/* ===== Cookie banner ===== */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -12px 32px rgba(28,36,48,0.12);
  transform: translateY(110%);
  transition: transform 0.35s ease;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.cookie-banner-inner p {
  flex: 1 1 420px;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}
.cookie-banner-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
.cookie-banner .btn { padding: 11px 22px; font-size: 0.9rem; }

.cookie-settings-link {
  background: none;
  border: none;
  padding: 0;
  margin-left: 4px;
  color: var(--muted);
  font-size: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.cookie-settings-link:hover { color: var(--accent); }

/* ===== Brand / partner strip ===== */
.brands-strip {
  overflow: hidden;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
}
.brands-track {
  display: flex;
  align-items: center;
  gap: 20px;
  width: max-content;
  animation: brands-scroll 48s linear infinite;
}
.brands-strip:hover .brands-track { animation-play-state: paused; }
.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  min-width: 128px;
  padding: 10px 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.brand-logo:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(28,36,48,0.08);
}
.brand-logo img {
  max-height: 34px;
  max-width: 110px;
  width: auto;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.brand-logo:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

@keyframes brands-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .brands-track { animation: none; }
}

/* ===== Footer ===== */
.site-footer {
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--accent), var(--orange)) 1;
  padding: 24px 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 8px 24px;
    gap: 0;
    display: none;
    box-shadow: 0 12px 24px rgba(28,36,48,0.08);
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
  }
  .main-nav a:last-child { border-bottom: none; }
  .nav-cta { display: none; }
  .menu-toggle { display: flex; }
  .cards-grid { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 44px; }
  .section { padding: 56px 0; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { text-align: center; }
  .contact-card, .card { padding: 24px 20px; }
  .map-wrap iframe { height: 240px; }
  .brand-logo { height: 56px; min-width: 108px; padding: 8px 18px; }
  .cookie-banner-inner { flex-direction: column; align-items: stretch; padding: 18px 20px; }
  .cookie-banner-actions { flex-direction: column-reverse; }
  .cookie-banner-actions .btn { width: 100%; text-align: center; }
  .map-fallback { padding: 28px 20px; }
  .map-fallback-actions { flex-direction: column; align-items: stretch; }
}

@media (max-width: 400px) {
  .logo-img { height: 44px; }
  .container { padding: 0 18px; }
}
