/* Shared cinematic presentation for the two product sites. */
:root {
  color-scheme: dark;

  --bg: #08090b;
  --line: #292b30;
  --text-1: #f5f5f7;
  --text-2: #b9bbc3;
  --text-3: #9699a3;
  --accent: #ff9e92;
  --primary-fill: #f3f3f5;
  --primary-ink: #101114;
  --focus: #e8eef7;

  --font-text:
    "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "PingFang SC",
    "Microsoft YaHei", sans-serif;
  --font-display:
    "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "PingFang SC",
    "Microsoft YaHei", sans-serif;
}

[data-product="sub2"] {
  --accent: #ebc58b;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-synthesis: none;
}

:lang(zh-CN) body,
body:lang(zh-CN) {
  line-height: 1.8;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--text-1);
  font-family: var(--font-display);
  line-height: 1.2;
  text-wrap: balance;
}

p,
ul,
ol {
  margin: 0;
}

a {
  color: var(--text-1);
  text-decoration-color: color-mix(in srgb, var(--accent) 70%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

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

strong {
  color: var(--text-1);
  font-weight: 600;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.wrap {
  width: min(70rem, 100% - 2rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 0.875rem;
  border-radius: 8px;
  background: var(--text-1);
  color: var(--primary-ink);
  z-index: 3;
}

.skip:focus {
  top: 1rem;
}

/* Header */
.site-header {
  position: relative;
  z-index: 2;
  padding-top: 1rem;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #101113;
  box-shadow: 0 8px 32px #0005;
}

.site-header a {
  color: var(--text-2);
  font-size: 0.9375rem;
  text-decoration: none;
}

.site-header a:hover,
.site-header a[aria-current="page"] {
  color: var(--text-1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 600;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.5rem;
}

.site-header nav a {
  padding-block: 0.375rem;
}

.site-header nav a[aria-current="page"] {
  box-shadow: 0 2px 0 var(--accent);
}

.site-header .language {
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.site-header .language:hover {
  border-color: var(--text-3);
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(3.5rem, 6vw, 5rem) 2rem;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -6rem 0 auto;
  height: min(66rem, 100%);
  background: url("assets/cinema-light.webp") center top / cover no-repeat;
  opacity: 0.7;
  pointer-events: none;
}

.hero-copy {
  text-align: center;
}

h1 {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.tagline {
  display: block;
  margin: 1.25rem auto 0;
  max-width: 16em;
  color: var(--text-1);
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.4vw, 4.5rem);
  font-weight: 650;
  letter-spacing: -0.045em;
  line-height: 1.12;
  text-wrap: balance;
}

:lang(zh-CN) .tagline {
  max-width: 14em;
  line-height: 1.3;
  letter-spacing: -0.035em;
}

.promise {
  margin-top: 1.5rem;
  color: #dddde2;
  font-size: 1.0625rem;
  font-weight: 600;
}

.lead {
  margin-top: 1.5rem;
  max-width: 42rem;
  font-size: 1.125rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 3.5rem;
  padding: 0.625rem 1.375rem;
  border: 1px solid #55565e;
  border-radius: 9px;
  background: #141418;
  color: var(--text-1);
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

.button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.button.primary {
  border-color: transparent;
  background: var(--primary-fill);
  color: var(--primary-ink);
  box-shadow: 0 0 20px #ffffff14;
}

.button.primary:hover {
  filter: brightness(1.06);
}

.button .hint {
  font-size: 0.8125rem;
  font-weight: 400;
  opacity: 0.78;
}

.meta {
  margin-top: 1.25rem;
  color: var(--text-3);
  font-size: 0.9375rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem 1.5rem;
  margin-top: 0.625rem;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.hero .showcase {
  margin-block: clamp(2.5rem, 5vw, 4rem) 0;
  padding: 0.5rem;
  border: 1px solid #484149;
  border-radius: 18px;
  background: #151519;
  box-shadow: 0 32px 80px #0009;
}

.hero figure img {
  border: 1px solid var(--line);
  border-radius: 14px;
}

.showcase img {
  width: 100%;
  border-radius: 11px;
}

figcaption {
  padding: 0.75rem 0.75rem 0.25rem;
  color: var(--text-3);
  font-size: 0.875rem;
}

/* Sections */
.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.download {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: start;
}

.download .lead {
  font-size: 1rem;
}

.download .actions .button {
  flex: 1 1 12rem;
}

.section-callout {
  padding-block: 0 1rem;
}

h2 {
  font-size: clamp(1.625rem, 3.4vw, 2.25rem);
  font-weight: 650;
  letter-spacing: -0.015em;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.callout {
  max-width: 46rem;
  color: var(--text-3);
  font-size: 0.9375rem;
}

.steps {
  display: grid;
  gap: clamp(4rem, 10vw, 8rem);
  margin-top: 3.5rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: center;
  counter-increment: step;
}

.step-copy::before {
  content: "0" counter(step);
  display: block;
  margin-bottom: 1.25rem;
  color: var(--text-3);
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.06em;
}

.steps h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 550;
}

.steps img {
  width: 100%;
}

.steps li:nth-child(even):has(img) .step-copy {
  order: 2;
}

.steps li:not(:has(img)) {
  display: block;
  max-width: 42rem;
}

.steps p {
  margin-top: 1rem;
  max-width: 28em;
}

.pairs {
  width: 100%;
  margin-top: 2rem;
  border-collapse: collapse;
  text-align: left;
}

.pairs th,
.pairs td {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.pairs thead th {
  padding-block: 0 0.75rem;
  color: var(--text-3);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.pairs tbody th {
  width: 42%;
  padding-right: 2rem;
  color: var(--text-1);
  font-weight: 600;
}

.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
}

.section-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.7fr);
  gap: 2rem 4rem;
  align-items: start;
}

.section-columns h2 {
  font-size: 1.5rem;
  font-weight: 550;
}

.section-columns .note {
  grid-column: 2;
  margin-top: 0;
  font-size: 0.9375rem;
  color: var(--text-3);
}

.panel ul {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 0;
  list-style: none;
}

.note,
.intro {
  margin-top: 1.5rem;
  max-width: 46rem;
}

.faq {
  display: grid;
  margin-top: 2rem;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 4rem;
}

.faq > div {
  padding-bottom: 1.75rem;
}

.faq p {
  margin-top: 0.5rem;
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 3rem;
  margin-top: 2.5rem;
  padding: 0;
  list-style: none;
}

.products p {
  margin-top: 0.5rem;
}

.badge {
  margin-left: 0.375rem;
  color: var(--text-3);
  font-family: var(--font-text);
  font-size: 0.75rem;
  font-weight: 400;
  vertical-align: middle;
}

/* Footer */
.site-footer {
  color: var(--text-3);
  font-size: 0.875rem;
}

.site-footer .wrap {
  padding-block: 2rem 4rem;
}

.site-footer a {
  color: var(--text-2);
}

/* Motion is an enhancement: content stays visible without timeline support. */
@media (prefers-reduced-motion: no-preference) {
  .hero::before {
    animation: light-settle 4.5s ease-out both;
  }

  .hero-copy {
    animation: title-settle 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  a {
    transition:
      color 180ms ease,
      text-decoration-color 180ms ease;
  }

  .button {
    position: relative;
    overflow: hidden;
    transition:
      transform 220ms ease,
      background 220ms ease,
      box-shadow 220ms ease;
  }

  .button::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 20%, #ffffff45 50%, transparent 80%);
    transform: translateX(-110%);
    pointer-events: none;
  }

  .button:focus-visible::after {
    animation: light-pass 650ms ease-out;
  }

  @media (hover: hover) and (pointer: fine) {
    .button:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 24px #ffffff16;
    }

    .button:hover::after {
      animation: light-pass 650ms ease-out;
    }
  }

  .button:active {
    transform: translateY(0);
  }

  @supports (animation-timeline: view()) and (animation-range: entry 0% entry 100%) {
    .hero .showcase,
    .section > h2,
    .download > div,
    .step-copy,
    .steps img,
    .columns > .panel,
    .faq > div,
    .products > li {
      animation: content-arrive linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 85%;
    }

    .steps img,
    .hero .showcase {
      animation-name: image-arrive;
    }

    .download > div:focus-within,
    .faq > div:focus-within,
    .products > li:focus-within {
      animation: none;
    }
  }
}

@keyframes title-settle {
  from {
    transform: translateY(12px);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes light-settle {
  from {
    opacity: 0.4;
    transform: translateY(-16px);
  }
  to {
    opacity: 0.7;
    transform: translateY(0);
  }
}

@keyframes light-pass {
  to {
    transform: translateX(110%);
  }
}

@keyframes content-arrive {
  from {
    opacity: 0.8;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes image-arrive {
  from {
    opacity: 0.65;
    transform: translateY(24px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 60rem) {
  .section-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .section-columns .note {
    grid-column: 1;
  }
}

@media (max-width: 40rem) {
  .site-header .wrap {
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .site-header nav {
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .site-header a {
    font-size: 0.8125rem;
  }

  .hero {
    padding-top: 3rem;
  }

  .hero::before {
    background-size: auto 48rem;
  }

  .tagline {
    font-size: clamp(2rem, 7.8vw, 3rem);
  }

  .hero-actions .button {
    padding-inline: 1rem;
    font-size: 0.9375rem;
  }

  .hero .showcase {
    padding: 0.25rem;
    border-radius: 12px;
  }

  .download,
  .faq {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .actions {
    flex-direction: column;
  }

  .download .actions .button {
    flex-basis: auto;
  }

  .steps,
  .steps li,
  .columns,
  .products {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps li:nth-child(even):has(img) .step-copy {
    order: 0;
  }

  .steps {
    margin-top: 2.5rem;
  }

  .pairs thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .pairs tr,
  .pairs th,
  .pairs td {
    display: block;
    width: auto;
  }

  .pairs tbody th {
    width: auto;
    padding: 1rem 0 0.25rem;
    border-bottom: 0;
  }

  .pairs td {
    padding-top: 0;
  }
}

/* Reading layout for scenario and comparison guides. */
.guide .wrap {
  width: min(56rem, 100% - 2rem);
}

.guide-header {
  padding-block: clamp(3rem, 6vw, 5rem) 1rem;
}

.guide h1 {
  margin-top: 1.5rem;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.guide .lead {
  max-width: 46rem;
}

.guide-header nav {
  margin-top: 2rem;
}

.guide .section {
  padding-block: 2.5rem;
}

.guide .section-columns {
  display: block;
}

.guide .columns {
  margin-top: 2rem;
}

.guide .section-columns .note {
  margin-top: 1.5rem;
}

.guide .steps {
  gap: 2.5rem;
  margin-top: 2rem;
}

.guide .steps p {
  max-width: 42rem;
}

.guide .step-copy::before {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}
