.product-home {
  --home-paper: #f9f8f4;
  --home-line: #dedfd7;
  background: var(--home-paper);
  container-type: size;
}

.landing-intro {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: min(calc(100dvh - 76px), 740px);
  min-height: min(100cqh, 740px);
}

.product-home .landing-hero {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  align-content: center;
  align-items: center;
  gap: clamp(30px, 5vw, 80px);
  padding-block: clamp(44px, 5.5vw, 88px) clamp(36px, 4vw, 60px);
}

@media (min-width: 801px) {
  .product-home .landing-hero {
    padding-block: clamp(36px, 5cqh, 68px);
  }
}

.landing-hero h1 {
  margin: 0 0 .28em;
  font-size: clamp(40px, 5.2vw, 76px);
  line-height: 1.12;
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
}

html:not([lang="zh-CN"]) .landing-hero h1 { font-size: clamp(34px, 4.5vw, 64px); }
.landing-hero h1 em { color: var(--brand); font-style: normal; }
.hero-line, .hero-line > * { display: block; }
.hero-line { overflow: clip; overflow-clip-margin: .08em; }
.landing-hero .intro { max-width: 30em; font-size: clamp(16px, 1.35vw, 19px); }
.landing-hero .text-link { text-decoration: none; }
.landing-hero .text-link:hover { text-decoration: underline; }

@media (prefers-reduced-motion: no-preference) {
  :is(.button, .nav-download, .landing-hero .text-link, .footer button, .analytics-dialog button) {
    transition:
      transform .22s cubic-bezier(.22, .75, .32, 1.12),
      background-color .2s ease-out,
      border-color .2s ease-out,
      box-shadow .22s ease-out;
  }

  @media (hover: hover) and (pointer: fine) {
    :is(.button, .nav-download, .landing-hero .text-link, .footer button, .analytics-dialog button):hover {
      transform: translateY(-1px);
    }
    :is(.button, .nav-download, .analytics-dialog button):hover {
      box-shadow: 0 4px 12px #15292024;
    }
  }

  :is(.button, .nav-download, .landing-hero .text-link, .footer button, .analytics-dialog button):active {
    transform: translateY(1px) scale(.975);
    box-shadow: none;
    transition-duration: .1s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button:active { transform: none; }
}

.landing-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 16px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
}
.landing-platforms a { color: inherit; }

.landing-devices { margin: 0; min-width: 0; }
.device-images {
  position: relative;
  isolation: isolate;
  padding: clamp(18px, 3.6vw, 54px) 7% clamp(20px, 3.2vw, 48px) 0;
}
.device-images::before {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 10%;
  border-radius: 14px clamp(26px, 6vw, 86px) 14px 14px;
  background: radial-gradient(ellipse at 30% 20%, #edf0d7, #cdddcc 72%, #bdd2c1);
  content: "";
}
.device-images a, .device-images img { display: block; }
.device-images img { width: 100%; height: auto; }
.device-desktop {
  border: 1px solid #a8af9d;
  border-radius: 8px;
  box-shadow: 0 14px 32px #1b3e3027;
}
.device-desktop img { border-radius: 7px; }
.device-phone {
  position: absolute;
  inset: auto 2% 3% auto;
  width: 24%;
  border: 3px solid #26392e;
  border-radius: clamp(8px, 1.5vw, 18px);
  box-shadow: 0 10px 20px #1b3e3038;
}
.device-phone img { border-radius: calc(clamp(8px, 1.5vw, 18px) - 3px); }
.landing-devices figcaption { margin-top: 9px; color: var(--muted); font-size: 12px; }

@media (prefers-reduced-motion: no-preference) {
  .landing-hero[data-intro-motion] h1:not([data-intro-entered]) .hero-line > *,
  .landing-hero[data-intro-motion] .landing-devices:not([data-intro-entered]):not(:focus-within)
    :is(.device-desktop, .device-phone, figcaption) {
    opacity: 0;
  }

  .landing-hero h1[data-intro-entered] .hero-line > * {
    animation: hero-line-in .58s cubic-bezier(.22, .8, .24, 1) backwards;
  }
  .landing-hero h1[data-intro-entered] .hero-line + .hero-line > * { animation-delay: .13s; }
  .landing-devices[data-intro-entered]:not(:focus-within) :is(.device-desktop, .device-phone) {
    animation: hero-device-in .74s cubic-bezier(.22, .8, .24, 1) var(--device-entry-delay) backwards;
  }
  .landing-devices[data-intro-entered] .device-desktop {
    --device-entry-x: -18px;
    --device-entry-delay: .08s;
  }
  .landing-devices[data-intro-entered] .device-phone {
    --device-entry-x: 18px;
    --device-entry-delay: .24s;
  }
  .landing-devices[data-intro-entered] figcaption {
    animation: hero-caption-in .42s ease-out .4s backwards;
  }
}

@keyframes hero-line-in {
  from { opacity: 0; transform: translateY(92%); }
  to { opacity: 1; transform: none; }
}
@keyframes hero-device-in {
  from { opacity: 0; filter: blur(9px); transform: translate(var(--device-entry-x), 10px) scale(.98); }
  to { opacity: 1; filter: none; transform: none; }
}
@keyframes hero-caption-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.landing-quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--home-line);
}
.landing-quick-links a {
  padding: 18px clamp(12px, 2.7vw, 40px);
  color: var(--ink);
  text-decoration: none;
}
.landing-quick-links a:first-child { padding-inline-start: 0; }
.landing-quick-links a + a { border-inline-start: 1px solid var(--home-line); }
.landing-quick-links a:hover strong { color: var(--brand); text-decoration: underline; }
.landing-quick-links strong { display: block; margin-bottom: 3px; font-size: 17px; }
.landing-quick-links span { display: block; color: var(--muted); font-size: 14px; }

.landing-features, .landing-start { padding-block: clamp(32px, 6vw, 80px); }
.landing-feature-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 48%);
  align-items: center;
  gap: 12px;
  min-height: clamp(94px, 11vw, 162px);
  margin-bottom: 24px;
}
.landing-feature-heading h2 { margin: 0; }
.feature-motif {
  position: relative;
  height: clamp(90px, 11vw, 162px);
  background: radial-gradient(ellipse at 58% 50%, #d5e4d584, transparent 68%);
  pointer-events: none;
}
.feature-wordmark {
  position: absolute;
  top: 50%;
  left: 58%;
  color: #087b88;
  font: 700 clamp(24px, 5vw, 80px)/1 Arial, sans-serif;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}
.feature-motif canvas { display: none; width: 100%; height: 100%; }
.feature-motif[data-animated] canvas { display: block; }
.feature-motif[data-animated] .feature-wordmark { visibility: hidden; }

.landing-story { margin-bottom: clamp(28px, 4vw, 56px); }
.landing-story .story-step {
  display: grid;
  align-items: center;
  gap: 18px;
  padding: clamp(22px, 3vw, 44px) 0;
  border: 0;
  border-top: 1px solid var(--home-line);
  border-radius: 0;
  background: transparent;
}
.story-step h3 { font-size: clamp(22px, 2.65vw, 38px); line-height: 1.3; }
.story-image {
  min-width: 0;
  margin: 0;
  padding: clamp(15px, 2.8vw, 32px);
}
.story-image img {
  display: block;
  width: min(100%, 360px);
  height: auto;
  margin-inline: auto;
  border: 1px solid #c3cabb;
  border-radius: 10px;
  box-shadow: 0 12px 30px #294c3424;
}
.story-image figcaption { margin-top: 10px; color: var(--muted); font-size: 13px; text-align: center; }
@media (min-width: 801px) {
  .landing-story .story-step {
    grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr);
    gap: clamp(24px, 5vw, 72px);
  }

  .story-image {
    display: grid;
    align-content: center;
    min-height: clamp(320px, 34vw, 420px);
  }

  .story-image img {
    width: auto;
    max-width: min(100%, 440px);
    max-height: clamp(240px, 25vw, 320px);
    object-fit: contain;
  }
}

.landing-start h2 { margin-bottom: 20px; }
.landing-feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.5vw, 22px);
}
.landing-feature {
  padding: clamp(18px, 2.9vw, 38px);
  border: 1px solid var(--home-line);
  border-radius: 12px;
  background: #fbfaf7;
}
.landing-feature h3 { margin-bottom: 8px; }
.landing-feature p { max-width: 43em; margin-bottom: 14px; color: var(--muted); }
.landing-feature .text-link { font-size: 14px; }
.landing-feature[id="feature-dedicated"] { background: #edf2e9; }
.landing-feature-list .landing-feature {
  display: flex;
  flex-direction: column;
  padding: clamp(16px, 2.4vw, 28px);
}
.feature-card-visual {
  aspect-ratio: 16 / 10;
  margin: 0 0 clamp(16px, 2.4vw, 24px);
  overflow: hidden;
  border-radius: 10px;
  background: #163429;
}
.feature-card-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.landing-feature .sharing-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 6px;
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}
.landing-feature-list .text-link { align-self: start; margin-top: auto; }
.landing-start { border-top: 1px solid var(--home-line); }
.landing-start .steps { gap: 22px clamp(16px, 2.4vw, 32px); }
.landing-start .steps li { padding-top: 12px; }
.landing-start .steps li::before {
  display: block;
  margin-bottom: 5px;
  color: var(--brand);
  font-weight: 700;
  content: counter(list-item);
}
.landing-start .steps h3 { margin-bottom: 0; }
.landing-start .steps a {
  display: grid;
  gap: 12px;
  border-radius: 10px;
}
.step-visual {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid #d9e4da;
  border-radius: 10px;
  background:
    radial-gradient(ellipse at 14% 0%, #fbfaf0, transparent 72%),
    linear-gradient(145deg, #edf3eb, #deebe2);
}
.step-visual img {
  display: block;
  height: auto;
  border: 1px solid #aebfb2;
  border-radius: 6px;
  box-shadow: 0 8px 20px #1c463020;
}
.step-visual--install .step-screen { width: 88%; }
.step-visual--account .step-screen { width: 71%; }
.step-visual--connect .step-screen {
  position: absolute;
  top: 16%;
  left: 7%;
  width: 76%;
}
.step-visual--connect .step-node {
  position: absolute;
  right: 7%;
  bottom: 9%;
  width: 33%;
}
@media (prefers-reduced-motion: no-preference) {
  .step-visual { transition: transform .22s cubic-bezier(.22, .75, .32, 1.12); }
  @media (hover: hover) and (pointer: fine) {
    .landing-start .steps a:hover .step-visual { transform: translateY(-2px); }
  }
}

@media (max-width: 800px) {
  .product-home .landing-hero { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .landing-devices { width: min(100%, 610px); margin-inline: auto; }
  .device-images { padding-block: 6%; }
  .landing-feature-list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .product-home .landing-hero { padding-block: 36px 27px; }
  .landing-feature-heading { margin-bottom: 16px; }
  .landing-quick-links { grid-template-columns: minmax(0, 1fr); }
  .landing-quick-links a, .landing-quick-links a:first-child { padding: 11px 0; }
  .landing-quick-links a + a { border-inline-start: 0; border-top: 1px solid var(--home-line); }
}
