(function (Drupal, once) {
  Drupal.behaviors.oohHeroModal = {
    attach(context) {
      once('oohHeroModal', 'body', context).forEach(() => {
        const openBtn = document.getElementById('ooh-read-prologue');
        const closeBtn = document.getElementById('ooh-close-prologue');
        const modal = document.getElementById('ooh-prologue-modal');
        const backdrop = modal ? modal.querySelector('[data-close="1"]') : null;

        if (!openBtn || !closeBtn || !modal) {
          return;
        }

        const openModal = () => {
          modal.classList.add('is-open');
          modal.setAttribute('aria-hidden', 'false');
          document.body.classList.add('ooh-modal-open');
        };

        const closeModal = () => {
          modal.classList.remove('is-open');
          modal.setAttribute('aria-hidden', 'true');
          document.body.classList.remove('ooh-modal-open');
        };

        openBtn.addEventListener('click', openModal);
        closeBtn.addEventListener('click', closeModal);

        if (backdrop) {
          backdrop.addEventListener('click', closeModal);
        }

        document.addEventListener('keydown', (event) => {
          if (event.key === 'Escape' && modal.classList.contains('is-open')) {
            closeModal();
          }
        });
      });
    }
  };
})(Drupal, once);
.path-landingpage h1.page-title,
.path-landingpage .breadcrumb,
.path-landingpage .region-breadcrumb,
.path-landingpage .block-page-title-block {
  display: none !important;
}

.path-landingpage main {
  max-width: none !important;
  padding: 0 !important;
}

/* === landingpage chrome cleanup === */
.path-landingpage h1.page-title,
.path-landingpage .page-title,
.path-landingpage .breadcrumb,
.path-landingpage .region-breadcrumb,
.path-landingpage .block-system-breadcrumb-block,
.path-landingpage .block-page-title-block,
.path-landingpage nav.breadcrumb {
  display: none !important;
}

.path-landingpage main,
.path-landingpage .layout-content,
.path-landingpage .region-content,
.path-landingpage .block-system-main-block,
.path-landingpage .node__content,
.path-landingpage .content {
  max-width: none !important;
  width: 100% !important;
}

.path-landingpage main {
  margin: 0 !important;
  padding: 0 !important;
}

.path-landingpage .layout-content,
.path-landingpage .region-content,
.path-landingpage .block-system-main-block {
  margin: 0 !important;
  padding: 0 !important;
}

.path-landingpage .dialog-off-canvas-main-canvas {
  min-height: 100vh;
}

.path-landingpage .ooh-landing-shell,
.path-landingpage .ooh-hero {
  width: 100%;
}

.path-landingpage .ooh-hero {
  min-height: 100vh;
}

.path-landingpage .tabs,
.path-landingpage .action-links,
.path-landingpage .messages,
.path-landingpage .status-messages {
  display: none !important;
}
