
/* =========================================
   STUDIO FORMA — DESIGN SYSTEM
   Ingegneria civile / edile
   ========================================= */

:root {
  --cream: #FFF2E9;
  --mist: #CFE6E7;
  --aqua: #6AB6C1;
  --teal: #2D6C78;
  --ink: #2A2A2A;
  --white: #FFFFFF;
  --muted: #565656;
  --line: rgba(42, 42, 42, 0.18);
  --max-width: 1240px;
  --space: clamp(2rem, 6vw, 6rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 18px;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
}

img {
  width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
}

button, a, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 999;
  padding: 12px 18px;
  color: white;
  background: var(--ink);
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: min(calc(100% - 48px), var(--max-width));
  margin-inline: auto;
}

/* NAVIGAZIONE */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 242, 233, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.navbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--teal);
  color: var(--cream);
  font-weight: 800;
  transform: rotate(-4deg);
}

.brand small {
  display: block;
  margin-top: 5px;
  color: var(--teal);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
}

.nav-links a {
  padding: 12px 0;
  font-size: 0.84rem;
  font-weight: 700;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  border-color: var(--aqua);
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid var(--teal);
  background: var(--teal);
  color: white;
  font-size: 0.9rem;
  font-weight: 750;
  text-align: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.button:hover {
  background: var(--ink);
  border-color: var(--ink);
  transform: translateY(-2px);
}

.button-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.button-outline:hover {
  background: var(--ink);
  color: white;
}

/* TESTI */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--aqua);
  flex-shrink: 0;
}

h1, h2, h3 {
  margin-top: 0;
  font-weight: 750;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

h1 {
  max-width: 1000px;
  margin-bottom: 26px;
  font-size: clamp(2.8rem, 7vw, 6.5rem);
}

h2 {
  margin-bottom: 22px;
  font-size: clamp(2.15rem, 4.5vw, 4.2rem);
}

h3 {
  margin-bottom: 12px;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.lead {
  max-width: 680px;
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  line-height: 1.65;
}

.muted {
  color: var(--muted);
}

/* HOME HERO */

.hero {
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  min-height: min(780px, calc(100svh - 84px));
  background: var(--mist);
  overflow: hidden;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(40px, 6vw, 96px);
  padding-left: max(24px, calc((100vw - var(--max-width)) / 2));
}

.hero h1 em {
  display: block;
  color: var(--teal);
  font-style: normal;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero-image {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  background: var(--teal);
}

.hero-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-caption {
  position: absolute;
  bottom: 24px;
  left: 24px;
  z-index: 1;
  padding: 9px 12px;
  background: var(--cream);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 36px;
}

.hero-stats strong {
  display: block;
  font-size: 1.05rem;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.78rem;
}

/* SEZIONI */

.section {
  padding-block: var(--space);
}

.section-light {
  background: #FFFAF6;
}

.section-blue {
  background: var(--mist);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 42px;
}

.section-heading > p {
  max-width: 470px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 290px;
  padding: 28px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.38);
}

.card-number {
  margin-bottom: 30px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.card p {
  color: var(--muted);
  font-size: 0.94rem;
}

.text-link {
  margin-top: auto;
  padding-top: 16px;
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 800;
}

/* LAYOUT A DUE COLONNE */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(32px, 7vw, 100px);
}

.split-image {
  min-height: 460px;
  overflow: hidden;
  background: var(--teal);
}

.split-image img {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
}

.check-list {
  padding: 0;
  margin: 28px 0;
  list-style: none;
}

.check-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.check-list li::before {
  content: "↗";
  margin-right: 12px;
  color: var(--teal);
  font-weight: 800;
}

/* PAGINE INTERNE */

.page-hero {
  padding-block: clamp(65px, 10vw, 130px);
  background: var(--mist);
}

.page-hero h1 {
  margin-top: 18px;
}

.page-hero h1 em {
  color: var(--teal);
  font-style: normal;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 420px;
  overflow: hidden;
  background: var(--mist);
}

.project-card > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.project-card:hover > img {
  transform: scale(1.04);
}

.project-info {
  position: relative;
  z-index: 1;
  width: min(85%, 380px);
  margin: 18px;
  padding: 22px;
  background: var(--cream);
}

.project-info span {
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-info h3 {
  margin: 10px 0;
}

.project-info p {
  margin: 0;
  font-size: 0.9rem;
}

/* LISTINO ATTIVITÀ SENZA PREZZI */

.service-list {
  border-top: 1px solid var(--line);
}

.service-row {
  display: grid;
  grid-template-columns: 70px 0.85fr 1.15fr 25px;
  align-items: start;
  gap: 22px;
  padding-block: 30px;
  border-bottom: 1px solid var(--line);
}

.service-row .num {
  color: var(--teal);
  font-weight: 800;
}

.service-row h3 {
  margin: 0;
}

.service-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.process-step {
  padding-top: 18px;
  border-top: 2px solid var(--teal);
}

.process-step span {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
}

.process-step h3 {
  margin-top: 22px;
}

/* INVITO AL CONTATTO */

.cta-band {
  padding-block: clamp(55px, 8vw, 100px);
  background: var(--teal);
  color: var(--cream);
}

.cta-band .eyebrow {
  color: var(--mist);
}

.cta-band h2 {
  max-width: 850px;
}

.cta-band .button {
  margin-top: 16px;
  background: var(--cream);
  border-color: var(--cream);
  color: var(--ink);
}

.cta-band .button:hover {
  background: white;
}

/* MODULI */

.contact-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: start;
  gap: clamp(32px, 7vw, 90px);
}

.form-card {
  padding: clamp(22px, 4vw, 44px);
  border: 1px solid var(--line);
  background: white;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-full {
  grid-column: 1 / -1;
}

label {
  font-size: 0.88rem;
  font-weight: 750;
}

input, select, textarea {
  width: 100%;
  min-height: 54px;
  padding: 13px 15px;
  border: 1px solid #9CAFB0;
  border-radius: 0;
  background: white;
  color: var(--ink);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

input[type="checkbox"] {
  width: 22px;
  min-height: 22px;
  flex-shrink: 0;
  accent-color: var(--teal);
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 400;
}

.notice {
  display: none;
  margin-top: 16px;
  padding: 16px;
  background: var(--mist);
  color: var(--ink);
}

.notice.show {
  display: block;
}

.contact-list {
  padding: 0;
  margin: 28px 0;
  list-style: none;
}

.contact-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.contact-list strong {
  display: block;
  color: var(--teal);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.small-note {
  color: var(--muted);
  font-size: 0.82rem;
}

/* FOOTER */

.footer {
  padding-block: 38px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.84rem;
  font-weight: 700;
}

.footer p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

/* TABLET */

@media (max-width: 1000px) {
  .nav-links {
    gap: 13px;
  }

  .nav-links a {
    font-size: 0.78rem;
  }

  .hero {
    grid-template-columns: 1fr 0.85fr;
  }

  .hero-copy {
    padding: 38px;
  }

  .service-row {
    grid-template-columns: 50px 1fr 25px;
    gap: 14px;
  }

  .service-row p {
    grid-column: 2 / 3;
  }

  .process-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* SMARTPHONE */

@media (max-width: 720px) {
  html {
    font-size: 17px;
  }

  .container {
    width: calc(100% - 36px);
  }

  .navbar {
    min-height: 74px;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 73px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 18px 20px;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 14px;
    font-size: 1rem;
    border: 0;
  }

  .nav-links a[aria-current="page"] {
    background: var(--mist);
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 54px 22px;
  }

  .hero-image {
    min-height: 390px;
  }

  .hero-actions {
    align-items: stretch;
    width: 100%;
  }

  .hero-actions .button {
    width: 100%;
  }

  .section-heading {
    display: block;
  }

  .grid-3,
  .project-grid,
  .split,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .card {
    min-height: 230px;
  }

  .project-card {
    min-height: 350px;
  }

  .split-image,
  .split-image img {
    min-height: 340px;
  }

  .service-row {
    grid-template-columns: 40px 1fr 20px;
    gap: 12px;
  }

  .service-row p {
    grid-column: 2 / 3;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field-full {
    grid-column: auto;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .process-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 400px) {
  .brand {
    font-size: 0.9rem;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .hero-stats {
    gap: 18px;
  }

  .process-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
