/* Up One Health: mobile-first refinement layer */

.responsive-hero-picture {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
}

.responsive-hero-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 920px) {
  html {
    scroll-padding-top: 88px;
  }

  body {
    overflow-x: hidden;
  }

  .container {
    width: min(100% - 36px, 720px);
  }

  main > section,
  .section {
    padding-block: clamp(4.25rem, 11vw, 6rem);
  }

  .hero,
  .page-hero {
    min-height: auto;
    padding-top: clamp(7rem, 16vw, 9rem);
    padding-bottom: clamp(3.75rem, 10vw, 5.5rem);
  }

  .hero {
    background:
      linear-gradient(180deg, rgba(4, 25, 52, 0.48) 0%, rgba(4, 25, 52, 0.66) 48%, rgba(4, 25, 52, 0.94) 100%),
      url("../images/upone-clinic-hero-mobile.png?v=20260725.1") center 34% / cover no-repeat;
  }

  .hero-inner {
    min-height: min(740px, calc(100svh - 3rem));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
  }

  .hero-grid,
  .page-hero-grid,
  .split-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .feature-grid,
  .program-grid,
  .media-story,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-grid,
  .page-hero-grid {
    gap: clamp(2rem, 7vw, 3.5rem);
  }

  .hero-copy,
  .page-hero-copy,
  .section-heading {
    max-width: 680px;
  }

  .hero-visual,
  .hero-media,
  .hero-image,
  .page-hero-media {
    width: 100%;
    min-height: 0;
    aspect-ratio: 4 / 5;
    max-height: 680px;
  }

  .hero-visual .responsive-hero-picture,
  .hero-media .responsive-hero-picture,
  .hero-image .responsive-hero-picture,
  .page-hero-media .responsive-hero-picture {
    aspect-ratio: 4 / 5;
  }

  .hero-visual img,
  .hero-media img,
  .hero-image img,
  .page-hero-media img {
    object-position: center 35%;
  }

  .grid-3,
  .grid-4,
  .feature-grid,
  .program-grid,
  .service-gallery {
    gap: 1.15rem;
  }

  .service-card-visual {
    min-height: 0;
  }

  .service-photo {
    height: clamp(215px, 50vw, 300px);
  }

  .feature-media,
  .editorial-frame,
  .photo-break {
    min-height: 0;
  }

  .feature-media img,
  .editorial-frame img,
  .photo-break img,
  .media-story img {
    object-position: center;
  }

  .section-heading {
    margin-bottom: clamp(1.8rem, 6vw, 3rem);
  }

  .hero-float,
  .floating-card,
  .orbit-card {
    max-width: min(72vw, 290px);
  }
}

@media (max-width: 920px) {
  .insurance-copy {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .insurance-logo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  :root {
    --mobile-gutter: 14px;
  }

  .brand-horizontal {
    gap: 0.5rem;
    height: 43px;
  }

  .brand-mark {
    width: 38px;
    height: 43px;
    background-size: 38px auto;
  }

  .brand-wordmark {
    width: 98px;
    height: 40px;
    background-position: center -110px;
    background-size: 98px auto;
  }

  .site-footer .brand-lockup {
    height: 132px;
  }

  .site-footer .brand-footer {
    padding: 0.85rem 1rem;
    border-radius: 20px;
  }

  .container {
    width: calc(100% - (var(--mobile-gutter) * 2));
  }

  h1 {
    max-width: 12ch;
    font-size: clamp(2.65rem, 13.2vw, 3.7rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
  }

  h2 {
    font-size: clamp(2rem, 9.5vw, 2.8rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
  }

  h3 {
    font-size: clamp(1.35rem, 6vw, 1.75rem);
  }

  p,
  li {
    line-height: 1.65;
  }

  .eyebrow {
    font-size: 0.73rem;
    letter-spacing: 0.12em;
  }

  main > section,
  .section {
    padding-block: 4.25rem;
  }

  .hero,
  .page-hero {
    padding-top: 6.75rem;
    padding-bottom: 3.75rem;
  }

  .hero {
    min-height: calc(100svh - 69px);
    padding: 0;
    background-position: center 32%;
  }

  .hero-inner {
    min-height: calc(100svh - 69px);
    padding: 6.25rem 0 2rem;
  }

  .hero .lede {
    margin-top: 1rem;
  }

  .hero .hero-actions {
    margin-top: 1.35rem;
  }

  .hero-signals {
    display: none;
  }

  .hero-grid,
  .page-hero-grid {
    gap: 1.8rem;
  }

  .hero-copy > p,
  .page-hero-copy > p,
  .hero-lede {
    font-size: 1.04rem;
  }

  .hero-actions,
  .button-row,
  .cta-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 0.75rem;
  }

  .hero-actions .button,
  .button-row .button,
  .cta-actions .button {
    width: 100%;
    min-height: 54px;
    justify-content: center;
    text-align: center;
  }

  .hero-visual,
  .hero-media,
  .hero-image,
  .page-hero-media,
  .responsive-hero-picture {
    aspect-ratio: 4 / 5;
    max-height: none;
    border-radius: 26px;
  }

  .hero-visual img,
  .hero-media img,
  .hero-image img,
  .page-hero-media img {
    object-position: center 32%;
  }

  .hero-float,
  .floating-card,
  .orbit-card {
    position: relative;
    inset: auto;
    width: calc(100% - 24px);
    max-width: none;
    margin: -3.5rem auto 0;
    transform: none;
  }

  .card {
    padding: 1.35rem;
    border-radius: 24px;
  }

  .bento-side {
    min-height: 680px;
    padding: 1.6rem;
    background-position: 61% center;
  }

  .bento-side h3 {
    max-width: 10ch;
    margin-bottom: 1.4rem;
    font-size: clamp(2.25rem, 10vw, 3rem);
  }

  .bento-side .clean-list {
    max-width: 100%;
    gap: 0.55rem;
    font-size: 1rem;
  }

  .service-card-visual {
    padding: 0;
    border-radius: 24px;
  }

  .service-photo {
    height: clamp(195px, 56vw, 245px);
  }

  .service-photo .service-code {
    left: 1rem;
    bottom: 1rem;
    min-width: 44px;
    height: 44px;
  }

  .service-card-body {
    padding: 1.3rem 1.25rem 1.45rem;
  }

  .service-card-body h3 {
    margin-bottom: 0.6rem;
  }

  .service-card-body .button-text {
    min-height: 44px;
    padding-block: 0.65rem;
  }

  .feature-media,
  .editorial-frame,
  .photo-break,
  .media-story img {
    aspect-ratio: 4 / 3;
    border-radius: 24px;
  }

  .feature-media img,
  .editorial-frame img,
  .photo-break img,
  .media-story img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .section-heading {
    margin-bottom: 1.75rem;
  }

  .section-heading p {
    font-size: 1rem;
  }

  .insurance-shell {
    padding: 1.4rem;
    border-radius: 26px;
  }

  .insurance-copy h2 {
    max-width: 10ch;
  }

  .insurance-intro .button {
    width: 100%;
    justify-content: center;
  }

  .insurance-logo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 2rem;
  }

  .insurance-logo {
    min-height: 86px;
    padding: 0.9rem;
    border-radius: 17px;
  }

  .insurance-note {
    font-size: 0.72rem;
    text-align: left;
  }

  .stat-grid,
  .metric-grid,
  .trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .stat,
  .metric,
  .trust-item {
    min-width: 0;
    padding: 1rem;
  }

  .site-footer {
    padding-top: 3.5rem;
  }

  .footer-grid {
    gap: 2rem;
  }

  a,
  button,
  input,
  select,
  textarea {
    touch-action: manipulation;
  }

  [id] {
    scroll-margin-top: 90px;
  }
}

@media (max-width: 390px) {
  h1 {
    font-size: clamp(2.4rem, 12.8vw, 3.15rem);
  }

  .stat-grid,
  .metric-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-card-visual,
  .service-photo img,
  .reveal {
    transition: none !important;
    animation: none !important;
    transform: none !important;
  }
}

@media (max-width: 640px) {
  body[data-page="home"] .trust-strip {
    margin-top: 0 !important;
  }
}

/*
 * Final mobile cascade safeguards. This stylesheet is loaded after every
 * page-specific stylesheet so desktop and dark-panel rules cannot undo these.
 */
@media (max-width: 920px) {
  body[data-page="contact"] .contact-card-dark .button.button-light {
    color: #061f43 !important;
    -webkit-text-fill-color: #061f43 !important;
  }

  body[data-page="about"] .about-knockout .content-card h3 {
    background: none !important;
    color: rgba(4, 48, 88, 0.88) !important;
    -webkit-text-fill-color: rgba(4, 48, 88, 0.88) !important;
  }

  body[data-page="about"] .about-knockout .content-card p {
    background: none !important;
    color: rgba(4, 48, 88, 0.82) !important;
    -webkit-text-fill-color: rgba(4, 48, 88, 0.82) !important;
  }
}
