/* MomentFit Enhancements: SF vector icons + 01 Counter/Wake Slider/Squish Switch + 04 Warm Cream Silk */

/* SF Symbol-style inline SVGs (cross-platform Windows/macOS/iOS crisp rendering, zero emoji) */
.sf-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.14em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sand-tile small .sf-icon {
  width: 12px;
  height: 12px;
  vertical-align: 0;
}
.amber-scan-btn .sf-icon {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}
.white-pill-btn {
  gap: 5px;
}
.white-pill-btn .sf-icon {
  width: 14px;
  height: 14px;
}
.plan-footer-row > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.plan-footer-row > strong {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.plan-footer-row .sf-icon {
  width: 13px;
  height: 13px;
}
.pg-check .sf-icon {
  width: 11px;
  height: 11px;
  stroke-width: 2.5;
}
.qs-check-circle .sf-icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.3;
}
.ai-confirm-btn .sf-icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.1;
}
.bn-arrow .sf-icon {
  width: 18px;
  height: 18px;
  stroke-width: 1.9;
}
.ric-chevron .sf-icon {
  width: 12px;
  height: 12px;
  stroke-width: 2.2;
}
html[dir="rtl"] .sf-flip-rtl {
  transform: scaleX(-1);
}

/* 04 Warm Cream Silk Hero Canvas & Serif Optical Focus (zero flash handoff) */
.hero-section {
  position: relative;
  overflow: hidden;
}
.mf-silk-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.hero-section > .container {
  position: relative;
  z-index: 1;
}

.editorial-title .mf-focus-seg {
  display: inline-block;
}
.editorial-title.is-breathing .mf-focus-seg {
  animation: mfLensBreath 7.2s ease-in-out var(--bd, 0ms) infinite;
}
@keyframes mfLensBreath {
  0%, 60%, 100% { opacity: 1; filter: blur(0px); }
  76% { opacity: 0.72; filter: blur(2.4px); }
}

/* 01 Odometer Counter (strictly LTR digits so RTL ar/ur never reverse) */
.odo {
  display: inline-flex;
  align-items: baseline;
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
  line-height: 1.04;
}
.odo-digit {
  display: inline-block;
  height: 1.04em;
  overflow: hidden;
  position: relative;
}
.odo-strip {
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.odo[data-odo-ready="true"] .odo-strip {
  transition: transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}
.odo-strip i {
  font-style: normal;
  height: 1.04em;
  display: block;
  text-align: center;
}

/* 01 Wake Slider wrapping the accessible #heicQualitySlider */
.wake-range-wrap {
  position: relative;
  height: 30px;
  display: flex;
  align-items: center;
  touch-action: none;
}
.wake-range-wrap .heic-range {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 30px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.wake-rail {
  position: absolute;
  left: 0;
  right: 0;
  height: 7px;
  border-radius: 99px;
  background: var(--surface-muted);
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.wake-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, #e7ad60, var(--accent));
  transition: width 0.14s ease-out;
}
html[dir="rtl"] .wake-fill {
  left: auto;
  right: 0;
  background: linear-gradient(270deg, #e7ad60, var(--accent));
}
.wake-range-wrap.is-dragging .wake-fill {
  transition: none;
}
.wake-trail {
  position: absolute;
  top: 50%;
  height: 16px;
  border-radius: 99px;
  background: radial-gradient(circle, rgba(223, 138, 40, 0.44), transparent 76%);
  transform: translateY(-50%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.28s ease;
}
.wake-knob {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--accent);
  box-shadow: 0 3px 10px rgba(190, 109, 18, 0.28);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
  transition: left 0.14s ease-out, right 0.14s ease-out, transform 0.28s var(--spring-easing);
}
html[dir="rtl"] .wake-knob {
  transform: translate(50%, -50%);
}
.wake-range-wrap.is-dragging .wake-knob {
  transition: transform 0.2s var(--spring-easing);
  transform: translate(-50%, -50%) scale(1.16);
}
html[dir="rtl"] .wake-range-wrap.is-dragging .wake-knob {
  transform: translate(50%, -50%) scale(1.16);
}
.wake-range-wrap:focus-within .wake-knob {
  box-shadow: 0 0 0 4px rgba(223, 138, 40, 0.22), 0 3px 10px rgba(190, 109, 18, 0.28);
}

/* 01 Squish Switch upgrade for #hdrSwitchBtn */
.ios-switch span {
  transition:
    translate 0.36s var(--spring-easing),
    width 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
.ios-switch.is-squishing span {
  width: 28px;
}
.ios-switch[aria-checked="true"].is-squishing span {
  translate: 12px 0;
}
html[dir="rtl"] .ios-switch[aria-checked="true"].is-squishing span {
  translate: -12px 0;
}

@media (prefers-reduced-motion: reduce) {
  .editorial-title .mf-focus-seg {
    animation: none !important;
    opacity: 1 !important;
    filter: none !important;
  }
  .odo-strip,
  .wake-fill,
  .wake-knob,
  .ios-switch span {
    transition: none !important;
  }
}

/* =====================================================
   Hero A2 Split Layout + Proportional Duo Screen Scale
   ===================================================== */
.hero-lead-br {
  display: inline;
}

.hero-lead {
  text-wrap: balance;
}

@media (min-width: 721px) {
  .duo-screen .app-canvas {
    width: 830px;
    height: 584px;
    transform-origin: top left;
    transform: scale(var(--duo-scale, 1));
    grid-template-columns: 300px minmax(0, 1fr) 54px;
    gap: 20px;
    padding-block: 20px;
    padding-inline: 24px 18px;
  }

  html[dir="rtl"] .duo-screen .app-canvas {
    transform-origin: top right;
  }

  .duo-screen .app-serif-logo { font-size: 30px; }
  .duo-screen .real-import-card { padding: 18px; }
  .duo-screen .sand-tile { padding: 12px 8px; }
  .duo-screen .sand-tile strong { font-size: 13.5px; }
  .duo-screen .amber-scan-btn { height: 44px; font-size: 14.5px; margin-bottom: 14px; }
  .duo-screen .white-pill-btn { padding: 9px 8px; font-size: 12.5px; }
  .duo-screen .liquid-glass-pill { height: 54px; padding: 0 10px 0 20px; }
  .duo-screen .liquid-share-orb { width: 54px; height: 54px; }
  .duo-screen .lgp-play-btn.is-duo-circle { width: 38px; height: 38px; }
  .duo-clock { font-size: 11px; }
  .duo-antenna-arc { width: 28px; height: 22px; }
}

@media (min-width: 961px) {
  .hero-section {
    min-height: calc(100dvh - var(--nav-height));
    display: flex;
    align-items: center;
    padding: clamp(14px, 2.2vh, 34px) 0 clamp(18px, 2.8vh, 42px);
  }

  #demo .container {
    width: min(1240px, calc(100% - clamp(40px, 6vw, 96px)));
  }

  .hero-stage-grid {
    display: grid;
    grid-template-columns: minmax(310px, 0.86fr) minmax(0, 1.34fr);
    gap: clamp(24px, 3.6vw, 52px);
    align-items: center;
  }

  .hero-copy {
    text-align: start;
    max-width: none;
    margin: 0;
  }

  .editorial-title {
    font-size: clamp(32px, 3.2vw, 46px);
    line-height: 1.14;
    margin: 0 0 14px;
    text-wrap: balance;
  }

  :is(:lang(zh-Hans), :lang(zh-Hant), :lang(ja)) #demo .editorial-title {
    white-space: nowrap;
  }

  .hero-lead-br {
    display: inline;
  }

  .hero-lead {
    font-size: clamp(15.5px, 1.25vw, 17.5px);
    line-height: 1.65;
    margin: 0 0 24px;
    max-width: 36ch;
    text-wrap: balance;
  }

  .hero-cta-row {
    justify-content: flex-start;
  }

  .duo-device-stage {
    max-width: none;
    width: min(100%, 860px, calc((100dvh - var(--nav-height) - clamp(52px, 7vh, 88px)) * 1.3765));
    margin: 0 auto;
  }
}

@media (max-width: 960px) {
  .hero-section {
    padding: 40px 0 56px;
  }

  .hero-stage-grid {
    display: block;
  }

  .hero-copy {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 28px;
  }

  .editorial-title {
    font-size: clamp(34px, 6vw, 52px);
    margin: 0 0 14px;
    text-wrap: balance;
  }

  .hero-lead {
    margin: 0 auto 22px;
  }

  .hero-cta-row {
    justify-content: center;
  }

  .duo-device-stage {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
  }
}

@media (max-width: 720px) {
  .hero-section {
    padding: 36px 0 52px;
  }

  .editorial-title {
    font-size: clamp(30px, 8.8vw, 42px);
  }

  .duo-device-stage {
    width: 100%;
    max-width: 100%;
  }

  .duo-screen .app-canvas {
    width: auto;
    height: auto;
    transform: none;
    grid-template-columns: 1fr;
    padding: 16px;
  }
}
