/* SensciLab – global mobile fixes (load after app.css / magicpen-glass.css) */

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

img,
video,
svg,
embed {
  max-width: 100%;
  height: auto;
}

iframe {
  max-width: 100%;
}

table {
  max-width: 100%;
}

pre,
code {
  max-width: 100%;
  overflow-x: auto;
}

@media (max-width: 991.98px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Mono hero / section headings */
  h1.display-4 {
    font-size: clamp(1.65rem, 5.5vw, 2.75rem);
    line-height: 1.2;
  }

  .display-3 {
    font-size: clamp(1.85rem, 6vw, 3rem);
  }

  .display-2 {
    font-size: clamp(2rem, 7vw, 3.25rem);
  }

  .display-1 {
    font-size: clamp(2.15rem, 8vw, 3.5rem);
  }

  .letter-spacing-2px {
    letter-spacing: 0.04em;
  }

  /* MagicPen glass panels */
  .magicpen-hero-panel {
    padding: 1.25rem 1.1rem !important;
    border-radius: 14px;
  }

  .magicpen-hero-panel .magicpen-hero-sub {
    font-size: 1rem !important;
    line-height: 1.5 !important;
  }

  .section-xl,
  .section-lg {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  /* Full-bleed background sections: avoid horizontal bleed */
  .bg-image.parallax {
    background-size: cover;
    background-position: center;
  }

  .navbar .navbar-brand img {
    max-height: 48px;
    width: auto;
  }

  /* Nav links: easier taps when menu open */
  .navbar .nav .nav-item .nav-link {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }
}

@media (max-width: 575.98px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  h1.display-4 {
    font-size: clamp(1.45rem, 6.5vw, 2.25rem);
  }

  .section-title h2 {
    font-size: 1.35rem;
    line-height: 1.25;
  }

  .lead {
    font-size: 1rem;
  }
}
