/* ── Brand tokens ── */
    :root {
      --rsb-navy:       #16284A;
      --rsb-navy-dark:  #0E1C36;
      --rsb-teal:       #1E9E8E;
      --rsb-teal-light: rgba(30,158,142,0.10);
      --rsb-teal-deep:  #16786B;
      --rsb-border:     #E2E8F0;
      --rsb-bg-light:   #F4F6F8;
      --rsb-text-muted: #5A6678;
      --rsb-radius:     14px;
    }

    /* ── Typography ── */
    body {
      font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
      color: var(--rsb-navy);
      background: var(--rsb-bg-light);
    }
    h1, h2, h3, h4 { font-family: 'Archivo', sans-serif; }
    .font-mono { font-family: 'IBM Plex Mono', monospace; }

    /* ── Overline label (eyebrow above headings) ── */
    .label-overline {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--rsb-teal-deep);
    }

    /* ── Brand colours for Bootstrap overrides ── */
    .bg-navy       { background-color: var(--rsb-navy) !important; }
    .bg-navy-dark  { background-color: var(--rsb-navy-dark) !important; }
    .bg-teal-soft  { background-color: var(--rsb-teal-light) !important; }
    .text-navy     { color: var(--rsb-navy) !important; }
    .text-teal     { color: var(--rsb-teal) !important; }
    .text-teal-deep{ color: var(--rsb-teal-deep) !important; }
    .text-muted-rsb{ color: var(--rsb-text-muted) !important; }
    .border-rsb    { border-color: var(--rsb-border) !important; }

    /* ── Buttons ── */
    .btn-rsb-primary {
      background-color: var(--rsb-navy);
      color: #fff;
      border: none;
      border-radius: var(--rsb-radius);
      font-weight: 600;
      padding: 0.75rem 1.6rem;
      transition: background 0.18s ease, transform 0.16s ease, box-shadow 0.18s ease;
    }
    .btn-rsb-primary:hover {
      background-color: var(--rsb-navy-dark);
      color: #fff;
      transform: translateY(-2px);
      box-shadow: 0 14px 26px -12px rgba(22,40,74,0.55);
    }
    .btn-rsb-outline {
      background: transparent;
      color: var(--rsb-navy);
      border: 1.5px solid #C4CDDA;
      border-radius: var(--rsb-radius);
      font-weight: 600;
      padding: 0.72rem 1.5rem;
      transition: border-color 0.18s ease, background 0.18s ease, transform 0.16s ease;
    }
    .btn-rsb-outline:hover {
      border-color: var(--rsb-navy);
      background: rgba(22,40,74,0.04);
      color: var(--rsb-navy);
      transform: translateY(-2px);
    }
    .btn-rsb-white {
      background: #fff;
      color: var(--rsb-navy);
      border: none;
      border-radius: var(--rsb-radius);
      font-weight: 600;
      padding: 0.9rem 1.8rem;
      transition: background 0.18s ease, transform 0.16s ease, box-shadow 0.18s ease;
    }
    .btn-rsb-white:hover {
      background: #EAF7F4;
      color: var(--rsb-navy);
      transform: translateY(-2px);
      box-shadow: 0 16px 30px -14px rgba(0,0,0,0.45);
    }

    /* ── Cards ── */
    .rsb-card {
      border: 1px solid var(--rsb-border);
      border-radius: var(--rsb-radius);
      background: #fff;
      transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
    }
    .rsb-card:hover {
      transform: translateY(-4px);
      border-color: var(--rsb-teal);
      box-shadow: 0 18px 36px -22px rgba(22,40,74,0.35);
    }

    /* ── Icon box ── */
    .icon-box-navy {
      display: inline-flex;
      width: 48px;
      height: 48px;
      align-items: center;
      justify-content: center;
      background: var(--rsb-navy);
      border-radius: 12px;
    }
    .icon-box-teal {
      display: inline-flex;
      width: 50px;
      height: 50px;
      align-items: center;
      justify-content: center;
      background: var(--rsb-teal-light);
      border-radius: 12px;
    }

    /* ── Navbar ── */
    #site-header {
      position: sticky;
      top: 0;
      z-index: 1030;
      background: rgba(255,255,255,0.92);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
      border-bottom: 1px solid var(--rsb-border);
    }
    .navbar-nav .nav-link {
      font-size: 0.94rem;
      font-weight: 500;
      color: var(--rsb-navy);
    }
    .navbar-nav .nav-link:hover { color: var(--rsb-teal); }
    .navbar-toggler { border: none; }
    .navbar-toggler:focus { box-shadow: none; }

    /* ── Hero ── */
    #hero {
      background-color: #fff;
      background-image: radial-gradient(rgba(22,40,74,0.05) 1px, transparent 1px);
      background-size: 26px 26px;
      border-bottom: 1px solid #E8ECF1;
    }
    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 9px;
      background: rgba(30,158,142,0.10);
      border: 1px solid rgba(30,158,142,0.28);
      color: var(--rsb-teal-deep);
      font-family: 'IBM Plex Mono', monospace;
      font-size: 0.72rem;
      font-weight: 600;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      padding: 7px 14px;
      border-radius: 999px;
    }
    .hero-badge-dot {
      display: block;
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--rsb-teal);
      flex-shrink: 0;
    }
    #hero h1 {
      font-weight: 800;
      line-height: 1.06;
      letter-spacing: -0.02em;
      color: var(--rsb-navy);
    }

    /* ── Section headings ── */
    .section-title {
      font-weight: 700;
      line-height: 1.1;
      letter-spacing: -0.015em;
      color: var(--rsb-navy);
    }

    /* ── Ciclo BIM — step connector ── */
    .ciclo-step-header { position: relative; }
    .ciclo-connector {
      position: absolute;
      top: 15px;
      height: 2px;
      background: #D5DEE8;
      z-index: 0;
    }
    .ciclo-connector.right { left: 50%; right: 0; }
    .ciclo-connector.both  { left: 0;   right: 0; }
    .ciclo-connector.left  { left: 0;   right: 50%; }
    .ciclo-number {
      position: relative;
      z-index: 1;
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background: var(--rsb-navy);
      color: #fff;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-family: 'IBM Plex Mono', monospace;
      font-size: 0.72rem;
      font-weight: 600;
    }
    .ciclo-number.active { background: var(--rsb-teal); }
    .ciclo-item {
      display: flex;
      align-items: center;
      gap: 11px;
      background: #fff;
      border: 1px solid var(--rsb-border);
      border-radius: 10px;
      padding: 13px 15px;
      font-size: 0.92rem;
      font-weight: 500;
      color: var(--rsb-navy);
    }
    .ciclo-dot {
      flex-shrink: 0;
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--rsb-teal);
    }

    /* ── Processo — step number ── */
    .step-number {
      font-family: 'Archivo', sans-serif;
      font-weight: 800;
      font-size: 2.6rem;
      line-height: 1;
      color: rgba(22,40,74,0.12);
    }

    /* ── CTA Banner ── */
    #cta {
      background-color: var(--rsb-navy);
      background-image:
        linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
      background-size: 36px 36px;
    }

    /* ── Footer ── */
    #contatti {
      background-color: var(--rsb-navy-dark);
      color: rgba(255,255,255,0.7);
    }
    #contatti .footer-heading {
      font-family: 'IBM Plex Mono', monospace;
      font-size: 0.68rem;
      font-weight: 600;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: #5FD0C0;
    }
    #contatti a {
      color: rgba(255,255,255,0.7);
      text-decoration: none;
      font-size: 0.95rem;
    }
    #contatti a:hover { color: #fff; }
    .footer-contact-label {
      display: block;
      font-size: 0.78rem;
      color: rgba(255,255,255,0.45);
      margin-bottom: 2px;
    }
    .footer-divider {
      border-top: 1px solid rgba(255,255,255,0.12);
    }
    .footer-logo-wrap {
      display: inline-flex;
      background: #fff;
      border-radius: 12px;
      padding: 11px 16px;
    }

    /* ── Selection colour ── */
    ::selection { background: var(--rsb-teal); color: #fff; }

    /* Salvaguardia: evita scroll orizzontale della pagina se un tooltip
       dell'orbita sfiora il bordo del viewport su schermi stretti */
    html, body { overflow-x: hidden; }

    /* ANIMAZIONE ORBITALE BIM: rotazione via CSS, velocità pilotata da JS
       tramite custom property transizionata + Animation.playbackRate */
    @property --orbit-speed {
      syntax: '<number>';
      inherits: true;
      initial-value: 1;
    }

    .bim-orbit-container {
      --orbit-radius: 160px;
      --orbit-speed: 1;
      transition: --orbit-speed 0.8s ease-in-out;
      position: relative;
      width: 420px;
      height: 420px;
      max-width: 100%;
      margin: 0 auto;
    }

    /* Anello tratteggiato decorativo */
    .bim-orbit-ring {
      position: absolute;
      inset: 10%;
      border: 2px dashed #C5CFDA;
      border-radius: 50%;
      pointer-events: none;
    }

    /* SVG inner ring: tre frecce + DESIGN/BUILD/OPERATE — ruota solidale con le icone */
    .bim-orbit-svg {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      animation: rsb-arm-spin 30s linear infinite;
      pointer-events: none;
      overflow: visible;
    }


    /* Logo RSBIM al centro */
    .bim-orbit-center {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      z-index: 3;
    }
    .bim-orbit-center img {
      width: 100px;
      height: 100px;
      object-fit: contain;
      display: block;
    }

    /*
      Tecnica orbita:
      - .orbit-arm è un div 0×0 posizionato al centro del contenitore.
        Ruota da 0° a 360° in 30s. Ogni satellite riceve un
        animation-delay negativo pari a -(indice × 3s) così sono
        distribuiti equidistanti a 36° ciascuno senza keyframe multipli.
      - .orbit-planet è posizionato a (--orbit-radius, 0) rispetto al
        braccio e contro-ruota per mantenere icona e label sempre dritti.
    */
    .orbit-arm {
      position: absolute;
      top: 50%;
      left: 50%;
      width: 0;
      height: 0;
      animation: rsb-arm-spin 30s linear infinite;
      animation-delay: calc(var(--i) * -3s);
    }

    @keyframes rsb-arm-spin {
      from { transform: rotate(0deg); }
      to   { transform: rotate(360deg); }
    }

    .orbit-planet {
      position: absolute;
      left: var(--orbit-radius);
      top: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 5px;
      animation: rsb-planet-counter 30s linear infinite;
      animation-delay: calc(var(--i) * -3s);
    }

    @keyframes rsb-planet-counter {
      from { transform: translate(-50%, -50%) rotate(0deg); }
      to   { transform: translate(-50%, -50%) rotate(-360deg); }
    }

    /* Cerchio teal chiaro dietro l'icona */
    .orbit-icon-wrap {
      background: #E6F5F2;
      border-radius: 50%;
      padding: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 12px rgba(22,40,74,0.14);
    }
    .orbit-icon-wrap img {
      width: 44px;
      height: 44px;
      object-fit: contain;
      display: block;
      transition: transform 0.15s ease;
    }

    /* Slot che racchiude solo l'icona: ancora di posizionamento per il tooltip,
       così eredita naturalmente il counter-rotate di .orbit-planet */
    .orbit-icon-slot {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    /* Tooltip "Scopri di più": nessuna pillola, solo testo, slide puro (no fade) */
    .orbit-tooltip {
      position: absolute;
      top: 50%;
      white-space: nowrap;
      font-family: 'IBM Plex Sans', system-ui, sans-serif;
      font-size: 12.5px;
      font-weight: 600;
      color: #16284A;
      background: transparent;
      pointer-events: none;
      opacity: 0;
      z-index: 5;
      transition: transform 0.22s ease-out;
    }
    .orbit-tooltip.slide-right {
      left: 100%;
      margin-left: 10px;
      transform: translate(0, -50%) translateX(-10px);
    }
    .orbit-tooltip.slide-left {
      right: 100%;
      margin-right: 10px;
      transform: translate(0, -50%) translateX(10px);
    }
    /* Varianti polo alto/basso: tooltip centrato orizzontalmente sull'icona,
       slide verticale invece che orizzontale */
    .orbit-tooltip.slide-up {
      top: auto;
      bottom: 100%;
      left: 50%;
      margin-bottom: 10px;
      transform: translate(-50%, 10px);
    }
    .orbit-tooltip.slide-down {
      top: 100%;
      left: 50%;
      margin-top: 10px;
      transform: translate(-50%, -10px);
    }
    .orbit-tooltip.is-visible { opacity: 1; }
    .orbit-tooltip.slide-right.is-visible { transform: translate(0, -50%) translateX(0); }
    .orbit-tooltip.slide-left.is-visible  { transform: translate(0, -50%) translateX(0); }
    .orbit-tooltip.slide-up.is-visible    { transform: translate(-50%, 0); }
    .orbit-tooltip.slide-down.is-visible  { transform: translate(-50%, 0); }

    /* Label testuale — rimane dritta grazie al counter-rotate */
    .orbit-label {
      font-size: 11px;
      font-weight: 500;
      color: #16284A;
      text-align: center;
      line-height: 1.2;
      max-width: 76px;
      text-shadow: 0 1px 6px rgba(255,255,255,0.95), 0 0 12px rgba(255,255,255,0.9);
    }

    /* Responsive mobile: raggio ridotto, label nascoste, icone più piccole */
    @media (max-width: 767px) {
      .bim-orbit-container {
        --orbit-radius: 110px;
        width: 270px;
        height: 270px;
      }
      .bim-orbit-center img {
        width: 72px;
        height: 72px;
      }
      .orbit-icon-wrap { padding: 7px; }
      .orbit-icon-wrap img {
        width: 32px;
        height: 32px;
      }
      .orbit-label { display: none; }
    }