/* =========================================================
   IMAGE ORIGAMI MOBILE HOMEPAGE HERO
   Applies only at 900px and below.
   Desktop homepage remains untouched.
   ========================================================= */

.io-mobile-home-hero {
  display: none;
}

@media (max-width: 900px) {
  .image-origami-home .io-hero-journey {
    display: none !important;
  }

  /*
   * One continuous hero.
   * The image spans the full stage. Copy sits over the lighter left area.
   * Tabs overlap the bottom edge instead of creating a separate strip.
   */
  .image-origami-home .io-mobile-home-hero {
    position: relative;
    display: block !important;
    min-height: clamp(500px, 70vh, 610px);
    padding-bottom: 68px;
    overflow: hidden;
    isolation: isolate;
    background: #ead8ca;
    color: #201a17;
  }

  .image-origami-home .io-mobile-home-hero::before {
    content: "";
    position: absolute;
    inset: 0 0 68px;
    z-index: 2;
    pointer-events: none;
    background:
      linear-gradient(
        90deg,
        rgba(244, 232, 220, 0.98) 0%,
        rgba(244, 232, 220, 0.94) 27%,
        rgba(244, 232, 220, 0.72) 44%,
        rgba(244, 232, 220, 0.22) 61%,
        rgba(244, 232, 220, 0) 74%
      ),
      radial-gradient(
        circle at 14% 26%,
        rgba(123, 20, 56, 0.055),
        transparent 34%
      );
  }

  .image-origami-home .io-mobile-home-hero::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 68px;
    left: 0;
    z-index: 2;
    height: 90px;
    pointer-events: none;
    background:
      linear-gradient(
        180deg,
        rgba(234, 216, 202, 0) 0%,
        rgba(234, 216, 202, 0.14) 100%
      );
  }

  .image-origami-home .io-mobile-home-media {
    position: absolute !important;
    inset: 0 0 68px !important;
    z-index: 1;
    width: auto !important;
    height: auto !important;
    min-width: 0;
    overflow: hidden;
    background: #ddc8b8;
  }

  .image-origami-home .io-mobile-home-media::before,
  .image-origami-home .io-mobile-home-media::after {
    content: none !important;
  }

  .image-origami-home .io-mobile-home-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 69% center;
    opacity: 1;
    transform: scale(1.035) translateX(-2.5%);
    transform-origin: center;
    transition:
      opacity 220ms ease,
      transform 520ms cubic-bezier(.22, 1, .36, 1);
  }

  .image-origami-home #ioMobileHeroImage[src$="image1.jpg"] {
    object-position: 69% center;
  }

  .image-origami-home #ioMobileHeroImage[src$="image2.jpg"] {
    object-position: 68% center;
  }

  .image-origami-home #ioMobileHeroImage[src$="image3.jpg"] {
    object-position: 65% center;
  }

  .image-origami-home #ioMobileHeroImage[src$="image4.jpg"] {
    object-position: 77% center;
  }

  .image-origami-home #ioMobileHeroImage[src$="image5.jpg"] {
    object-position: 64% center;
  }

  .image-origami-home #ioMobileHeroImage[src$="image6.jpg"] {
    object-position: 73% center;
  }

  .image-origami-home
  .io-mobile-home-hero.is-switching
  .io-mobile-home-media img {
    opacity: 0.34;
    transform: scale(1.055) translateX(-3.2%);
  }

  .image-origami-home .io-mobile-home-copy {
    position: relative !important;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 56%;
    min-width: 0;
    min-height: clamp(432px, calc(70vh - 68px), 542px);
    height: auto !important;
    padding:
      clamp(44px, 7vh, 62px)
      10px
      34px
      18px;
    background: transparent !important;
    box-shadow: none !important;
  }

  .image-origami-home .io-mobile-home-copy::before {
    content: "";
    position: absolute;
    top: clamp(29px, 5vh, 42px);
    left: 18px;
    width: 44px;
    height: 2px;
    background: #b88443;
  }

  .image-origami-home .io-mobile-home-copy::after {
    content: none !important;
  }

  .image-origami-home .io-mobile-home-eyebrow {
    margin: 0 0 11px;
    color: #7b1438;
    font-family: "Lato", Arial, Helvetica, sans-serif;
    font-size: clamp(8px, 2vw, 10px);
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.15em;
    text-transform: uppercase;
  }

  .image-origami-home .io-mobile-home-title {
    max-width: 100%;
    margin: 0;
    color: #14233d;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(32px, 8.55vw, 42px);
    font-weight: 500;
    line-height: 0.94;
    letter-spacing: -0.035em;
  }

  .image-origami-home .io-mobile-home-title span {
    color: #7b1438;
  }

  .image-origami-home .io-mobile-home-note {
    max-width: 100%;
    margin: 16px 0 0;
    color: #574b43;
    font-family: "Lato", Arial, Helvetica, sans-serif;
    font-size: clamp(11px, 2.6vw, 13px);
    line-height: 1.52;
  }

  .image-origami-home .io-mobile-home-link {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    margin-top: 17px;
    padding-bottom: 5px;
    border-bottom: 1px solid #b88443;
    color: #7b1438;
    font-family: "Lato", Arial, Helvetica, sans-serif;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.11em;
    text-decoration: none;
    text-transform: uppercase;
  }

  /*
   * Tabs overlap the hero bottom.
   * No rail background and no inactive button fill.
   */
  .image-origami-home .io-mobile-service-tabs {
    position: absolute !important;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5;
    display: flex;
    width: 100%;
    height: 68px;
    gap: 0;
    padding: 8px 10px 6px;
    overflow-x: auto;
    overflow-y: hidden;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    scrollbar-width: none;
    scroll-padding-inline: 10px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .image-origami-home .io-mobile-service-tabs::before,
  .image-origami-home .io-mobile-service-tabs::after {
    content: none !important;
  }

  .image-origami-home .io-mobile-service-tabs::-webkit-scrollbar {
    display: none;
  }

  .image-origami-home .io-mobile-service-tab {
    appearance: none;
    position: relative;
    flex: 0 0 clamp(176px, 45vw, 204px);
    width: clamp(176px, 45vw, 204px);
    min-height: 54px;
    max-width: none;
    margin: 0;
    padding: 0 29px 0 15px;
    border: 1px solid rgba(68, 50, 38, 0.42) !important;
    border-right-width: 0 !important;
    border-radius: 0 !important;
    clip-path:
      polygon(
        0 0,
        calc(100% - 20px) 0,
        100% 20px,
        100% 100%,
        0 100%
      );
    background: transparent !important;
    color: #2d261f;
    box-shadow: none !important;
    font-family: "Lato", Arial, Helvetica, sans-serif;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.18;
    text-align: left;
    white-space: normal;
    cursor: pointer;
    scroll-margin-inline: 10px;
    scroll-snap-align: start;
    transition:
      border-color 180ms ease,
      background-color 180ms ease,
      color 180ms ease,
      transform 180ms ease;
  }

  .image-origami-home .io-mobile-service-tab:last-child {
    border-right-width: 1px !important;
  }

  .image-origami-home .io-mobile-service-tab::before {
    content: none !important;
  }

  .image-origami-home .io-mobile-service-tab::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 21px;
    height: 21px;
    pointer-events: none;
    background: rgba(184, 132, 67, 0.12);
    border-left: 1px solid rgba(68, 50, 38, 0.27);
    border-bottom: 1px solid rgba(68, 50, 38, 0.20);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
  }

  .image-origami-home .io-mobile-service-tab.is-active {
    z-index: 1;
    border-color: #7b1438 !important;
    background:
      linear-gradient(
        145deg,
        #8b1741 0%,
        #650d31 100%
      ) !important;
    color: #fff8ee;
    transform: translateY(-3px);
  }

  .image-origami-home .io-mobile-service-tab.is-active::after {
    background:
      linear-gradient(
        135deg,
        rgba(255, 232, 191, 0.78),
        rgba(255, 232, 191, 0.08)
      );
    border-left-color: rgba(255, 239, 210, 0.28);
    border-bottom-color: rgba(255, 239, 210, 0.20);
  }

  .image-origami-home .io-mobile-service-tab:focus-visible {
    outline: 2px solid #b88443;
    outline-offset: 2px;
  }

  .image-origami-home .io-page-flow {
    position: relative;
    z-index: 1;
  }

  /* Hide the homepage prologue line on mobile only. */
  .image-origami-home .io-why-prologue {
    display: none !important;
  }
}

@media (max-width: 520px) {
  .image-origami-home .io-mobile-home-hero {
    min-height: clamp(490px, 69vh, 585px);
  }

  .image-origami-home .io-mobile-home-copy {
    width: 57%;
    min-height: clamp(422px, calc(69vh - 68px), 517px);
    padding:
      43px
      8px
      29px
      14px;
  }

  .image-origami-home .io-mobile-home-copy::before {
    top: 28px;
    left: 14px;
    width: 40px;
  }

  .image-origami-home .io-mobile-home-title {
    font-size: clamp(31px, 8.45vw, 40px);
  }

  .image-origami-home .io-mobile-home-note {
    margin-top: 14px;
  }

  .image-origami-home .io-mobile-home-link {
    margin-top: 16px;
  }

  .image-origami-home .io-mobile-service-tab {
    flex-basis: clamp(170px, 45vw, 196px);
    width: clamp(170px, 45vw, 196px);
  }
}

@media (max-width: 360px) {
  .image-origami-home .io-mobile-home-copy {
    width: 59%;
    padding-right: 6px;
    padding-left: 12px;
  }

  .image-origami-home .io-mobile-home-copy::before {
    left: 12px;
  }

  .image-origami-home .io-mobile-home-eyebrow {
    font-size: 8px;
    letter-spacing: 0.12em;
  }

  .image-origami-home .io-mobile-home-title {
    font-size: 29px;
  }

  .image-origami-home .io-mobile-home-note {
    font-size: 10.5px;
    line-height: 1.46;
  }

  .image-origami-home .io-mobile-service-tabs {
    padding-inline: 8px;
    scroll-padding-inline: 8px;
  }

  .image-origami-home .io-mobile-service-tab {
    flex-basis: 164px;
    width: 164px;
    scroll-margin-inline: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .image-origami-home .io-mobile-home-media img,
  .image-origami-home .io-mobile-service-tab {
    transition: none;
  }
}
