:root {
  --primary: #24313a;
  --secondary: #f4efe8;
  --accent: #9b6f45;
  --background: #fbfaf7;
  --text: #2f3438;
  --muted: #74706a;
  --border: #ddd5ca;

  --max-width: 1180px;
  --radius: 10px;
  --shadow: 0 14px 34px rgba(36, 49, 58, 0.08);
}

.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: Georgia, "Times New Roman", serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.6;
}

button,
input,
textarea,
.main-nav,
.btn,
.eyebrow,
.contact-list,
.site-footer {
  font-family: Arial, Helvetica, sans-serif;
}

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.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 16px;
}

.split-content .eyebrow {
  color: var(--accent);
}

/* HEADER */

.header-link {
  color: var(--accent);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.header-link:hover {
  opacity: 0.75;
}

.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 24px;

  border-radius: 4px;
  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: 110px 0 90px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: 80px;
}

.hero-content h1 {
  max-width: 760px;
  font-size: clamp(2.7rem, 5.3vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
  font-weight: 500;
}

.hero-text {
  max-width: 520px;
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-image img {
  width: 100%;
  min-height: 560px;
  object-fit: cover;

  border-radius: 4px;

  box-shadow: 0 18px 40px rgba(36, 49, 58, 0.10);
}

/* SERVIZI */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;

  counter-reset: service-counter;
}

.card {
  position: relative;

  padding: 34px;
  padding-top: 72px;

  border: 1px solid var(--border);
  border-radius: var(--radius);

  background: rgba(255, 255, 255, 0.55);

  counter-increment: service-counter;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.card::before {
  content: "0" counter(service-counter);

  position: absolute;
  top: 28px;
  left: 34px;

  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.card::after {
  content: "";

  position: absolute;
  top: 56px;
  left: 34px;

  width: 28px;
  height: 1px;

  background: var(--accent);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  background: #ffffff;
}

.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: repeat(2, 1fr);
  gap: 20px;
}

.gallery img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius);
}

/* 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: 22px;
  padding: 10px 0;

  color: rgba(255, 255, 255, 0.82);

  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;

  border-top: 1px solid rgba(255, 255, 255, 0.18);

  background: transparent;
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 70px;
  align-items: start;
}

.contact-list {
  list-style: none;
  margin: 28px 0;
}

.contact-list li {
  margin-bottom: 10px;
}

.contact-form {
  display: grid;
  gap: 12px;
  padding: 30px;
  background: #ffffff;
  color: var(--text);
  border-radius: var(--radius);
}

.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: 10px;
  padding: 14px 16px;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
}

.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-link {
  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;
  }
}


@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;
  }
}