body.page-home {
  background: var(--ink);
}

.page-home main {
  padding-bottom: 0;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 32px;
  align-items: start;
  padding: 28px 0 30px;
  border-bottom: 1px solid var(--line);
}

.hero-media,
.hero-scrim {
  position: static;
  inset: auto;
  pointer-events: none;
}

.hero-media {
  min-height: 360px;
  background-image: url("/assets/images/1coverpage.jpg");
  background-size: cover;
  background-position: center;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
}

.hero-scrim {
  display: none;
}

.hero-copy {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(40px, 7.2vw, 78px);
  line-height: 0.95;
}

.hero-line {
  margin: 10px 0 0;
  color: var(--text);
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
  font-size: clamp(20px, 3.1vw, 34px);
  font-weight: 600;
  line-height: 1.1;
}

.hero-lead {
  max-width: 64ch;
  margin: 16px 0 0;
  color: var(--text-soft);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  align-items: flex-start;
}

.home-language {
  position: relative;
  flex: none;
}

.home-language > summary {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  color: var(--text-soft);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.home-language > summary::before {
  content: "文/A";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 16px;
  padding: 0 3px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  opacity: 0.88;
}

.home-language > summary::-webkit-details-marker {
  display: none;
}

.home-language > summary::after {
  content: "";
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.home-language .language-switcher__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  width: min(210px, calc(100vw - 28px));
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-solid);
  box-shadow: var(--shadow-soft);
}

.home-language:not([open]) .language-switcher__panel {
  display: none;
}

.home-language .language-switcher__panel button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text-soft);
  background: transparent;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.home-language .language-switcher__panel button:hover,
.home-language .language-switcher__panel button[aria-pressed="true"] {
  border-color: var(--line);
  background: var(--surface-strong);
  color: var(--text);
}

.intro-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  margin-top: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.intro-strip p {
  max-width: 760px;
  margin: 0;
  color: var(--text);
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
  font-size: clamp(20px, 2.7vw, 30px);
  font-weight: 500;
  line-height: 1.24;
}

.intro-marks {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0;
  max-width: 360px;
}

.intro-marks span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
}

.intro-marks span + span::before {
  content: "·";
  margin: 0 8px;
  color: var(--muted);
}

.section-heading {
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.section-heading h2 {
  max-width: 900px;
  font-size: clamp(28px, 3.1vw, 40px);
  line-height: 1.14;
}

.feature-stage {
  display: grid;
  grid-template-columns: minmax(0, 0.44fr) minmax(0, 0.56fr);
  gap: 24px;
  align-items: start;
}

.stage-copy,
.stage-frame {
  opacity: 1;
  transition: opacity 150ms var(--ease);
}

.feature-stage.is-fading-out .stage-copy,
.feature-stage.is-fading-out .stage-frame {
  opacity: 0;
}

.stage-copy {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0;
}

.stage-index {
  margin: 0 0 10px;
  color: var(--muted);
  font-family: "SF Mono", "Menlo", monospace;
  font-size: 12px;
  font-weight: 500;
}

.stage-copy h3 {
  margin: 0;
  font-size: clamp(26px, 3.3vw, 38px);
  line-height: 1.12;
}

.stage-copy p:not(.stage-index) {
  margin: 12px 0 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.6;
}

.stage-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 14px;
}

.stage-tags span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
}

.stage-tags span + span::before {
  content: "·";
  margin: 0 8px;
  color: var(--muted);
}

.stage-explore {
  width: fit-content;
  margin-top: 18px;
}

.stage-frame {
  display: block;
  min-width: 0;
  margin: 0;
  color: inherit;
  text-decoration: none;
}

.stage-frame img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
}

.stage-tabs {
  --stage-tab-indicator-x: 0px;
  --stage-tab-indicator-width: 0px;
  grid-column: 1 / -1;
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.stage-tabs::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: var(--stage-tab-indicator-width);
  height: 1px;
  background: var(--text);
  transform: translateX(var(--stage-tab-indicator-x));
  transition:
    transform 150ms var(--ease),
    width 150ms var(--ease),
    opacity 150ms var(--ease);
  opacity: 0;
  pointer-events: none;
}

.stage-tabs.has-indicator::after {
  opacity: 1;
}

.stage-tabs.is-indicator-instant::after {
  transition: none;
}

.stage-tab {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 0 0 6px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transform: translateY(0);
  transition:
    color 150ms var(--ease),
    transform 150ms var(--ease);
}

.stage-tab > span:first-child {
  color: var(--muted);
  font-family: "SF Mono", "Menlo", monospace;
  font-size: 11px;
}

.stage-tab [data-stage-tab-label] {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-tab:hover {
  color: var(--text);
}

.stage-tab.is-active {
  color: var(--text);
  transform: translateY(-2px);
}

.stage-tab.is-active > span:first-child {
  color: var(--text-soft);
}

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

.principle-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 14px 0 0;
  border-top: 1px solid var(--line);
}

.principle-card span {
  color: var(--muted);
  font-family: "SF Mono", "Menlo", monospace;
  font-size: 12px;
  font-weight: 500;
}

.principle-card h3 {
  margin: 10px 0 8px;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.22;
}

.principle-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.trust-section {
  overflow: hidden;
}

.trust-marquee {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  padding: 8px 0;
}

.trust-track {
  display: flex;
  gap: 12px;
  width: fit-content;
  animation: trustScroll 70s linear infinite;
}

.trust-brand {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 24px 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--surface);
  transition: border-color 180ms var(--ease), color 180ms var(--ease);
}

.trust-brand-logo {
  width: 20px;
  height: 20px;
  flex: none;
}

.trust-brand:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

@keyframes trustScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .stage-copy,
  .stage-frame,
  .stage-tab,
  .stage-tabs::after {
    transition: none;
  }

  .trust-track {
    animation: none;
  }
}

.final-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  margin-top: 76px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.final-downloads {
  justify-content: flex-end;
}

.final-cta h2 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 38px);
  line-height: 1.16;
}

.final-cta p:not(.eyebrow) {
  max-width: 700px;
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.6;
}

@media (max-width: 1020px) {
  .home-hero,
  .feature-stage,
  .principle-grid,
  .final-cta,
  .intro-strip {
    grid-template-columns: 1fr;
  }

  .hero-media {
    min-height: 320px;
    order: 2;
  }

  .hero-copy {
    order: 1;
  }

  .stage-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .intro-marks,
  .final-downloads {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .home-hero {
    gap: 16px;
    padding: 20px 0 24px;
  }

  .home-hero h1 {
    font-size: clamp(36px, 13vw, 62px);
  }

  .hero-actions {
    display: grid;
  }

  .section {
    padding-top: 68px;
  }

  .stage-tabs {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .stage-tab {
    min-height: 38px;
  }

  .home-language > summary {
    max-width: 104px;
    padding: 0 10px;
  }

  .home-language [data-active-language] {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-language .language-switcher__panel {
    right: auto;
    left: 0;
  }
}
