/*
 * TOP / current PC-based mobile layout (2026-08-28)
 *
 * The desktop DOM and artwork remain the source of truth. Only the abrupt
 * smartphone breakpoint is rearranged here. Desktop (769px+) is untouched.
 */

@keyframes r2-mobile-logo-continuous {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

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

  .fv4ref--mobile-current,
  .fv4ref--mobile-current .fv4ref-stage {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    margin: 0;
    overflow: visible;
    background: #071e49;
    transform: none !important;
  }

  .fv4ref--mobile-current .fv4ref-stage {
    position: relative;
    inset: auto;
    display: flex;
    min-width: 0;
    flex-direction: column;
  }

  .fv4ref--mobile-current .fv4ref-layout-guides,
  .fv4ref--mobile-current .fv4ref-navy,
  .fv4ref--mobile-current .fv4ref-industry-nav {
    display: none !important;
  }

  .fv4ref--mobile-current .fv4ref-main {
    position: relative;
    inset: auto;
    isolation: isolate;
    display: grid;
    width: 100%;
    height: auto !important;
    min-height: 0;
    padding: 38px 14px 36px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "copy"
      "device"
      "badges"
      "product";
    overflow: hidden;
    background-color: #f4f9ff;
    background-image:
      url("hero-background-flow-mobile-sweep-20260828-v1.png"),
      linear-gradient(180deg, #fff 0%, #f4f9ff 60%, #d7eafb 100%);
    background-image:
      image-set(
        url("hero-background-flow-mobile-sweep-20260828-v1.webp") type("image/webp"),
        url("hero-background-flow-mobile-sweep-20260828-v1.png") type("image/png")
      ),
      linear-gradient(180deg, #fff 0%, #f4f9ff 60%, #d7eafb 100%);
    background-repeat: no-repeat, no-repeat;
    background-position: center top, center;
    background-size: cover, 100% 100%;
  }

  .fv4ref--mobile-current .fv4ref-main::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0;
    display: block;
    pointer-events: none;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, .62) 0%,
      rgba(255, 255, 255, .38) 31%,
      rgba(255, 255, 255, .12) 57%,
      rgba(255, 255, 255, 0) 74%
    );
  }

  .fv4ref--mobile-current .fv4ref-copy {
    grid-area: copy;
    position: relative;
    z-index: 2;
    inset: auto;
    display: block;
    width: 100%;
    height: auto;
    color: #0b315d;
    text-align: center;
  }

  .fv4ref--mobile-current .fv4ref-lead {
    position: static;
    margin: 0 0 2px;
    font-size: clamp(24px, 7.5vw, 34px);
    font-weight: 850;
    line-height: 1.3;
    letter-spacing: .015em;
    white-space: nowrap;
  }

  .fv4ref--mobile-current .fv4ref-copy h1 {
    position: relative;
    z-index: 2;
    inset: auto;
    display: flex;
    margin: 0;
    padding-bottom: 14px;
    align-items: flex-end;
    justify-content: center;
    color: #0e3d72;
    line-height: 1;
    letter-spacing: -.05em;
    white-space: nowrap;
    overflow: visible;
  }

  .fv4ref--mobile-current .fv4ref-copy h1 span {
    position: relative;
    z-index: 1;
    display: inline-block;
    isolation: isolate;
    margin: 0;
    padding: 0 .06em .08em 0;
    color: transparent;
    font-size: clamp(72px, 22vw, 96px);
    font-weight: 900;
    letter-spacing: -.075em;
    background: linear-gradient(180deg, #1658a0 0%, #0a4b9d 48%, #0e3d72 100%);
    -webkit-background-clip: text;
    background-clip: text;
    transform: none;
    overflow: visible;
  }

  .fv4ref--mobile-current .fv4ref-copy h1 span::after {
    content: "";
    position: absolute;
    z-index: 5;
    display: block;
    left: 50%;
    bottom: -7px;
    width: clamp(52px, 16vw, 76px);
    height: 0;
    pointer-events: none;
    opacity: 1;
    border: 0;
    border-top: 6px solid #1fc3e7;
    border-radius: 999px;
    background: none;
    box-shadow: 0 3px 8px rgba(31, 195, 231, .28);
    transform: translateX(-50%) rotate(-8deg);
    transform-origin: center;
  }

  .fv4ref--mobile-current .fv4ref-copy h1 small {
    display: inline-block;
    margin: 0 0 .28em .16em;
    color: #0e3d72;
    font-size: clamp(25px, 7.5vw, 33px);
    font-weight: 850;
    line-height: 1;
    letter-spacing: -.045em;
    transform: none;
  }

  .fv4ref--mobile-current .fv4ref-copy-line {
    position: absolute;
    z-index: 1;
    inset: auto auto -5px 50%;
    display: none;
    width: min(94vw, 440px);
    height: 21px;
    opacity: .94;
    background: url("hero-kaitetsu-swash-light-v1-delivery-64a56ac644.webp") center / 100% 100% no-repeat;
    transform: translateX(-50%);
  }

  .fv4ref--mobile-current .fv4ref-product {
    grid-area: product;
    position: relative;
    z-index: 2;
    inset: auto;
    width: 100%;
    height: auto;
    margin: 30px 0 0;
  }

  .fv4ref--mobile-current .fv4ref-product-sub {
    position: relative;
    inset: auto;
    width: min(100%, 390px);
    height: 44px;
    margin: 0 auto;
    padding: 0 13px;
    gap: 6px;
    border-radius: 5px;
  }

  .fv4ref--mobile-current .fv4ref-product-sub .jp {
    font-size: clamp(14px, 4vw, 17px);
  }

  .fv4ref--mobile-current .fv4ref-product-sub strong {
    font-size: clamp(22px, 6vw, 28px);
  }

  .fv4ref--mobile-current .fv4ref-product-row {
    position: relative;
    inset: auto;
    width: auto;
    margin: 12px auto 0;
    padding: 0;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
  }

  .fv4ref--mobile-current .fv4ref-product-logo {
    width: clamp(190px, 54vw, 238px);
  }

  .fv4ref--mobile-current .fv4ref-product-ruby {
    margin: 0 0 7px;
    font-size: clamp(8px, 2.4vw, 10px);
    letter-spacing: .08em;
  }

  .fv4ref--mobile-current .fv4ref-main > picture {
    grid-area: device;
    position: relative;
    z-index: 2;
    display: block;
    width: min(calc(100vw - 8px), 480px);
    margin: 6px auto 0;
    justify-self: center;
    transform: none;
  }

  .fv4ref--mobile-current .fv4ref-tablet {
    position: relative;
    inset: auto;
    display: block !important;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    transform: none;
  }

  /* The three proof circles straddle the tablet's lower edge. */
  .fv4ref--mobile-current .fv4ref-badges {
    grid-area: badges;
    position: relative;
    z-index: 3;
    inset: auto;
    display: flex;
    width: 100%;
    margin: 18px auto 0;
    align-items: center;
    justify-content: center;
    gap: clamp(5px, 2vw, 10px);
    transform: none;
  }

  .fv4ref--mobile-current .fv4ref-badge {
    flex: 0 0 auto;
    width: clamp(86px, 26vw, 112px);
    height: clamp(86px, 26vw, 112px);
    padding: 7px;
    border-width: 3px;
    box-shadow: 0 10px 24px rgba(4, 48, 99, .13), 0 0 0 2px rgba(255, 255, 255, .72);
  }

  .fv4ref--mobile-current .fv4ref-badge::after {
    content: none;
  }

  .fv4ref--mobile-current .fv4ref-badge .t1 {
    font-size: clamp(8px, 2.25vw, 10.5px);
    line-height: 1.18;
  }

  .fv4ref--mobile-current .fv4ref-badge .t2,
  .fv4ref--mobile-current .fv4ref-badge:nth-child(2) .t2 {
    margin-top: 2px;
    font-size: clamp(28px, 8.2vw, 38px);
  }

  .fv4ref--mobile-current .fv4ref-badge .t2 small {
    font-size: clamp(10px, 2.8vw, 14px);
  }

  .fv4ref--mobile-current .fv4ref-badge .t3 {
    margin-top: 1px;
    font-size: clamp(8px, 2.1vw, 10px);
  }

  .fv4ref--mobile-current .fv4ref-badge.is-subsidy .t1 {
    font-size: clamp(7px, 1.95vw, 9px);
  }

  .fv4ref--mobile-current .fv4ref-badge.is-subsidy img {
    width: clamp(38px, 11vw, 50px);
    margin-top: 3px;
  }

  .fv4ref--mobile-current .fv4ref-logo-card.logo-slider-sec {
    position: relative;
    inset: auto;
    z-index: 4;
    width: 100%;
    height: auto;
    min-height: 154px;
    padding: 18px 0 14px;
    border-width: 1px 0;
    border-radius: 0;
    background: #fff;
  }

  .fv4ref--mobile-current .fv4ref-logo-card .logo-lead {
    margin: 0 0 12px;
    gap: 7px;
  }

  .fv4ref--mobile-current .fv4ref-logo-card .logo-lead span {
    font-size: clamp(13px, 3.8vw, 16px);
    white-space: nowrap;
  }

  .fv4ref--mobile-current .fv4ref-logo-card .logo-lead::before,
  .fv4ref--mobile-current .fv4ref-logo-card .logo-lead::after {
    font-size: 14px;
  }

  .fv4ref--mobile-current .fv4ref-logo-card .logo-scroll-wrapper {
    width: 100%;
    height: 84px;
    margin: 0;
    overflow: hidden;
    border-color: #edf0f3;
  }

  .fv4ref--mobile-current .fv4ref-logo-card .logo-scroll-track {
    display: flex;
    width: max-content;
    will-change: transform;
  }

  .fv4ref--mobile-current .fv4ref-logo-card .logo-item {
    width: clamp(112px, 32vw, 138px);
    height: 82px;
    padding: 7px 0;
  }

  .fv4ref--mobile-current .fv4ref-functions {
    position: relative;
    inset: auto;
    z-index: 3;
    width: 100%;
    height: auto;
    min-height: 116px;
    padding: 0;
  }

  .fv4ref--mobile-current .fv4ref-functions-card {
    display: grid;
    width: 100%;
    height: auto;
    min-height: 116px;
    margin: 0;
    padding: 8px 5px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: minmax(100px, auto);
  }

  .fv4ref--mobile-current .fv4ref-function {
    min-width: 0;
    gap: 4px;
    padding: 9px 3px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 0 !important;
  }

  .fv4ref--mobile-current .fv4ref-function:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 16px;
    right: 0;
    height: calc(100% - 32px);
    border-right: 1px solid rgba(255, 255, 255, .32);
  }

  .fv4ref--mobile-current .fv4ref-function-icon {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
  }

  .fv4ref--mobile-current .fv4ref-function img,
  .fv4ref--mobile-current .fv4ref-function:nth-child(2) img,
  .fv4ref--mobile-current .fv4ref-function:nth-child(3) img,
  .fv4ref--mobile-current .fv4ref-function:nth-child(4) img {
    width: 29px;
    height: 29px;
    object-fit: contain;
    object-position: center;
    clip-path: none;
    transform: none;
  }

  .fv4ref--mobile-current .fv4ref-function strong {
    margin: 0;
    font-size: clamp(9px, 2.7vw, 12px);
    line-height: 1.35;
    letter-spacing: 0;
    white-space: normal;
  }

  .fv4ref--mobile-current .fv4ref-function p {
    display: none;
  }

  /* Use the same supplied switching banner as desktop. */
  section.switch-q4-sec.switch-q4-sec--r2-814 {
    padding: 32px 0 40px;
  }

  .switch-q4-sec--r2-814 .container {
    width: calc(100% - 20px);
  }

  .switch-q4-sec--r2-814 .switch-q4-banner {
    display: block !important;
    width: 100%;
  }

  .switch-q4-sec--r2-814 .switch-q4-mobile {
    display: none !important;
  }
}

/* The client requires this continuous logo rail to remain visibly moving.
 * Other reduced-motion rules on the page remain unchanged. */
.fv4ref-logo-card .logo-scroll-track {
  --logo-scroll-duration: 198s;
  animation: scroll-left var(--logo-scroll-duration) linear infinite;
  animation-play-state: running;
  will-change: transform;
}

@media (max-width: 768px) {
  .fv4ref--mobile-current .fv4ref-logo-card .logo-scroll-track {
    --logo-scroll-duration: 286s;
  }
}

@media (max-width: 350px) {
  .fv4ref--mobile-current .fv4ref-main {
    padding-right: 10px;
    padding-left: 10px;
  }

  .fv4ref--mobile-current .fv4ref-product-sub {
    padding-right: 8px;
    padding-left: 8px;
  }

  .fv4ref--mobile-current .fv4ref-function strong {
    font-size: 8.5px;
  }
}
