/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: #000;
  border-bottom: 0;
  backdrop-filter: none;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-height: 44px;
}

.brand img {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  filter: invert(1);
}

.brand-light { font-weight: 400; color: rgba(255, 255, 255, 0.72); }

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.lang-switch {
  display: flex;
  align-items: center;
}

.lang-switch a {
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  min-width: 2.15rem;
  min-height: 44px;
  padding: 0 0.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lang-switch a[aria-current="true"] {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  border-radius: 0;
  padding: 0;
  cursor: pointer;
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  position: relative;
  margin-inline: auto;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list > li > a,
.nav-drop summary {
  white-space: nowrap;
}

.nav-list a,
.nav-drop summary {
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.45rem 0.55rem;
  border-radius: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.nav-list a:hover,
.nav-drop summary:hover {
  color: var(--accent);
  background: transparent;
}

.nav-list a[aria-current="page"],
.nav-drop summary[aria-current="page"] {
  color: #fff;
  background: transparent;
  box-shadow: inset 0 -2px 0 var(--accent);
}

.nav-drop { position: relative; }

.nav-drop summary {
  list-style: none;
}

.nav-drop summary::-webkit-details-marker { display: none; }

.nav-drop summary::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  margin-left: 0.35rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.nav-drop details[open] summary { color: var(--accent); }

.nav-drop details ul {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 18.5rem;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: #111;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  box-shadow: none;
}

.nav-drop details a {
  display: flex;
  width: 100%;
  border-radius: 8px;
}

.lang-drop details ul {
  left: auto;
  right: 0;
  min-width: 12rem;
}

.lang-drop details a[aria-current="true"] {
  box-shadow: inset 2px 0 0 var(--accent);
}

.nav-cta { margin-left: 0.4rem; }

.site-header .nav-store {
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff;
    background: transparent;
}

.site-header .nav-store:hover {
    border-color: #fff;
    color: #fff;
}

.nav-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: 0.35rem;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    text-decoration: none;
}

.nav-login svg {
    width: 20px;
    height: 20px;
}

.nav-login:hover {
    border-color: #fff;
    color: #fff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.65rem 1.05rem;
  border-radius: 0;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.1;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
}

.btn-primary {
  background: var(--accent);
  color: #111;
}

.btn-primary:hover { background: var(--accent-hover); color: #111; }

.btn-secondary {
  border-color: var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.btn-secondary:hover { border-color: var(--ink); color: var(--ink); background: transparent; }

.section-dark .btn-secondary {
  border-color: rgba(244, 242, 236, 0.35);
  color: var(--on-dark);
}

.section-dark .btn-secondary:hover {
  border-color: var(--on-dark);
  color: var(--on-dark);
}

.btn[hidden] {
  display: none !important;
}

.btn[disabled],
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: var(--space-5);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: var(--space-7);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(2rem, 4vw, 3.5rem);
}

.hero h1 { max-width: 12ch; }

.hero-bleed {
  position: relative;
  min-height: min(88vh, 760px);
  display: grid;
  align-items: end;
  color: #fff;
  overflow: hidden;
  background: #000;
}

.hero-bleed picture,
.hero-bleed img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: auto;
}

.hero-bleed::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.42) 48%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  padding-block: clamp(4rem, 10vh, 7rem) clamp(2.5rem, 6vh, 4.5rem);
}

.hero-copy h1,
.hero-copy .eyebrow { color: #fff; }

.hero-copy h1 { max-width: 11ch; font-weight: 400; }

.hero-copy .lead {
  color: rgba(255, 255, 255, 0.88);
  max-width: 34rem;
}

.hero-bleed .btn-secondary,
.band-photo .btn-secondary,
.page-hero .btn-secondary {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.hero-bleed .btn-secondary:hover,
.band-photo .btn-secondary:hover,
.page-hero .btn-secondary:hover {
  border-color: #fff;
  color: #fff;
  background: transparent;
}

.band-photo {
  position: relative;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.72)),
    image-set(
      url("../img/lab/laboratorio-insieme.avif") type("image/avif"),
      url("../img/lab/laboratorio-insieme.webp") type("image/webp"),
      url("../img/lab/laboratorio-insieme.jpg") type("image/jpeg")
    ) center / cover no-repeat;
}

.band-photo h2,
.band-photo h3,
.band-photo .eyebrow { color: #fff; }

.band-photo .muted,
.band-photo .process p { color: rgba(255, 255, 255, 0.84); }

.band-photo .process li::before {
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  color: #fff;
  font-size: clamp(2rem, 1.4rem + 1.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1;
  content: counter(step, decimal-leading-zero);
}

/* Layout del template: fasce alternate, non una griglia di card */
.tpl-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: end;
  padding-block: clamp(4rem, 8vw, 6.5rem);
}

.tpl-split h2 {
  font-size: clamp(2.6rem, 1.4rem + 3vw, 4.2rem);
  line-height: 0.95;
  margin: 0;
}

.tpl-split p { font-size: 1.15rem; max-width: 38rem; }

.tpl-steps,
.tpl-projects,
.tpl-statement {
  position: relative;
  color: #fff;
  overflow: hidden;
  min-height: 78vh;
  display: grid;
  align-items: end;
}

.tpl-steps,
.tpl-projects,
.tpl-statement {
  background-color: #000;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.tpl-steps {
  background-image: image-set(
    url("../img/lab/laboratorio-insieme.avif") type("image/avif"),
    url("../img/lab/laboratorio-insieme.webp") type("image/webp"),
    url("../img/lab/laboratorio-insieme.jpg") type("image/jpeg")
  );
}

.tpl-projects {
  background-image: image-set(
    url("../img/lab/formazione-mantract-stampante.avif") type("image/avif"),
    url("../img/lab/formazione-mantract-stampante.webp") type("image/webp"),
    url("../img/lab/formazione-mantract-stampante.jpg") type("image/jpeg")
  );
}

.tpl-statement {
  background-image: image-set(
    url("../img/lab/automazione-stampanti-parallelo.avif") type("image/avif"),
    url("../img/lab/automazione-stampanti-parallelo.webp") type("image/webp"),
    url("../img/lab/automazione-stampanti-parallelo.jpg") type("image/jpeg")
  );
}

.tpl-steps::before,
.tpl-projects::before,
.tpl-statement::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.25) 0%, rgba(0, 0, 0, 0.82) 78%);
}

.tpl-steps .container,
.tpl-projects .container,
.tpl-statement .container { position: relative; z-index: 1; padding-block: clamp(3rem, 7vw, 5rem); }

.step-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 2.5rem);
}

.step-row .num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.5rem + 2vw, 3.4rem);
  line-height: 1;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.step-row h2 { font-size: clamp(1.6rem, 1.2rem + 1vw, 2.2rem); margin-bottom: 0.5rem; }
.step-row p { margin: 0; color: rgba(255, 255, 255, 0.86); }

.project-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.project-row a {
  color: #fff;
  text-decoration: none;
  display: block;
}

.project-row img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.project-row h3 { margin: 0.7rem 0 0.25rem; font-size: 1.5rem; }
.project-row p { margin: 0; color: rgba(255, 255, 255, 0.8); }

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.8rem, 4vw, 3.5rem) clamp(2rem, 5vw, 5rem);
}

.why-grid a { color: inherit; text-decoration: none; }
.why-grid article a {
  display: inline-block;
  margin-top: 0.55rem;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.why-grid h3 { font-size: clamp(1.6rem, 1.2rem + 0.8vw, 2.1rem); margin-bottom: 0.4rem; }
.why-grid p { margin: 0; color: var(--on-dark-muted); }

.tpl-statement .kicker {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.tpl-statement h2 {
  font-size: clamp(4.2rem, 8vw, 8.5rem);
  line-height: 0.85;
  margin: 0 0 1rem;
  max-width: 10ch;
}

.hero-figure {
  margin: 0;
  background: var(--dark-2);
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid #2a323b;
}

.hero-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.hero-figure figcaption {
  color: var(--on-dark-muted);
  font-size: var(--text-sm);
  padding: 0.85rem 1rem 1rem;
}

/* Grids and cards */
.grid-2, .grid-3, .grid-4 {
  display: grid;
  gap: var(--space-4);
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.3rem;
  height: 100%;
}

.card h3 { font-size: 1.2rem; }

.card p { color: var(--ink-soft); }

a.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

a.card:hover {
  border-color: var(--accent);
  color: inherit;
}

.card-link {
  margin-top: auto;
  padding-top: 0.8rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
}

.icon-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.icon-mark svg { width: 22px; height: 22px; }

.section-dark .card {
  background: var(--dark-2);
  border-color: rgba(244, 242, 236, 0.1);
}

.section-dark .card p { color: var(--on-dark-muted); }

.path-kicker {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--copper);
  font-weight: 600;
  margin-bottom: 0.45rem;
}

/* Process */
.process {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-4);
  counter-reset: step;
}

.process li {
  position: relative;
  padding-top: 0.2rem;
}

.process li::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--accent);
  color: #111;
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.process h3 { font-size: 1.05rem; }
.process p { color: var(--muted); font-size: 0.98rem; margin: 0; }

/* Pills */
.pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.8rem; }

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 600;
}

/* FAQ */
.faq { display: grid; gap: 0.6rem; }

.faq details {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.35rem 1rem;
}

.faq summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  font-weight: 500;
  color: var(--accent);
  font-size: 1.3rem;
  line-height: 1;
}

.faq details[open] summary::after { content: "–"; }

.faq details p {
  color: var(--ink-soft);
  margin: 0 0 0.9rem;
}

/* CTA band */
.cta-band {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: var(--space-6);
  align-items: center;
}

.contact-quick {
  display: grid;
  gap: 0.55rem;
}

.contact-quick a {
  color: var(--on-dark);
  text-decoration: none;
  font-weight: 600;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.contact-quick a:hover { color: #fff; }

/* Footer */
.site-footer {
  background: #050505;
  color: var(--on-dark-muted);
  border-top: 1px solid #2a2a2a;
  padding-block: var(--space-8) var(--space-6);
  font-size: 0.98rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: var(--space-6);
}

.site-footer h2 {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-dark);
  margin-bottom: 0.8rem;
}

.site-footer a {
  color: var(--on-dark-muted);
  text-decoration: none;
}

.site-footer a:hover { color: #fff; }

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--on-dark);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.footer-brand img { width: 36px; height: 36px; background: #fff; border-radius: 8px; }

.footer-base {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(244, 242, 236, 0.12);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

/* Mobile bar */
.mobile-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom));
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 0.5rem;
}

.mobile-bar .btn { width: 100%; }

/* Cookie */
.cookie[hidden] {
  display: none !important;
}

.cookie {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  width: auto;
  max-width: 52rem;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #111;
  color: #f2f2f2;
  border: 1px solid #3a3a3a;
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem 0.75rem 1rem;
  box-shadow: var(--shadow);
}

.cookie p { margin: 0; color: var(--on-dark-muted); font-size: 0.95rem; }
.cookie a { color: #fff; }
.cookie .btn { flex: 0 0 auto; }

/* Breadcrumb */
.breadcrumb { padding-top: 1.1rem; font-size: 0.92rem; }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
}
.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: var(--line-strong);
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* Forms */
.form {
  display: grid;
  gap: 0.95rem;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.req { color: var(--copper); }

input, select, textarea {
  width: 100%;
  min-height: 44px;
  border-radius: 0;
  border: 1px solid var(--line-strong);
  background: #111;
  color: var(--ink);
  font: inherit;
  padding: 0.6rem 0.75rem;
}

textarea { min-height: 140px; resize: vertical; }

input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--accent);
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea { border-color: var(--danger); }

.field-error {
  color: var(--danger);
  font-size: 0.9rem;
  margin: 0.3rem 0 0;
}

.form-note { color: var(--muted); font-size: 0.92rem; }

.check {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.98rem;
}

.check input {
  width: 1.15rem;
  height: 1.15rem;
  min-height: 0;
  margin-top: 0.25rem;
  accent-color: var(--accent);
}

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}

.form-status.ok { background: var(--ok-soft); color: var(--ok); }
.form-status.err { background: var(--danger-soft); color: var(--danger); }

.steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.steps span {
  flex: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  background: #111;
}

.steps span[aria-current="step"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #111;
}

.file-box {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--paper);
}

.measure-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.quote-result {
  margin-top: 1rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line);
  background: #111;
}

.quote-result h3 { margin: 0.2rem 0 0.7rem; }
.quote-result p { margin: 0 0 0.45rem; }
.quote-result strong { font-size: 1.25rem; }

.js .is-wizard [data-step="2"] { display: none; }
.js .is-wizard [data-step="2"].is-active { display: block; }
.js .is-wizard [data-step="1"].is-hidden { display: none; }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table {
  width: 100%;
  border-collapse: collapse;
  background: #111;
  color: var(--ink);
  font-size: 0.98rem;
}
th, td {
  text-align: left;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-family: var(--font-display);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--paper);
}
tr:last-child td { border-bottom: 0; }

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.2rem;
}

.filters button {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #111;
  font: inherit;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  cursor: pointer;
  color: var(--ink);
}

.filters button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

/* Prose */
.prose { max-width: 44rem; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.4rem; }
.prose li { margin-bottom: 0.35rem; }

.meta-line {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
}

/* Media placeholder frame — area progettata, non un segnaposto testuale */
.media-frame {
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 20% 20%, rgba(12, 100, 124, 0.18), transparent 42%),
    linear-gradient(160deg, #1c232b, #12161b);
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--on-dark-muted);
}

.media-frame .icon-mark {
  margin: 0;
  width: 4.5rem;
  height: 4.5rem;
  background: rgba(244, 242, 236, 0.06);
  color: var(--on-dark);
}

.media-frame .icon-mark svg { width: 2rem; height: 2rem; }

.media-photo {
  display: block;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #1c232b;
  min-height: 0;
}

.media-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
}

.card > .media-photo {
  margin: -1.25rem -1.25rem 1rem;
  border-radius: var(--radius) var(--radius) 0 0;
}

.photo-figure {
  margin: 0;
}

.photo-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

.photo-figure figcaption,
.media-caption {
  color: var(--muted);
  font-size: var(--text-sm);
  margin-top: 0.55rem;
}

.photo-stack {
  display: grid;
  gap: var(--space-4);
}

.book-cover {
  margin: -1.25rem -1.25rem 1rem;
  background: #efeae2;
}

.book-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.loop {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.loop span {
  background: var(--dark-2);
  border: 1px solid rgba(244, 242, 236, 0.1);
  border-radius: var(--radius);
  padding: 0.9rem;
  color: var(--on-dark);
  font-family: var(--font-display);
  font-weight: 600;
}

@media (max-width: 1080px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .site-nav {
    display: flex;
    position: static;
    background: transparent;
    padding: 0;
    flex-direction: row;
    align-items: center;
    max-height: none;
    overflow: visible;
  }
  .site-nav .nav-list { display: none; }
  .site-nav.is-open {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #000;
    padding: 0.6rem 1rem 1rem;
    flex-direction: column;
    align-items: stretch;
    max-height: calc(100vh - var(--header-h));
    overflow: auto;
  }
  .site-nav.is-open .nav-list { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .nav-list a, .nav-drop summary { width: 100%; }
  .nav-drop details ul,
  .lang-drop details ul {
    position: static;
    right: auto;
    left: 0;
    box-shadow: none;
    min-width: 0;
    margin-top: 0.25rem;
  }
  .site-nav.is-open .nav-cta { margin: 0.4rem 0 0; }
  .site-nav:not(.is-open) .nav-cta { margin: 0 0 0 0.35rem; }
  .grid-4, .process, .footer-grid, .loop { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; gap: var(--space-5); }
  .hero h1 { max-width: 18ch; }
  .cta-band { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .grid-2, .grid-3, .grid-4, .process, .footer-grid, .loop, .measure-grid { grid-template-columns: 1fr 1fr; }
  .tpl-split, .step-row, .project-row, .why-grid { grid-template-columns: 1fr; }
  .tpl-steps, .tpl-projects, .tpl-statement { min-height: 0; }
  .hero-bleed { min-height: 78vh; }
  .hero-bleed::after {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 10%, rgba(0, 0, 0, 0.82) 72%);
  }
  .mobile-bar { display: grid; }
  .cookie {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 4.7rem;
    flex-direction: column;
    align-items: stretch;
  }
  body.has-mobile-bar { padding-bottom: 5rem; }
}

.agc {
  position: fixed;
  right: 16px;
  bottom: 6.5rem;
  z-index: 200;
  font-family: inherit;
}
.agc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f4f2ec;
  color: #111;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}
.agc-panel {
  display: none;
  position: absolute;
  right: 0;
  bottom: 88px;
  width: min(360px, calc(100vw - 32px));
  height: 440px;
  flex-direction: column;
  overflow: hidden;
  background: #111;
  color: #f5f5f5;
  border: 1px solid #c0c0c0;
  border-radius: 16px;
}
.agc.is-open .agc-panel { display: flex; }
.agc-head, .agc-form { padding: 12px; }
.agc-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #2a2a2a;
}
.agc-log {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}
.agc-msg {
  margin: 0;
  padding: 8px 10px;
  border-radius: 12px;
  white-space: pre-wrap;
}
.agc-msg.user { align-self: flex-end; background: #2a2a2a; }
.agc-msg.bot { align-self: flex-start; background: #1b1b1b; border: 1px solid #333; }
.agc-form {
  display: flex;
  gap: 8px;
  border-top: 1px solid #2a2a2a;
}
.agc-form input {
  flex: 1;
  background: #000;
  color: #fff;
  border: 1px solid #444;
  border-radius: 999px;
  padding: 8px 14px;
}
.agc-form button, .agc-head button {
  min-height: 40px;
  padding: 0.45rem 1rem;
  border: 0;
  border-radius: 999px;
  background: #f4f2ec;
  color: #111;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  cursor: pointer;
}
@media (max-width: 760px) {
  .agc { bottom: 12rem; }
}
