/* Medèn Àgan — Prospero */
:root {
  --navy: #021b73;
  --navy-deep: #010928;
  --navy-mid: #02165c;
  --sky: #56aeff;
  --sky-soft: #9dceff;
  --ink: #0e131f;
  --ink-soft: #3a4254;
  --fog: #f3f2f2;
  --paper: #f7f8fb;
  --white: #ffffff;
  --line: rgba(2, 27, 115, 0.12);
  --shadow-soft: 0 18px 50px rgba(2, 27, 115, 0.08);
  --radius: 4px;
  --max: 1120px;
  --header-h: 72px;
  --font-display: "Bricolage Grotesque", "Segoe UI", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(86, 174, 255, 0.18), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(2, 27, 115, 0.08), transparent 50%),
    linear-gradient(180deg, #eef3fb 0%, var(--paper) 35%, var(--white) 100%);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--sky);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  color: var(--navy-deep);
}

h1 {
  font-size: clamp(2.4rem, 5.5vw, 4.2rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 650;
}

p {
  margin: 0 0 1em;
  color: var(--ink-soft);
}

p:last-child {
  margin-bottom: 0;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  backdrop-filter: blur(14px);
  background: rgba(247, 248, 251, 0.82);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--navy-deep);
  flex-shrink: 0;
}

.brand img {
  height: calc(var(--header-h) * 0.8);
  width: auto;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--navy);
  background: rgba(2, 27, 115, 0.06);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown > button {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-dropdown > button:hover,
.nav-dropdown.open > button {
  color: var(--navy);
  background: rgba(2, 27, 115, 0.06);
}

.nav-dropdown > button::after {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 200px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  padding: 0.4rem;
  display: none;
}

.nav-dropdown.open .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  display: block;
}

.dropdown-panel a {
  display: block;
  padding: 0.65rem 0.8rem;
}

.nav-cta {
  margin-left: 0.4rem;
  background: var(--navy) !important;
  color: var(--white) !important;
  padding: 0.6rem 1rem !important;
}

.nav-cta:hover {
  background: var(--navy-mid) !important;
  color: var(--white) !important;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  margin-left: 0.15rem;
  padding: 0;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  line-height: 1;
  background: rgba(2, 27, 115, 0.06);
  border: 1px solid transparent;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.header-tools .lang-switch {
  margin-left: 0;
}

.lang-switch:hover,
.lang-switch:focus-visible {
  background: rgba(2, 27, 115, 0.1);
  border-color: rgba(2, 27, 115, 0.18);
  outline: none;
}

.lang-flag {
  display: block;
  width: 1.25rem;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.lang-switch--footer {
  width: 2rem;
  height: 2rem;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.lang-switch--footer:hover,
.lang-switch--footer:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
  cursor: pointer;
  font-family: var(--font-body);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--navy);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--navy-mid);
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--navy);
  border-color: rgba(2, 27, 115, 0.28);
}

.btn-secondary:hover {
  border-color: var(--navy);
  color: var(--navy);
  background: rgba(255, 255, 255, 0.55);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-items: stretch;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(115deg, rgba(1, 9, 40, 0.92) 0%, rgba(2, 27, 115, 0.78) 48%, rgba(2, 22, 92, 0.55) 100%),
    radial-gradient(800px 500px at 75% 40%, rgba(86, 174, 255, 0.45), transparent 60%),
    radial-gradient(600px 400px at 20% 80%, rgba(86, 174, 255, 0.18), transparent 55%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2356aeff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-size: cover, auto, auto, 60px 60px;
}

.hero-circuits {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, 1240px);
  margin: auto;
  padding: clamp(2.5rem, 6vh, 4.5rem) 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.25fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.hero-copy,
.hero-visual {
  color: var(--white);
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 1.1rem;
  color: var(--sky);
}

.hero h1 {
  color: var(--white);
  max-width: 14ch;
  margin-bottom: 0.85rem;
}

.hero .lede {
  max-width: 38ch;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: rgba(255, 255, 255, 0.86);
  margin: 0;
}

.hero .btn-primary {
  background: var(--sky);
  color: var(--navy-deep);
}

.hero .btn-primary:hover {
  background: var(--sky-soft);
  color: var(--navy-deep);
}

.hero .btn-secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.35);
}

.hero .btn-secondary:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.hero-art-wrap {
  position: relative;
  width: min(100%, 560px);
  margin-left: auto;
}

.hero-art {
  width: 100%;
  display: block;
  border-radius: 14px;
  box-shadow: 0 28px 70px rgba(1, 9, 40, 0.4);
  position: relative;
  z-index: 1;
}

.hero-traces path {
  opacity: 0.85;
}

.hero-pads circle {
  opacity: 0.75;
}

@media (prefers-reduced-motion: reduce) {
  .hero-packets {
    display: none;
  }
}

.impact {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
  border-bottom: 1px solid var(--line);
}

.impact-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(180px, 0.75fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.impact-copy {
  min-width: 0;
}

.impact-figure {
  display: flex;
  justify-content: center;
  align-items: center;
}

.impact-figure img {
  width: min(100%, 320px);
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
}

.impact-label {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 1.25rem;
}

.impact-stage {
  min-height: 7.5rem;
  display: grid;
  align-items: center;
}

.impact-msg {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.2vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--navy-deep);
  max-width: 22ch;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

.impact-msg.is-active {
  opacity: 1;
  transform: translateY(0);
}

.impact-dots {
  display: flex;
  gap: 0.45rem;
  margin-top: 1.5rem;
}

.impact-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(2, 27, 115, 0.2);
  cursor: pointer;
}

.impact-dots button[aria-current="true"] {
  background: var(--navy);
}

.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.section-head {
  max-width: 40rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.section-head p {
  font-size: 1.1rem;
}

.section-muted {
  background: linear-gradient(180deg, rgba(243, 242, 242, 0.65), rgba(255, 255, 255, 0.2));
  border-block: 1px solid var(--line);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.list-plain {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-plain li {
  position: relative;
  padding: 0.85rem 0 0.85rem 1.5rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}

.list-plain li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.25rem;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--sky);
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 1.75rem;
  margin-top: 2.75rem;
}

.capability-grid + .cta-row {
  margin-top: 2.75rem;
}

.capability {
  padding: 0.25rem 0 0.5rem;
  text-align: center;
}

.capability-icon {
  display: grid;
  place-items: center;
  width: 8.25rem;
  height: 8.25rem;
  margin: 0 auto 1.1rem;
  color: var(--navy);
  overflow: visible;
}

.capability-icon svg {
  width: 5.55rem;
  height: 5.55rem;
  overflow: visible;
  flex-shrink: 0;
}

.capability-rule {
  width: 100%;
  height: 0;
  border-top: 2px solid var(--navy);
  margin: 0 0 1rem;
}

.capability h3 {
  margin-bottom: 0.45rem;
}

.capability p {
  font-size: 0.98rem;
  margin-inline: auto;
  max-width: 28ch;
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 0;
}

.step {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.step:last-child {
  border-bottom: 1px solid var(--line);
}

.step-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sky);
  line-height: 1.2;
}

.step h3 {
  margin-bottom: 0.35rem;
}

.page-hero {
  padding: clamp(3rem, 7vw, 4.5rem) 0 2rem;
}

/* Inner pages — background band (excludes muted pre-footer + footer) */
.page-prospero {
  --page-bg-image: url("../img/background-prospero-page.jpg");
  --page-bg-opacity: 0.62;
  --page-bg-wash: linear-gradient(
    180deg,
    rgba(247, 248, 251, 0.28) 0%,
    rgba(247, 248, 251, 0.12) 40%,
    rgba(255, 255, 255, 0.35) 100%
  );
}

.page-automazioni {
  --page-bg-image: url("../img/background-automation-page.jpg?v=2");
  --page-bg-opacity: 0.38;
  --page-bg-wash: linear-gradient(
    180deg,
    rgba(247, 248, 251, 0.5) 0%,
    rgba(247, 248, 251, 0.32) 40%,
    rgba(255, 255, 255, 0.55) 100%
  );
}

.page-scenari {
  --page-bg-image: url("../img/background-scenari-page.jpg?v=1");
  --page-bg-opacity: 0.38;
  --page-bg-wash: linear-gradient(
    180deg,
    rgba(247, 248, 251, 0.5) 0%,
    rgba(247, 248, 251, 0.32) 40%,
    rgba(255, 255, 255, 0.55) 100%
  );
}

.page-servizi {
  --page-bg-image: url("../img/background-servizi-page.jpg?v=1");
  --page-bg-opacity: 0.38;
  --page-bg-wash: linear-gradient(
    180deg,
    rgba(247, 248, 251, 0.5) 0%,
    rgba(247, 248, 251, 0.32) 40%,
    rgba(255, 255, 255, 0.55) 100%
  );
}

.page-servizi .split,
.page-automazioni .split,
.page-integrazioni .split {
  align-items: stretch;
}

.page-servizi .split > article,
.page-automazioni .split > article,
.page-integrazioni .split > article {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.page-servizi .split > article > .list-plain,
.page-automazioni .split > article > .list-plain,
.page-integrazioni .split > article > .list-plain {
  margin-top: auto;
}

.page-bg-band {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.page-bg-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--page-bg-image);
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  opacity: var(--page-bg-opacity, 0.62);
  pointer-events: none;
}

.page-bg-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(
    --page-bg-wash,
    linear-gradient(
      180deg,
      rgba(247, 248, 251, 0.28) 0%,
      rgba(247, 248, 251, 0.12) 40%,
      rgba(255, 255, 255, 0.35) 100%
    )
  );
  pointer-events: none;
}

.page-bg-band .page-hero,
.page-bg-band .section {
  position: relative;
  z-index: 1;
  background: transparent;
}

.page-hero .eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.page-hero h1 {
  max-width: 16ch;
}

.page-hero .lede {
  max-width: 42ch;
  font-size: 1.15rem;
}

.page-hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(240px, 0.95fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.page-hero-media {
  justify-self: end;
  width: min(100%, 520px);
}

.page-hero-media img {
  display: block;
  width: 100%;
  height: auto;
}

.page-hero-media--logo {
  width: min(100%, 520px);
}

.page-hero-media--logo img {
  object-fit: contain;
}

.page-hero-media--mascot {
  width: min(100%, 280px);
}

.page-hero-media--mascot img {
  object-fit: contain;
}

.page-clearcompany .page-hero--cc {
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.page-clearcompany .page-hero--cc .page-hero-copy h2 {
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.page-clearcompany .page-hero--cc .page-hero-copy p {
  max-width: 42ch;
}

.page-clearcompany .page-hero--cc .page-hero-media--logo {
  width: min(100%, 560px);
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 2.5rem;
}

.scenario {
  padding-top: 1.25rem;
  border-top: 2px solid var(--sky);
}

.scenario h3 {
  margin-bottom: 0.5rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.chip {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--navy);
  background: rgba(86, 174, 255, 0.16);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius);
}

.flow {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  align-items: stretch;
  margin: 2rem 0;
}

.flow-node {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1rem 0.85rem;
  text-align: center;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--navy-deep);
  min-height: 88px;
  display: grid;
  place-items: center;
}

.flow-node.accent {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* Integrazioni — ellissi statiche a destra (blocchi 1–2); orbite a tutta band */
.page-integrazioni .integ-cosmos-band {
  --page-bg-image: none;
  --page-bg-opacity: 0;
  --page-bg-wash: linear-gradient(
    165deg,
    rgba(247, 250, 255, 0.92) 0%,
    rgba(232, 242, 255, 0.55) 42%,
    rgba(255, 255, 255, 0.75) 100%
  );
}

.integ-orbits-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.integ-orbits-bg .orbit {
  fill: none;
  stroke: rgba(2, 27, 115, 0.18);
  stroke-width: 1.4;
}

.integ-orbits-bg .orbit-soft {
  stroke: rgba(86, 174, 255, 0.16);
  stroke-width: 1.15;
}

.integ-top {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.integ-copy {
  min-width: 0;
}

.integ-copy .page-hero {
  padding-top: clamp(3rem, 7vw, 4.5rem);
  padding-bottom: 1.25rem;
}

.integ-copy .page-hero .lede {
  max-width: 36rem;
}

.integ-copy .section {
  padding-top: clamp(1.75rem, 4vw, 2.75rem);
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.integ-copy .section-head {
  max-width: none;
  margin-bottom: 0;
}

.page-integrazioni .section-soft {
  position: relative;
  z-index: 1;
  background: transparent;
}

.integ-bodies {
  position: relative;
  min-height: 320px;
  height: 100%;
  pointer-events: none;
}

.integ-body {
  position: absolute;
  width: clamp(7.2rem, 12vw, 10rem);
  aspect-ratio: 1.7 / 1;
  margin: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0.55rem 0.85rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.7rem, 1.05vw, 0.86rem);
  line-height: 1.15;
  color: rgba(2, 27, 115, 0.62);
  background: rgba(86, 174, 255, 0.16);
  border: 1.5px solid rgba(2, 27, 115, 0.3);
  backdrop-filter: blur(3px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35) inset;
  opacity: 0.94;
  transform: translate(-50%, -50%);
}

.integ-body span {
  max-width: 12ch;
}

.integ-body.accent {
  background: rgba(2, 27, 115, 0.12);
  border-color: rgba(86, 174, 255, 0.48);
  color: rgba(2, 27, 115, 0.68);
}

/* Costellazione statica nella colonna destra (blocchi 1–2) */
.integ-body.b1 {
  left: 28%;
  top: 22%;
}
.integ-body.b2 {
  left: 68%;
  top: 18%;
}
.integ-body.b3 {
  left: 48%;
  top: 48%;
}
.integ-body.b4 {
  left: 22%;
  top: 72%;
}
.integ-body.b5 {
  left: 72%;
  top: 78%;
}

@media (max-width: 960px) {
  .integ-top {
    grid-template-columns: 1fr;
  }

  .integ-bodies {
    min-height: 240px;
    margin-bottom: 0.5rem;
    order: -1;
  }

  .integ-body {
    width: clamp(6.2rem, 28vw, 8.5rem);
  }
}

.legal-doc {
  max-width: 46rem;
}

.legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.legal-toc a {
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.legal-toc a:hover {
  text-decoration: underline;
}

.legal-doc h2 {
  margin-top: 2.25rem;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.legal-doc h3 {
  margin-top: 1.35rem;
}

.legal-doc ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.legal-doc li {
  margin-bottom: 0.45rem;
}

.legal-doc article:first-of-type h2 {
  margin-top: 0;
}

.form {
  position: relative;
  display: grid;
  gap: 1rem;
  max-width: 36rem;
}

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

.form-row {
  display: grid;
  gap: 0.4rem;
}

.form-row.two {
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  font-weight: 650;
  font-size: 0.92rem;
  color: var(--navy-deep);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(2, 27, 115, 0.22);
  background: var(--white);
  border-radius: var(--radius);
  padding: 0.8rem 0.9rem;
  font: inherit;
  color: var(--ink);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(86, 174, 255, 0.55);
  border-color: var(--sky);
}

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

.form-note {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.form-status {
  display: none;
  padding: 0.9rem 1rem;
  background: rgba(86, 174, 255, 0.15);
  border-left: 3px solid var(--navy);
  color: var(--navy-deep);
  font-weight: 600;
}

.form-status.is-visible {
  display: block;
}

.contact-aside {
  display: grid;
  gap: 1.25rem;
}

.contact-split {
  align-items: stretch;
}

.contact-split .form {
  display: flex;
  flex-direction: column;
  max-width: none;
  height: 100%;
}

.contact-split .form-actions {
  display: grid;
  gap: 1rem;
  margin-top: auto;
}

.contact-split .form-actions .btn-primary {
  width: 100%;
  justify-content: center;
}

.contact-split .contact-aside {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.contact-consult-cta {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  margin-top: auto;
  box-sizing: border-box;
  text-align: center;
}

.contact-item strong {
  display: block;
  font-family: var(--font-display);
  color: var(--navy-deep);
  margin-bottom: 0.2rem;
}

.contact-item a {
  text-decoration: none;
  font-weight: 650;
}

.cert-trust {
  padding: clamp(3rem, 7vw, 4.5rem) 0;
  background: linear-gradient(120deg, rgba(2, 27, 115, 0.04), rgba(86, 174, 255, 0.1)), var(--white);
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.cert-trust-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

.cert-trust-badge {
  justify-self: start;
  width: min(100%, 260px);
}

.cert-trust-badge.reveal {
  opacity: 0;
  transform: translateX(-70%);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

.cert-trust-badge.reveal.is-in {
  opacity: 1;
  transform: translateX(0);
}

.cert-trust-badge img {
  width: 100%;
  max-width: 260px;
  display: block;
}

.cert-trust-copy {
  min-width: 0;
}

.cert-trust .eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

.cert-trust h2 {
  max-width: 22ch;
}

.cert-trust p {
  max-width: 58ch;
}

.partner-banner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.site-footer {
  margin-top: 0;
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.78);
  padding: 3rem 0 2rem;
}

.site-footer a {
  color: var(--sky-soft);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand {
  margin-bottom: 0.75rem;
}

.footer-brand img {
  display: block;
  width: min(100%, 220px);
  height: auto;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

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

.footer-bottom {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: 0.9rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (max-width: 960px) {
  .hero-inner,
  .impact-inner,
  .split,
  .scenario-grid,
  .footer-grid,
  .partner-banner,
  .flow,
  .page-hero-split {
    grid-template-columns: 1fr;
  }

  .page-hero-media {
    justify-self: center;
    width: min(100%, 420px);
    order: -1;
  }

  .impact-figure {
    order: -1;
  }

  .impact-figure img {
    width: min(100%, 220px);
  }

  .hero-visual {
    justify-content: center;
  }

  .hero-art-wrap {
    width: min(100%, 480px);
    margin: 0 auto;
  }

  .capability-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .cert-trust-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cert-trust-badge {
    justify-self: center;
  }

  .cert-trust h2,
  .cert-trust p {
    margin-inline: auto;
  }

  .cert-trust .cta-row {
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .capability-grid {
    grid-template-columns: 1fr;
    max-width: 26rem;
    margin-inline: auto;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .header-tools {
    margin-left: auto;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    margin-left: 0;
    background: rgba(247, 248, 251, 0.97);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1.25rem 1.25rem;
    gap: 0.15rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
  }

  body.nav-open .nav {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .nav a,
  .nav-dropdown > button {
    width: 100%;
    justify-content: space-between;
    text-align: left;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 0.5rem;
    text-align: center;
  }

  .dropdown-panel {
    position: static;
    box-shadow: none;
    border: 0;
    background: transparent;
    padding: 0 0 0 0.5rem;
  }

  .nav-dropdown.open .dropdown-panel {
    display: grid;
  }

  .form-row.two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .step {
    grid-template-columns: 3rem 1fr;
  }

  .brand-text {
    display: none;
  }

  .capability-icon {
    width: 6rem;
    height: 6rem;
  }

  .capability-icon svg {
    width: 4rem;
    height: 4rem;
  }
}

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

/* Consultation booking */
.consult-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: start;
}

.consult-notes {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
  max-width: 40rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.55;
}

.consult-notes strong {
  color: var(--navy-deep);
}

.booking-panel {
  display: grid;
  gap: 1.25rem;
}

.cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.cal-toolbar h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--navy-deep);
}

.cal-nav {
  display: inline-flex;
  gap: 0.4rem;
}

.cal-nav button {
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.cal-nav button:hover {
  border-color: rgba(2, 27, 115, 0.35);
  background: rgba(86, 174, 255, 0.12);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.cal-weekday {
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0.35rem 0;
}

.cal-day {
  aspect-ratio: 1;
  border: 1px solid transparent;
  background: rgba(2, 27, 115, 0.04);
  color: var(--navy-deep);
  border-radius: var(--radius);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.cal-day:hover:not(:disabled) {
  background: rgba(86, 174, 255, 0.18);
  border-color: rgba(86, 174, 255, 0.45);
}

.cal-day.is-empty {
  visibility: hidden;
  pointer-events: none;
}

.cal-day.is-disabled,
.cal-day.is-full {
  opacity: 0.38;
  cursor: not-allowed;
  background: transparent;
}

.cal-day.is-selected {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.slots-panel {
  display: grid;
  gap: 0.75rem;
}

.slots-panel h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--navy-deep);
  text-transform: capitalize;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.slot-btn {
  border: 1px solid rgba(2, 27, 115, 0.22);
  background: var(--white);
  color: var(--navy-deep);
  border-radius: var(--radius);
  padding: 0.7rem 0.75rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.slot-btn:hover:not(:disabled) {
  border-color: var(--sky);
  background: rgba(86, 174, 255, 0.12);
}

.slot-btn.is-selected {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.slot-btn.is-taken,
.slot-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
}

.cal-hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.channel-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.channel-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid rgba(2, 27, 115, 0.22);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem;
  cursor: pointer;
  font-weight: 650;
  color: var(--navy-deep);
  background: var(--white);
}

.channel-option:has(input:checked) {
  border-color: var(--navy);
  background: rgba(86, 174, 255, 0.12);
}

.channel-option input {
  width: auto;
  margin: 0;
}

.consult-form {
  max-width: none;
}

@media (max-width: 960px) {
  .consult-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .slots-grid,
  .channel-options {
    grid-template-columns: 1fr;
  }
}
