/* Company 51 — Mobile visual/layout pass v0.2.6 */

/* Keep the header and hero flush together on mobile. */
.wp-site-blocks > header.c51-site-header,
.wp-site-blocks > main,
.wp-site-blocks > footer {
  margin-block-start: 0 !important;
}

.c51-hero {
  color: #fff;
}

.c51-hero .c51-eyebrow,
.c51-hero h1 {
  color: #fff;
}

.c51-hero .has-lead-font-size {
  color: #f2f2f2;
}

@media (max-width: 960px) {
  /*
   * Mobile is intentionally composed as two visual zones instead of
   * forcing the wide cinematic artwork to cover the entire tall viewport.
   * The supplied composite remains intact; only its responsive crop/scale
   * changes. This prevents the firefighter from becoming oversized and
   * keeps the brick wall available as the copy's visual field.
   */
  .c51-hero {
    min-height: 720px;
    display: block;
    position: relative;
    overflow: hidden;
    padding: 0;
    background: #050505;
  }

  .c51-hero__media {
    position: absolute;
    inset: 0 0 auto 0;
    height: 430px;
    background-image: url('../images/hero-mobile.webp');
    background-size: 155% auto;
    background-position: 48% top;
    background-repeat: no-repeat;
    background-color: #050505;
    z-index: 0;
  }

  .c51-hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
      linear-gradient(180deg,
        rgba(5,5,5,0) 38%,
        rgba(5,5,5,.22) 56%,
        rgba(5,5,5,.82) 82%,
        #050505 100%),
      linear-gradient(90deg,
        rgba(5,5,5,.68) 0%,
        rgba(5,5,5,.42) 48%,
        rgba(5,5,5,.12) 76%,
        rgba(5,5,5,.18) 100%);
    pointer-events: none;
  }

  /* Copy is a single controlled group, independent of the artwork crop. */
  .c51-hero .c51-container {
    position: relative;
    z-index: 2;
    width: min(calc(100% - 2.5rem), 34rem);
    min-height: 720px;
    margin-inline: auto;
    padding: 320px 0 54px;
    box-sizing: border-box;
  }

  .c51-hero .c51-eyebrow {
    max-width: 100%;
    margin: 0 0 .8rem;
    color: #fff;
    font-size: .62rem;
    letter-spacing: .1em;
    line-height: 1.35;
    white-space: nowrap;
  }

  .c51-hero h1 {
    max-width: none;
    margin: 0 0 1rem;
    color: #fff;
    font-size: clamp(3.45rem, 15vw, 5rem);
    line-height: .84;
    letter-spacing: -.025em;
    text-align: left;
    text-shadow: 0 2px 18px rgba(0,0,0,.55);
  }

  .c51-hero .has-lead-font-size {
    max-width: 23rem;
    margin: 0 0 1.35rem;
    color: #f2f2f2;
    font-size: 1rem;
    line-height: 1.4;
    text-align: left;
    text-shadow: 0 1px 10px rgba(0,0,0,.7);
  }

  .c51-hero .wp-block-buttons {
    margin: 0;
  }

  .c51-hero .wp-block-button.c51-button .wp-block-button__link {
    min-height: 3.15rem;
    padding-inline: 1.2rem;
    font-size: .72rem;
  }

  /* The global hero overlay is replaced by the controlled mobile overlay. */
  .c51-hero::after {
    display: none;
  }
}

@media (max-width: 600px) {
  .c51-hero {
    min-height: 640px;
  }

  .c51-hero__media {
    height: 420px;
    background-size: 155% auto;
    background-position: 48% top;
  }

  .c51-hero .c51-container {
    width: calc(100% - 2.5rem);
    min-height: 640px;
    padding-top: 305px;
    padding-bottom: 44px;
  }

  .c51-hero .c51-eyebrow {
    margin-bottom: .75rem;
    font-size: .55rem;
    letter-spacing: .075em;
  }

  .c51-hero h1 {
    font-size: clamp(3.35rem, 15.8vw, 4.7rem);
    line-height: .83;
    margin-bottom: 1rem;
  }

  .c51-hero .has-lead-font-size {
    max-width: 21rem;
    font-size: .96rem;
    line-height: 1.4;
    margin-bottom: 1.2rem;
  }
}

@media (max-width: 480px) {
  .c51-hero__media {
    height: 405px;
    background-size: 160% auto;
    background-position: 45% top;
  }

  .c51-hero .c51-container {
    min-height: 640px;
    padding-top: 292px;
  }
}

@media (max-width: 380px) {
  .c51-hero {
    min-height: 620px;
  }

  .c51-hero__media {
    height: 390px;
    background-size: 165% auto;
    background-position: 42% top;
  }

  .c51-hero .c51-container {
    min-height: 620px;
    width: calc(100% - 2rem);
    padding-top: 280px;
    padding-bottom: 42px;
  }

  .c51-hero .c51-eyebrow {
    font-size: .5rem;
    letter-spacing: .06em;
  }

  .c51-hero h1 {
    font-size: 3.1rem;
  }

  .c51-hero .has-lead-font-size {
    font-size: .9rem;
  }
}
