/*
 * Reversible homepage mobile visual preview.
 *
 * Scope: homepage at <= 640px only.
 * Rollback: remove the home-mobile-polish.css <link> from index.html.
 * No original styles, content, or behavior are replaced by this file.
 */

@media (max-width: 640px) {
  :root {
    --mp-navy: #071c4c;
    --mp-blue: #0a3ba8;
    --mp-yellow: #ffc31a;
    --mp-ink: #10234c;
    --mp-muted: #5c6f91;
    --mp-surface: #ffffff;
    --mp-canvas: #f5f7fc;
    --mp-line: #dfe6f2;
    --mp-shadow: 0 14px 34px rgba(7, 28, 76, .10);
    --mp-radius: 22px;
  }

  body {
    color: var(--mp-ink);
    background: var(--mp-canvas);
  }

  /* Navigation */
  .header-nav {
    height: 64px !important;
    padding-inline: 14px !important;
    border-bottom: 1px solid rgba(7, 28, 76, .12);
    background: rgba(255, 195, 26, .98);
    box-shadow: 0 7px 22px rgba(7, 28, 76, .12);
    backdrop-filter: blur(12px);
  }

  .header-nav .nav-logo {
    gap: 8px;
  }

  .header-nav .nav-logo img {
    width: 40px !important;
    height: 40px !important;
  }

  .header-nav .nav-logo-text,
  .header-nav .nav-logo-text span {
    font-size: clamp(16px, 5.1vw, 20px) !important;
    letter-spacing: .35px !important;
  }

  .header-nav .hamburger {
    border-radius: 12px;
    background: rgba(255, 255, 255, .32);
  }

  .mobile-menu {
    border-top: 1px solid rgba(7, 28, 76, .1);
    border-radius: 0 0 18px 18px;
    box-shadow: 0 18px 34px rgba(7, 28, 76, .18);
  }

  /* Hero */
  .market-hero {
    min-height: 0 !important;
    margin-top: 64px !important;
    padding: 0 !important;
    border-radius: 0 0 28px 28px;
    background:
      radial-gradient(circle at 78% 18%, rgba(255, 195, 26, .18), transparent 30%),
      linear-gradient(148deg, rgba(0, 56, 179, .68), rgba(3, 25, 73, .88)),
      url('../hero/hero-background.webp') center / cover no-repeat,
      #0038b3;
    box-shadow: 0 16px 34px rgba(7, 28, 76, .17);
  }

  .market-hero::after {
    height: 84px;
    border-bottom-width: 3px;
  }

  .mh-shell {
    width: 100% !important;
    padding: 34px 18px 12px !important;
  }

  .mh-main {
    gap: 18px;
  }

  .mh-copy {
    width: 100%;
  }

  .mh-kicker {
    min-height: 26px;
    margin-bottom: 14px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 9.5px;
    letter-spacing: .55px;
  }

  .mh-title,
  .market-hero h1 {
    max-width: 350px;
    margin: 0 auto 14px;
    font-size: clamp(34px, 10vw, 41px) !important;
    line-height: 1.03 !important;
    letter-spacing: -1.4px;
  }

  .mh-subtitle {
    max-width: 345px;
    margin: 0 auto 18px;
    color: rgba(255, 255, 255, .84);
    font-size: 14px;
    line-height: 1.52;
  }

  .mh-stores {
    width: 100%;
    justify-content: center;
    gap: 9px !important;
    margin-bottom: 8px !important;
  }

  .mh-store-badge {
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 9px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
  }

  .mh-store-badge img {
    height: 42px !important;
  }

  .mh-visual {
    margin-top: 0;
  }

  .mh-device-stage {
    width: 100%;
    min-height: 0 !important;
  }

  .mh-device-stage::before {
    width: min(112vw, 470px);
    opacity: .52;
  }

  .mh-device-stage::after {
    left: 8%;
    right: 8%;
    bottom: -1px;
    height: 58px;
  }

  .mh-device-stage img {
    width: min(89vw, 430px) !important;
    transform: translateY(3px);
    filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .28));
  }

  .mh-stats {
    width: calc(100% - 24px) !important;
    margin: 16px auto 26px !important;
    padding: 8px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0;
    border: 1px solid rgba(10, 59, 168, .16);
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(7, 28, 76, .16);
  }

  .mh-stat {
    min-height: 72px;
    grid-template-columns: 38px minmax(0, 1fr);
    column-gap: 7px;
    justify-content: start;
    padding: 9px 7px !important;
    border-radius: 12px;
  }

  .mh-stat:nth-child(odd):not(:last-child) {
    border-right: 1px solid var(--mp-line) !important;
  }

  .mh-stat:nth-child(-n+4) {
    border-bottom: 1px solid var(--mp-line) !important;
  }

  .mh-stat:last-child {
    grid-column: 1 / -1 !important;
    justify-content: center;
    border: 0 !important;
  }

  .mh-stat-icon {
    width: 36px;
    height: 52px;
  }

  .mh-stat-icon svg {
    width: 31px;
    height: 31px;
  }

  .mh-stat-icon::after {
    width: 24px;
    height: 3px;
  }

  .mh-stat strong {
    font-size: 18px;
  }

  .mh-stat span {
    font-size: 10.5px;
    line-height: 1.2;
  }

  /* Ecosystem */
  .ecosystem-section {
    padding: 48px 14px 54px !important;
    background:
      radial-gradient(circle at 100% 0, rgba(255, 195, 26, .15), transparent 30%),
      linear-gradient(180deg, #f8faff 0%, #fff 100%);
  }

  .ecosystem-header {
    margin-bottom: 26px;
    padding-inline: 6px;
  }

  .ecosystem-eyebrow {
    margin-bottom: 10px;
    color: var(--mp-blue);
    font-size: 11px;
    letter-spacing: 1.8px;
  }

  .ecosystem-header h2 {
    max-width: 330px;
    margin: 0 auto 10px;
    color: var(--mp-navy);
    font-size: 30px;
    line-height: 1.08;
    letter-spacing: -1px;
  }

  .ecosystem-header p {
    max-width: 320px;
    margin-inline: auto;
    color: var(--mp-muted);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
  }

  .ecosystem-cards {
    gap: 16px;
  }

  .eco-card {
    padding: 24px 17px 20px;
    gap: 18px;
    border-width: 1px;
    border-radius: var(--mp-radius);
    box-shadow: var(--mp-shadow);
  }

  .eco-card-content {
    min-width: 0;
  }

  .eco-card-icon {
    width: 62px;
    height: 62px;
    margin-bottom: 13px;
    border-radius: 16px;
  }

  .eco-card-title {
    min-height: 0 !important;
    margin-bottom: 7px;
    font-size: 24px;
    line-height: 1.12;
  }

  .eco-card-tag {
    min-height: 0;
    margin-bottom: 8px;
    font-size: 11px;
    letter-spacing: .55px;
  }

  .eco-card-tag-underline {
    width: 38px;
    height: 3px;
    margin-bottom: 16px;
  }

  .eco-card-audience {
    min-height: 0;
    margin-bottom: 16px;
    padding: 13px;
    gap: 9px;
    border: 1px solid #e7ecf4;
    border-radius: 16px;
    background: #f8faff;
  }

  .eco-card-audience img {
    width: 48px;
    height: 48px;
  }

  .eco-card-audience p {
    max-width: 280px;
    font-size: 14px;
    line-height: 1.45;
  }

  .eco-card-divider {
    margin: 0 0 14px;
    background: #e1e7f0;
  }

  .eco-card-badges {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .eco-card-badges a {
    max-width: none;
    min-width: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 6px 14px rgba(7, 28, 76, .12);
  }

  .eco-card-badges img {
    width: 100%;
    height: auto;
    max-height: none;
  }

  .eco-card-phones {
    width: 100%;
    max-width: 310px;
    margin: 0 auto;
    padding: 16px 8px 6px;
    border-radius: 18px;
  }

  .eco-card--structure .eco-card-phones {
    background: linear-gradient(180deg, #fff9df, rgba(255, 249, 223, .15));
  }

  .eco-card--partners .eco-card-phones {
    background: linear-gradient(180deg, #fff0e4, rgba(255, 240, 228, .15));
  }

  .eco-phones-composite {
    height: 190px;
  }

  .eco-phones-pair--partners {
    width: 202px;
    height: 190px;
  }

  .eco-phone-label {
    font-size: 12px;
  }

  /* Four-step journey: compact cards replace the very long mobile timeline. */
  .journey-section {
    min-height: 0;
    padding: 52px 14px 56px;
    background:
      radial-gradient(circle at 90% 5%, rgba(255, 255, 255, .7), transparent 26%),
      linear-gradient(145deg, #ffc31a 0%, #ffdb54 52%, #ffc01a 100%);
  }

  .journey-pattern {
    opacity: .12 !important;
  }

  .journey-heading,
  .journey-tagline,
  .journey-intro,
  .journey-divider {
    transform: none;
  }

  .journey-heading {
    font-size: 29px !important;
    line-height: 1.05 !important;
    letter-spacing: .6px;
  }

  .journey-tagline {
    max-width: 330px;
    margin-top: 9px;
    font-size: 15px;
    line-height: 1.25;
    letter-spacing: .45px;
  }

  .journey-intro {
    max-width: 320px;
    margin-top: 12px;
    font-size: 13.5px;
    line-height: 1.5;
  }

  .journey-divider {
    width: 150px;
    margin: 18px auto 22px;
  }

  .journey-divider::before,
  .journey-divider::after {
    width: 48px;
  }

  .journey-track {
    gap: 11px;
    margin-top: 0;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .journey-step {
    min-height: 112px;
    padding: 14px;
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 13px;
    align-items: center;
    text-align: left;
    border: 1px solid rgba(10, 59, 168, .13);
    border-radius: 18px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 9px 22px rgba(95, 66, 0, .10);
    backdrop-filter: blur(8px);
  }

  .journey-icon-wrap {
    grid-row: 1 / span 2;
    width: 64px;
    height: 64px;
    margin: 0;
    border-width: 2px;
    box-shadow: 0 7px 15px rgba(10, 59, 168, .13), 0 0 0 5px rgba(255, 193, 7, .35);
  }

  .journey-icon-wrap svg {
    width: 29px;
    height: 29px;
  }

  .journey-badge {
    top: -7px;
    right: -7px;
    width: 27px;
    height: 27px;
    border-width: 2px;
    font-size: 10px;
  }

  .journey-step h3 {
    align-self: end;
    margin: 0 0 4px;
    font-size: 16px;
    line-height: 1.2;
  }

  .journey-step p {
    align-self: start;
    margin: 0;
    color: #42597f;
    font-size: 12px;
    line-height: 1.42;
  }

  /* Founders */
  .founders-sec {
    padding: 54px 14px 56px !important;
    background:
      radial-gradient(circle at 0 0, rgba(255, 195, 26, .12), transparent 27%),
      linear-gradient(180deg, #fff 0%, #f4f7ff 100%);
  }

  .founders-rings {
    opacity: .28;
  }

  .founders-eyebrow {
    gap: 10px;
    margin-bottom: 14px;
    font-size: 11px;
    letter-spacing: 1.7px;
  }

  .founders-eyebrow-line {
    width: 30px;
  }

  .founders-sec .sec-title {
    margin-bottom: 18px;
    font-size: 31px !important;
    line-height: 1.1 !important;
    letter-spacing: -.8px;
  }

  .founders-heading-ul::after {
    bottom: -6px;
    height: 3px;
  }

  .founders-sec .sec-sub {
    max-width: 340px;
    margin-bottom: 25px;
    color: var(--mp-muted);
    font-size: 13.5px;
    line-height: 1.55;
  }

  .founders-grid {
    gap: 17px;
  }

  .founder-card {
    border: 1px solid rgba(10, 59, 168, .22);
    border-radius: var(--mp-radius);
    box-shadow: var(--mp-shadow);
  }

  .founder-photo-wrap {
    aspect-ratio: 16 / 10;
  }

  .founder-info-pane {
    padding: 20px 18px 22px;
  }

  .founder-pill {
    margin-bottom: 10px;
    padding: 5px 13px;
    font-size: 10px;
  }

  .fot-name {
    margin-bottom: 8px;
    font-size: 25px;
  }

  .founder-name-bar {
    margin-bottom: 10px;
  }

  .founder-role-line {
    font-size: 14px;
  }

  .founder-company-line {
    margin-bottom: 10px;
    font-size: 12px;
  }

  .founder-bio {
    margin-bottom: 13px;
    color: #385685;
    font-size: 13px;
    line-height: 1.58;
  }

  .f-tags {
    gap: 6px;
    margin-bottom: 14px;
  }

  .f-tag {
    padding: 6px 10px;
    font-size: 10.5px;
  }

  .f-soc {
    width: 42px;
    height: 42px;
    border-radius: 11px;
  }

  /* FAQ */
  #faq {
    padding: 42px 12px 52px !important;
    background:
      radial-gradient(circle at 100% 0, rgba(255, 195, 26, .12), transparent 25%),
      #f3f6fc;
  }

  #faq .faq-hero {
    min-height: 0;
    padding: 32px 18px 38px;
    border: 1px solid rgba(10, 59, 168, .08);
    border-radius: 20px;
    background-position: center;
    box-shadow: 0 12px 30px rgba(7, 28, 76, .08);
  }

  #faq .faq-hero-content {
    width: 100%;
    max-width: 350px;
    margin-inline: auto;
  }

  #faq .faq-hero-eyebrow {
    gap: 7px;
    margin-bottom: 12px;
    font-size: 10.5px;
    letter-spacing: 1.35px;
  }

  #faq .faq-hero-title {
    max-width: 340px;
    margin: 0 auto 14px;
    font-size: clamp(27px, 8.2vw, 32px);
    line-height: 1.08;
    letter-spacing: -.6px;
  }

  #faq .faq-hero-title span {
    margin-top: 3px;
  }

  #faq .faq-hero-sub {
    max-width: 315px;
    margin-inline: auto;
    font-size: 14px;
    line-height: 1.55;
  }

  #faq .faq-hero-search {
    grid-template-columns: 36px minmax(0, 1fr) 40px;
    width: 100%;
    min-height: 46px;
    margin-top: 18px;
    padding: 3px 4px;
  }

  #faq .faq-hero-search input {
    height: 38px;
    padding-inline: 4px;
    font-size: 12px;
  }

  #faq .faq-hero-search button {
    width: 38px;
    height: 38px;
  }

  #faq .sec-label {
    margin-bottom: 8px;
    font-size: 11px;
    letter-spacing: 1.7px;
  }

  #faq .sec-title {
    max-width: 330px;
    margin: 0 auto 10px;
    font-size: 30px !important;
  }

  #faq .sec-sub {
    max-width: 330px;
    margin-bottom: 24px;
    color: var(--mp-muted);
    font-size: 13.5px;
    line-height: 1.5;
  }

  .faq-card {
    padding: 13px !important;
    margin: -18px 0 0 !important;
    border: 1px solid rgba(10, 59, 168, .12);
    border-radius: var(--mp-radius);
    box-shadow: var(--mp-shadow);
  }

  .faq-layout {
    gap: 18px;
  }

  .faq-sidebar {
    margin-inline: -3px;
    padding: 3px 3px 10px;
    display: flex;
    flex-wrap: nowrap;
    gap: 7px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
    scroll-snap-type: inline proximity;
  }

  .faq-sidebar::-webkit-scrollbar {
    display: none;
  }

  .faq-sidebar-title {
    display: none;
  }

  .faq-cat-btn {
    min-height: 42px;
    margin: 0;
    padding: 7px 10px;
    flex: 0 0 auto;
    gap: 6px;
    border: 1px solid #dce4f0;
    border-left-width: 1px;
    border-radius: 999px;
    background: #f8faff;
    font-size: 11.5px;
    scroll-snap-align: start;
  }

  .faq-cat-btn.active {
    border-color: var(--mp-blue);
    background: var(--mp-blue);
    box-shadow: 0 7px 16px rgba(10, 59, 168, .22);
  }

  .faq-cat-icon {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    font-size: 12px;
  }

  .faq-search-row {
    gap: 8px;
    margin-bottom: 18px;
  }

  .faq-search-row input {
    min-height: 46px;
    padding-left: 40px;
    border-radius: 13px;
    background: #f7f9fd;
  }

  .faq-count {
    padding-left: 3px;
    font-size: 11px;
  }

  .faq-group {
    margin-bottom: 10px;
    border: 1px solid #e1e7f0;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
  }

  .faq-group-summary {
    min-height: 46px;
    margin: 0;
    padding: 9px 12px;
    background: #f8faff;
  }

  .faq-group-summary .faq-group-title {
    font-size: 11px;
    letter-spacing: .8px;
  }

  .faq-group-summary .faq-group-title::after {
    display: none;
  }

  .faq-group-chevron {
    width: 18px;
    height: 18px;
  }

  .faq-group > .faq-item {
    margin: 7px 8px;
  }

  .faq-q {
    padding: 13px 12px;
  }

  .faq-q-text {
    font-size: 13px;
  }

  .faq-a-inner {
    padding: 0 12px 14px;
    font-size: 12.5px;
    line-height: 1.65;
  }

  .faq-footnote {
    margin-top: 18px;
    padding: 13px;
    border-radius: 13px;
    background: #f7f9fd;
    font-size: 12.5px;
  }

  /* Contact */
  #contact {
    padding: 54px 14px 58px !important;
    background:
      radial-gradient(circle at 90% 4%, rgba(255, 195, 26, .14), transparent 25%),
      linear-gradient(155deg, #0a3ba8 0%, #061d50 100%) !important;
  }

  .cf-layout {
    gap: 26px;
  }

  .cf-left h2 {
    margin-bottom: 10px;
    text-align: center;
    font-size: 31px;
    line-height: 1.12;
  }

  .cf-left > p {
    max-width: 330px;
    margin: 0 auto 22px;
    text-align: center;
    font-size: 13.5px;
    line-height: 1.55;
  }

  .cf-info {
    gap: 8px;
  }

  .cf-info-item {
    min-width: 0;
    padding: 11px 12px;
    gap: 11px;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    background: rgba(255, 255, 255, .07);
  }

  .cf-info-icon,
  .cf-info-icon[style] {
    width: 36px !important;
    height: 36px !important;
    flex: 0 0 36px;
  }

  .cf-info-icon svg {
    width: 36px;
    height: 36px;
  }

  .cf-info-item > div:last-child {
    min-width: 0;
  }

  .cf-info-label {
    margin-bottom: 1px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .65px;
  }

  .cf-info-val {
    overflow-wrap: anywhere;
    font-size: 12.5px;
    line-height: 1.35;
  }

  .cf-form {
    padding: 20px 16px !important;
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: var(--mp-radius);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .2);
  }

  .cf-form .form-group {
    margin-bottom: 16px;
  }

  .cf-form .form-group label {
    margin-bottom: 7px;
    font-size: 12px;
  }

  .cf-form input,
  .cf-form select,
  .cf-form textarea {
    min-height: 48px;
    padding: 13px 14px;
    border-width: 1.5px;
    border-radius: 11px;
  }

  .cf-form textarea {
    min-height: 112px;
  }

  .cf-privacy-note {
    margin-bottom: 13px;
    font-size: 10.5px;
  }

  .submit-btn {
    min-height: 50px;
    padding: 13px;
    border-radius: 12px;
    font-size: 15px;
  }

  /* Calm hover-only motion on touch devices. */
  .eco-card:hover,
  .founder-card:hover,
  .journey-step:hover .journey-icon-wrap {
    transform: none !important;
  }
}

@media (max-width: 360px) {
  .mh-title,
  .market-hero h1 {
    font-size: 32px !important;
  }

  .mh-store-badge img {
    height: 38px !important;
  }

  .journey-step {
    grid-template-columns: 58px minmax(0, 1fr);
    padding: 12px;
    column-gap: 11px;
  }

  .journey-icon-wrap {
    width: 54px;
    height: 54px;
  }

  .journey-icon-wrap svg {
    width: 25px;
    height: 25px;
  }
}
