@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("assets/fonts/AlibabaPuHuiTi-2-Regular.subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Alibaba PuHuiTi";
  src: url("assets/fonts/AlibabaPuHuiTi-2-Bold.subset.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --coral: #e85a4f;
  --coral-deep: #d4453b;
  --coral-soft: #ff7a6e;
  --ink: #1c1412;
  --ink-soft: #5c403a;
  --paper: #fff8f4;
  --line: rgba(28, 20, 18, 0.1);
  --shadow: 0 18px 48px rgba(120, 48, 36, 0.18);
  --font-display: "Alibaba PuHuiTi", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Alibaba PuHuiTi", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --marquee-duration: 32s;
  /* Left readable stage ~46–48% on desktop (avoid 42rem cap collapsing wide screens to ~35%) */
  --hero-stage: clamp(28rem, 48vw, 56rem);
  --hero-inline: clamp(1.25rem, 3.4vw, 3.5rem);
  --hero-block: clamp(2.4rem, 7.5vh, 5.25rem);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(232, 90, 79, 0.28);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: #fff;
  color: var(--ink);
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  z-index: 40;
}

.skip:focus {
  top: 1rem;
}

/* —— Hero (design B: full-bleed warm desk, left stage holds brand) —— */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  min-height: 100svh;
  display: grid;
  align-items: stretch;
  overflow: clip;
  color: var(--ink);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /*
    Source photo has the subject on the right. Bias LEFT (not 100%) so the
    visible right half shows more desk/atmosphere and crops the head/shoulders
    toward the far edge instead of enlarging the face.
  */
  object-position: 54% 46%;
  transform: scale(1);
  transform-origin: 50% 50%;
  will-change: transform;
}

.hero-veil {
  position: absolute;
  inset: 0;
  /* Readable band ~52% wide; soft handoff still leaves photo full-bleed on the right */
  background:
    linear-gradient(
      98deg,
      rgba(255, 236, 224, 0.99) 0%,
      rgba(255, 234, 220, 0.97) 40%,
      rgba(255, 228, 212, 0.88) 50%,
      rgba(255, 220, 200, 0.42) 58%,
      rgba(255, 210, 188, 0.12) 68%,
      transparent 80%
    ),
    linear-gradient(
      180deg,
      rgba(255, 240, 230, 0.2) 0%,
      transparent 20%,
      transparent 80%,
      rgba(255, 236, 224, 0.38) 100%
    );
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0; /* grid item defaults to min-width:auto and would grow with marquee */
  margin: 0;
  padding: 0 var(--hero-inline);
  min-height: 100dvh;
  min-height: 100svh;
}

/* Left stage: one cohesive stack (brand → actions → platforms), fills visual weight */
.hero-stage {
  width: var(--hero-stage);
  max-width: 100%;
  min-width: 0; /* contain marquee max-content so CTAs don't inherit ~2k width */
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.6rem, 4.2vh, 2.85rem);
  padding-block: var(--hero-block);
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.4vh, 1.55rem);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: clamp(0.95rem, 1.8vw, 1.3rem);
}

.brand-logo {
  width: clamp(4rem, 6.8vw, 5.75rem);
  height: clamp(4rem, 6.8vw, 5.75rem);
  border-radius: 20px;
  object-fit: contain;
  background: #fff;
  box-shadow: 0 12px 32px rgba(90, 30, 24, 0.16);
  flex: none;
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7.4vw, 7.25rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-wrap: balance;
}

.tagline {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.95rem, 4.6vw, 3.85rem);
  font-weight: 400;
  line-height: 1.16;
  color: var(--ink);
  text-wrap: balance;
  max-width: 12em;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(1.05rem, 2.4vh, 1.45rem);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.lede {
  margin: 0;
  max-width: 32rem;
  font-size: clamp(1.12rem, 1.85vw, 1.42rem);
  line-height: 1.55;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 3.65rem;
  padding: 0.85rem 1.85rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: clamp(1.05rem, 1.3vw, 1.18rem);
  text-decoration: none;
  border: 1.5px solid transparent;
  transition:
    transform 180ms var(--ease),
    box-shadow 180ms var(--ease),
    background 180ms var(--ease),
    color 180ms var(--ease),
    border-color 180ms var(--ease);
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, var(--coral-soft), var(--coral));
  box-shadow: 0 12px 28px rgba(216, 72, 62, 0.34);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #ff8579, var(--coral-deep));
}

.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(28, 20, 18, 0.55);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background: #fff;
  border-color: var(--ink);
}

.privacy {
  margin: 0;
  font-size: clamp(0.98rem, 1.15vw, 1.08rem);
  color: var(--ink);
  font-weight: 400;
}

/* —— Platform marquee —— */
.platform-marquee {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
}

.marquee-viewport {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
  display: flex;
  width: max-content;
  gap: 0.9rem;
  animation: marquee-scroll var(--marquee-duration) linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  flex: none;
  min-height: 2.85rem;
  padding: 0.4rem 1rem 0.4rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 20px rgba(90, 30, 24, 0.1);
  backdrop-filter: blur(10px);
}

.marquee-item img {
  display: block;
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
  flex: none;
}

.marquee-item span {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}

.marquee-fade {
  pointer-events: none;
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2.4rem;
  z-index: 2;
}

.marquee-fade-left {
  left: 0;
  background: linear-gradient(90deg, rgba(255, 232, 218, 0.82), transparent);
}

.marquee-fade-right {
  right: 0;
  background: linear-gradient(270deg, rgba(255, 220, 200, 0.28), transparent);
}

@keyframes marquee-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

/* —— Below-fold sections —— */
.section-inner {
  width: min(860px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: clamp(2.2rem, 5.5vw, 3.6rem) 0;
}

.how {
  background:
    radial-gradient(700px 360px at 10% 0%, #ffe0d4 0%, transparent 60%),
    linear-gradient(180deg, #fff4ee 0%, #fffaf7 100%);
}

.how-intro h2,
.install-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3vw, 2.05rem);
  font-weight: 700;
  color: var(--ink);
  text-wrap: balance;
}

.how-intro p,
.install-card > p {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  max-width: 36rem;
  line-height: 1.6;
  text-wrap: pretty;
}

.how-steps {
  list-style: none;
  margin: 1.45rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}

/* Soft timeline rows — avoid a stack of heavy white cards */
.how-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  padding: 1.05rem 0.15rem;
  border-radius: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(28, 20, 18, 0.08);
}

.how-steps li:last-child {
  border-bottom: none;
  padding-bottom: 0.2rem;
}

.step-num {
  display: grid;
  place-items: center;
  width: 2.05rem;
  height: 2.05rem;
  margin-top: 0.12rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background: var(--coral);
  box-shadow: 0 6px 14px rgba(216, 72, 62, 0.22);
  flex: none;
}

.how-steps strong {
  display: block;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.how-steps p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.58;
  text-wrap: pretty;
}

.install {
  background: #fffaf7;
}

.install-card {
  padding: clamp(1.15rem, 3vw, 1.7rem);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(255, 236, 230, 0.9));
  border: 1px solid rgba(232, 90, 79, 0.14);
  box-shadow: var(--shadow);
}

.install-card ol {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}

.install-card li + li {
  margin-top: 0.35rem;
}

.install-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: rgba(232, 90, 79, 0.1);
  color: #9f1d2a;
}

.install-tip {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.site-foot {
  width: min(860px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 0 0 2rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.site-foot p {
  margin: 0;
}

/* Motion */
.brand-lockup,
.hero-actions,
.platform-marquee {
  animation: rise-in 760ms var(--ease) both;
}

.brand-lockup { animation-delay: 40ms; }
.hero-actions { animation-delay: 160ms; }
.platform-marquee { animation-delay: 300ms; }

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (max-width: 960px) {
  :root {
    --hero-stage: min(100%, 36rem);
  }

  .hero-veil {
    background:
      linear-gradient(
        102deg,
        rgba(255, 236, 224, 0.97) 0%,
        rgba(255, 232, 218, 0.92) 42%,
        rgba(255, 220, 200, 0.48) 58%,
        transparent 78%
      ),
      linear-gradient(
        180deg,
        rgba(255, 240, 230, 0.25) 0%,
        transparent 24%,
        transparent 76%,
        rgba(255, 236, 224, 0.5) 100%
      );
  }

  .hero-photo {
    object-position: 58% 44%;
  }
}

@media (max-width: 820px) {
  :root {
    --hero-stage: 100%;
    --hero-block: clamp(1.05rem, 3.2vh, 1.85rem);
  }

  /* Readable top band → soft handoff → photo owns the lower third */
  .hero-veil {
    background:
      linear-gradient(
        180deg,
        rgba(255, 236, 224, 0.985) 0%,
        rgba(255, 234, 220, 0.97) 34%,
        rgba(255, 230, 216, 0.86) 46%,
        rgba(255, 228, 212, 0.48) 60%,
        rgba(255, 236, 224, 0.16) 74%,
        transparent 88%
      );
  }

  .hero-photo {
    /* Keep desk/mug lower; leave soft upper wash behind the platform band */
    object-position: 70% 52%;
  }

  .hero-stage {
    justify-content: flex-start;
    gap: 1.2rem;
  }

  .brand-lockup {
    gap: 0.55rem;
  }

  .tagline {
    max-width: none;
    color: var(--ink-soft);
  }

  .lede {
    max-width: none;
    font-size: clamp(1.02rem, 3.6vw, 1.16rem);
    line-height: 1.55;
  }

  .hero-actions {
    gap: 0.85rem;
  }

  .privacy {
    font-size: 0.92rem;
    font-weight: 400;
    color: var(--ink-soft);
  }

  /*
    Soft wash band at the veil→photo handoff.
    Icons/names sit in the wash — no white capsule chips, no sticker rail.
  */
  .platform-marquee {
    margin-top: clamp(0.95rem, 3.2vh, 1.55rem);
    margin-inline: calc(-1 * var(--hero-inline));
    width: calc(100% + 2 * var(--hero-inline));
    max-width: none;
    padding: 0.85rem var(--hero-inline) 0.7rem;
    background: linear-gradient(
      180deg,
      rgba(255, 236, 224, 0.72) 0%,
      rgba(255, 236, 224, 0.38) 55%,
      rgba(255, 236, 224, 0) 100%
    );
  }

  .marquee-viewport {
    padding: 0.1rem 0;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  }

  .marquee-track {
    padding: 0;
    gap: 1.05rem;
  }

  .marquee-item {
    min-height: 2.15rem;
    padding: 0;
    gap: 0.45rem;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
  }

  .marquee-item img {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(90, 30, 24, 0.12);
  }

  .marquee-item span {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--ink);
  }

  .marquee-fade {
    width: 2.8rem;
  }

  .marquee-fade-left {
    background: linear-gradient(90deg, rgba(255, 236, 224, 0.95), transparent);
  }

  .marquee-fade-right {
    background: linear-gradient(270deg, rgba(255, 236, 224, 0.42), transparent);
  }
}

@media (max-width: 560px) {
  :root {
    --hero-inline: 1.2rem;
    --hero-block: clamp(0.95rem, 2.8vh, 1.55rem);
  }

  .section-inner,
  .site-foot {
    width: min(860px, calc(100% - 2.4rem));
  }

  .section-inner {
    padding: 2rem 0 2.15rem;
  }

  /* Brand leads; tagline steps down clearly */
  .brand {
    font-size: clamp(2.35rem, 10.2vw, 2.85rem);
  }

  .brand-logo {
    width: clamp(2.85rem, 12vw, 3.25rem);
    height: clamp(2.85rem, 12vw, 3.25rem);
    border-radius: 13px;
    box-shadow: 0 8px 22px rgba(90, 30, 24, 0.14);
  }

  .brand-row {
    gap: 0.75rem;
  }

  .brand-lockup {
    gap: 0.45rem;
  }

  .tagline {
    font-size: clamp(1.22rem, 5.4vw, 1.48rem);
    line-height: 1.28;
    letter-spacing: 0.005em;
  }

  .hero-stage {
    gap: 1rem;
  }

  .hero-actions {
    gap: 0.72rem;
  }

  .lede {
    font-size: clamp(0.98rem, 3.5vw, 1.08rem);
    line-height: 1.52;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.62rem;
    margin-top: 0.12rem;
  }

  .btn {
    width: 100%;
    min-height: 3.15rem;
    padding: 0.72rem 1.3rem;
    font-size: 1.02rem;
  }

  .btn-primary {
    box-shadow: 0 10px 24px rgba(216, 72, 62, 0.3);
  }

  .btn-ghost {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(28, 20, 18, 0.42);
  }

  .privacy {
    font-size: 0.88rem;
    margin-top: 0.1rem;
  }

  .platform-marquee {
    margin-top: 1.15rem;
    padding: 0.75rem var(--hero-inline) 0.65rem;
  }

  .marquee-track {
    gap: 0.95rem;
  }

  .marquee-item {
    min-height: 2.05rem;
  }

  .marquee-item img {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 7px;
  }

  .marquee-item span {
    font-size: 0.84rem;
    font-weight: 700;
  }

  .marquee-fade {
    width: 2.4rem;
  }

  .how-intro h2,
  .install-card h2 {
    font-size: clamp(1.55rem, 7vw, 1.8rem);
  }

  .how-intro p,
  .install-card > p {
    font-size: 0.98rem;
    line-height: 1.62;
  }

  .how-steps {
    margin-top: 1.15rem;
  }

  .how-steps li {
    gap: 0.8rem;
    padding: 0.95rem 0;
  }

  .how-steps strong {
    font-size: 1.02rem;
  }

  .how-steps p {
    font-size: 0.92rem;
    line-height: 1.6;
  }

  .step-num {
    width: 1.9rem;
    height: 1.9rem;
    font-size: 0.9rem;
  }

  .install-card {
    padding: 1.25rem 1.15rem 1.4rem;
    border-radius: 20px;
  }

  .install-card ol {
    padding-left: 1.15rem;
    font-size: 0.95rem;
    line-height: 1.62;
  }

  .install-card li + li {
    margin-top: 0.65rem;
  }

  /* Keep the chrome:// URL intact on its own line instead of mid-word wrap */
  .install-card code {
    display: block;
    width: max-content;
    max-width: 100%;
    white-space: nowrap;
    overflow-x: auto;
    font-size: 0.82em;
    margin: 0.3rem 0 0.15rem;
    padding: 0.28rem 0.45rem;
  }

  .install-tip {
    font-size: 0.9rem;
    line-height: 1.55;
  }

  .how .section-inner {
    padding-bottom: 1.55rem;
  }

  .install .section-inner {
    padding-top: 0.35rem;
  }

  .site-foot {
    padding-bottom: 1.6rem;
    font-size: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .brand-lockup,
  .hero-actions,
  .platform-marquee {
    animation: none !important;
  }

  .marquee-track {
    animation: none !important;
    flex-wrap: wrap;
    width: auto;
    max-width: 100%;
    min-width: 0;
    justify-content: flex-start;
  }

  .btn {
    transition: none;
  }
}
