/* Studio Clivio
   Bianco e nero. Un solo carattere (Archivo, a larghezza variabile): largo e leggero per i titoli,
   normale per il testo, stretto per le note.
   Impianto: asse centrale in apertura, poi registro a due colonne: titoli a margine, corpo a destra. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000;
  --white: #fff;
  --steel-1: #e4e4e4;
  --steel-2: #bdbdbd;
  --steel-3: #8c8c8c;
  --steel-4: #4d4d4d;
  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pad: clamp(20px, 5vw, 80px);
  --sec: clamp(72px, 10vw, 150px);
  --hd: 68px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hd) + 20px);
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.62;
  font-weight: 400;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, dl, dt, dd, ol, ul, figure { margin: 0; }
h1, h2, h3 { font-weight: inherit; font-size: inherit; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:focus-visible, summary:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

.wrap { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: var(--pad); }

.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--white); color: var(--black); padding: 12px 16px; }
.skip:focus { left: 8px; top: 8px; }

.on-black { background: var(--black); color: var(--white); --rule: rgba(255, 255, 255, 0.26); --soft: var(--steel-1); --mute: var(--steel-3); }
.on-white { background: var(--white); color: var(--black); --rule: rgba(0, 0, 0, 0.2); --soft: #1c1c1c; --mute: #5c5c5c; }

/* ---------- Testata ---------- */

.hd { position: sticky; top: 0; z-index: 50; background: var(--black); color: var(--white); border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
.hd-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--hd); }

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.brand svg { width: 21px; height: auto; flex: none; }
.brand-name { font-size: 0.8125rem; font-weight: 400; font-stretch: 125%; letter-spacing: 0.26em; text-transform: uppercase; white-space: nowrap; }

.hd-right { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); }
.nav ul { display: flex; gap: clamp(16px, 2.2vw, 34px); }
.nav a { font-size: 0.875rem; font-stretch: 104%; text-decoration: none; color: var(--steel-2); }
.nav a:hover { color: var(--white); }

.langs { display: flex; gap: 12px; font-size: 0.8125rem; font-stretch: 104%; }
.langs a { text-decoration: none; color: var(--steel-3); }
.langs a:hover, .langs a[aria-current] { color: var(--white); }

.menu { display: none; }
.menu summary { list-style: none; cursor: pointer; font-size: 0.875rem; font-stretch: 104%; padding: 10px 0; }
.menu summary::-webkit-details-marker { display: none; }
.menu nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--black); border-bottom: 1px solid rgba(255, 255, 255, 0.18); padding: 4px var(--pad) 20px; }
.menu li a { display: block; padding: 15px 0; border-top: 1px solid rgba(255, 255, 255, 0.14); text-decoration: none; font-stretch: 104%; }
.menu .langs { gap: 22px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 0.9375rem; }

@media (max-width: 920px) {
  .nav { display: none; }
  .hd-right > .langs { display: none; }
  .menu { display: block; }
}

/* ---------- Apertura ---------- */

.hero { overflow: hidden; }
.lockup { display: flex; flex-direction: column; align-items: center; text-align: center; padding-block: clamp(52px, 8vw, 112px) clamp(44px, 6vw, 84px); }
.lockup svg { width: clamp(112px, 13.5vw, 194px); height: auto; }
.wordmark { margin-top: clamp(26px, 3.2vw, 42px); padding-left: 0.3em; font-size: clamp(1.25rem, 5.6vw, 3.875rem); font-weight: 200; font-stretch: 125%; letter-spacing: 0.3em; line-height: 1.1; text-transform: uppercase; white-space: nowrap; }
.hero-h1 { margin-top: clamp(22px, 2.6vw, 34px); max-width: 30em; font-size: clamp(1rem, 1.5vw, 1.3125rem); font-weight: 300; font-stretch: 110%; line-height: 1.4; color: var(--steel-1); text-wrap: balance; }
.hero-h1::before { content: ""; display: block; width: 56px; height: 1px; margin: 0 auto clamp(22px, 2.6vw, 34px); background: var(--white); }

.hero-photo { position: relative; overflow: hidden; }
.hero-photo img { width: 100%; height: clamp(250px, 44vw, 640px); object-fit: cover; object-position: 50% 60%; }
.hero-photo::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(#000 0%, #000 5%, rgba(0, 0, 0, 0.62) 22%, rgba(0, 0, 0, 0) 48%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.8) 100%); }
.hero-cap { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 24px; padding-bottom: 18px; font-size: 0.8125rem; font-stretch: 96%; color: var(--steel-1); }

@media (prefers-reduced-motion: no-preference) {
  .lockup > * { animation: appear 1s ease-out both; }
  .lockup > :nth-child(2) { animation-delay: 0.2s; }
  .lockup > :nth-child(3) { animation-delay: 0.4s; }
  .hero-photo img { animation: settle 2.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both; }
}
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@keyframes settle { from { opacity: 0; transform: scale(1.05); } to { opacity: 1; transform: none; } }

/* ---------- Sezioni ---------- */

.sec { padding-block: var(--sec); }
.sec-tight { padding-top: 0; }
.sec-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); column-gap: clamp(24px, 4vw, 64px); row-gap: 26px; }
.rail h2 { position: sticky; top: calc(var(--hd) + 28px); font-size: 0.9375rem; font-weight: 500; font-stretch: 112%; line-height: 1.3; }

.lead { max-width: 25em; font-size: clamp(1.4375rem, 2.5vw, 2.25rem); font-weight: 300; font-stretch: 110%; line-height: 1.22; letter-spacing: -0.008em; text-wrap: balance; }
.prose { display: grid; gap: 1.05em; max-width: 39em; color: var(--soft); }
.lead + .prose { margin-top: clamp(28px, 3.4vw, 48px); }

@media (max-width: 920px) {
  .sec-grid { grid-template-columns: minmax(0, 1fr); }
  .rail h2 { position: static; }
}

/* Elenchi a righe: termine a sinistra, descrizione a destra */
.rows { border-top: 1px solid currentColor; }
.lead + .rows, .prose + .rows { margin-top: clamp(36px, 5vw, 68px); }
.row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 5fr); column-gap: clamp(20px, 3vw, 48px); row-gap: 8px; padding-block: clamp(22px, 2.4vw, 32px); border-bottom: 1px solid var(--rule); }
.row dt { font-size: clamp(1.1875rem, 1.6vw, 1.4375rem); font-weight: 400; font-stretch: 108%; line-height: 1.25; text-wrap: balance; }
.row dd { max-width: 37em; color: var(--soft); }
.group-title { margin-top: clamp(40px, 5vw, 68px); margin-bottom: 14px; font-size: 0.9375rem; font-weight: 500; font-stretch: 112%; line-height: 1.3; }
.rows-compact .row { padding-block: 18px; }
.rows-compact .row dt { font-size: 1.0625rem; font-stretch: 104%; font-weight: 500; }

@media (max-width: 700px) {
  .row { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Fotografie ---------- */

.band img { width: 100%; height: clamp(240px, 46vw, 720px); object-fit: cover; }
.cap { padding-top: 10px; font-size: 0.8125rem; font-stretch: 96%; color: var(--mute); }
.band .cap { padding-block: 12px 18px; }

.gallery { margin-top: clamp(48px, 6vw, 96px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(14px, 1.8vw, 26px); }
.gallery figure { display: flex; flex-direction: column; min-height: 0; }
.gallery img { width: 100%; object-fit: cover; }
.g-tall { grid-row: 1 / span 2; }
.g-tall img { flex: 1 1 0; height: 0; min-height: 0; }
.g-wide img { aspect-ratio: 16 / 10; }
.g-low img { object-position: 50% 78%; }

@media (max-width: 700px) {
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .g-tall { grid-row: auto; }
  .g-tall img { flex: none; height: auto; aspect-ratio: 4 / 5; }
}

/* ---------- Schema di linea ---------- */

.drawing { margin-top: clamp(48px, 6vw, 96px); }
.drawing-scroll { overflow-x: auto; border: 1px solid var(--rule); padding: clamp(10px, 2vw, 26px); }
.ld { width: 100%; min-width: 780px; height: auto; font-family: var(--font); }
.ld-grid { stroke: #5a5a5a; stroke-width: 0.6; stroke-dasharray: 2 6; }
.ld-axb { fill: #000; stroke: #5a5a5a; stroke-width: 0.8; }
.ld-axis { fill: var(--steel-3); font-size: 10.5px; text-anchor: middle; }
.ld-pillar { fill: var(--steel-3); }
.ld-wall { fill: none; stroke: #fff; stroke-width: 2.4; }
.ld-m { fill: none; stroke: #fff; stroke-width: 1.3; }
.ld-mh { stroke: #fff; stroke-width: 1.3; }
.ld-thin { fill: none; stroke: var(--steel-2); stroke-width: 0.7; }
.ld-cv-o { fill: none; stroke: #fff; stroke-width: 9; }
.ld-cv-i { fill: none; stroke: #000; stroke-width: 7.2; }
.ld-chev { fill: none; stroke: var(--steel-2); stroke-width: 0.9; }
.ld-fence { fill: none; stroke: var(--steel-3); stroke-width: 0.9; stroke-dasharray: 5 4; }
.ld-util { fill: none; stroke: var(--steel-3); stroke-width: 0.9; stroke-dasharray: 12 3 2 3; }
.ld-reach { fill: none; stroke: var(--steel-3); stroke-width: 0.7; stroke-dasharray: 2 4; }
.ld-arrow { fill: none; stroke: #fff; stroke-width: 1.3; }
.ld-hatch { stroke: var(--steel-3); stroke-width: 0.8; }
.ld-lead { stroke: var(--steel-2); stroke-width: 0.6; }
.ld-bal { fill: #000; stroke: #fff; stroke-width: 0.9; }
.ld-num { fill: #fff; font-size: 11.5px; font-weight: 500; text-anchor: middle; }

.legend { margin-top: 22px; columns: 3 230px; column-gap: clamp(24px, 3vw, 48px); font-size: 0.875rem; font-stretch: 98%; color: var(--soft); }
.legend li { display: grid; grid-template-columns: 2.1em minmax(0, 1fr); padding-block: 4px; break-inside: avoid; }
.legend .n { font-variant-numeric: tabular-nums; color: var(--mute); }
.note { margin-top: 16px; font-size: 0.8125rem; font-stretch: 96%; color: var(--mute); }

/* ---------- Fondatore ---------- */

.founder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.founder img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 62% 30%; }
.founder-name { margin-top: -0.12em; font-size: clamp(1.75rem, 2.9vw, 2.625rem); font-weight: 250; font-stretch: 118%; line-height: 1.08; letter-spacing: -0.006em; }
.founder-meta { margin-top: 10px; font-size: 0.875rem; color: var(--mute); }
.founder .prose { margin-top: clamp(22px, 2.6vw, 36px); }

@media (max-width: 700px) {
  .founder { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Contatti ---------- */

.mail { display: inline-block; padding-bottom: 0.06em; border-bottom: 1px solid currentColor; font-size: clamp(1.4375rem, 3.7vw, 3.375rem); font-weight: 250; font-stretch: 116%; line-height: 1.15; letter-spacing: -0.004em; text-decoration: none; overflow-wrap: anywhere; }
.contacts { margin-top: clamp(40px, 5vw, 72px); padding-top: 22px; border-top: 1px solid currentColor; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px clamp(20px, 3vw, 48px); }
.contacts dt { margin-bottom: 4px; font-size: 0.8125rem; font-stretch: 96%; color: var(--mute); }
.contacts a { text-decoration: none; }
.contacts a:hover { text-decoration: underline; }

@media (max-width: 700px) {
  .contacts { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Piede: cartiglio con i dati dello Studio ---------- */

.ft { padding-block: clamp(44px, 6vw, 84px) 30px; border-top: 1px solid rgba(255, 255, 255, 0.18); }
.tb { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: #6a6a6a; border: 1px solid #6a6a6a; }
.tb > div { min-width: 0; padding: 13px 16px 15px; background: var(--black); }
.tb .tb-wide { grid-column: span 2; display: flex; align-items: center; gap: 16px; }
.tb .tb-wide svg { width: 30px; height: auto; flex: none; }
.tb dt { margin-bottom: 3px; font-size: 0.75rem; font-stretch: 94%; color: var(--steel-3); }
.tb dd { font-size: 0.9375rem; line-height: 1.4; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.tb a { text-decoration: none; }
.tb a:hover { text-decoration: underline; }
.ft-low { margin-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: 0.8125rem; color: var(--steel-3); }
.ft-low ul { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.ft-low a { color: var(--steel-1); }

@media (max-width: 920px) {
  .tb { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .tb { grid-template-columns: minmax(0, 1fr); }
  .tb .tb-wide { grid-column: auto; }
}

/* ---------- Pagine di testo (privacy, note legali) ---------- */

.doc { padding-block: clamp(52px, 7vw, 104px) var(--sec); }
.doc-body { max-width: 43rem; }
.doc h1 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 300; font-stretch: 110%; line-height: 1.14; letter-spacing: -0.008em; text-wrap: balance; }
.doc .sub { margin-top: 16px; font-size: 0.9375rem; color: var(--mute); }
.doc h2 { margin-top: 2.7em; padding-top: 1.1em; border-top: 1px solid var(--rule); font-size: 1.0625rem; font-weight: 600; font-stretch: 106%; }
.doc p { margin-top: 0.85em; color: var(--soft); }
.doc .back { margin-top: 3.2em; }

/* ---------- Stampa ---------- */

@media print {
  .hd, .skip, .hero-photo, .band, .gallery { display: none; }
  body, .on-black, .on-white { background: #fff; color: #000; --soft: #000; --mute: #333; --rule: #999; }
  .sec { padding-block: 24pt; }
}
