/* Final mobile layout pass shared by every page. */
.about-mobile-cta {
  display: none;
}

.philosophy-mobile-cta,
.proof-mobile-links {
  display: none;
}

.catalog-dialog-close:focus,
.catalog-dialog-close:focus-visible {
  outline: none;
  box-shadow: none;
}

.catalog-hero-image picture,
.approach-hero-image picture,
.about-hero-portrait picture,
.philosophy-art picture {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* Maps use a quieter card treatment rather than the previous blue frame. */
.map-card {
  border: 0 !important;
  border-radius: 26px;
  box-shadow: 0 24px 64px rgba(4,24,38,.14);
}

@media (min-width: 901px) {
  .visit > .map-card {
    width: min(620px, calc(100% - 70px));
    min-height: 520px;
    margin: 70px 70px 70px 0;
    justify-self: end;
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  /* Landscape tablets use the same full-viewport hero rhythm as portrait tablets. */
  .hero,
  .catalog-hero,
  .approach-hero,
  .about-hero,
  .visit-hero {
    min-height: 100svh !important;
    position: relative;
    display: block !important;
    padding: 0 !important;
  }

  .hero .hero-copy,
  .hero .hero-copy.reveal,
  .catalog-hero-copy,
  .approach-hero-copy,
  .about-hero-copy,
  .visit-hero-copy {
    position: absolute !important;
    z-index: 2;
    top: 210px;
    left: clamp(42px, 7vw, 72px);
    right: auto;
    width: min(680px, calc(100% - 84px)) !important;
    min-height: 0;
    max-width: 680px;
    margin: 0 !important;
    padding: 0 !important;
    align-self: auto !important;
    justify-content: flex-start !important;
  }

  .hero h1,
  .catalog-hero h1,
  .approach-hero h1,
  .about-hero h1,
  .visit-hero h1 {
    margin: 0;
    font-size: clamp(60px, 7vw, 76px);
    line-height: .88;
  }

  .hero .eyebrow,
  .catalog-hero-copy .section-kicker,
  .approach-hero-copy .section-kicker,
  .about-hero-copy .section-kicker,
  .visit-hero-copy .section-kicker {
    margin: 0 0 22px;
    line-height: 14px;
  }

  .hero .hero-intro,
  .catalog-hero-copy > p:last-of-type,
  .approach-hero-copy > p:last-child,
  .about-hero-copy > p:last-of-type,
  .visit-hero-copy > p:last-of-type {
    margin: 24px 0 0;
  }

  .hero .hero-actions {
    margin-top: 30px;
  }

  .approach-hero-steps {
    position: absolute;
    z-index: 2;
    left: clamp(42px, 7vw, 72px);
    right: clamp(42px, 7vw, 72px);
    bottom: 28px;
  }

  /* Keep the final approach action inside the viewport at iPad landscape widths. */
  .approach-cta {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .approach-cta-actions {
    width: min(340px, 100%);
  }
}

@media (max-width: 900px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .site-header {
    padding-inline: 22px;
  }

  /* Match every page to the 52px mobile logo used on the home page. */
  .site-header .brand img,
  .catalog-site-header .brand img,
  .approach-site-header .brand img,
  .about-site-header .brand img,
  .visit-site-header .brand img {
    width: 52px;
    height: auto;
  }

  /* Keep the supplied blue Prosperity Minds mark unchanged in the open menu. */
  .menu-open .site-header .brand img,
  .menu-open .catalog-site-header .brand img,
  .menu-open .approach-site-header .brand img,
  .menu-open .about-site-header .brand img,
  .menu-open .visit-site-header .brand img {
    filter: none !important;
    opacity: 1;
  }

  .mobile-menu {
    padding: 118px 22px 38px;
  }

  /* One hero system for phones and tablets: full-screen image and aligned copy. */
  .hero,
  .catalog-hero,
  .approach-hero,
  .about-hero,
  .visit-hero {
    min-height: 100svh !important;
  }

  .hero .hero-visual,
  .hero .hero-visual.visible {
    position: absolute !important;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 0;
    max-height: none !important;
    margin: 0 !important;
  }

  .hero .hero-image-wrap {
    inset: 0 !important;
    border: 0;
    border-radius: 0;
    clip-path: none;
  }

  /* Match the cooler blue treatment used by the desktop hero compositions. */
  .approach-hero::before {
    background:
      linear-gradient(180deg, rgba(4,48,76,.54) 0%, rgba(3,39,63,.58) 38%, rgba(3,24,38,.9) 74%, #061923 100%),
      linear-gradient(90deg, rgba(6,77,112,.24), rgba(3,24,38,.12));
  }

  .about-hero::before {
    background:
      linear-gradient(180deg, rgba(5,55,83,.46) 0%, rgba(4,43,67,.52) 38%, rgba(3,24,38,.9) 74%, #061923 100%),
      linear-gradient(90deg, rgba(6,79,113,.22), rgba(3,24,38,.1));
  }

  .catalog-hero,
  .about-hero,
  .visit-hero {
    display: flex !important;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    padding: 150px clamp(22px, 7vw, 64px) 72px !important;
  }

  .catalog-hero {
    padding-bottom: 116px !important;
  }

  .catalog-hero-copy,
  .about-hero-copy,
  .visit-hero-copy {
    position: relative;
    z-index: 2;
    width: min(680px, 100%);
    margin: 0;
    padding: 0;
    align-self: auto;
  }

  .approach-hero {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: end;
    padding: 146px clamp(22px, 7vw, 64px) 28px !important;
  }

  .approach-hero-copy {
    width: min(680px, 100%);
    margin: 0 0 38px;
    align-self: end;
  }

  /* Images belong to their sections, after the section introduction. */
  .philosophy {
    display: flex;
    flex-direction: column;
    padding-bottom: 22px;
  }

  .philosophy-copy {
    order: 1;
  }

  .philosophy-art {
    order: 2;
    width: min(680px, calc(100% - 88px));
    min-height: 0;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
  }

  .philosophy-art::before {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
    background: linear-gradient(180deg, rgba(5,76,110,.18), rgba(3,35,56,.34));
    pointer-events: none;
  }

  /* Keep the treatment plan on the tablet; remove only the page caption over the photo. */
  .philosophy-art > p {
    display: none;
  }

  .philosophy-art img {
    position: absolute;
    inset: 0;
  }

  .about {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 78px 22px 22px;
  }

  .about-copy {
    order: 1;
  }

  .about-photo {
    order: 2;
    width: 100%;
    min-height: 620px;
  }

  .about-copy .button {
    display: none;
  }

  .about-mobile-cta {
    order: 3;
    display: inline-flex;
    align-self: center;
    min-width: 236px;
    margin: -8px auto 30px;
  }

  .proof {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 48px;
  }

  .proof-copy {
    order: 1;
  }

  .proof-score {
    order: 2;
    width: 100%;
    margin: 0;
  }

  .visit > .map-card {
    width: min(680px, calc(100% - 88px));
    min-height: 420px;
    margin: 0 auto 70px;
  }

  .mobile-book {
    display: none !important;
  }

  .site-footer {
    padding-bottom: 30px;
  }
}

@media (max-width: 620px) {
  /* Every page hero uses one full-screen photographic canvas. */
  .hero {
    min-height: max(760px, 100svh) !important;
    padding: 0 22px !important;
    position: relative;
  }

  .hero .hero-visual,
  .hero .hero-visual.visible {
    position: absolute !important;
    z-index: 0;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 0;
    max-height: none !important;
    margin: 0 !important;
  }

  .hero .hero-image-wrap {
    inset: 0 !important;
    border: 0;
    border-radius: 0;
    clip-path: none;
  }

  .hero .hero-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 82% center;
  }

  .hero .hero-copy,
  .hero .hero-copy.reveal {
    position: relative;
    z-index: 2;
    min-height: inherit;
    padding: 108px 0 218px !important;
    justify-content: center !important;
  }

  .hero .hero-proof {
    position: absolute;
    z-index: 2;
    left: 22px;
    right: 22px;
    bottom: 0;
    margin: 0;
  }

  .catalog-hero,
  .approach-hero,
  .about-hero,
  .visit-hero {
    min-height: max(760px, 100svh) !important;
  }

  .catalog-hero,
  .about-hero,
  .visit-hero {
    display: flex !important;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    padding: 132px 22px 64px !important;
  }

  .catalog-hero {
    padding-bottom: 108px !important;
  }

  .catalog-hero-copy,
  .about-hero-copy,
  .visit-hero-copy {
    position: relative;
    z-index: 2;
    width: min(640px, 100%);
    margin: 0;
    padding: 0;
    align-self: auto;
  }

  .approach-hero {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: end;
    padding: 132px 22px 24px !important;
  }

  .approach-hero-copy {
    width: min(640px, 100%);
    margin: 0 0 34px;
    align-self: end;
  }

  .catalog-hero h1,
  .approach-hero h1,
  .about-hero h1,
  .visit-hero h1 {
    font-size: clamp(54px, 15.5vw, 72px);
    line-height: .88;
  }

  .catalog-hero-copy .section-kicker,
  .approach-hero-copy .section-kicker,
  .about-hero-copy .section-kicker,
  .visit-hero-copy .section-kicker {
    margin-bottom: 22px;
  }

  .catalog-hero-copy > p:last-of-type,
  .approach-hero-copy > p:last-child,
  .about-hero-copy > p:last-of-type,
  .visit-hero-copy > p:last-of-type {
    max-width: 560px;
    margin-top: 24px;
    font-size: 14px;
    line-height: 1.62;
  }

  .about-hero-copy::after {
    margin-top: 30px;
  }

  .catalog-hero-image,
  .approach-hero-image,
  .about-hero-portrait,
  .visit-hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  .catalog-hero-image img,
  .approach-hero-image img,
  .about-hero-portrait img,
  .visit-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .philosophy-copy {
    padding: 66px 22px 46px;
  }

  .philosophy-art {
    width: calc(100% - 44px);
    min-height: 0;
    aspect-ratio: 1 / 1;
  }

  .about {
    gap: 34px;
    padding-top: 70px;
  }

  .about-photo {
    min-height: 560px;
  }

  .about-mobile-cta {
    width: min(100%, 310px);
    min-width: 0;
    margin-top: -6px;
  }

  .proof {
    gap: 42px;
  }

  .proof-score {
    min-height: 330px;
    padding: 42px 28px;
  }

  .proof-rating-row {
    min-height: 112px;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 18px;
  }

  .proof-rating-row > span {
    font-size: clamp(58px, 17vw, 76px);
  }

  .proof-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .proof-review-button {
    width: 100%;
    padding-inline: 12px;
    text-align: center;
  }

  .site-footer {
    padding-bottom: 28px;
  }
}

@media (max-width: 390px) {
  .catalog-hero,
  .about-hero,
  .visit-hero {
    padding-inline: 18px !important;
  }

  .approach-hero {
    padding-inline: 18px !important;
  }

  .hero {
    padding-inline: 18px !important;
  }

  .hero .hero-proof {
    left: 18px;
    right: 18px;
  }

  .proof-rating-row {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 14px;
  }

  .proof-rating-row small {
    font-size: 8px;
  }
}

/*
 * Shared mobile hero coordinates.
 * Every page now starts its kicker, heading and supporting copy from the same
 * vertical and horizontal anchors instead of aligning each block by its end.
 */
@media (max-width: 900px) {
  html,
  body {
    overflow-x: clip;
  }

  .hero,
  .catalog-hero,
  .approach-hero,
  .about-hero,
  .visit-hero {
    position: relative;
    display: block !important;
    padding: 0 !important;
  }

  .hero .hero-copy,
  .hero .hero-copy.reveal,
  .catalog-hero-copy,
  .approach-hero-copy,
  .about-hero-copy,
  .visit-hero-copy {
    position: absolute !important;
    z-index: 2;
    top: clamp(300px, 38svh, 410px);
    left: clamp(22px, 7vw, 64px);
    right: clamp(22px, 7vw, 64px);
    width: auto !important;
    min-height: 0;
    max-width: 680px;
    margin: 0 !important;
    padding: 0 !important;
    align-self: auto !important;
    justify-content: flex-start !important;
  }

  .hero h1,
  .catalog-hero h1,
  .approach-hero h1,
  .about-hero h1,
  .visit-hero h1 {
    margin: 0;
    font-size: clamp(60px, 10vw, 88px);
    line-height: .88;
  }

  .hero .eyebrow,
  .catalog-hero-copy .section-kicker,
  .approach-hero-copy .section-kicker,
  .about-hero-copy .section-kicker,
  .visit-hero-copy .section-kicker {
    margin: 0 0 26px;
    line-height: 14px;
  }

  .hero .hero-intro,
  .catalog-hero-copy > p:last-of-type,
  .approach-hero-copy > p:last-child,
  .about-hero-copy > p:last-of-type,
  .visit-hero-copy > p:last-of-type {
    margin: 32px 0 0;
  }

  .hero .hero-actions {
    margin-top: 36px;
  }

  .approach-hero-steps {
    position: absolute;
    z-index: 2;
    left: clamp(22px, 7vw, 64px);
    right: clamp(22px, 7vw, 64px);
    bottom: 28px;
  }

  .catalog-search {
    position: -webkit-sticky;
    position: sticky;
    top: max(10px, env(safe-area-inset-top));
  }

  /* Match the visual weight and width of Anzelika's portrait. */
  .philosophy-art {
    width: calc(100% - 44px);
    min-height: 620px;
    aspect-ratio: auto;
  }
}

@media (max-width: 620px) {
  .hero .hero-copy,
  .hero .hero-copy.reveal,
  .catalog-hero-copy,
  .approach-hero-copy,
  .about-hero-copy,
  .visit-hero-copy {
    top: clamp(240px, 38svh, 330px);
    left: 22px;
    right: 22px;
  }

  .hero h1,
  .catalog-hero h1,
  .approach-hero h1,
  .about-hero h1,
  .visit-hero h1 {
    font-size: clamp(54px, 15.5vw, 72px);
  }

  .hero .eyebrow,
  .catalog-hero-copy .section-kicker,
  .approach-hero-copy .section-kicker,
  .about-hero-copy .section-kicker,
  .visit-hero-copy .section-kicker {
    margin-bottom: 24px;
  }

  .hero .hero-intro,
  .catalog-hero-copy > p:last-of-type,
  .approach-hero-copy > p:last-child,
  .about-hero-copy > p:last-of-type,
  .visit-hero-copy > p:last-of-type {
    margin-top: 30px;
  }

  .hero .hero-actions {
    margin-top: 34px;
  }

  .approach-hero-steps {
    left: 22px;
    right: 22px;
    bottom: 24px;
  }

  .philosophy-art {
    min-height: 560px;
  }
}

@media (max-width: 390px) {
  .hero .hero-copy,
  .hero .hero-copy.reveal,
  .catalog-hero-copy,
  .approach-hero-copy,
  .about-hero-copy,
  .visit-hero-copy {
    left: 18px;
    right: 18px;
  }

  .approach-hero-steps {
    left: 18px;
    right: 18px;
  }
}

@media (max-width: 340px) and (max-height: 650px) {
  .hero .hero-copy,
  .hero .hero-copy.reveal,
  .catalog-hero-copy,
  .approach-hero-copy,
  .about-hero-copy,
  .visit-hero-copy {
    top: 228px;
  }
}

/* Mobile composition refinement: shared anchors, controls, and section order. */
@media (min-width: 901px) and (max-width: 1100px) {
  .hero .hero-copy,
  .hero .hero-copy.reveal,
  .catalog-hero-copy,
  .approach-hero-copy,
  .about-hero-copy,
  .visit-hero-copy {
    top: 184px;
  }
}

@media (max-width: 900px) {
  /* The navigation control stays available while the page moves underneath it. */
  .site-header .menu-button {
    position: fixed;
    z-index: 22;
    top: max(20px, env(safe-area-inset-top));
    right: 22px;
  }

  /* Raise every hero from the same coordinate instead of bottom-aligning its copy. */
  .hero .hero-copy,
  .hero .hero-copy.reveal,
  .catalog-hero-copy,
  .approach-hero-copy,
  .about-hero-copy,
  .visit-hero-copy {
    top: clamp(260px, 31svh, 330px);
  }

  .hero h1,
  .catalog-hero h1,
  .approach-hero h1,
  .about-hero h1,
  .visit-hero h1 {
    font-size: clamp(60px, 10.25vw, 88px);
  }

  .hero .hero-intro,
  .catalog-hero-copy > p:last-of-type,
  .approach-hero-copy > p:last-child,
  .about-hero-copy > p:last-of-type,
  .visit-hero-copy > p:last-of-type {
    font-size: 15px;
    line-height: 1.64;
  }

  /* Home approach: copy, image, then the full-width action. */
  .philosophy-link {
    display: none;
  }

  .philosophy-mobile-cta {
    order: 3;
    display: inline-flex;
    align-self: center;
    width: min(100%, 310px);
    min-height: 56px;
    margin: 30px auto 34px;
    justify-content: center;
    border-color: var(--blue);
    border-radius: 999px;
    color: var(--ink);
    background: #fff;
  }

  /* Home reviews: rating panel first, then both review actions. */
  .proof-copy .proof-links {
    display: none;
  }

  .proof-mobile-links {
    order: 3;
    display: grid;
    justify-items: center;
    gap: 12px;
    width: 100%;
  }

  .proof-mobile-links .proof-review-button {
    width: min(100%, 310px);
    min-height: 56px;
    justify-content: center;
    border-radius: 999px;
  }
}

@media (max-width: 620px) {
  :root {
    --mobile-action-width: min(100%, 310px);
  }

  .site-header .menu-button {
    right: 22px;
  }

  .hero,
  .catalog-hero,
  .approach-hero,
  .about-hero,
  .visit-hero {
    min-height: max(820px, 100svh) !important;
  }

  .hero .hero-copy,
  .hero .hero-copy.reveal,
  .catalog-hero-copy,
  .approach-hero-copy,
  .about-hero-copy,
  .visit-hero-copy {
    top: clamp(205px, 29svh, 252px);
  }

  .hero h1,
  .catalog-hero h1,
  .approach-hero h1,
  .about-hero h1,
  .visit-hero h1 {
    font-size: clamp(56px, 16vw, 72px);
  }

  .hero .eyebrow,
  .catalog-hero-copy .section-kicker,
  .approach-hero-copy .section-kicker,
  .about-hero-copy .section-kicker,
  .visit-hero-copy .section-kicker {
    margin-bottom: 22px;
  }

  .hero .hero-intro,
  .catalog-hero-copy > p:last-of-type,
  .approach-hero-copy > p:last-child,
  .about-hero-copy > p:last-of-type,
  .visit-hero-copy > p:last-of-type {
    margin-top: 28px;
    font-size: 15px;
    line-height: 1.62;
  }

  .hero .hero-actions {
    margin-top: 30px;
  }

  .hero .hero-actions .button,
  .philosophy-mobile-cta,
  .about-mobile-cta,
  .proof-mobile-links .button,
  .visit-actions .button,
  .catalog-cta .button,
  .approach-cta-actions .button,
  .about-cta > .button,
  .founder-scope-detail .button,
  .visit-contact-card > .button,
  .visit-location-copy > .button,
  .visit-before-copy .button {
    width: var(--mobile-action-width) !important;
    min-height: 56px;
    justify-content: center;
    border-radius: 999px;
  }

  .hero .hero-actions .button,
  .philosophy-mobile-cta,
  .about-mobile-cta,
  .proof-mobile-links .button {
    margin-inline: auto;
  }

  /* Give the three home rails more presence without changing their labels. */
  .hero .hero-proof div,
  .hero .hero-proof div + div {
    min-height: 58px;
    padding-block: 15px;
  }

  .hero .hero-proof span br {
    display: block;
  }

  .catalog-hero-facts span {
    min-height: 58px;
  }

  .catalog-hero-facts {
    font-size: 10px;
    line-height: 1.45;
    letter-spacing: .12em;
  }

  /* The line directly after the approach description is unnecessary on phones. */
  .approach-hero-steps {
    padding-top: 0;
    border-top: 0;
  }

  .approach-hero-steps li {
    min-height: 60px;
    border-top: 0;
    font-size: 11px;
    letter-spacing: .14em;
  }

  .approach-hero-steps span {
    font-size: 10px;
  }

  .approach-hero-steps li:nth-child(n + 3) {
    border-top: 1px solid rgba(255,255,255,.16);
  }

  /* Match the map to the same 22px page grid used by the editorial images. */
  .visit > .map-card {
    width: calc(100% - 44px);
    min-height: 360px;
    margin: 0 auto 50px;
    border-radius: 18px;
  }

  .visit-location-map {
    min-height: 360px;
    border-radius: 18px;
  }

  .map-card-link {
    padding: 24px 20px;
  }

  .map-card-link span {
    width: var(--mobile-action-width);
    min-height: 56px;
    justify-content: center;
  }
}

@media (max-width: 390px) {
  .site-header .menu-button {
    right: 18px;
  }
}

@media (max-width: 340px) and (max-height: 650px) {
  .hero .hero-copy,
  .hero .hero-copy.reveal,
  .catalog-hero-copy,
  .approach-hero-copy,
  .about-hero-copy,
  .visit-hero-copy {
    top: 190px;
  }

  .hero h1,
  .catalog-hero h1,
  .approach-hero h1,
  .about-hero h1,
  .visit-hero h1 {
    font-size: 52px;
  }
}
