/* Cavaliere Build — proposta sito istituzionale
   Font: Archivo (variabile, wght + wdth), self-hosted.
   Palette derivata dal logo: nero caldo + oro brunito. */

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("assets/fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("assets/fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #16140f;
  --coal: #211f1a;
  --coal-2: #2b2822;
  --bone: #faf8f4;
  --stone: #f1ede5;
  --line: #ddd6c8;
  --line-dark: #3a362e;
  --muted: #5b564b;
  --muted-dark: #b9b2a2;
  --gold: #b88a2c;
  --bronze: #86611a;
  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.62;
  color: var(--ink);
  background: var(--bone);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- tipografia ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-size: .78rem; font-weight: 600; font-stretch: 118%;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--bronze);
}
.eyebrow::before { content: ""; width: 32px; height: 2px; background: var(--gold); flex: none; }
.on-dark .eyebrow { color: var(--gold); }

.h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
  font-weight: 700; font-stretch: 112%;
  line-height: 1.14; letter-spacing: -.012em;
  margin-top: 18px;
  max-width: 22ch;
}
.lede { font-size: 1.1875rem; line-height: 1.6; color: var(--muted); max-width: 60ch; }
.on-dark .lede { color: var(--muted-dark); }

/* ---------- bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  font: 600 .9rem/1 "Archivo", sans-serif; font-stretch: 112%;
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  border: 2px solid var(--ink); border-radius: 2px;
  cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn-solid { background: var(--ink); color: var(--bone); }
.btn-solid:hover { background: var(--bronze); border-color: var(--bronze); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--bone); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #cfa243; border-color: #cfa243; }
.btn-line-light { background: transparent; border-color: #8d866f; color: var(--bone); }
.btn-line-light:hover { background: var(--bone); color: var(--ink); border-color: var(--bone); }

/* ---------- barra superiore + header ---------- */
.topbar { background: var(--ink); color: var(--muted-dark); font-size: .8125rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 24px; min-height: 38px; align-items: center; }
.topbar a { color: #e9e4d8; text-decoration: none; }
.topbar a:hover { color: var(--gold); }
.topbar .right { display: flex; gap: 26px; }

.header { position: sticky; top: 0; z-index: 50; background: var(--bone); border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }
.brand img { height: 60px; width: auto; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { text-decoration: none; font-size: .9rem; font-weight: 500; letter-spacing: .01em; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-color: var(--gold); }
.nav .btn { min-height: 44px; padding: 0 20px; font-size: .8rem; color: var(--bone); border-bottom: 2px solid var(--ink); }
.nav .btn:hover { border-color: var(--bronze); }
.menu-toggle { display: none; background: none; border: 2px solid var(--ink); width: 46px; height: 46px; border-radius: 2px; cursor: pointer; padding: 0; }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 20px; height: 2px; background: var(--ink); margin: 0 auto; position: relative; }
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }

/* ---------- hero ---------- */
.hero { padding: clamp(40px, 6vw, 84px) 0 clamp(44px, 6vw, 88px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.55rem);
  font-weight: 700; font-stretch: 112%;
  line-height: 1.08; letter-spacing: -.018em;
  margin-top: 22px;
}
.hero h1 em { font-style: normal; color: var(--bronze); }
.hero .lede { margin-top: 24px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero .actions .btn { padding: 0 22px; }
.hero .note { margin-top: 18px; font-size: .9rem; color: var(--muted); }
.hero-photo { position: relative; }
.hero-photo::before { content: ""; position: absolute; inset: 22px -18px -18px 22px; border: 2px solid var(--gold); z-index: 0; }
.hero-photo img { position: relative; z-index: 1; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; object-position: 78% 50%; }
.hero-photo figcaption { position: relative; z-index: 1; background: var(--ink); color: var(--muted-dark); font-size: .78rem; letter-spacing: .04em; padding: 10px 16px; }

/* fascia fatti */
.facts { background: var(--coal); color: var(--bone); }
.facts ul { display: grid; grid-template-columns: repeat(4, 1fr); }
.facts li { padding: 30px 28px 30px 0; margin-right: 28px; border-right: 1px solid var(--line-dark); }
.facts li:last-child { border-right: 0; margin-right: 0; }
.facts strong { display: block; font-size: .78rem; font-weight: 600; font-stretch: 118%; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.facts span { font-size: .975rem; color: #d7d1c3; line-height: 1.5; display: block; }

/* ---------- sezioni ---------- */
section { position: relative; }
.sec { padding: clamp(64px, 8vw, 112px) 0; }
.sec-stone { background: var(--stone); }
.on-dark { background: var(--coal); color: var(--bone); }

/* l'impresa */
.about .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.about .copy p { margin-top: 20px; color: var(--muted); max-width: 58ch; }
.about .copy p:first-of-type { margin-top: 26px; }
.about .figs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.about .figs img { width: 100%; object-fit: cover; aspect-ratio: 4 / 5; }
.about .figs figure:nth-child(2) { margin-top: 48px; }
.about .figs figure:nth-child(3) { grid-column: 1 / -1; }
.about .figs figure:nth-child(3) img { aspect-ratio: 16 / 10; }
.about .figs { position: sticky; top: calc(var(--header-h) + 24px); }
.principles { margin-top: 34px; border-top: 1px solid var(--line); }
.principles li { display: grid; grid-template-columns: 44px 1fr; gap: 6px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.principles b { font-stretch: 112%; font-weight: 700; color: var(--bronze); font-size: .9rem; padding-top: 3px; }
.principles h3 { font-size: 1.02rem; font-weight: 700; font-stretch: 106%; }
.principles p { margin: 4px 0 0 !important; font-size: .975rem; color: var(--muted); }

/* competenze */
.areas { margin-top: 56px; border-top: 2px solid var(--ink); }
.area { display: grid; grid-template-columns: 90px minmax(0, 4fr) minmax(0, 6fr); gap: clamp(16px, 3vw, 40px); padding: 36px 0; border-bottom: 1px solid var(--line); align-items: start; }
.area .num { font-size: 2.2rem; font-weight: 300; font-stretch: 125%; color: var(--gold); line-height: 1; }
.area h3 { font-size: 1.4rem; font-weight: 700; font-stretch: 110%; line-height: 1.2; letter-spacing: -.01em; }
.area p { margin-top: 10px; color: var(--muted); font-size: .975rem; max-width: 40ch; }
.area ul { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.area li { padding: 10px 0 10px 22px; border-bottom: 1px solid var(--line); position: relative; font-size: .98rem; }
.area li::before { content: ""; position: absolute; left: 0; top: 1.15em; width: 10px; height: 2px; background: var(--gold); }

/* lavori */
.works-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; }
.works-head .lede { max-width: 46ch; }
.works { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 48px; }
.work { margin: 0; }
.work button { display: block; width: 100%; padding: 0; border: 0; background: var(--coal); cursor: zoom-in; overflow: hidden; border-radius: 0; }
.work img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s ease, opacity .2s; }
.work button:hover img { transform: scale(1.04); opacity: .92; }
.work figcaption { padding-top: 12px; font-size: .9rem; line-height: 1.4; color: var(--muted); }
.work figcaption b { display: block; font-size: .72rem; font-weight: 600; font-stretch: 118%; letter-spacing: .14em; text-transform: uppercase; color: var(--bronze); margin-bottom: 3px; }
.works-note { margin-top: 36px; font-size: .9rem; color: var(--muted); max-width: 70ch; }

dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 94vh; }
dialog.lightbox::backdrop { background: rgba(14, 12, 8, .92); }
dialog.lightbox img { max-width: 94vw; max-height: 82vh; width: auto; height: auto; margin: 0 auto; }
dialog.lightbox p { color: #e9e4d8; text-align: center; padding: 14px 20px 0; font-size: .95rem; }
dialog.lightbox button { position: fixed; top: 16px; right: 16px; background: var(--bone); color: var(--ink); border: 0; width: 46px; height: 46px; font-size: 1.5rem; cursor: pointer; border-radius: 2px; }

/* metodo */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 56px; border-top: 1px solid var(--line-dark); }
.step { padding: 32px 28px 8px 0; margin-right: 28px; border-right: 1px solid var(--line-dark); }
.step:last-child { border-right: 0; margin-right: 0; }
.step .n { font-size: 3rem; font-weight: 300; font-stretch: 125%; color: var(--gold); line-height: 1; }
.step h3 { margin-top: 22px; font-size: 1.15rem; font-weight: 700; font-stretch: 108%; }
.step p { margin-top: 10px; font-size: .97rem; color: var(--muted-dark); }

/* clienti */
.audience { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 52px; border: 1px solid var(--line); background: var(--bone); }
.aud { padding: 36px 32px 40px; border-right: 1px solid var(--line); }
.aud:last-child { border-right: 0; }
.aud h3 { font-size: 1.2rem; font-weight: 700; font-stretch: 108%; line-height: 1.25; }
.aud p { margin-top: 12px; color: var(--muted); font-size: .98rem; }
.aud ul { margin-top: 18px; }
.aud li { padding: 8px 0 8px 20px; position: relative; font-size: .95rem; border-top: 1px solid var(--line); }
.aud li::before { content: ""; position: absolute; left: 0; top: 1.05em; width: 8px; height: 2px; background: var(--gold); }
.coverage { margin-top: 28px; display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; padding: 26px 32px; background: var(--ink); color: var(--bone); }
.coverage b { font-size: .78rem; font-stretch: 118%; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.coverage span { color: #d7d1c3; font-size: 1rem; }

/* faq */
.faq .wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 88px); }
.faq-list { border-top: 2px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { cursor: pointer; list-style: none; padding: 24px 48px 24px 0; font-size: 1.12rem; font-weight: 600; font-stretch: 104%; line-height: 1.35; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; font-weight: 300; color: var(--bronze); }
.faq-list details[open] summary::after { content: "–"; }
.faq-list details p { padding: 0 48px 26px 0; color: var(--muted); max-width: 64ch; }

/* contatti */
.contact .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.contact .h2 { max-width: 16ch; }
.contact .lede { margin-top: 20px; }
.contact-list { margin-top: 36px; border-top: 1px solid var(--line-dark); }
.contact-list li { display: grid; grid-template-columns: 110px 1fr; padding: 16px 0; border-bottom: 1px solid var(--line-dark); gap: 12px; }
.contact-list b { font-size: .74rem; font-weight: 600; font-stretch: 118%; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); padding-top: 4px; }
.contact-list a { text-decoration: none; }
.contact-list a:hover { color: var(--gold); }
.form-card { background: var(--bone); color: var(--ink); padding: clamp(24px, 4vw, 44px); border-top: 4px solid var(--gold); }
.form-card h3 { font-size: 1.3rem; font-weight: 700; font-stretch: 110%; }
.form-card .sub { color: var(--muted); font-size: .95rem; margin-top: 6px; }
.field { margin-top: 18px; }
.field label { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 7px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid #b9b2a2; border-radius: 2px; padding: 13px 14px; min-height: 50px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--gold); outline-offset: 0; border-color: var(--ink); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-card .btn { width: 100%; margin-top: 26px; }
.privacy { margin-top: 18px; font-size: .78rem; line-height: 1.5; color: var(--muted); }
.form-msg { margin-top: 14px; font-size: .95rem; font-weight: 600; color: var(--bronze); min-height: 1.4em; }

/* footer */
.footer { background: var(--ink); color: var(--muted-dark); font-size: .92rem; }
.footer .top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; padding: 64px 0 48px; }
.footer img { height: 64px; width: auto; }
.footer p { margin-top: 18px; max-width: 40ch; }
.footer h4 { font-size: .74rem; font-weight: 600; font-stretch: 118%; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.footer li { padding: 5px 0; }
.footer a { text-decoration: none; color: #e9e4d8; }
.footer a:hover { color: var(--gold); }
.footer .bottom { border-top: 1px solid var(--line-dark); padding: 22px 0; font-size: .82rem; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* barra contatto mobile */
.callbar { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .nav { gap: 22px; }
  .nav a:not(.btn) { font-size: .85rem; }
  .works { grid-template-columns: repeat(3, 1fr); }
  .area { grid-template-columns: 64px minmax(0, 1fr); }
  .area ul { grid-column: 2; }
}
@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--bone);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 24px;
    border-bottom: 1px solid var(--line); display: none;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav .btn { margin-top: 18px; }
  .hero .wrap, .about .wrap, .faq .wrap, .contact .wrap { grid-template-columns: 1fr; }
  .hero-photo { order: -1; margin-right: 18px; }
  .facts ul { grid-template-columns: 1fr 1fr; }
  .facts li { border-right: 0; margin-right: 0; padding: 24px 16px 24px 0; border-bottom: 1px solid var(--line-dark); }
  .facts li:nth-last-child(-n+2) { border-bottom: 0; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step { border-right: 0; margin-right: 0; padding-bottom: 24px; }
  .audience { grid-template-columns: 1fr; }
  .aud { border-right: 0; border-bottom: 1px solid var(--line); }
  .aud:last-child { border-bottom: 0; }
  .footer .top { grid-template-columns: 1fr 1fr; }
  .footer .top > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  :root { --header-h: 68px; }
  body { font-size: 1rem; padding-bottom: 64px; }
  .topbar .left { display: none; }
  .topbar .wrap { justify-content: center; }
  .brand img { height: 44px; }
  .works { grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 36px; }
  .work figcaption { font-size: .82rem; }
  .area { grid-template-columns: 1fr; padding: 28px 0; }
  .area .num { font-size: 1.6rem; }
  .area ul { grid-column: 1; grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .facts ul { grid-template-columns: 1fr; }
  .facts li { border-bottom: 1px solid var(--line-dark) !important; }
  .facts li:last-child { border-bottom: 0 !important; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .coverage { grid-template-columns: 1fr; gap: 8px; padding: 22px; }
  .about .figs figure:nth-child(2) { margin-top: 24px; }
  .contact-list li { grid-template-columns: 1fr; gap: 2px; }
  .footer .top { grid-template-columns: 1fr; gap: 32px; padding: 48px 0 32px; }
  .hero .actions .btn { width: 100%; }
  .callbar { display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--ink); }
  .callbar a { display: flex; align-items: center; justify-content: center; min-height: 56px; color: var(--bone); text-decoration: none; font-weight: 600; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; font-stretch: 112%; }
  .callbar a + a { background: var(--gold); color: var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
