/* BIOMED REWIRED - responsive hero. Loaded last on purpose.
   Goal: the first screen shows what the site is for and where to start.
   - The hero is sized to the space below the header (--hdr is measured by js/app.js), but it is only a minimum:
     it grows when the text needs more room, so nothing is ever clipped.
   - 1000px and wider: text panel on the left, team photo on the right (iPad landscape, laptops, desktops).
   - Narrower: text and Start Exploring first, photo below. On a short phone the bottom of the photo continues below the fold.
   - The team photo is never stretched. On wide layouts it is cropped only slightly (about 5% off each side) so every face stays in view. */
:root { --hdr: 113px; }

/* Fill the first screen, capped so very tall screens do not leave a large empty hero */
.hero {
  min-height: clamp(440px, calc(100vh - var(--hdr)), 820px) !important;
  min-height: clamp(440px, calc(100dvh - var(--hdr)), 820px) !important;
}

/* Stacked layout (phones and tablets in portrait): spare height becomes breathing room around the text */
.hero .hero-inner.hero-glass { flex: 1 1 auto; align-content: center; }
.hero .hero-team { flex: 0 0 auto; }

/* Side by side: iPad landscape, laptops, desktops */
@media (min-width: 1000px) {
  .hero { align-items: center !important; }
  .hero .hero-inner h1 { white-space: normal !important; }
  .hero-photo { align-self: center !important; }
  .hero-photo .hero-team {
    width: 100%; height: auto; aspect-ratio: 1.65 / 1;
    object-fit: cover; object-position: 50% 38%;
  }
}

/* Phones: keep the type comfortable and the buttons easy to reach */
@media (max-width: 760px) {
  .hero .hero-inner.hero-glass { padding: 20px 18px 22px !important; }
  .hero .hero-inner .lede { line-height: 1.35; }
  .hero .hero-inner .hero-actions { gap: 10px; }
}

/* Very short landscape screens (a phone turned sideways): do not force a full-height hero */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { min-height: 0 !important; }
}

/* Tablet portrait (761-999px): one column, text and buttons first, photo below */
@media (min-width: 761px) and (max-width: 999px) {
  .hero .hero-inner.hero-glass { display: block !important; padding: 36px 40px 32px !important; align-content: center; }
  .hero .hero-inner .lede { max-width: 38em; }
  .hero .hero-inner .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
}

/* Phones: no forced full-height hero. The hero is only as tall as its content, so the photo follows the buttons directly
   and "Where to start" comes into view with less scrolling. (Tablets and desktops still fill the first screen.) */
@media (max-width: 760px) {
  .hero { min-height: 0 !important; }
  .hero .hero-inner.hero-glass { flex: 0 0 auto; align-content: start; }
}
