:root {
  --brand: #004aad;
  --brand-d: #003a86;
  --brand-t: #eef3fa;
  --ink: #0f1b2d;
  --muted: #5a6675;
  --line: #e2e7ee;
  --bg: #fff;
  --bg-alt: #f6f8fb;

  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial,
    sans-serif;
  --pad: clamp(1.25rem, 5vw, 3rem);

  font: 17px/1.6 var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

body,
h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  /* ponytail: gli attributi width/height nell'HTML (anti-CLS) diventano hint CSS
     e fisserebbero l'altezza, azzerando gli aspect-ratio della gallery. */
  height: auto;
}

a {
  color: var(--brand);
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.mark {
  --h: 38px;
  display: block;
  flex: none;
}
.mark img {
  display: block;
  height: var(--h);
  width: auto;
}
.mark-lg {
  --h: 56px;
}

/* ---------- layout ---------- */
main > section {
  padding: clamp(3.5rem, 8vw, 6rem) var(--pad);
  max-width: 1180px;
  margin-inline: auto;
  scroll-margin-top: 4.5rem;
}
.alt {
  max-width: none;
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}
.alt > * {
  max-width: 1180px;
  margin-inline: auto;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
}
h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-weight: 800;
}
h3 {
  font-size: 1.15rem;
  font-weight: 700;
}
.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.9rem;
}
.lead {
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: var(--muted);
  max-width: 62ch;
  margin-top: 1.1rem;
}

/* ---------- header ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  padding: 0.7rem var(--pad);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}
.brand-txt {
  display: grid;
  line-height: 1.2;
}
.brand-txt b {
  font-size: 0.98rem;
  font-weight: 800;
}
.brand-txt i {
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.bar nav {
  margin-left: auto;
}
.bar nav ul {
  display: flex;
  gap: clamp(0.9rem, 2.2vw, 2rem);
}
.bar nav a {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 600;
}
.bar nav a:hover {
  color: var(--brand);
}
.lang {
  display: flex;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.lang b {
  color: var(--brand);
}
.lang a {
  color: var(--muted);
  text-decoration: none;
}
.lang a:hover {
  color: var(--ink);
}

.btn {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border-radius: 4px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid var(--brand);
}
.btn:hover {
  background: var(--brand-d);
  border-color: var(--brand-d);
}
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.88rem;
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}
.btn-ghost:hover {
  background: #fff;
  border-color: #fff;
  color: var(--brand-d);
}

/* ---------- hero ---------- */
.hero {
  max-width: none !important;
  position: relative;
  display: grid;
  align-content: center;
  min-height: min(78vh, 720px);
  padding-block: clamp(4rem, 12vw, 8rem) !important;
  background-color: var(--brand-d);
  color: #fff;
  isolation: isolate;
}
.hero-img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    100deg,
    rgba(0, 26, 58, 0.92) 0%,
    rgba(0, 40, 90, 0.8) 45%,
    rgba(0, 45, 100, 0.35) 100%
  );
}
.hero-in {
  max-width: 1180px;
  width: 100%;
  margin-inline: auto;
}
.hero .eyebrow {
  color: #8fb8ee;
}
.hero .lead {
  color: rgba(255, 255, 255, 0.86);
  max-width: 56ch;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2.25rem;
}
.credit {
  position: absolute;
  right: var(--pad);
  bottom: 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- stats ---------- */
.stats ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.75rem;
}
.stats li {
  padding-left: 1.15rem;
  border-left: 3px solid var(--brand);
}
.stats b {
  display: block;
  font-size: clamp(2.1rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1;
  color: var(--brand);
  letter-spacing: -0.02em;
}
.stats span {
  display: block;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- about ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 300px) 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding-top: 0 !important;
}
.about figure {
  position: relative;
}
.about figure::before {
  content: '';
  position: absolute;
  inset: 7% -5% -5% 7%;
  background: var(--brand);
  border-radius: 4px;
}
.about img {
  position: relative;
  width: 100%;
  height: auto;
  border-radius: 4px;
  filter: grayscale(1) contrast(1.05);
}
.about h2 {
  margin-bottom: 1.5rem;
}
.about p {
  color: var(--muted);
  max-width: 68ch;
}
.about p + p {
  margin-top: 1.1rem;
}
.about b {
  color: var(--ink);
}

/* ---------- cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.cards > li {
  background: var(--bg);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brand);
  border-radius: 4px;
  padding: 1.6rem;
}
.cards > li p {
  color: var(--muted);
  margin-top: 0.7rem;
  font-size: 0.97rem;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.1rem;
}
.tags li {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--brand-t);
  color: var(--brand-d);
}

/* ---------- metodo ---------- */
.metodo {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.metodo ol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.75rem;
  margin-top: 1.75rem;
  padding: 0;
  list-style: none;
}
.metodo li {
  display: flex;
  gap: 1rem;
}
.metodo b {
  flex: none;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.9rem;
}
.metodo h4 {
  margin: 0.2rem 0 0.35rem;
  font-size: 1rem;
}
.metodo p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---------- gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.gallery .wide {
  grid-column: span 2;
}
.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  background: var(--bg-alt);
}
.gallery .wide img {
  aspect-ratio: 16 / 7;
}
.gallery figcaption {
  margin-top: 0.9rem;
}
.gallery figcaption b {
  font-size: 1.02rem;
  font-weight: 700;
}
.gallery figcaption em {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.5rem;
  border-radius: 3px;
  background: var(--brand);
  color: #fff;
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 700;
  vertical-align: 2px;
  white-space: nowrap;
}
.gallery figcaption span {
  display: block;
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- wall ---------- */
.wall {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.wall ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.wall li {
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.92rem;
  background: var(--bg-alt);
}
.note {
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- contatti ---------- */
.contact {
  background: var(--bg-alt);
  max-width: none !important;
  border-top: 1px solid var(--line);
}
.contact > * {
  max-width: 1180px;
  margin-inline: auto;
}
.big-btns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}
.big {
  display: grid;
  gap: 0.2rem;
  padding: 1.6rem 1.9rem;
  border-radius: 4px;
  background: var(--brand);
  border: 1px solid var(--brand);
  color: #fff;
  text-decoration: none;
}
.big b {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 800;
}
.big span {
  font-size: 1rem;
  opacity: 0.8;
}
.big:hover {
  background: var(--brand-d);
  border-color: var(--brand-d);
}
.big-alt {
  background: var(--bg);
  color: var(--brand-d);
  border-color: var(--brand);
}
.big-alt:hover {
  background: var(--brand-t);
  border-color: var(--brand-d);
  color: var(--brand-d);
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-top: 2.5rem;
}
.meta span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}
.meta p,
.meta a {
  font-weight: 700;
}
.meta a {
  text-decoration: none;
}
.meta a:hover {
  text-decoration: underline;
}

/* ---------- footer ---------- */
footer {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 2.5rem var(--pad);
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .about {
    grid-template-columns: 1fr;
  }
  .about figure {
    max-width: 260px;
  }
  .bar .btn-sm {
    display: none;
  }
  .bar nav ul {
    gap: 1rem;
  }
  .bar nav a {
    font-size: 0.85rem;
  }
}
@media (max-width: 700px) {
  .gallery .wide {
    grid-column: auto;
  }
  .gallery .wide img {
    aspect-ratio: 4 / 3;
  }
}
@media (max-width: 520px) {
  .bar {
    gap: 0.6rem;
  }
  .bar nav ul {
    gap: 0.65rem;
  }
  .bar nav a {
    font-size: 0.78rem;
  }
  .mark {
    --h: 32px;
  }
  .lang {
    font-size: 0.72rem;
    gap: 0.3rem;
  }
}
@media (max-width: 620px) {
  .brand-txt {
    display: none;
  }
  .gallery {
    grid-template-columns: 1fr;
  }
}

/* ---------- skip link ---------- */
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--pad);
  top: 0.5rem;
  z-index: 10;
  background: #fff;
  padding: 0.6rem 1rem;
  border-radius: 6px;
}

/* ---------- 404 ---------- */
.nf {
  min-height: 62vh;
  display: grid;
  align-content: center;
}
.nf h1 b {
  display: block;
  font-size: clamp(4rem, 13vw, 7rem);
  line-height: 1;
  color: var(--brand);
  margin-bottom: 0.6rem;
}
.nf .or {
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}
