/* ==========================================================================
   AIFIA — Premium layer
   Override caricato DOPO aifia.webflow.shared.css. Non modifica la struttura:
   solo rifinitura visiva (tipografia, profondità, hover, form).
   ========================================================================== */

:root {
  --accent: #486ae2;
  --accent-soft: #8ea7ff;
  --accent-grad: linear-gradient(160deg, #5d7ceb 0%, #3f61d9 100%);
  --navy: #0d2349;
  --navy-deep: #00173f;
  --hairline: rgba(13, 35, 73, 0.09);
  --shadow-card: 0 18px 40px -22px rgba(4, 15, 38, 0.45);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* ---------- Fondamenta ---------- */
html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(72, 106, 226, 0.22);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Tipografia ---------- */
.heading-jumbo {
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  text-wrap: balance;
}

.heading-jumbo-small,
.section-drk-h {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}

.paragraph-light {
  opacity: 0.78;
  line-height: 1.65;
  max-width: 62ch;
}

.paragraph-bigger.cc-bigger-white-light {
  opacity: 0.82;
  line-height: 1.6;
  max-width: 64ch;
  margin-left: auto;
  margin-right: auto;
}

/* Su fondo navy l'accent pieno è poco leggibile: si alza di un tono */
.blue-span {
  color: var(--accent-soft);
}

/* ---------- Navigazione ---------- */
.navigation {
  position: sticky;
  top: 0;
  z-index: 900;
  background-color: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--hairline);
}

/* ---------- Hero ---------- */
.intro-header {
  background-color: var(--navy-deep);
  background-image:
    radial-gradient(90rem 42rem at 78% -18%, rgba(72, 106, 226, 0.32), transparent 60%),
    radial-gradient(70rem 36rem at 8% 118%, rgba(113, 138, 226, 0.16), transparent 62%);
}

.intro-header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.intro-content {
  position: relative;
  z-index: 2;
}

/* ---------- Sistema bottoni ---------- */
.primary-button,
.secondary-button,
.tertiary-button {
  border-radius: 12px;
  letter-spacing: 0.07em;
  transition:
    transform 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out),
    background-color 0.25s var(--ease-out),
    border-color 0.25s var(--ease-out),
    color 0.25s var(--ease-out);
}

.primary-button {
  background-image: linear-gradient(180deg, #14315f 0%, #0d2349 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 1px 2px rgba(4, 15, 38, 0.2);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -10px rgba(13, 35, 73, 0.5);
}

.primary-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px -6px rgba(13, 35, 73, 0.4);
}

.primary-button.light {
  background-image: var(--accent-grad);
  border-color: rgba(255, 255, 255, 0.14);
}

.primary-button.light:hover {
  box-shadow: 0 12px 28px -10px rgba(72, 106, 226, 0.55);
}

.secondary-button {
  box-shadow: 0 1px 3px rgba(4, 15, 38, 0.12);
}

.secondary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -12px rgba(4, 15, 38, 0.45);
}

.secondary-button:active {
  transform: translateY(0);
}

.tertiary-button:hover {
  transform: translateY(-2px);
  background-color: rgba(255, 255, 255, 0.08);
}

/* ---------- Card numerate (missione) ---------- */
.card {
  background-color: transparent;
  background-image: linear-gradient(165deg, #142e5e 0%, #0d2349 70%);
  border: 1px solid rgba(143, 162, 255, 0.16);
  border-radius: 16px;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  transition:
    border-color 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out),
    translate 0.3s var(--ease-out);
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(142, 167, 255, 0.75), transparent);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

.card:hover {
  translate: 0 -4px;
  border-color: rgba(143, 162, 255, 0.42);
  box-shadow: var(--shadow-card);
}

.card:hover::before {
  opacity: 1;
}

.card-num-txt {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.2px rgba(142, 167, 255, 0.55);
}

.card-heading {
  margin-top: 20px;
  margin-bottom: 14px;
  font-size: 23px;
  letter-spacing: -0.01em;
}

.card-text {
  color: #c3cfec;
  font-size: 15px;
  line-height: 1.65;
}

/* ---------- Card soci (reasons, su fondo scuro) ---------- */
.reason {
  background-color: rgba(255, 255, 255, 0.025);
  border-color: rgba(143, 162, 255, 0.2);
  border-radius: 16px;
  padding: 30px 28px;
  transition: border-color 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}

.reason:hover {
  border-color: rgba(143, 162, 255, 0.42);
  background-color: rgba(255, 255, 255, 0.04);
}

.icon-block {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background-color: transparent;
  background-image: var(--accent-grad);
  box-shadow: 0 8px 18px -8px rgba(72, 106, 226, 0.6);
}

.icon-block img,
.reason-icon {
  filter: brightness(0) invert(1);
}

.reason-h {
  font-size: 20px;
  letter-spacing: -0.01em;
}

.card-list_inner li {
  margin-bottom: 10px;
  line-height: 1.6;
}

.card-list_inner li::marker {
  color: var(--accent-soft);
}

/* ---------- Blocchi documenti (compliance) ---------- */
.compliance-block {
  background-color: #fff;
  border-color: var(--hairline) var(--hairline) var(--hairline) var(--accent);
  border-radius: 14px;
  padding: 24px;
  transition:
    border-color 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out),
    translate 0.3s var(--ease-out);
}

.compliance-block:hover {
  translate: 0 -3px;
  border-color: rgba(72, 106, 226, 0.4) rgba(72, 106, 226, 0.4) rgba(72, 106, 226, 0.4) var(--accent);
  box-shadow: 0 18px 38px -24px rgba(13, 35, 73, 0.45);
}

.icon-round {
  width: 44px;
  height: 44px;
  background-color: transparent;
  background-image: var(--accent-grad);
  box-shadow: 0 8px 18px -8px rgba(72, 106, 226, 0.55);
}

.icon-round img {
  width: 22px;
  height: 22px;
  filter: brightness(0) invert(1);
}

.arrow-compliance {
  opacity: 0.5;
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}

.compliance-block:hover .arrow-compliance {
  transform: translate(3px, -3px);
  opacity: 1;
}

/* ---------- Form ---------- */
.text-field,
.w-input,
.w-select {
  background-color: #fcfdff;
  border: 1px solid #dbe1ef;
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.text-field:hover,
.w-input:hover {
  border-color: #b9c5e8;
}

.text-field:focus,
.w-input:focus,
.w-select:focus {
  background-color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(72, 106, 226, 0.13);
  outline: none;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
}

/* Checkbox/radio custom di Webflow */
.w-checkbox-input--inputType-custom.w--redirected-checked,
.w-form-formradioinput--inputType-custom.w--redirected-checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

/* Dropdown del datepicker */
.datepicker-container {
  border: 1px solid #e2e8f7;
  border-radius: 12px;
  box-shadow: 0 24px 50px -24px rgba(13, 35, 73, 0.4);
  overflow: hidden;
}

.datepicker-picked {
  color: var(--accent);
  font-weight: 700;
}

/* ---------- Footer ---------- */
.footer-wrap a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

.footer-wrap a:hover {
  color: var(--accent-soft);
}

/* ---------- Reveal allo scroll (solo browser che lo supportano) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .card,
    .compliance-block,
    .reason {
      animation: aifia-rise both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
  }
}

@keyframes aifia-rise {
  from {
    opacity: 0;
    translate: 0 26px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
