/* ==========================================================================
   De Vuono Costruzioni — Design system v2
   Mood: moderno / minimal — palette derivata dal logo esistente
   ========================================================================== */

:root {
  /* Palette — estratta dal logo attuale */
  --blue: #0f4d95;        /* blu primario del logo */
  --blue-dark: #062a4d;   /* blu profondo, per header/footer/cta band */
  --blue-mid: #386d8e;
  --red: #e21f2b;         /* rosso del logo, solo per accenti puntuali */

  --ink: #171b1f;
  --ink-soft: #565f68;
  --ink-faint: #8a929a;

  --paper: #f7f7f5;
  --white: #ffffff;
  --line: #e2e4e1;
  --line-strong: #c7cbc8;

  --font-display: "Archivo", sans-serif;
  --font-body: "Work Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--red);
  display: inline-block;
}

/* ---------- buttons ---------- */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: #c11922; }
.btn-ghost { border-color: rgba(255,255,255,.4); color: inherit; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost.on-dark { border-color: rgba(255,255,255,.45); color: var(--white); }
.btn-ghost.on-dark:hover { border-color: var(--white); background: rgba(255,255,255,.08); }

/* ---------- topbar ---------- */
.topbar {
  background: var(--blue-dark);
  color: rgba(255,255,255,.85);
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding-top: 6px;
  padding-bottom: 6px;
  flex-wrap: wrap;
  row-gap: 4px;
}
.topbar .tb-left { display: flex; gap: 22px; }
.topbar a:hover { color: var(--white); }
.topbar .tb-left span { color: rgba(255,255,255,.5); margin-right: 6px; }

/* ---------- nav ---------- */
.nav {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 60px; width: auto; }
.brand-text { display: none; }

.nav-links { display: flex; align-items: center; gap: 34px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
}
.nav-links a.active, .nav-links a:hover { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--red);
}
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-toggle { display: none; background: none; border: 0; font-size: 22px; color: var(--blue-dark); cursor: pointer; }

/* ---------- quota divider (signature element) ---------- */
.quota {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.quota .tick { width: 1px; height: 14px; background: var(--line-strong); }
.quota .rule { flex: 1; height: 1px; background: var(--line-strong); }
.quota .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* ---------- hero ---------- */
.hero { padding: 72px 0 56px; }
.hero .container {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { font-size: 44px; color: var(--blue-dark); }
.hero p.lead { font-size: 17px; color: var(--ink-soft); max-width: 46ch; margin-bottom: 30px; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.hero .coord {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-faint);
  letter-spacing: .04em;
}

.hero-frame {
  position: relative;
  padding: 16px;
}
.hero-frame .corner {
  position: absolute;
  width: 20px; height: 20px;
  border: 1.5px solid var(--red);
}
.hero-frame .c-tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.hero-frame .c-tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.hero-frame .c-bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.hero-frame .c-br { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.hero-frame img { width: 100%; height: 380px; object-fit: cover; }

/* ---------- trust strip ---------- */
.trust {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 26px 0;
}
.trust .container {
  display: flex;
  align-items: center;
  gap: 44px;
  flex-wrap: wrap;
}
.trust img { height: 42px; width: auto; filter: grayscale(1); opacity: .8; }
.trust .t-note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: .04em;
  margin-left: auto;
}

/* ---------- section heads ---------- */
.section { padding: 76px 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: 32px; color: var(--blue-dark); }

/* ---------- services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.service-item {
  background: var(--white);
  padding: 30px 28px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.service-item i {
  font-size: 20px;
  color: var(--red);
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.service-item h5 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15.5px;
  color: var(--ink);
  margin: 4px 0 0;
  line-height: 1.4;
}

/* ---------- story split ---------- */
.story .container {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 56px;
  align-items: center;
}
.story-frame { position: relative; }
.story-frame img { width: 100%; height: 420px; object-fit: cover; }
.story-frame::before {
  content: "";
  position: absolute;
  top: 14px; left: 14px;
  width: 100%; height: 100%;
  border: 1px solid var(--blue);
  z-index: -1;
}
.story-copy p { color: var(--ink-soft); font-size: 15.5px; max-width: 54ch; }
.story-copy .btn { margin-top: 8px; }
.story-split { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }

/* ---------- certifications ---------- */
.certs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cert-card { background: var(--white); padding: 34px; display: flex; gap: 22px; align-items: flex-start; }
.cert-card img { height: 56px; width: auto; max-width: 130px; flex-shrink: 0; }
.cert-card > div { min-width: 0; }
.cert-card h5 { font-family: var(--font-body); font-weight: 700; font-size: 16px; margin: 0 0 8px; color: var(--blue-dark); }
.cert-card p { font-size: 14px; color: var(--ink-soft); margin: 0 0 10px; }
.cert-card a { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--red); text-transform: uppercase; }
.cert-card a:hover { text-decoration: underline; }

/* ---------- gallery teaser ---------- */
.gallery-teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.gallery-teaser-grid a { display: block; overflow: hidden; height: 260px; }
.gallery-teaser-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery-teaser-grid a:hover img { transform: scale(1.04); }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.link-arrow { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); white-space: nowrap; }
.link-arrow:hover { color: var(--red); }

/* ---------- contact band ---------- */
.contact-band { background: var(--blue-dark); color: var(--white); padding: 70px 0; }
.contact-band .container { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.contact-band h2 { color: var(--white); font-size: 30px; }
.contact-band p { color: rgba(255,255,255,.7); max-width: 42ch; margin-bottom: 26px; }
.contact-band .cline { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: 15px; margin-bottom: 10px; }
.contact-band .cline i { color: var(--red); width: 18px; }
.contact-band .actions { margin-top: 24px; display: flex; gap: 14px; flex-wrap: wrap; }
.map-frame { border: 1px solid rgba(255,255,255,.2); padding: 8px; }
.map-frame iframe { width: 100%; height: 320px; border: 0; display: block; filter: grayscale(.2); }

/* ---------- footer ---------- */
footer { background: #04182c; color: rgba(255,255,255,.62); padding: 60px 0 24px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 40px; }
footer h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.85); margin-bottom: 18px; font-weight: 500; }
footer a { color: rgba(255,255,255,.62); }
footer a:hover { color: var(--white); }
footer p { line-height: 1.7; }
footer .flinks { display: flex; flex-direction: column; gap: 10px; }
footer .fbrand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
footer .fbrand img { height: 46px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 46px;
  padding-top: 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: rgba(255,255,255,.4);
}

/* ---------- masonry gallery (full gallery page) ---------- */
.masonry { column-count: 4; column-gap: 8px; }
.masonry a { display: block; margin-bottom: 8px; break-inside: avoid; overflow: hidden; }
.masonry img { width: 100%; display: block; transition: transform .35s ease; }
.masonry a:hover img { transform: scale(1.04); }

/* ---------- contact form ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; }
.field { margin-bottom: 18px; }
.field label { display:block; font-family: var(--font-mono); font-size: 11.5px; letter-spacing:.06em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 13px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); }
.contact-info-card { background: var(--white); border: 1px solid var(--line); padding: 32px; }
.contact-info-card .cline { display:flex; gap:12px; align-items:center; font-family: var(--font-mono); font-size: 14px; margin-bottom: 14px; color: var(--ink); }
.contact-info-card .cline i { color: var(--red); width:18px; }
.contact-info-card hr { border: none; border-top: 1px solid var(--line); margin: 22px 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-frame { order: -1; }
  .hero h1 { font-size: 34px; }
  .story .container { grid-template-columns: 1fr; }
  .story-frame { order: -1; }
  .story-split { grid-template-columns: 1fr; }
  .services-grid, .certs-grid { grid-template-columns: 1fr; }
  .contact-band .container { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery-teaser-grid { grid-template-columns: repeat(3, 1fr); }
  .masonry { column-count: 3; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hide-mobile { display: none !important; }
  .topbar { font-size: 11.5px; }
  .cert-card { flex-direction: column; }
  .cert-card img { max-width: 160px; }
  .topbar .tb-left { gap: 14px; }
  .brand { flex-shrink: 0; }
  .brand img { height: 40px; }
  .nav-links { position: fixed; top: 72px; left: 0; right: 0; background: var(--white); flex-direction: column; align-items: flex-start; gap: 0; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(6,42,77,.1); transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .15s ease; }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links li { width: 100%; border-bottom: 1px solid var(--line); }
  .nav-links li:last-child { border-bottom: 0; }
  .nav-links a { display: block; padding: 17px 24px; width: 100%; font-size: 15.5px; }
  .nav-links a.active::after { display: none; }
  .nav-links a.active { color: var(--red); }
  .nav-toggle { display: block; flex-shrink: 0; }
  .nav-cta { flex-shrink: 0; gap: 10px; }
  .nav-cta .btn span.hide-mobile { display: none; }
  .nav .container { height: 72px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .gallery-teaser-grid { grid-template-columns: 1fr 1fr; }
  .trust .t-note { margin-left: 0; }
  .masonry { column-count: 2; }
}