/* ============================================================
   NOA Service Company — design system "Rosso Mediterraneo"
   Display: Syne · Body: Hanken Grotesk
   ============================================================ */

:root {
  --red: #d40f0f;
  --red-bright: #e01010;
  --red-dark: #9c0a0a;
  --red-deep: #6e0707;
  --ink: #0e0e11;
  --ink-2: #16161b;
  --ink-3: #1f1f26;
  --paper: #f6f4ef;
  --white: #ffffff;
  --text: #1c1c22;
  --muted: #5d5d68;
  --muted-dark: #a2a2b0;
  --line: rgba(14, 14, 17, 0.1);
  --line-dark: rgba(255, 255, 255, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px rgba(14, 14, 17, 0.1);
  --shadow-red: 0 16px 44px rgba(212, 15, 15, 0.28);
  --font: "Hanken Grotesk", system-ui, sans-serif;
  --font-display: "Syne", "Hanken Grotesk", sans-serif;
  --header-h: 84px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--paper);
  line-height: 1.65;
  font-size: 1.0375rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, picture, video { max-width: 100%; height: auto; display: block; }
a { color: var(--red); }
::selection { background: var(--red); color: #fff; }

.container { width: min(1200px, calc(100% - 3rem)); margin-inline: auto; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.05;
  color: var(--ink);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--red);
}
.eyebrow::before {
  content: "";
  width: 9px; height: 9px;
  background: var(--red);
  border-radius: 2px;
  flex: none;
}

.lead { font-size: 1.16rem; color: var(--muted); max-width: 60ch; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), background 0.25s ease,
              color 0.25s ease, border-color 0.25s ease, box-shadow 0.35s ease;
}
.btn .btn__arrow { transition: transform 0.35s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(5px); }
.btn:active { transform: scale(0.97); }

.btn--primary { background: var(--red); color: #fff; box-shadow: var(--shadow-red); }
.btn--primary:hover { background: var(--red-dark); transform: translateY(-2px); }

.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-3); transform: translateY(-2px); }

.btn--ghost { background: transparent; border-color: rgba(255,255,255,0.35); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,0.08); transform: translateY(-2px); }

.btn--ghost-dark { background: transparent; border-color: rgba(14,14,17,0.25); color: var(--ink); }
.btn--ghost-dark:hover { border-color: var(--ink); transform: translateY(-2px); }

.btn--light { background: #fff; color: var(--red); }
.btn--light:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }

.btn--sm { padding: 0.6rem 1.15rem; font-size: 0.88rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(14, 14, 17, 0.82);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-color: var(--line-dark);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  z-index: 101;
}
.brand__mark { width: 40px; height: 40px; transition: transform 0.4s var(--ease-out); }
.brand:hover .brand__mark { transform: rotate(-8deg) scale(1.06); }
.brand__text { display: flex; flex-direction: column; gap: 0.28rem; }
.brand__word { height: 17px; width: auto; }
.brand__sub {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
}

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav ul {
  display: flex; gap: 1.7rem;
  list-style: none; margin: 0; padding: 0;
}
.site-nav a:not(.btn) {
  position: relative;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.3rem 0;
  transition: color 0.25s ease;
}
.site-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--red);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.site-nav a:not(.btn):hover,
.site-nav a:not(.btn).is-active { color: #fff; }
.site-nav a:not(.btn):hover::after,
.site-nav a:not(.btn).is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-toggle {
  display: none;
  z-index: 101;
  border: 0;
  background: transparent;
  padding: 0.6rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 26px; height: 2px;
  margin: 6px 0;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.35s var(--ease-out), opacity 0.25s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: saturate(1.05);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(200deg, rgba(212, 15, 15, 0.22), transparent 42%),
    linear-gradient(to top, rgba(14, 14, 17, 0.94) 0%, rgba(14, 14, 17, 0.45) 45%, rgba(14, 14, 17, 0.42) 100%);
}
.hero__content {
  padding: calc(var(--header-h) + 3rem) 0 5.5rem;
}
.hero .eyebrow { color: #ff5a5a; }
.hero h1 {
  color: #fff;
  font-size: clamp(2.7rem, 7vw, 5.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.0;
  margin: 1.1rem 0 1.4rem;
  max-width: 17ch;
  text-wrap: balance;
}
.hero h1 .accent { color: var(--red-bright); }
.hero .lead { color: rgba(255, 255, 255, 0.82); font-size: 1.2rem; max-width: 56ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.2rem; }

.hero__scroll {
  position: absolute;
  right: clamp(1rem, 4vw, 3rem);
  bottom: 2.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.hero__scroll::after {
  content: "";
  width: 1px; height: 54px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.7), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---------- Marquee ---------- */
.marquee {
  background: var(--red);
  color: #fff;
  overflow: hidden;
  padding: 0.95rem 0;
  border-block: 1px solid rgba(0, 0, 0, 0.15);
}
.marquee__track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group {
  display: flex;
  gap: 3rem;
  align-items: center;
  flex: none;
}
.marquee__group span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 3rem;
}
.marquee__group span::after {
  content: "";
  width: 10px; height: 10px;
  background: var(--ink);
  border-radius: 2px;
  opacity: 0.55;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; position: relative; }
.section--white { background: var(--white); }
.section--dark { background: var(--ink); color: var(--muted-dark); }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--tight { padding: clamp(3rem, 6vw, 4.5rem) 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(2.2rem, 5vw, 3.5rem);
}
.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin: 0.9rem 0 0;
  max-width: 22ch;
  text-wrap: balance;
}
.section-head p { margin: 0.9rem 0 0; color: var(--muted); max-width: 58ch; }
.section-head__aside { flex: none; padding-bottom: 0.35rem; }

/* ---------- Service cards ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.3rem;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.9rem 1.7rem 1.6rem;
  overflow: hidden;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s ease, border-color 0.3s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(212, 15, 15, 0.35);
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out);
}
.card:hover::before { transform: scaleX(1); }
.card__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.6rem;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(212, 15, 15, 0.5);
  margin-bottom: 1.3rem;
  transition: color 0.35s ease;
}
.card:hover .card__num { color: var(--red); }
.card h3 { margin: 0 0 0.6rem; font-size: 1.22rem; line-height: 1.25; }
.card h3 a { text-decoration: none; color: var(--ink); }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { margin: 0 0 1.4rem; color: var(--muted); font-size: 0.98rem; flex: 1; }
.card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--red);
  margin-top: auto;
}
.card__link .btn__arrow { transition: transform 0.35s var(--ease-out); }
.card:hover .card__link .btn__arrow { transform: translateX(5px); }

/* ---------- Split (home chi-siamo) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.split__media { position: relative; }
.split__media::before {
  content: "";
  position: absolute;
  inset: 1.4rem -1.4rem -1.4rem 1.4rem;
  background: var(--red);
  border-radius: var(--radius);
  z-index: 0;
}
.split__media::after {
  content: "";
  position: absolute;
  top: -1.1rem; left: -1.1rem;
  width: 34px; height: 34px;
  background: var(--red-dark);
  border-radius: 6px;
  z-index: 2;
}
.split__media img {
  position: relative;
  z-index: 1;
  border-radius: var(--radius);
  width: 100%;
  aspect-ratio: 4 / 3.1;
  object-fit: cover;
}
.split h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  margin: 0.9rem 0 1.1rem;
  text-wrap: balance;
}
.split p { color: var(--muted); }

.check-list {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.check-list li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  font-weight: 600;
  color: var(--ink);
}
.check-list li::before {
  content: "";
  flex: none;
  width: 11px; height: 11px;
  margin-top: 0.5em;
  background: var(--red);
  border-radius: 3px;
}

/* ---------- Stats ---------- */
.section--dark .eyebrow { color: #fff; }
.section--dark:has(.stats-grid)::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(50% 60% at 50% 0%, rgba(212, 15, 15, 0.09), transparent 70%);
  pointer-events: none;
}
.eyebrow + .stats-grid { margin-top: clamp(1.6rem, 3.5vw, 2.4rem); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
}
.stats-grid > div {
  display: flex;
  flex-direction: column;
  background: linear-gradient(155deg, var(--ink-3), var(--ink-2) 58%);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 1.8rem 1.6rem 1.5rem;
  transition: transform 0.4s var(--ease-out), border-color 0.3s ease, box-shadow 0.4s ease;
}
.stats-grid > div:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 15, 15, 0.55);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4);
}
.stats-grid strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.95rem, 0.9vw + 1.4rem, 2.2rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: #fff;
  margin-bottom: 1.1rem;
}
.stats-grid strong em { font-style: normal; color: var(--red-bright); }
.stats-grid span {
  display: block;
  margin-top: auto;
  padding-top: 0.95rem;
  border-top: 1px solid var(--line-dark);
  color: var(--muted-dark);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  background: var(--red);
  color: #fff;
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.8rem, 5vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-red);
}
.cta-band::before,
.cta-band::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}
.cta-band::before {
  width: 190px; height: 190px;
  top: -70px; right: 16%;
  transform: rotate(18deg);
}
.cta-band::after {
  width: 120px; height: 120px;
  bottom: -50px; right: 4%;
  transform: rotate(-12deg);
  background: rgba(110, 7, 7, 0.35);
}
.cta-band > div { position: relative; z-index: 1; }
.cta-band h2 {
  color: #fff;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  margin: 0;
  max-width: 24ch;
  text-wrap: balance;
}
.cta-band p { color: rgba(255, 255, 255, 0.85); margin: 0.8rem 0 0; max-width: 52ch; }
.cta-band .btn { position: relative; z-index: 1; flex: none; }

/* ---------- Page hero (interior) ---------- */
.page-hero {
  position: relative;
  background: var(--ink);
  color: var(--muted-dark);
  padding: calc(var(--header-h) + clamp(3rem, 8vw, 5.5rem)) 0 clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  top: -80px; right: -60px;
  width: 300px; height: 300px;
  background: var(--red);
  opacity: 0.14;
  border-radius: 26px;
  transform: rotate(18deg);
}
.page-hero::after {
  content: "";
  position: absolute;
  bottom: -90px; right: 18%;
  width: 180px; height: 180px;
  background: var(--red-dark);
  opacity: 0.18;
  border-radius: 20px;
  transform: rotate(-14deg);
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero .eyebrow { color: #ff5a5a; }
.page-hero h1 {
  color: #fff;
  font-size: clamp(2.3rem, 5.5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 1rem 0 1rem;
  max-width: 20ch;
  text-wrap: balance;
}
.page-hero .lead { color: rgba(255, 255, 255, 0.72); }

/* ---------- Prose / legal ---------- */
.prose { max-width: 72ch; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--ink); }
.legal h2 {
  margin-top: 2.6rem;
  font-size: 1.35rem;
  padding-left: 0.9rem;
  border-left: 4px solid var(--red);
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 1.6rem;
  align-items: start;
}
.contact-info {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  background: var(--ink);
  color: var(--muted-dark);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  overflow: hidden;
}
.contact-info::after {
  content: "";
  position: absolute;
  bottom: -60px; right: -40px;
  width: 160px; height: 160px;
  background: var(--red);
  opacity: 0.16;
  border-radius: 20px;
  transform: rotate(16deg);
}
.contact-info h2 { color: #fff; font-size: 1.4rem; margin: 0 0 1.4rem; }
.contact-info ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.contact-info li strong {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #ff5a5a;
  margin-bottom: 0.25rem;
}
.contact-info a { color: #fff; text-decoration: none; font-weight: 600; }
.contact-info a:hover { color: #ff5a5a; }

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 4vw, 2.4rem);
  box-shadow: var(--shadow);
}
.field { margin-bottom: 1.25rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
  color: var(--ink);
}
.field input, .field textarea, .field select {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font: inherit;
  color: var(--text);
  background: var(--paper);
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--red);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(212, 15, 15, 0.12);
}
.field.is-error input, .field.is-error textarea { border-color: var(--red); background: #fdf1f1; }
.field-error { color: var(--red-dark); font-size: 0.85rem; display: block; margin-top: 0.3rem; font-weight: 600; }
.field--check label { font-weight: 500; display: flex; gap: 0.6rem; align-items: flex-start; }
.field--check input { width: auto; accent-color: var(--red); margin-top: 0.25rem; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 860px; }
.faq-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 0.8rem;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.faq-item[open] { border-color: rgba(212, 15, 15, 0.4); box-shadow: var(--shadow); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 1.15rem 1.4rem;
  color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--paper);
  color: var(--red);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.35s var(--ease-out), background 0.25s ease, color 0.25s ease;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
  background: var(--red);
  color: #fff;
}
.faq-item p { margin: 0; padding: 0 1.4rem 1.3rem; color: var(--muted); }

/* ---------- Alerts / flash ---------- */
.flash-wrap {
  position: fixed;
  top: calc(var(--header-h) + 1rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  width: min(560px, calc(100% - 2rem));
}
.alert {
  border-radius: var(--radius-sm);
  padding: 1rem 1.3rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  animation: flashIn 0.5s var(--ease-out);
}
@keyframes flashIn {
  from { opacity: 0; transform: translateY(-14px); }
  to { opacity: 1; transform: translateY(0); }
}
.alert--success { background: #0e3d24; color: #b9f0cf; border: 1px solid #1e6b41; }
.alert--error { background: #4a0d0d; color: #ffc9c9; border: 1px solid var(--red-dark); }
.alert { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.alert__close {
  flex: none;
  background: none;
  border: 0;
  color: inherit;
  font-size: 1.3rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}
.alert__close:hover, .alert__close:focus-visible { opacity: 1; }

/* Riepilogo errori del form */
.form-error-summary {
  background: #fdf1f1;
  border: 1.5px solid var(--red);
  border-left-width: 5px;
  border-radius: var(--radius-sm);
  color: var(--red-dark);
  padding: 1rem 1.2rem;
  margin-bottom: 1.4rem;
}
.form-error-summary:focus { outline: none; box-shadow: 0 0 0 4px rgba(212, 15, 15, 0.12); }
.form-error-summary strong { display: block; font-size: 0.95rem; }
.form-error-summary ul { margin: 0.55rem 0 0; padding-left: 1.15rem; display: grid; gap: 0.3rem; font-size: 0.9rem; }
.form-error-summary a { color: inherit; font-weight: 600; text-underline-offset: 2px; }
.field--check.is-error > label { color: var(--red-dark); }

/* Stato di invio del bottone */
.btn.is-loading { opacity: 0.75; pointer-events: none; }
.btn__spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -0.15em;
  animation: btnSpin 0.7s linear infinite;
}
@keyframes btnSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn__spinner { animation-duration: 1.6s; }
}

/* ---------- Detail page ---------- */
.detail-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.detail-cta {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  background: var(--ink);
  color: var(--muted-dark);
  border-radius: var(--radius);
  padding: 1.9rem 1.7rem;
  overflow: hidden;
}
.detail-cta::after {
  content: "";
  position: absolute;
  top: -50px; right: -40px;
  width: 130px; height: 130px;
  background: var(--red);
  opacity: 0.18;
  border-radius: 18px;
  transform: rotate(14deg);
}
.detail-cta h2 { color: #fff; font-size: 1.3rem; margin: 0 0 0.7rem; position: relative; z-index: 1; }
.detail-cta p { font-size: 0.96rem; margin: 0 0 1.4rem; position: relative; z-index: 1; }
.detail-cta .btn { width: 100%; position: relative; z-index: 1; }

/* ---------- 404 ---------- */
.error-hero {
  min-height: 70svh;
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--ink);
  color: var(--muted-dark);
  padding: calc(var(--header-h) + 2rem) 0 4rem;
}
.error-hero .error-code {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(6rem, 20vw, 12rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px var(--red);
  margin: 0;
}
.error-hero h1 { color: #fff; margin: 0.5rem 0 0.8rem; font-size: clamp(1.5rem, 3vw, 2.2rem); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--muted-dark);
  position: relative;
  overflow: hidden;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--red);
}
.site-footer a { color: rgba(255, 255, 255, 0.85); text-decoration: none; transition: color 0.2s ease; }
.site-footer a:hover { color: #ff5a5a; }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.1fr;
  gap: 2.5rem;
  padding: clamp(3rem, 7vw, 4.5rem) 0 2.5rem;
}
.footer-brand__lockup { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.3rem; }
.footer-brand__lockup img:first-child { width: 52px; height: 52px; }
.footer-brand__lockup img:last-child { height: 22px; width: auto; }
.site-footer h3 {
  margin: 0 0 1.1rem;
  color: #fff;
  font-size: 0.78rem;
  font-family: var(--font);
  text-transform: uppercase;
  letter-spacing: 0.24em;
}
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-tagline { color: var(--muted-dark); font-size: 0.96rem; max-width: 34ch; }
.footer-legal { color: #6f6f7c; font-size: 0.88rem; margin-top: 1.1rem; }
.site-footer__bottom {
  border-top: 1px solid var(--line-dark);
  padding: 1.4rem 0 1.6rem;
  font-size: 0.88rem;
  color: #6f6f7c;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-footer__bottom p { margin: 0; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 1.2rem; bottom: 1.2rem;
  z-index: 100;
  width: min(430px, calc(100% - 2.4rem));
  background: var(--ink);
  color: var(--muted-dark);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  animation: cookieIn 0.6s var(--ease-out);
  max-height: calc(100dvh - 2.4rem);
  overflow-y: auto;
}
@keyframes cookieIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.cookie-banner__inner { padding: 1.5rem 1.5rem 1.4rem; }
.cookie-banner p { margin: 0 0 0.65rem; font-size: 0.93rem; }
.cookie-banner p:last-of-type { margin-bottom: 1.1rem; }
.cookie-banner a { color: #ff5a5a; }
.cookie-banner__link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: #ff5a5a;
  text-decoration: underline;
  cursor: pointer;
}
.cookie-banner__actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.cookie-banner .btn--ghost { border-color: var(--line-dark); }

/* ---------- Consent: centro preferenze ---------- */
.consent-modal { position: fixed; inset: 0; z-index: 110; display: flex; align-items: center; justify-content: center; padding: 1.2rem; }
.consent-modal[hidden] { display: none; }
.consent-modal__backdrop { position: absolute; inset: 0; background: rgba(8, 8, 10, 0.62); backdrop-filter: blur(3px); }
.consent-modal__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(86vh, 720px);
  overflow-y: auto;
  background: var(--ink);
  color: var(--muted-dark);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  padding: 1.6rem 1.6rem 1.5rem;
  animation: cookieIn 0.45s var(--ease-out);
}
.consent-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.4rem; }
.consent-modal__head h2 { margin: 0; font-size: 1.35rem; color: #fff; }
.consent-modal__close { background: none; border: 0; color: #8a8a96; font-size: 1.9rem; line-height: 1; cursor: pointer; padding: 0.1rem 0.4rem; border-radius: 8px; }
.consent-modal__close:hover { color: #fff; }
.consent-modal__intro { font-size: 0.92rem; margin: 0 0 1.1rem; }
.consent-modal a { color: #ff5a5a; }
.consent-cat { border: 1px solid var(--line-dark); border-radius: 12px; padding: 0.95rem 1.05rem; margin-bottom: 0.7rem; background: rgba(255, 255, 255, 0.02); }
.consent-cat__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.consent-cat strong { color: #fff; font-size: 0.98rem; }
.consent-cat p { margin: 0.25rem 0 0; font-size: 0.85rem; color: #9a9aa6; }
.consent-locked { flex: 0 0 auto; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #7ee2a8; border: 1px solid rgba(126, 226, 168, 0.35); padding: 0.32rem 0.6rem; border-radius: 999px; }
.consent-switch { position: relative; flex: 0 0 auto; display: inline-block; cursor: pointer; }
.consent-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.consent-switch__track { display: block; width: 46px; height: 26px; border-radius: 999px; background: #3a3a44; border: 1px solid var(--line-dark); transition: background 0.25s ease; position: relative; }
.consent-switch__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.25s ease; }
.consent-switch input:checked + .consent-switch__track { background: var(--red); }
.consent-switch input:checked + .consent-switch__track::after { transform: translateX(20px); }
.consent-switch input:focus-visible + .consent-switch__track { outline: 2px solid #ff5a5a; outline-offset: 2px; }
.consent-modal__actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 1.1rem; }
.consent-modal .btn--ghost { border-color: var(--line-dark); }
body.consent-modal-open { overflow: hidden; }
.footer-link-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.footer-link-btn:hover { color: #fff; text-decoration: underline; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.policy-revision { margin-top: 2.2rem; padding-top: 1rem; border-top: 1px solid rgba(14, 14, 17, 0.12); font-size: 0.88rem; color: #6f6f7c; font-style: italic; }

/* ---------- Reveal animations ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  :root { --header-h: 72px; }
  body { font-size: 1rem; }
  .container { width: calc(100% - 2.4rem); }

  .nav-toggle { display: block; }
  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(14, 14, 17, 0.97);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: calc(var(--header-h) + 1rem) 2rem 2.5rem;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0.4s ease;
  }
  .site-nav.is-open { visibility: visible; opacity: 1; }
  .site-nav ul { flex-direction: column; gap: 0.4rem; width: 100%; }
  .site-nav a:not(.btn) {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 8vw, 2.6rem);
    font-weight: 700;
    color: #fff;
    display: inline-block;
    padding: 0.35rem 0;
    transform: translateY(18px);
    opacity: 0;
    transition: transform 0.5s var(--ease-out), opacity 0.5s ease;
  }
  .site-nav.is-open a:not(.btn) {
    transform: none;
    opacity: 1;
  }
  .site-nav.is-open li:nth-child(1) a { transition-delay: 0.08s; }
  .site-nav.is-open li:nth-child(2) a { transition-delay: 0.14s; }
  .site-nav.is-open li:nth-child(3) a { transition-delay: 0.2s; }
  .site-nav.is-open li:nth-child(4) a { transition-delay: 0.26s; }
  .site-nav.is-open li:nth-child(5) a { transition-delay: 0.32s; }
  .site-nav > .btn {
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(18px);
    transition: transform 0.5s var(--ease-out) 0.4s, opacity 0.5s ease 0.4s;
  }
  .site-nav.is-open > .btn { opacity: 1; transform: none; }

  .hero { min-height: 92svh; }
  .hero__scroll { display: none; }

  .section-head { flex-direction: column; align-items: flex-start; gap: 1.2rem; }

  .split { grid-template-columns: 1fr; }
  .split__media { margin-inline: 0.9rem 1.4rem; }

  .cards-grid, .contact-grid, .detail-grid { grid-template-columns: 1fr; }
  .contact-info, .detail-cta { position: static; }

  .cta-band { flex-direction: column; align-items: flex-start; }
  .field-row { grid-template-columns: 1fr; gap: 0; }

  .site-footer__grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr; }
  .brand__sub { display: none; }
  .hero h1 { font-size: clamp(1.7rem, 7.4vw, 2.4rem); }
  .page-hero h1 { font-size: clamp(1.7rem, 7.4vw, 2.3rem); }
}
