/*
 * One Earth mobile polish v31
 * Mobile-only usability refinements. Desktop/tablet visual baseline is untouched.
 */
@media (max-width: 760px) {
  html {
    scroll-padding-top: 78px;
  }

  /* Keep information visible even when entrance observers are delayed or interrupted. */
  [data-reveal],
  .experience-motion-ready [data-reveal],
  [data-reveal].reveal-in,
  [data-reveal].is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Comfortable touch targets without changing the visual language. */
  .breadcrumbs a,
  .chapter-nav a,
  .text-link,
  a.action,
  .hero-link,
  .button,
  .footer-directory a,
  .footer-top nav a,
  .sub-next a,
  .contact-v4 .topic-actions a,
  .contact-v4 .direct-row a.action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .breadcrumbs a {
    min-width: 44px;
    justify-content: flex-start;
    margin-block: -10px;
  }
  .footer-directory a,
  .footer-top nav a {
    padding-block: 8px;
  }

  /* Long local navigation remains scrollable, but each item is easier to tap. */
  .chapter-nav {
    overflow: hidden;
  }
  .chapter-nav .wrap {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .chapter-nav .wrap::-webkit-scrollbar { display: none; }
  .chapter-nav a {
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding-block: 15px;
  }

  /* Keep primary headings from producing awkward one-word lines at 360–390 px. */
  .sub-hero h1,
  .page-hero h1 {
    text-wrap: balance;
  }
  .chapter-heading h2,
  .contact-v4 .contact-heading h2,
  .design-heading h2,
  .op-heading h2,
  .cs-heading h2 {
    text-wrap: balance;
  }

  /* Index hero: preserve the v30 composition and make the image feel anchored. */
  .concept-hero {
    min-height: 720px;
  }
  .concept-hero .hero-copy {
    padding-top: 58px;
  }
  .concept-hero .hero-image {
    top: 318px;
    height: 360px;
    object-position: 69% 50%;
  }
  .concept-hero .hero-caption {
    right: 20px;
    bottom: 92px;
  }
  .concept-hero .hero-media-controls {
    bottom: 82px;
  }


  /* Solutions hero: show the water sculpture as a composed mobile visual instead of a cropped edge fragment. */
  .sub-hero-solutions {
    min-height: 660px;
  }
  .sub-hero-solutions .sub-hero-art {
    width: 118% !important;
    height: 285px !important;
    top: auto !important;
    right: -10% !important;
    bottom: 30px !important;
    object-fit: cover !important;
    object-position: 68% 50% !important;
    opacity: .78 !important;
  }
  .sub-hero-solutions .sub-hero-wash {
    background: linear-gradient(180deg,#101e36 0%,#101e36f2 48%,#101e36b8 66%,#101e3630 100%) !important;
  }
  .sub-hero-solutions .sub-hero-sign {
    right: 20px;
    bottom: 14px;
  }

  /* Contact content should never appear as a large blank area on mobile. */
  .contact-v4 .contact-section {
    padding-block: 64px;
  }
  .contact-v4 .inquiry-topic-grid,
  .contact-v4 .input-grid {
    gap: 12px;
  }
  .contact-v4 .inquiry-topic {
    padding: 24px 20px;
  }
  .contact-v4 .topic-top {
    margin-bottom: 24px;
  }
  .contact-v4 .input-item {
    padding: 22px 20px;
  }
  .contact-v4 .form-field textarea {
    min-height: 170px;
  }
  .contact-v4 .direct-row {
    padding-block: 20px;
  }
  .contact-v4 .direct-row a.action {
    padding-inline: 10px;
  }

  /* Careers hero had excessive dead space on phones. Keep the photo card, tighten the stage. */
  .career-hero {
    min-height: 650px !important;
    padding-bottom: 34px !important;
  }
  .career-hero .sub-hero-art {
    height: 220px !important;
    bottom: 30px !important;
    object-position: center 50% !important;
  }
  .career-hero .sub-hero-wash {
    background: linear-gradient(180deg,#f2f6fa 0%,#f2f6faf8 50%,#f2f6fad8 65%,#f2f6fa22 100%) !important;
  }
  .career-hero .sub-hero-sign {
    bottom: 14px !important;
  }
  .career-grow-split .career-side-visual-grow {
    order: -1;
    aspect-ratio: 16 / 10;
    max-width: none;
  }
  .career-side-visual-grow img {
    object-position: center 43%;
  }

  /* The eight-step design flow is a vertical timeline on phones instead of a tiny 1160 px strip. */
  .design-flow-section .engineering-line {
    margin-inline: 0;
    padding: 8px 0 0;
    overflow: visible;
  }
  .design-flow-section .engineering-track {
    display: none;
  }
  .design-flow-section .engineering-steps {
    display: block;
    min-width: 0;
    margin-left: 7px;
    border-left: 1px solid rgba(142,164,189,.48);
  }
  .design-flow-section .engineering-steps article,
  .design-flow-section .engineering-steps article:nth-child(n) {
    position: relative;
    padding: 18px 0 24px 28px;
    opacity: 1;
    transform: none;
  }
  .design-flow-section .engineering-steps article:before {
    left: -5px;
    top: 25px;
    background: var(--brand-aqua);
    border-color: var(--brand-aqua);
    box-shadow: 0 0 0 5px rgba(32,217,210,.12);
  }
  .design-flow-section .step-no {
    margin-bottom: 10px;
  }
  .design-flow-section .engineering-steps h3 {
    white-space: normal;
    font-size: 21px;
  }
  .design-flow-section .engineering-steps p {
    max-width: 300px;
    font-size: 14px;
  }
  .design-flow-section .flow-caption {
    display: none;
  }

  /* Horizontal comparison graphics should advertise that they can be panned. */
  .cs-matrix {
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  /* Keep footer information readable and links comfortably spaced. */
  .footer-info,
  .site-footer .footer-info {
    font-size: 12.5px;
    line-height: 1.75;
  }
  .footer-bottom {
    line-height: 1.75;
  }

  /* Avoid fixed-size decorative elements nudging the viewport by a few pixels. */
  .earth-brand-image {
    max-width: 100%;
  }
}

@media (max-width: 390px) {
  .concept-hero h1 {
    font-size: 43px;
  }
  .concept-hero .hero-desc {
    font-size: 15px;
  }
  .sub-hero h1,
  .page-hero h1 {
    font-size: 39px;
  }
  .contact-v4 .contact-heading h2,
  .op-start-title h2,
  .op-standard-title h2,
  .cs-scope-title h2,
  .cs-heading h2,
  .cs-output-title h2,
  .basis-lead h2,
  .operation-statement h2 {
    font-size: 34px !important;
  }
}

@media (max-width: 360px) {
  .concept-hero h1 {
    font-size: 40px;
  }
  .concept-hero .hero-image {
    top: 305px;
    height: 350px;
  }
  .sub-hero h1,
  .page-hero h1 {
    font-size: 37px;
  }
}

@media (max-width: 760px) {
  .experience-toggle,
  .motion-toggle,
  .research a,
  .contact-phone,
  .contact-email > a,
  .career-mail-link,
  .careers-route a,
  .footer-info a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .footer-info a {
    width: 100%;
  }
}
