/* Di Mauro Rivestimenti — "Precisione a vista" (mockup 3, Codex 2026-10-26).
   Red / black / heavy uppercase headings. Mobile-first; desktop from 900px. */

:root {
  --red: #e30713;        /* brand red, same as the logo */
  --red-dark: #b8050f;
  --ink: #1e1d1b;        /* logo black */
  --dark: #1c1c1b;       /* dark sections */
  --dark-2: #2a2927;
  --grey: #9d9d9b;       /* logo grey */
  --muted: #55534f;
  --line: #e2e0dc;
  --paper: #ffffff;
  --stone: #f1efeb;      /* footer: light stone grey */
  --head: 'Montserrat', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  /* titles: Archivo narrowed (founder trial 2026-10-27); menu, buttons and labels stay on --head */
  --display: 'Archivo', system-ui, sans-serif;
  --display-stretch: 82%;
  --wrap: 1440px;
  --gutter: clamp(20px, 4.4vw, 64px);
  --sec: clamp(48px, 5vw, 76px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-stretch: var(--display-stretch); margin: 0; line-height: 1.05; letter-spacing: 0; word-spacing: .06em; }
p { margin: 0; }
.nb { white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; }
.skip:focus { left: 8px; }

/* ── buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font: 700 15px/1 var(--head);
  text-decoration: none; border: 0; cursor: pointer;
  padding: 17px 24px; border-radius: 2px;
  transition: background-color .2s, transform .2s;
}
.btn i { font-style: normal; font-size: 1.2em; transition: transform .2s; }
.btn:hover i { transform: translateX(4px); }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover, .nav__cta[aria-current="page"] { background: var(--red-dark); }
.nav__cta[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--ink); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: #000; }
.btn--sm { padding: 12px 16px; font-size: 13px; }

/* ── header ──────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.brand { display: grid; gap: 4px; width: max-content; align-content: start; align-self: start; color: var(--ink); text-decoration: none; }
.brand img { width: 230px; height: auto; }
.brand picture { display: block; line-height: 0; }
/* the logo's own tagline was an outlined hairline font, unreadable below ~500px wide: set it as real text */
.brand__tag { display: block; width: 100%; height: auto; overflow: visible; }
.brand__tag text { font: 600 46px var(--head); fill: currentColor; }
.nav .brand { align-self: center; }
.nav .brand__tag { display: none; }
.menu { display: none; }
.menu a { white-space: nowrap; font: 600 14px/1 var(--head); text-decoration: none; color: var(--ink); padding: 8px 0; border-bottom: 2px solid transparent; }
.menu a:hover, .menu a[aria-current="page"] { border-bottom-color: var(--red); }
.nav__cta { display: none; }
.nav__toggle {
  width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; position: relative;
}
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  position: absolute; left: 10px; width: 24px; height: 2px; background: var(--ink); content: ''; transition: transform .2s, background-color .2s;
}
.nav__toggle span { top: 21px; }
.nav__toggle span::before { left: 0; top: -7px; }
.nav__toggle span::after { left: 0; top: 7px; }
.nav-open .nav__toggle span { background: transparent; }
.nav-open .nav__toggle span::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav__toggle span::after { transform: translateY(-7px) rotate(-45deg); }
.nav-open .menu {
  display: flex; flex-direction: column; gap: 4px;
  position: absolute; top: 100%; left: 0; right: 0; background: #fff;
  padding: 12px var(--gutter) 24px; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0,0,0,.08);
}
.nav-open .menu a { padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
.menu .menu__cta { margin-top: 12px; color: #fff; background: var(--red); text-align: center; padding: 16px; border: 0; }
.nav__right { display: flex; align-items: center; gap: 8px; }
.nav__cta { white-space: nowrap; }

/* language dropdown with the globe: same component as Castaldo (founder rule, every multilingual site) */
.langdd { position: relative; }
.langdd summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px;
  font: 600 13px/1 var(--head); color: var(--ink); white-space: nowrap; transition: border-color .2s;
}
.langdd summary::-webkit-details-marker { display: none; }
.langdd summary:hover { border-color: var(--ink); }
.langdd__chev { transition: transform .15s; }
.langdd[open] .langdd__chev { transform: rotate(180deg); }
.langdd__menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  margin: 0; padding: 6px; list-style: none; min-width: 172px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px rgba(0,0,0,.14);
}
.langdd__menu button {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 16px;
  background: none; border: 0; cursor: pointer; padding: 10px 12px; border-radius: 8px;
  font: 500 14px/1 var(--head); color: var(--ink); text-align: left;
}
.langdd__menu button:hover { background: var(--stone); }
.langdd__code { font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.langdd__menu button[aria-pressed="true"] { font-weight: 700; }
.langdd__menu button[aria-pressed="true"] .langdd__code { color: var(--red); }
@media (max-width: 439px) {
  .nav .brand img { width: 200px; }
  .langdd summary { padding: 8px 10px; gap: 5px; }
  .langdd__chev { display: none; }
}

@media (min-width: 1000px) {
  /* menu centred on the page: two equal side columns around it */
  .nav__inner { display: grid; grid-template-columns: 1fr auto 1fr; height: 100px; }
  .nav__right { justify-self: end; gap: 14px; }
  .brand img { width: 270px; }
  .nav .brand__tag { display: block; }
  .menu { display: flex; gap: 34px; align-items: center; }
  .menu .menu__cta { display: none; }
  .nav__cta { display: inline-flex; }
  .nav__toggle { display: none; }
}
@media (min-width: 1000px) and (max-width: 1239px) {
  .nav .brand img { width: 210px; }
  .menu { gap: 22px; }
  .nav__right { gap: 10px; }
  .nav__cta { padding-inline: 14px; }
}
@media (min-width: 1240px) { .nav .brand img { width: 340px; } }

/* ── hero ────────────────────────────────────────────────── */
.hero { display: grid; background: var(--dark); color: #fff; }
.hero__copy { padding: 40px var(--gutter) 44px; }
.hero__title {
  font-weight: 800; text-transform: uppercase;
  font-size: clamp(33px, 11vw, 69px); line-height: .95; letter-spacing: 0;
}
.rule { display: block; width: 64px; height: 4px; background: var(--red); margin: 24px 0 20px; border: 0; }
.hero__lead { font-size: clamp(16px, 1.75vw, 25px); line-height: 1.45; max-width: 26em; color: #ecebe8; }
.hero .btn { margin-top: 26px; }
@media (min-width: 900px) { .hero .btn { padding: 20px 28px; font-size: 17px; } }
.hero__media { position: relative; min-height: 300px; }
.hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* home: slow crossfade between finished jobs (site.js; off with reduced motion) */
.hero__media img.fade { opacity: 0; transition: opacity 1.6s ease; }
.hero__media img.fade.on { opacity: 1; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 43% 57%; min-height: 620px; }
  .hero__title { font-size: clamp(38px, 4.2vw, 63px); }
  .hero__copy { padding: 56px 40px 56px max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); align-self: center; }
  .hero__media { min-height: 0; }
}

/* inner pages: same split, shorter, smaller title */
.hero--page .hero__title { font-size: clamp(27px, 9.2vw, 48px); margin-top: 22px; }
.hero--page .hero__lead { font-size: clamp(16px, 1.4vw, 20px); }
.hero--page .hero__media { min-height: 260px; }
.hero .kicker { color: #fff; }
@media (min-width: 900px) {
  .hero--page { min-height: 520px; }
  /* label at the same height on every inner page, whatever the title length */
  .hero--page .hero__copy { align-self: start; padding-top: 64px; }
  .hero--page .hero__title { font-size: clamp(30px, 3.3vw, 50px); }
  .hero--page .hero__media { min-height: 0; }
}

/* inner pages, "full": photo across the whole width, copy over a dark fade */
.hero--full { position: relative; min-height: 470px; align-content: end; }
.hero--full .hero__media { position: absolute; inset: 0; min-height: 0; }
.hero--full .hero__media::after {
  content: ''; position: absolute; inset: 0;
  /* phone: the copy fills most of the photo, so the fade climbs higher and stays darker under the label */
  background: linear-gradient(to top, rgba(20,20,19,.92) 0%, rgba(20,20,19,.8) 55%, rgba(20,20,19,.35) 82%, rgba(20,20,19,.1) 100%);
}
.hero--full .hero__copy { position: relative; z-index: 1; padding-top: 140px; padding-bottom: 32px; }
.hero--full .hero__lead { color: #f2f1ee; }
@media (min-width: 900px) {
  .hero--full { grid-template-columns: 1fr; min-height: 560px; }
  .hero--full .hero__media::after {
    background: linear-gradient(to top, rgba(20,20,19,.9) 0%, rgba(20,20,19,.62) 42%, rgba(20,20,19,.1) 78%, rgba(20,20,19,0) 100%);
  }
  .hero--full .hero__copy { align-self: end; padding-top: 160px; padding-bottom: 56px; }
  .hero--full .hero__lead { max-width: 36em; }
}

/* ── section label above titles (no numbering: founder 2026-10-27) ── */
.kicker { font: 600 12px/1 var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.on-dark .kicker, .on-red .kicker, .page-hero .kicker { color: #fff; }

.h2 { font-weight: 800; font-size: clamp(28px, 5vw, 56px); line-height: 1.02; letter-spacing: 0; }

/* ── 01 services ─────────────────────────────────────────── */
.services { padding: var(--sec) 0; }
.services__head { display: grid; gap: 22px; margin-bottom: 36px; }
.services__head .h2 { margin-top: 20px; }
.services__head p { color: var(--muted); max-width: 34em; }
@media (min-width: 900px) {
  .services__head { grid-template-columns: 1.35fr 1fr; align-items: end; gap: 48px; margin-bottom: 44px; }
}
.svc { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.svc li { border-bottom: 1px solid var(--line); }
.svc a { display: grid; gap: 14px 20px; padding: 22px 0; text-decoration: none; color: inherit; }
.svc__txt h3 { font-weight: 800; font-size: clamp(20px, 2.6vw, 36px); line-height: 1.1; }
.svc__txt p { color: var(--muted); margin-top: 8px; max-width: 30em; font-size: 16px; }
.svc__img { display: grid; grid-template-columns: 1fr 64px; grid-template-rows: 100%; height: 120px; overflow: hidden; }
.svc__img img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.svc__arrow { background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 28px; transition: background-color .2s; }
.svc a:hover .svc__arrow { background: var(--red); }
@media (min-width: 900px) {
  .svc a { grid-template-columns: 1fr 46%; align-items: center; gap: 28px; padding: 6px 0; }
  .svc__img { height: 120px; grid-template-columns: 1fr 100px; }
}

/* ── 02 works (dark) ─────────────────────────────────────── */
.on-dark { background: var(--dark); color: #fff; }
.works { padding: var(--sec) 0; }
.works__head { display: grid; gap: 24px; margin-bottom: 32px; }
.works__head .h2 { margin-top: 20px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  font: 600 14px/1 var(--head); color: #fff; text-decoration: none;
  border: 1px solid rgba(255,255,255,.75); padding: 11px 22px; min-width: 108px; text-align: center; background: transparent; cursor: pointer;
}
.pill:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.pill.is-on { background: var(--red); border-color: var(--red); }
.on-light .pill { color: var(--ink); border-color: var(--ink); }
.on-light .pill.is-on { color: #fff; }
@media (min-width: 900px) {
  .works__head { grid-template-columns: 1fr auto; align-items: end; }
}
.works__grid { display: grid; gap: 16px; }
.works__grid figure { margin: 0; display: flex; flex-direction: column; }
.works__grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.works__grid figure > a { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.works__grid img { transition: transform .4s; }
.works__grid a:hover img { transform: scale(1.04); }
@media (min-width: 900px) {
  .works__grid { grid-template-columns: 1.6fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px 14px; }
  .works__grid .big { grid-row: 1 / 3; }
  /* the large photo (all 4:3) sets the height; the two small ones fill half each */
  .works__grid .big img { aspect-ratio: 4 / 3; height: auto; }
  .works__grid figure:not(.big) > a { flex: 1 1 0; }
  .works__grid figure:not(.big) img { aspect-ratio: auto; flex: 1 1 0; min-height: 0; height: 0; }
}
.works__grid[hidden] { display: none; }
.works__more { margin-top: 36px; }

/* ── 03 story ────────────────────────────────────────────── */
.story { display: grid; }
.story__copy { padding: var(--sec) var(--gutter); }
.story__title { display: flex; align-items: center; gap: 18px; margin-top: 26px; }
.story__num { font: 800 clamp(100px, 14vw, 200px)/.8 var(--display); font-stretch: var(--display-stretch); color: var(--red); letter-spacing: -0.03em; }
.story__title h2 { font-weight: 800; font-size: clamp(25px, 3.8vw, 44px); line-height: 1.05; }
.story__copy p { color: var(--muted); max-width: 32em; }
.story__copy .btn { margin-top: 28px; }
.story__media { min-height: 380px; position: relative; background: #ddd; }
.story__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; filter: grayscale(1); }
@media (min-width: 900px) {
  .story { grid-template-columns: 1fr 1fr; }
  .story__copy { padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))); padding-right: 56px; align-self: center; }
  .story__media { min-height: 420px; }
}

/* ── 04 contact (red) ────────────────────────────────────── */
.on-red { background: var(--red); color: #fff; }
.contact { padding: var(--sec) 0; }
.contact__grid { display: grid; gap: 40px; }
.contact__title { font-weight: 800; font-size: clamp(30px, 4.6vw, 54px); line-height: 1.02; margin-top: 22px; letter-spacing: 0; }
.contact__text { margin-top: 22px; font-size: clamp(16px, 1.2vw, 17px); max-width: 26em; }
.contact__details { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 8px; font-size: 16px; }
.contact__details a { color: #fff; text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (min-width: 900px) {
  .contact__grid { grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: start; }
}

.form { display: grid; gap: 12px; }
.form .row { display: grid; gap: 12px; }
@media (min-width: 600px) { .form .row { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font: 600 13px/1 var(--head); margin: 0 0 7px; }
.field input, .field textarea, .field select {
  width: 100%; font: 400 16px/1.4 var(--body); color: var(--ink);
  background: #fff; border: 1px solid #fff; border-radius: 2px; padding: 13px 14px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field select { appearance: none; padding-right: 40px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23222' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; }
.field select:invalid, .field select.is-empty { color: #77746f; }
.field input::placeholder, .field textarea::placeholder { color: #77746f; }
.on-red .field input:focus, .on-red .field textarea:focus, .on-red .field select:focus { outline: 3px solid var(--ink); outline-offset: 0; }
.consent { font-size: 14px; display: flex; gap: 10px; align-items: flex-start; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.consent a { color: inherit; }
.form .btn { justify-self: start; padding: 17px 24px; font-size: 16px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-error { background: #fff; color: var(--red-dark); padding: 12px 14px; font-weight: 600; border-left: 4px solid var(--ink); }
.form-error a { color: inherit; }
.cf-turnstile { min-height: 65px; }
.light-form .field label { color: var(--ink); }
.light-form .field input, .light-form .field textarea, .light-form .field select { border-color: #c9c6c0; }

/* ── footer: light, so the logo keeps its original colours (black frame, red name) ── */
.footer { background: var(--stone); color: var(--ink); font-size: 15px; border-top: 1px solid var(--line); }
.footer__top { display: grid; gap: 32px; padding: 48px 0 36px; }
.footer__logo img { width: 300px; }
.footer__col { display: grid; gap: 8px; align-content: start; }
.footer__h { font: 700 12px/1 var(--head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.footer__col a { color: var(--ink); text-decoration: none; }
.footer__col a:hover { color: var(--red-dark); text-decoration: underline; }
.ico { display: flex; gap: 10px; align-items: flex-start; }
.ico svg { flex: none; margin-top: 3px; color: var(--red); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; border-top: 1px solid #d9d5ce; padding: 20px 0 26px; font-size: 13px; color: var(--muted); }
.footer__bottom a { color: var(--muted); }
.footer__legal a + a::before { content: '|'; margin: 0 10px; color: #b3aea6; display: inline-block; }
/* phone/tablet: two columns so the right half isn't empty (founder 2026-10-27):
   address next to the page links, then the contacts with the two numbers side by side */
@media (max-width: 899px) {
  .footer { font-size: 14px; }
  /* address column as wide as its two lines, page links take the rest */
  .footer__top { grid-template-columns: auto 1fr; gap: 30px 24px;
    grid-template-areas: "logo logo" "where pages" "contact contact"; }
  .footer__logo { grid-area: logo; }
  .footer__col--where { grid-area: where; }
  .footer__col--pages { grid-area: pages; }
  .footer__col--contact { grid-area: contact; grid-template-columns: auto 1fr; column-gap: 28px; }
  .footer__col--contact .footer__h, .footer__col--contact .ico:last-child { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  .footer__top { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
  .footer__logo img { width: 340px; }
}

/* ── inner pages ─────────────────────────────────────────── */
.page-hero { background: var(--dark); color: #fff; padding: clamp(48px, 7vw, 88px) 0; }
.page-hero h1 { font-weight: 800; text-transform: uppercase; font-size: clamp(32px, 6.5vw, 72px); line-height: .95; margin-top: 22px; }
.page-hero p { margin-top: 22px; max-width: 40em; color: #ecebe8; font-size: clamp(16px, 1.3vw, 18px); }
.page-hero .rule { margin: 26px 0 0; }

.block { padding: var(--sec) 0; }
.block + .block { border-top: 1px solid var(--line); }
.split { display: grid; gap: 32px; align-items: center; }
.split h2 { font-weight: 800; font-size: clamp(25px, 4vw, 46px); margin: 18px 0 18px; letter-spacing: 0; }
.split p + p { margin-top: 14px; }
.split p { color: var(--muted); }
.split .btn { margin-top: 26px; }
.split__media { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.split__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.split__media img:first-child { grid-column: 1 / -1; }
.split__media--two img:first-child { grid-column: auto; }
/* Lavorazioni: the photos are links that open the viewer */
.split__media figure { margin: 0; }
.split__media figure:first-child { grid-column: 1 / -1; }
.split__media figure a { display: block; height: 100%; overflow: hidden; cursor: zoom-in; }
.split__media figure a:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.mat-more { margin-top: 22px; justify-self: start; align-self: flex-start; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1.15fr; gap: 64px; }
  .split--rev .split__copy { order: 2; }
}

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 32px; }
.gallery figure { margin: 0; }
.gallery a { display: block; overflow: hidden; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s; }
.gallery a:hover img { transform: scale(1.04); }
.gallery figcaption { font-size: 14px; color: var(--muted); padding-top: 8px; }
.gallery [hidden] { display: none; }

/* /lavori/: one card per project, read in rows left to right (Pietro 2026-11-12:
   "tutti in fila"), so covers share one 4:3 frame. */
.pcards { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: clamp(24px, 2.6vw, 36px) clamp(16px, 2vw, 28px); }
.pcards [hidden] { display: none; }
.pcard { display: block; color: inherit; text-decoration: none; }
.pcard img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .4s; }
.pcard:hover img { transform: scale(1.02); }
.pcard h2 { font: 700 clamp(18px, 1.6vw, 21px)/1.25 var(--head); margin: 12px 0 6px; }
.pcard:hover h2 { color: var(--red); }
.pcard__meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.tag { font: 600 11px/1 var(--head); letter-spacing: .08em; text-transform: uppercase; background: var(--stone); color: var(--muted); padding: 6px 9px; }

/* /lavori/<slug>/: justified rows. Grow and basis are both proportional to the
   photo's ratio, so every photo in a row gets the same height and none is cropped. */
.proj__back { display: inline-flex; gap: 8px; font: 600 14px var(--head); color: var(--ink); text-decoration: none; margin-bottom: 28px; }
.proj__back:hover { color: var(--red); }
.proj__kicker { color: var(--red); margin: 0 0 12px; }
.proj__title { font: 800 clamp(34px, 6vw, 64px)/1 var(--display); font-stretch: var(--display-stretch); text-transform: uppercase; margin: 0 0 16px; }
.proj__lead { color: var(--muted); max-width: 65ch; margin: 0; }
.jgrid { --h: 170px; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
@media (min-width: 800px) { .jgrid { --h: 260px; gap: 12px; } }
.jgrid::after { content: ""; flex: 1.5 1 0; }
.jgrid figure { margin: 0; flex: var(--r) 1 calc(var(--r) * var(--h)); }
.jgrid a { display: block; overflow: hidden; }
.jgrid img { width: 100%; height: auto; transition: transform .4s; }
.jgrid a:hover img { transform: scale(1.02); }
.proj__next[hidden] { display: none; }
.proj__next { display: grid; gap: 4px; margin-top: 40px; padding: 20px 22px; background: var(--ink); color: #fff; text-decoration: none; font: 700 clamp(17px, 2vw, 22px)/1.25 var(--head); }
.proj__next small { font: 500 13px var(--body); opacity: .75; }
.proj__next i { font-style: normal; display: inline-block; transition: transform .2s; }
.proj__next:hover { background: var(--red); }
.proj__next:hover i { transform: translateX(4px); }

/* lightbox (/lavori/) */
html.lb-open { overflow: hidden; }
.lb { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(15,14,13,.96); color: #fff; }
.lb::backdrop { background: rgba(15,14,13,.96); }
.lb__fig { margin: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 16px 56px; pointer-events: none; }
.lb__img { max-width: 100%; max-height: calc(100dvh - 150px); width: auto; height: auto; object-fit: contain; pointer-events: auto; }
.lb__cap { font: 500 15px/1.3 var(--body); color: #e9e8e5; padding-top: 14px; text-align: center; }
.lb__count { position: absolute; top: 20px; left: 20px; margin: 0; font: 600 14px/1 var(--head); color: #e9e8e5; }
.lb__btn { position: absolute; width: 52px; height: 52px; display: grid; place-items: center; border: 0; background: rgba(255,255,255,.12); color: #fff; font: 400 26px/1 var(--body); cursor: pointer; transition: background-color .2s; }
.lb__btn:hover { background: var(--red); }
.lb__close { top: 8px; right: 8px; font-size: 34px; }
.lb__prev, .lb__next { top: 50%; transform: translateY(-50%); }
.lb__prev { left: 8px; }
.lb__next { right: 8px; }
@media (max-width: 699px) {
  /* phone: arrows at the bottom, out of the photo; swipe works too */
  .lb__prev, .lb__next { top: auto; bottom: 8px; transform: none; }
  .lb__fig { padding-bottom: 72px; }
  .lb__img { max-height: calc(100dvh - 190px); }
}

.list-check { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.list-check li { padding-left: 30px; position: relative; color: var(--ink); }
.list-check li::before { content: ''; position: absolute; left: 0; top: .45em; width: 14px; height: 14px; background: var(--red); }

.partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 30px; }
.partners li { list-style: none; }
.partners a { border: 1px solid var(--line); height: 110px; display: grid; place-items: center; padding: 16px; transition: border-color .2s; }
.partners a:hover, .partners a:focus-visible { border-color: currentColor; }
.partners img { max-height: 64px; width: auto; object-fit: contain; }
.partners { padding: 0; }

.quote { font: 600 clamp(17px, 2.4vw, 26px)/1.45 var(--head); color: var(--ink); border-left: 4px solid var(--red); padding-left: 22px; margin: 0; }
.quote footer { font: 500 15px/1 var(--body); color: var(--muted); margin-top: 16px; }

.cta-band { padding: 56px 0; }
.cta-band .wrap { display: grid; gap: 22px; align-items: center; }
.cta-band .btn { justify-self: start; } /* sized to its label, not the full row (founder 2026-10-27) */
.cta-band h2 { font-weight: 800; font-size: clamp(24px, 3.6vw, 40px); }
@media (min-width: 900px) { .cta-band .wrap { grid-template-columns: 1fr auto; } }

/* legal pages */
.legal { padding: var(--sec) 0; }
.legal h1 { font-weight: 800; font-size: clamp(30px, 4vw, 44px); margin-bottom: 26px; }
.legal h2 { font-weight: 800; font-size: 22px; margin: 34px 0 10px; }
.legal p, .legal li { color: #34322f; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 22px; }
.legal li + li { margin-top: 8px; }
.legal a { color: var(--red-dark); }

/* reveal on scroll (only when JS has marked the page) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn i, .gallery img, .works__grid img, .pcard img, .jgrid img, .proj__next i { transition: none; }
}

/* contatti page */
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; border-top: 1px solid var(--line); }
.contact-list li { display: grid; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: clamp(16px, 1.3vw, 18px); }
.contact-list span { font: 600 12px/1 var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.contact-list b { font-weight: 400; }
.contact-list a { color: var(--ink); text-decoration-color: var(--red); text-underline-offset: 4px; }

/* home form on red: labels visually hidden like the mockup (still read by screen readers) */
.on-red .form .field label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.on-red .form { gap: 10px; }
