/* ==========================================================================
   Homepage hero + customer-logo bar on tablets and phones.
   Load AFTER teradix-ds-blue6.css / teradix-v6.css. Media-scoped only: the
   desktop layout (981px and up) is not touched.

   Below 981px the desktop hero (a one-screen stage with the copy laid over
   the scene and the logo bar pinned to its foot) cannot hold: the copy
   outgrows the fixed height and runs over the drawing. Here it becomes a
   plain stack: copy, then the scene in its own frame, then the logo bar.
   ========================================================================== */

@media (max-width: 980px) {
  /* the stage stops being one fixed screen and grows with its content */
  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    min-height: 0;
    padding: 0;
    background: var(--ground, #080E5E);
  }

  /* 1. copy: full width, never on top of the drawing */
  .hero .hero__copy {
    order: 1;
    width: auto;
    max-width: none;
    padding-block: clamp(36px, 7vw, 64px) clamp(28px, 5vw, 44px);
    padding-inline: var(--pad);
  }
  .hero .hero__copy .badge { margin-bottom: clamp(20px, 3.4vw, 28px); }
  .hero .hero__copy h1 {
    font-size: clamp(32px, 6.9vw, 54px);
    max-width: 16ch;
    margin-bottom: clamp(14px, 2.4vw, 20px);
    text-align: start;
  }
  .hero .hero__copy .lead {
    font-size: clamp(16px, 2.35vw, 19px);
    line-height: 1.55;
    max-width: 52ch;
    margin-bottom: clamp(24px, 3.6vw, 32px);
    text-align: start;
  }
  .hero .hero__actions { margin-bottom: clamp(22px, 3.2vw, 28px); }

  /* the film button: its two lines never wrap out of the box */
  .hero .film { flex: 0 0 auto; padding: 0; padding-inline-end: 20px; }
  .hero .film__poster { flex: 0 0 auto; }
  .hero .film__tx { text-align: start; white-space: nowrap; }
  .hero .film__tx span { font-size: 12px; }

  .hero .proof { gap: 10px 26px; }
  .hero .proof li { font-size: 15px; }

  /* 2. the scene: its own frame under the copy, cropped onto the network core */
  .hero .hero__veil { display: none; }
  .hero .hero__art {
    order: 2;
    position: relative;
    inset: auto;
    width: 100%;
    height: clamp(280px, 62vw, 520px);
    overflow: hidden;
    transform: none;
    -webkit-mask-image: none;
            mask-image: none;
    background: radial-gradient(58% 62% at 50% 52%, rgba(61, 64, 255, .36), rgba(8, 14, 94, 0) 74%);
  }
  .hero .hero__layer {
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: 73% 50%;
    -webkit-mask-image: none !important;
            mask-image: none !important;
  }
  /* soft top edge so the frame does not start with cut tiles */
  .hero .hero__art::before {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 0 0 auto 0;
    height: 14%;
    pointer-events: none;
    background: linear-gradient(180deg, var(--ground, #080E5E), rgba(8, 14, 94, 0));
  }

  /* 3. the logo bar: back in the flow, at the foot of the stack */
  .hero .hlogos {
    order: 3;
    position: relative;
    inset: auto;
    height: auto;
    min-height: 88px;
    padding-block: 18px;
    padding-inline: var(--pad);
  }
}

/* ---- large phones and small tablets: the bar becomes two rows ------------ */
@media (max-width: 760px) {
  .hero .hlogos {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding-block: 22px 24px;
    padding-inline: 0;
  }
  /* the figure keeps its caption (it was hidden here, leaving a bare number) */
  .hero .hlogos__stat {
    padding: 0;
    padding-inline: var(--pad);
    border: 0;
    gap: 14px;
  }
  .hero .hlogos__stat b { font-size: 32px; }
  .hero .hlogos__stat span {
    display: block;
    max-width: 22ch;
    font-size: 14px;
    line-height: 1.35;
    text-align: start;
  }
  .hero .marq { flex: 0 0 auto; width: 100%; }
  .hero .hlogos { --lh: 28px; }
  .hero .marq__track { gap: 44px; padding-right: 0; padding-inline-end: 44px; }
}

/* ---- phones --------------------------------------------------------------- */
@media (max-width: 560px) {
  /* both actions the full width of the column, the same height */
  .hero .hero__actions {
    align-self: stretch;
    flex-direction: column;
    align-items: stretch;
    row-gap: 20px;
    /* room for the primary button's solid offset block; the block is a
       physical shadow (always to the right), so this side is physical too */
    padding-right: 7px;
  }
  .hero .hero__actions .btn.btn--primary.btn--lg,
  .hero .film { height: 58px; }
  .hero .film { display: flex; justify-content: flex-start; }
  .hero .film__poster { width: 104px; height: 54px; }

  .hero .proof { flex-direction: column; align-items: flex-start; gap: 10px; }

  /* the badge may run to two lines instead of pushing past the screen edge */
  .hero .badge { max-width: 100%; }
  .hero .badge__face {
    min-width: 0;
    white-space: normal;
    line-height: 1.3;
    letter-spacing: .08em;
    padding: 7px;
    padding-inline-end: 16px;
  }
  .hero .badge__tx { margin-right: 0; margin-inline-end: -.08em; }

  /* the scene: a little taller in proportion, so the core stays readable */
  .hero .hero__art { height: clamp(260px, 78vw, 420px); }
  .hero .hero__layer { object-position: 74% 50%; }
  /* the alert chips carry words that land near 6px at this scale: unreadable,
     so they are left out here and the scene stays a clean drawing */
  .hero .hero__layer[src*="05-alerts"] { display: none; }
}

/* ---- short landscape phones: the desktop height rules shrink the buttons;
        keep every tap target at 44px or more -------------------------------- */
@media (max-width: 980px) and (max-height: 720px) {
  .hero .hero__actions .btn.btn--primary.btn--lg,
  .hero .film { height: 52px; }
  .hero .film__poster { width: 92px; height: 48px; }
}
