/* Heaven — mobile-first reflows. Not a shrunken desktop. */

@media (max-width: 1280px) {
  .hero {
    grid-template-columns: 3.4rem 1fr 0.85fr;
  }

  .service-row {
    grid-template-columns: 2.6rem 1fr 1.4rem;
  }

  .service-row__excerpt {
    display: none;
  }

  .why__grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "lead lead"
      "two tall"
      "wide wide";
  }
}

@media (max-width: 1100px) {
  :root {
    --header-h: calc(5.15rem + env(safe-area-inset-top, 0px));
  }

  html, body {
    overflow-x: hidden;
  }

  .nav-desktop {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    justify-self: end;
    width: 2.75rem;
    height: 2.75rem;
  }

  .btn-header {
    display: inline-flex;
    min-height: 2.5rem;
    padding-inline: 0.95rem;
    font-size: 0.62rem;
  }

  .btn-header::after {
    display: none;
  }

  .site-header__bar {
    grid-template-columns: auto 1fr auto auto;
    width: min(calc(100% - 1.4rem), 1600px);
    gap: 0.55rem;
  }

  .brand__logo {
    height: 3.85rem;
  }

  .hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    padding: calc(var(--header-h) + 1.2rem) 0 1.5rem;
    min-height: auto;
  }

  .hero__rail {
    display: none;
  }

  .hero__copy {
    padding: 1.6rem 1.4rem 0;
  }

  .hero__figure {
    margin: 0;
    width: 100%;
    order: -1;
  }

  .hero__frame {
    height: auto;
    aspect-ratio: 4 / 5;
    max-height: none;
    min-height: 0;
  }

  .hero__frame::before {
    inset: 0.55rem;
  }

  .hero__figure figcaption {
    width: min(calc(100% - 2.8rem), 100%);
    margin: 0.7rem 1.4rem 0;
  }

  .hero__scroll {
    grid-column: 1;
    margin: 1.6rem 0 0.6rem 1.4rem;
  }

  .hero__copy,
  .hero__figure {
    grid-column: 1;
  }

  .manifest__grid,
  .services-index__layout,
  .featured,
  .appoint__grid,
  .site-footer__grid,
  .journal__layout,
  .geo-band__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .manifest {
    padding: 5.5rem 0 4.5rem;
  }

  .manifest__title {
    max-width: none;
  }

  .manifest__body {
    grid-column: 1;
  }

  .services-index__head,
  .gallery-preview__head,
  .journal__intro {
    flex-direction: column;
    align-items: flex-start;
  }

  .service-visual {
    display: none;
  }

  .service-list {
    display: flex;
    gap: 0.9rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.6rem;
    margin-inline: -1.75rem;
    padding-inline: 1.75rem;
    -webkit-overflow-scrolling: touch;
  }

  .service-list li {
    flex: 0 0 min(78vw, 20rem);
    scroll-snap-align: start;
  }

  .service-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
    min-height: 12.5rem;
    padding: 1.3rem 1.2rem 1.4rem;
    border: 1px solid var(--color-border);
    background: var(--color-bg-warm);
  }

  .service-row__excerpt {
    display: block;
  }

  .service-row__arrow {
    opacity: 1;
    transform: none;
    margin-top: auto;
  }

  .featured__media img {
    min-height: 22rem;
    aspect-ratio: 4 / 5;
  }

  .featured__copy {
    padding: 3rem 1.75rem 4.5rem;
  }

  .journal-piece--lead,
  .journal-piece--side {
    grid-row: auto;
  }

  .journal-piece--lead figure,
  .journal-piece--side figure {
    aspect-ratio: 5 / 4;
  }

  .site-footer__grid {
    padding-top: 3.2rem;
  }

  .inner-hero {
    padding: calc(var(--header-h) + 1.8rem) 0 2.6rem;
  }

  .inner-hero--split .inner-hero__copy {
    padding: calc(var(--header-h) + 1.5rem) 1.4rem 1.8rem;
  }

  .inner-hero__media img {
    min-height: 22rem;
    max-height: 62vh;
  }

  .page-section {
    padding: 3.2rem 0;
  }

  .form input,
  .form select,
  .form textarea {
    font-size: 16px;
    min-height: 3.25rem;
  }

  .form .btn,
  .appoint-page .btn,
  .contact-grid .btn {
    width: 100%;
  }

  .cover-hero {
    min-height: 68svh;
    padding: 7rem 1.4rem 2.2rem;
  }

  .lightbox {
    padding: 5rem 0.7rem 1rem;
  }

  .lightbox__close,
  .lightbox__nav {
    min-height: 44px;
    min-width: 44px;
  }

  .lightbox__nav--prev,
  .lightbox__nav--next {
    top: auto;
    bottom: 1.2rem;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .process-list li {
    grid-template-columns: 3rem 1fr;
  }

  .chip {
    min-height: 2.7rem;
  }

  .gallery-toolbar {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    margin-inline: -0.2rem;
    padding-bottom: 0.3rem;
  }

  .collage-stage__main {
    height: 22rem;
  }

  .related-card img {
    height: 12.5rem;
  }

  .dual-split article {
    padding: 2rem 1.4rem;
  }

  body > .flash {
    margin: calc(var(--header-h) + 0.6rem) 1.2rem 0;
  }
}

@media (max-width: 820px) {
  .wrap {
    width: min(calc(100% - 2.4rem), var(--wrap));
  }

  .hero__title {
    font-size: clamp(2.6rem, 12vw, 4.2rem);
  }

  .gallery-collage {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "a a"
      "b c"
      "d d"
      "e f";
    gap: 0.7rem;
  }

  .gallery-collage__item--tall,
  .gallery-collage__item--wide,
  .gallery-collage__item--square,
  .gallery-collage__item--portrait,
  .gallery-collage__item--tall:nth-child(4),
  .gallery-collage__item--wide:nth-child(2),
  .gallery-collage__item--wide:nth-child(5) {
    min-height: 0;
  }

  .gallery-collage__item--tall { min-height: 22rem; }
  .gallery-collage__item--wide:nth-child(2),
  .gallery-collage__item--square,
  .gallery-collage__item--portrait,
  .gallery-collage__item--wide:nth-child(5) { min-height: 12rem; }
  .gallery-collage__item--tall:nth-child(4) { min-height: 16rem; }

  .why__grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "lead"
      "two"
      "tall"
      "wide";
  }

  .why-block {
    min-height: 0;
    padding: 1.8rem 1.4rem;
  }

  .signature__overlay {
    min-height: 58vh;
    padding: 4rem 1.4rem 2.4rem;
  }

  .appoint__channels li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .inner-hero__title {
    font-size: clamp(2.3rem, 11vw, 3.6rem);
    line-height: 0.96;
  }

  .appoint .btn,
  .hero__actions .btn {
    width: 100%;
  }

  .nav-mobile {
    padding: 1.1rem 1.15rem 1.6rem;
    padding-bottom: max(1.6rem, env(safe-area-inset-bottom));
  }

  .nav-mobile__nav a {
    min-height: 3.15rem;
    align-items: center;
  }

  .nav-mobile__label {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  .nav-mobile__foot .btn {
    width: 100%;
  }

  .article {
    padding: 4.4rem 0 3.2rem;
  }
}
}

@media (max-width: 560px) {
  body {
    font-size: 1rem;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .hero__frame {
    height: 86vw;
  }

  .journal__wordmark {
    letter-spacing: 0.04em;
  }

  .gallery-collage {
    grid-template-columns: 1fr;
    grid-template-areas:
      "a"
      "b"
      "c"
      "d"
      "e"
      "f";
  }

  .gallery-collage__item {
    min-height: 16rem;
  }

  .service-list li {
    flex-basis: 84vw;
  }
}

@media (min-width: 1101px) {
  .nav-mobile {
    display: none !important;
  }
}
