:root {
  --primary: #111827;
  --secondary: #eef2f7;
  --accent: #2563eb;
  --background: #ffffff;
  --text: #111827;
  --muted: #667085;
  --border: #dbe2ea;

  --max-width: 1180px;
  --radius: 24px;
  --shadow: 0 18px 45px rgba(17, 24, 39, 0.10);
}

.back-formalab {
  position: fixed;
  left: 18px;
  bottom: 18px;

  z-index: 999;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 10px 14px;

  font-family: "Montserrat", Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;

  color: #ffffff;
  background: #121214;

  border: 1px solid #e4572e;
  border-radius: 999px;

  text-decoration: none;

  box-shadow: 0 6px 18px rgba(0,0,0,.18);

  transition:
    transform .2s ease,
    background .2s ease;
}

.back-formalab:hover {
  transform: translateY(-2px);
  background: #e4572e;
  color: #121214;
}

/* RESET BASE */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button,
input,
textarea {
  font: inherit;
}

/* STRUTTURA */

.container {
  width: min(92%, var(--max-width));
  margin: 0 auto;
}

.section {
  padding: 90px 0;
}

.section-alt {
  background: var(--secondary);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-heading h2,
.split-content h2,
.contact-section h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 18px;
}


.eyebrow {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.split-content .eyebrow {
  color: var(--accent);
}

/* HEADER */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.nav-wrapper {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;

  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.logo-image {
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex-shrink: 0;

  padding: 4px;
  background: #ffffff;
  border: 1.5px solid var(--accent);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a {
  font-size: 0.95rem;
  color: var(--text);
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--accent);
}

/* BOTTONI */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  opacity: 0.92;
}

.btn-small {
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.9rem;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: #ffffff;
}

/* HERO */

.hero {
  padding: 80px 0 90px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: stretch;
  gap: 30px;
}

.hero-content h1 {
  max-width: 720px;
  font-size: clamp(2.8rem, 5.8vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
  margin-bottom: 24px;
  font-weight: 800;
}

.hero .hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: 52px;

  background-color: #111827;
  color: #ffffff;

  border-radius: var(--radius);
}

.hero .hero-content h1 {
  color: #ffffff;
}

.hero .eyebrow {
  color: #93c5fd;
}

.hero .hero-text {
  max-width: 560px;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 30px;
}

.hero-text {
  max-width: 620px;
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero-image {
  height: 100%;
}

.hero-image img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: none;
}

.hero .btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.hero .btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.hero .btn-outline:hover {
  background: #ffffff;
  color: var(--primary);
  border-color: #ffffff;
}

/* SERVIZI */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;

  counter-reset: service-counter;
}

.card {
  position: relative;

  padding: 36px;
  padding-top: 86px;

  border: 1px solid var(--border);
  border-radius: var(--radius);

  background: #ffffff;

  counter-increment: service-counter;

  overflow: hidden;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.card::before {
  content: "0" counter(service-counter);

  position: absolute;
  top: 24px;
  left: 32px;

  color: var(--accent);
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;

  opacity: 0.18;
}

.card::after {
  content: "";

  position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  height: 5px;

  background: var(--accent);
}

.card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow);
  border-color: rgba(37, 99, 235, 0.35);
}

.card h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.card p {
  color: var(--muted);
}

/* CHI SIAMO */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}

.split-image img {
  width: 100%;
  min-height: 460px;
  object-fit: cover;
  border-radius: var(--radius);
}

.split-content p {
  color: var(--muted);
  margin-bottom: 18px;
}

.text-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
  font-weight: 700;
}

/* GALLERY */

.gallery {
  display: grid;

  grid-template-columns: 1.25fr 0.75fr;
  grid-template-rows: repeat(2, 280px);

  gap: 20px;
}

.gallery img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  border-radius: var(--radius);

  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

.gallery img:first-child {
  grid-row: 1 / 3;
}

.gallery img:nth-child(4) {
  grid-column: 1 / 3;
  height: 260px;
}

.gallery img:hover {
  transform: scale(1.015);
}

/* CONTATTI */

.contact-section {
  background: var(--primary);
  color: #ffffff;
}

.contact-section .eyebrow {
  color: #ffffff;
  opacity: 0.75;
}

.contact-section p {
  color: rgba(255, 255, 255, 0.75);
}

.contact-section .contact-highlight {
  display: inline-block;

  margin-top: 18px;
  padding: 10px 16px;

  color: #bfdbfe;

  font-size: 0.88rem;
  font-weight: 700;

  border: 1px solid rgba(147, 197, 253, 0.3);
  border-radius: 999px;

  background: rgba(37, 99, 235, 0.14);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;

  gap: 80px;
  align-items: center;
}

.contact-list {
  list-style: none;
  margin: 28px 0;
}

.contact-list li {
  margin-bottom: 10px;
}

.contact-form {
  display: grid;
  gap: 12px;

  padding: 36px;

  background: #ffffff;
  color: var(--text);

  border-radius: var(--radius);

  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.contact-form label {
  font-weight: 700;
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;

  border: 1px solid var(--border);
  border-radius: 12px;

  padding: 15px 16px;

  background: #f8fafc;

  outline: none;

  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  background: #ffffff;
}

.contact-form textarea {
  resize: vertical;
}

/* FOOTER */

.site-footer {
  padding: 28px 0;
  background: #111827;
  color: rgba(255, 255, 255, 0.7);
}

.footer-wrapper {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.9rem;
}
/* MENU HAMBURGER */

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 9px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
/* RESPONSIVE */

@media (max-width: 900px) {

  .nav-wrapper {
    position: relative;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav {
    position: absolute;
    top: 78px;
    left: 4%;
    right: 4%;

    display: flex;
    flex-direction: column;
    align-items: stretch;

    padding: 20px;

    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);

    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);

    transition:
      opacity 0.25s ease,
      transform 0.25s ease,
      visibility 0.25s ease;
  }

  .main-nav.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .main-nav a {
    padding: 12px 8px;
    border-bottom: 1px solid var(--border);
  }

  .main-nav a:last-child {
    border-bottom: 0;
  }

  .header-cta {
    display: none;
  }

  .hero-grid,
  .split,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 60px;
  }

  .hero-grid {
    gap: 40px;
  }

  .hero-image img {
    min-height: 360px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .gallery {
  grid-template-columns: 1fr;
  grid-template-rows: auto;
}

.gallery img,
.gallery img:first-child,
.gallery img:nth-child(4) {
  grid-row: auto;
  grid-column: auto;
  height: 320px;
}
}


@media (max-width: 640px) {

    .logo {
  gap: 9px;
  font-size: 1rem;
}

.logo-image {
  width: 48px;
  height: 48px;
}

    .section {
    padding: 65px 0;
  }

  .nav-wrapper {
    min-height: 68px;
  }

  .hero-content h1 {
    font-size: clamp(2.4rem, 12vw, 4rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .gallery img {
    height: 240px;
  }

  .footer-wrapper {
    flex-direction: column;
  }
}