/* Calapod Costruzioni — foglio di stile del sito.
   Valori dal design system "Calapod Costruzioni" (tokens.json + bundle.css).
   Layout: header bianco → fascia blu → contenuti su carta → fascia arancio di chiusura → footer blu. */

@font-face { font-family: "Open Sauce One"; src: url("fonts/open-sauce-one-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Open Sauce One"; src: url("fonts/open-sauce-one-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Open Sauce One"; src: url("fonts/open-sauce-one-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Open Sauce One"; src: url("fonts/open-sauce-one-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --brand-navy: #00285b; --brand-rust: #ca471b; --brand-orange: #f15522;
  --bg: #f2f6f8; --surface: #ffffff; --ink: #00285b; --ink-muted: #4b5c78;
  --line: #d3dce5; --control-border: #71829c;
  --accent: #ca471b; --on-accent: #ffffff; --accent-ink: #b23d15;
  --band: #00285b; --on-band: #ffffff; --on-band-muted: #a9bad3; --band-accent: #f15522;
  --closing: #f15522; --on-closing: #ffffff;
  --focus: #00285b; --focus-on-band: #ffffff;
  --wa: #1e7a4c; --on-wa: #ffffff; --band-shape: #0d3a75;
  --font-sans: "Open Sauce One", "Helvetica Neue", Arial, sans-serif;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 72px; --space-9: 112px;
  --content-max: 1200px; --text-max: 680px; --header-height: 80px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #071a33; --surface: #0e2747; --ink: #e9eef3; --ink-muted: #a3b1c6; --line: #22406a; --control-border: #7690b5;
  --accent: #ff7a45; --on-accent: #071a33; --accent-ink: #ff7a45; --on-band: #e9eef3; --on-band-muted: #a3b1c6; --band-accent: #ff7a45;
  --focus: #ff7a45; --wa: #5fd39a; --on-wa: #071a33; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #071a33; --surface: #0e2747; --ink: #e9eef3; --ink-muted: #a3b1c6; --line: #22406a; --control-border: #7690b5;
  --accent: #ff7a45; --on-accent: #071a33; --accent-ink: #ff7a45; --on-band: #e9eef3; --on-band-muted: #a3b1c6; --band-accent: #ff7a45;
  --focus: #ff7a45; --wa: #5fd39a; --on-wa: #071a33; color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: inherit; }
.mc-wrap { max-width: var(--content-max); margin: 0 auto; padding-left: max(var(--space-4), env(safe-area-inset-left, 0px)); padding-right: max(var(--space-4), env(safe-area-inset-right, 0px)); }
@media (min-width: 768px) { .mc-wrap { padding-left: max(var(--space-6), env(safe-area-inset-left, 0px)); padding-right: max(var(--space-6), env(safe-area-inset-right, 0px)); } }
@media (min-width: 1100px) { .mc-wrap { padding-left: max(var(--space-7), env(safe-area-inset-left, 0px)); padding-right: max(var(--space-7), env(safe-area-inset-right, 0px)); } }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: var(--space-3); z-index: 50; }
.skip:focus { left: var(--space-4); }

.mc-eyebrow { font-size: 12px; line-height: 1.3; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
.mc-band .mc-eyebrow { color: var(--on-band-muted); }
:where(a, button, input, summary):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.mc-band :where(a, button, input):focus-visible, .mc-closing :where(a, button):focus-visible { outline-color: var(--focus-on-band); }

/* Tipografia */
.t-display { font-size: clamp(40px, 6vw, 64px); line-height: 1.02; letter-spacing: -.02em; }
.t-h1 { font-size: clamp(34px, 4.6vw, 48px); line-height: 1.05; letter-spacing: -.015em; }
.t-h2 { font-size: clamp(28px, 3.4vw, 34px); line-height: 1.1; letter-spacing: -.01em; }
.t-h3 { font-size: 22px; line-height: 1.25; }
.t-lead { font-size: clamp(18px, 2vw, 20px); line-height: 1.5; }
.t-small { font-size: 14px; line-height: 1.5; }
.muted { color: var(--ink-muted); }
.mc-band .muted { color: var(--on-band-muted); }
.prose { display: grid; gap: var(--space-4); max-width: var(--text-max); }
.prose strong { font-weight: 600; }

/* Bottoni e link */
.mc-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: 48px; padding: 0 var(--space-5); border: 1.5px solid transparent; border-radius: 0; font: 600 15px/1.1 var(--font-sans); letter-spacing: .01em; text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; text-align: center; }
.mc-btn--primary { background: var(--accent); color: var(--on-accent); }
.mc-btn--primary:hover { background: var(--brand-navy); color: #fff; }
.mc-btn--secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.mc-btn--secondary:hover { background: var(--ink); color: var(--bg); }
.mc-btn--on-band { background: transparent; color: var(--on-band); border-color: var(--on-band); }
.mc-btn--on-band:hover { background: var(--on-band); color: var(--band); }
.mc-btn--wa { background: var(--wa); color: var(--on-wa); }
.mc-btn--wa:hover { background: var(--brand-navy); color: #fff; }
.mc-btn--white { background: #fff; color: var(--brand-navy); }
.mc-btn--white:hover { background: var(--brand-navy); color: #fff; }
.mc-arrow { font-size: 18px; line-height: 1; transition: transform .15s; }
.mc-btn:hover .mc-arrow, .mc-arrowlink:hover .mc-arrow { transform: translateX(4px); }
.mc-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.mc-arrowlink { display: inline-flex; align-items: center; gap: var(--space-2); font: 600 15px/1.2 var(--font-sans); color: var(--accent-ink); text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; }
.mc-band .mc-arrowlink { color: var(--on-band); }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--surface); }
.mc-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.mc-header__in { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); min-height: var(--header-height); }
.mc-header__logo img { display: block; height: 44px; width: auto; }
.logo-on-dark { display: none !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-on-light { display: none !important; } :root:not([data-theme="light"]) .logo-on-dark { display: block !important; } }
:root[data-theme="dark"] .logo-on-light { display: none !important; }
:root[data-theme="dark"] .logo-on-dark { display: block !important; }
.mc-nav { display: flex; align-items: center; gap: var(--space-5); }
.mc-nav__links { display: flex; gap: var(--space-5); }
.mc-nav__links a { font: 500 15px/1 var(--font-sans); color: var(--ink); text-decoration: none; padding: var(--space-2) 0; border-bottom: 2px solid transparent; }
.mc-nav__links a:hover, .mc-nav__links a[aria-current="page"] { border-bottom-color: var(--accent); }
.mc-nav__toggle { display: none; min-height: 44px; padding: 0 var(--space-4); background: transparent; color: var(--ink); border: 1.5px solid var(--ink); font: 600 15px/1 var(--font-sans); cursor: pointer; }
.mc-nav .mc-btn { min-height: 44px; padding: 0 var(--space-4); }
.mc-mobilenav { border-top: 1px solid var(--line); padding-block: var(--space-3) var(--space-5); }
.mc-mobilenav ul { list-style: none; margin: 0; padding: 0; }
.mc-mobilenav a { display: block; padding: var(--space-3) 0; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 18px; font-weight: 500; }
.mc-mobilenav a[aria-current="page"] { color: var(--accent-ink); }
@media (max-width: 1020px) { .mc-nav__links { display: none; } .mc-nav__toggle { display: inline-flex; align-items: center; } .mc-header__in { min-height: 64px; } .mc-header__logo img { height: 34px; } }
@media (max-width: 480px) { .mc-nav .mc-btn--wa .lbl-long { display: none; } .mc-nav { gap: var(--space-2); } }
@media (min-width: 481px) { .lbl-short { display: none; } }

/* Sezioni */
.mc-section { padding-block: var(--space-8); }
@media (min-width: 900px) { .mc-section { padding-block: var(--space-9); } }
.mc-section--tight { padding-block: var(--space-7) var(--space-8); }
.mc-band { background: var(--band); color: var(--on-band); }
.mc-surface { background: var(--surface); }
.mc-head { display: grid; gap: var(--space-4); margin-bottom: var(--space-7); max-width: 760px; }
.split { display: grid; gap: var(--space-7); align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: var(--space-8); } .split--wide { grid-template-columns: 5fr 6fr; } .split--center { align-items: center; } }
.split > * { min-width: 0; }
.split--media { align-items: stretch; }
.split--media > .prose, .split--media > .stack { align-self: start; }
.stack { display: grid; gap: var(--space-7); align-content: start; }
.prose { align-content: start; }
.photo--fill { aspect-ratio: 4 / 3; }
@media (min-width: 900px) { .photo--fill { aspect-ratio: auto; height: 100%; min-height: 400px; } }
.photo { margin: 0; overflow: hidden; background: var(--line); }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ratio-45 { aspect-ratio: 4 / 5; } .ratio-43 { aspect-ratio: 4 / 3; } .ratio-11 { aspect-ratio: 1; } .ratio-1610 { aspect-ratio: 16 / 10; }

/* Hero con prima/dopo */
.hero { padding-block: var(--space-8); }
.hero__grid { display: grid; gap: var(--space-7); align-items: center; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 6fr 5fr; gap: var(--space-8); } }
.hero__grid > * { min-width: 0; }
.hero__copy { display: grid; gap: var(--space-5); }
.hero__sub { font-size: clamp(20px, 2.4vw, 24px); font-weight: 500; color: var(--band-accent); line-height: 1.3; }
.hero p.muted { max-width: 56ch; }
.ba { position: relative; aspect-ratio: 4 / 5; max-width: 100%; overflow: hidden; background: #0b315f; user-select: none; touch-action: pan-y; --pos: 50%; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ba__before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.ba__knob { position: absolute; top: 50%; left: var(--pos); width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 999px; background: var(--brand-orange); color: var(--brand-navy); display: grid; place-items: center; pointer-events: none; }
.ba__knob svg { width: 26px; height: 26px; }
.ba__tag { position: absolute; top: var(--space-3); padding: 6px 10px; background: var(--brand-navy); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: .08em; pointer-events: none; }
.ba__tag--b { left: var(--space-3); } .ba__tag--a { right: var(--space-3); }
.ba input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.ba:has(input:focus-visible) { outline: 2px solid var(--focus-on-band); outline-offset: 3px; }
.ba__cap { margin-top: var(--space-3); font-size: 14px; color: var(--on-band-muted); }

/* Apertura di pagina */
.opener { position: relative; overflow: hidden; padding-block: var(--space-8); }
.opener__mark { position: absolute; left: max(58%, 620px); bottom: -12%; height: 112%; width: auto; max-width: none; pointer-events: none; }
.opener__mark .g-n { fill: var(--band-shape); }
.opener__mark .g-r { fill: var(--brand-rust); }
.opener__in { position: relative; }
@media (max-width: 899px) { .opener__mark { left: 50%; height: 55%; bottom: -10%; } .opener__mark .g-r { fill: var(--band-shape); } }
@media (min-width: 900px) { .opener { padding-block: var(--space-9) var(--space-8); } }
.opener__in { display: grid; gap: var(--space-5); }
.opener__row { display: flex; justify-content: space-between; align-items: end; gap: var(--space-5); }
.opener__arrow { font-size: 40px; line-height: 1; color: var(--band-accent); }
.opener h1 { max-width: 16ch; }
@media (min-width: 900px) { .opener__in > * { max-width: 560px; } }
.opener .t-lead { color: var(--on-band-muted); max-width: min(56ch, 560px); }
.opener .mc-actions { margin-top: var(--space-3); }

/* Card servizi */
.cards { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
@media (min-width: 1100px) { .cards { grid-template-columns: repeat(5, 1fr); } .cards .card__body { padding: var(--space-4); } .cards .card__body p { font-size: 15px; line-height: 1.5; } .cards .mc-arrowlink { font-size: 14px; } }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.card__img { aspect-ratio: 4 / 3; overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.card:hover .card__img img { transform: scale(1.03); }
.card__body { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); flex: 1; }
.card__body .mc-arrowlink { margin-top: auto; align-self: flex-start; padding-top: var(--space-3); }
.card__body p { color: var(--ink-muted); }

/* Lista risorse / voci */
.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.facts li { display: grid; gap: var(--space-2); padding: var(--space-5) 0; border-bottom: 1px solid var(--line); }
@media (min-width: 700px) { .facts li { grid-template-columns: 260px 1fr; gap: var(--space-6); } }
.facts strong { font-size: 18px; font-weight: 600; }
.facts span { color: var(--ink-muted); }
.mc-band .facts, .mc-band .facts li { border-color: rgba(255,255,255,.2); }
.mc-band .facts span { color: var(--on-band-muted); }

.services { display: grid; gap: 0; border-top: 1px solid var(--line); }
.services article { display: grid; gap: var(--space-3); padding: var(--space-6) 0; border-bottom: 1px solid var(--line); }
@media (min-width: 800px) { .services article { grid-template-columns: 300px 1fr; gap: var(--space-6); } }
.services p { max-width: var(--text-max); color: var(--ink-muted); }

/* Griglia lavori in home (1 grande + 2) */
.mosaic { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: var(--space-2); aspect-ratio: 3 / 2; }
.mosaic .photo { min-height: 0; }
.mosaic .photo:first-child { grid-row: 1 / 3; }
@media (min-width: 900px) { .split--media .mosaic { aspect-ratio: auto; height: 100%; min-height: 380px; } }

/* Due pubblici */
.audience { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.audience .card__body h3 { font-size: 28px; line-height: 1.1; letter-spacing: -.01em; }

/* Contatti */
.info { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--space-5) var(--space-6); margin: 0; }
.info div { min-width: 0; }
.info dt { font-size: 12px; font-weight: 500; color: var(--ink-muted); margin: 0 0 var(--space-1); letter-spacing: .02em; }
.info dd { margin: 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.info dd span { display: block; font-weight: 400; color: var(--ink-muted); font-size: 14px; }
.info a { text-decoration: none; border-bottom: 1px solid var(--line); }
.mc-band .info dt, .mc-band .info dd span { color: var(--on-band-muted); }
.mc-band .info a { border-color: rgba(255,255,255,.3); }
.wa-box { display: grid; gap: var(--space-5); background: var(--surface); border: 1px solid var(--line); padding: var(--space-6); }
.wa-msg { margin: 0; padding: var(--space-4) var(--space-5); background: var(--bg); border-left: 3px solid var(--wa); font-size: 17px; }
.note { font-size: 13px; color: var(--ink-muted); }

/* Lavorazioni: indice */
.lav { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.lav article { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.lav__n { font-size: 32px; line-height: 1; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.lav p { color: var(--ink-muted); font-size: 15px; }
.lav .mc-arrowlink { margin-top: auto; align-self: flex-start; padding-top: var(--space-3); }

/* Galleria */
.filters { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-5); }
.filters button { min-height: 40px; padding: 0 var(--space-4); border: 1.5px solid var(--control-border); background: var(--surface); color: var(--ink); font: 500 14px/1 var(--font-sans); cursor: pointer; display: inline-flex; align-items: center; gap: var(--space-2); }
.filters button span { font-size: 12px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }
.filters button[aria-pressed="true"] span { color: #a9bad3; }
.gal-cap { display: grid; gap: var(--space-3); padding: var(--space-5) 0 var(--space-6); border-top: 1px solid var(--line); max-width: 820px; }
.gal-cap p { color: var(--ink-muted); }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }
@media (min-width: 700px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery button { display: block; padding: 0; border: 0; background: var(--line); aspect-ratio: 1; overflow: hidden; cursor: zoom-in; width: 100%; }
.gallery img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.gallery button:hover img { transform: scale(1.03); }

.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0, 20, 46, .96); display: grid; grid-template-rows: auto 1fr auto; padding: max(var(--space-3), env(safe-area-inset-top, 0px)) max(var(--space-3), env(safe-area-inset-right, 0px)) max(var(--space-3), env(safe-area-inset-bottom, 0px)) max(var(--space-3), env(safe-area-inset-left, 0px)); color: #fff; }
.lightbox[hidden] { display: none; }
.lightbox__top { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); font-size: 14px; }
.lightbox__stage { display: grid; place-items: center; min-height: 0; padding: var(--space-3) 0; }
.lightbox__stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox__nav { display: flex; justify-content: center; gap: var(--space-3); }
.lightbox button { min-height: 44px; min-width: 44px; padding: 0 var(--space-4); background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.6); font: 600 15px/1 var(--font-sans); cursor: pointer; }
.lightbox button:hover { background: #fff; color: var(--brand-navy); }
.lightbox :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Chiusura e footer */
.mc-closing { background: var(--closing); color: var(--on-closing); padding-block: var(--space-8); }
.mc-closing__in { display: grid; gap: var(--space-6); align-items: center; }
@media (min-width: 900px) { .mc-closing__in { grid-template-columns: 1fr auto; } }
.mc-closing__title { font: 500 clamp(28px, 4vw, 40px)/1.1 var(--font-sans); letter-spacing: -.015em; max-width: 20ch; }
.mc-footer { padding-block: var(--space-8) var(--space-6); }
.mc-footer__grid { display: grid; gap: var(--space-7); }
@media (min-width: 900px) { .mc-footer__grid { grid-template-columns: 1.2fr 1fr 1.4fr; } }
.mc-footer img { height: 84px; width: auto; display: block; }
.mc-footer h2 { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--on-band-muted); margin-bottom: var(--space-4); }
.mc-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.mc-footer ul a { text-decoration: none; }
.mc-footer ul a:hover { text-decoration: underline; }
.mc-footer__legal { margin-top: var(--space-7); padding-top: var(--space-4); border-top: 1px solid rgba(255,255,255,.2); font-size: 13px; color: var(--on-band-muted); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* CTA in coda ai paragrafi, segnaposto immagine, coppia di foto */
.prose-cta { margin-top: var(--space-3); }
.placeholder { display: grid; place-items: center; min-height: 320px; aspect-ratio: 4 / 3; max-width: 100%; border: 2px dashed var(--control-border); background: var(--surface); color: var(--ink-muted); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.duo { display: grid; grid-template-rows: 1fr 1fr; gap: var(--space-2); aspect-ratio: 4 / 5; }
.duo .photo { min-height: 0; }
@media (min-width: 900px) { .split--media .placeholder { aspect-ratio: auto; height: 100%; min-height: 400px; } .split--media .duo { aspect-ratio: auto; height: 100%; min-height: 480px; } }
.mc-footer .logo-foot-light { display: none; }

.ratio-32 { aspect-ratio: 3 / 2; align-self: start; }
.duo--square { display: grid; grid-template-rows: none; gap: var(--space-2); aspect-ratio: auto; align-self: start; }
.duo--square .photo { aspect-ratio: 1; }
@media (min-width: 900px) { .split--media .duo--square { height: auto; min-height: 0; } }

/* Testata delle pagine interne: stessa altezza ovunque, monogramma intero a destra */
.opener { min-height: 300px; display: flex; align-items: center; padding-block: var(--space-7); }
.opener__in { width: 100%; }
.opener__mark { left: auto; top: 50%; bottom: auto; right: calc(max(0px, (100% - var(--content-max)) / 2) + var(--space-7)); height: 60%; max-height: 270px; width: auto; transform: translateY(-50%); overflow: visible; }
@media (min-width: 1100px) {
  .opener { height: 460px; padding-block: 0; }
  .opener__in > * { max-width: 470px; }
  .opener .t-lead { max-width: 470px; }
}
@media (max-width: 1099px) {
  .opener { min-height: 0; flex-direction: column; align-items: stretch; padding-block: var(--space-7); }
  .opener__mark { position: relative; order: 2; top: auto; right: auto; bottom: auto; left: auto; transform: none; opacity: 1;
    height: auto; max-height: none; width: min(78%, 440px); margin: var(--space-6) auto 0; }
  .opener__mark .g-r { fill: var(--brand-rust); }
}

/* Impalcatura che si auto-monta davanti alla M (pagina Per le imprese) */
.scaffold { --scaff: var(--brand-orange); }
.scaffold .sc { fill: none; stroke: var(--scaff); stroke-linecap: square; stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: sc-draw .55s cubic-bezier(.3,.6,.2,1) var(--d, 0s) forwards; }
.scaffold .sc-v { stroke-width: 2.6; animation-duration: .9s; }
.scaffold .sc-h { stroke-width: 2.6; animation-duration: .5s; }
.scaffold .sc-p { stroke-width: 1.4; animation-duration: .45s; }
.scaffold .sc-g { stroke-width: 1.2; animation-duration: .45s; }
.scaffold .sc-d { stroke-width: 1; animation-duration: .35s; }
.scaffold .sc-base { fill: var(--scaff); transform-box: fill-box; opacity: 0; animation: sc-fade .3s ease var(--d, 0s) forwards; }
@keyframes sc-draw { to { stroke-dashoffset: 0; } }
@keyframes sc-fade { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .scaffold .sc { animation: none; stroke-dashoffset: 0; }
  .scaffold .sc-base { animation: none; opacity: 1; }
}

/* Altre animazioni davanti alla M */
.scaffold .sc-tile, .scaffold .sc-brick { fill: none; stroke: var(--scaff); stroke-width: 1.6; opacity: 0; transform-box: fill-box; transform-origin: center;
  animation: sc-place .5s cubic-bezier(.2,.7,.2,1) var(--d, 0s) forwards; }
.scaffold .sc-tile.sc-fill { fill: var(--scaff); fill-opacity: .18; }
.scaffold .sc-tile { transform: translateY(-18px) scale(.92); }
.scaffold .sc-brick { transform: translateY(-26px); stroke-width: 1.8; }
@keyframes sc-place { to { opacity: 1; transform: none; } }

.anim-layout .sc-g { stroke-dasharray: 1; }
.anim-plumb .plumb { transform-box: view-box; transform-origin: 556px 930px; animation: sc-swing 2.4s cubic-bezier(.3,.5,.3,1) 1.2s both; }
.anim-plumb .plumb-line { animation-duration: .8s; }
.anim-plumb .plumb-bob { fill: var(--scaff); opacity: 0; animation: sc-drop .8s cubic-bezier(.3,.6,.2,1) .45s forwards; transform-box: fill-box; }
.anim-plumb .plumb-dot { fill: var(--scaff); opacity: 0; animation: sc-fade .3s ease 2.3s forwards; }
@keyframes sc-drop { from { opacity: 0; transform: translateY(-510px); } 20% { opacity: 1; } to { opacity: 1; transform: none; } }
@keyframes sc-swing { 0% { transform: rotate(0); } 15% { transform: rotate(5deg); } 40% { transform: rotate(-3deg); } 62% { transform: rotate(1.6deg); } 80% { transform: rotate(-.6deg); } 100% { transform: rotate(0); } }

@media (prefers-reduced-motion: reduce) {
  .scaffold .sc-tile, .scaffold .sc-brick, .anim-plumb .plumb-bob, .anim-plumb .plumb-dot { animation: none; opacity: 1; transform: none; }
  .anim-plumb .plumb { animation: none; }
}

/* Mobile: dimensioni esplicite per le foto (Safari su iPhone non ricava l'altezza dalle griglie con aspect-ratio) */
.photo, .mosaic, .duo, .placeholder { width: 100%; }
.photo img { min-height: 100%; }
@media (max-width: 899px) {
  .mosaic { aspect-ratio: auto; height: 64vw; grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .photo--fill { aspect-ratio: auto; height: 68vw; }
  .ratio-32 { aspect-ratio: auto; height: 62vw; }
  .duo--square .photo { aspect-ratio: auto; height: calc(100vw - 2 * var(--space-4)); }
  .placeholder { aspect-ratio: auto; height: 68vw; min-height: 0; }
}
.mc-footer__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-5); }
.mc-footer__legal p { margin: 0; }
.mc-footer__legal a { color: inherit; text-underline-offset: 3px; }
.mc-footer__legal a:hover { color: var(--on-band); }

/* Link Privacy e Cookie nel footer: distanziati (2026-10-17) */
.mc-footer__legal p a + a { margin-left: var(--space-4); }
