/* zongMacTools 公开产品站：Windows 到 macOS 的功能迁移叙事 */

:root {
  --surface: #f6f6f7;
  --surface-raised: #ffffff;
  --surface-inset: #efeff1;
  --line: rgb(27 27 30 / 0.09);
  --line-strong: rgb(27 27 30 / 0.16);
  --text: #1b1b1e;
  --text-soft: #4f5158;
  --text-dim: #75777e;
  --accent-migration: #0b6e76;
  --accent-gain: #5f6a16;
  --focus-ring: #1b1b1e;
  --content-width: 72rem;
  --header-height: 4rem;
  --radius: 0.75rem;
  --radius-card: 1rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --card-toplight: inset 0 1px 0 rgb(255 255 255 / 0.6);
  --card-shadow: 0 24px 64px rgb(27 27 30 / 0.08);
  --hover-wash: rgb(27 27 30 / 0.04);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #efeff1;
}

html[data-reduced-motion="true"] {
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: linear-gradient(to bottom, #ffffff 0%, #f6f6f7 40rem, #efeff1 100%) fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
p,
dl,
dd,
figure {
  margin: 0;
}

a {
  color: inherit;
}

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

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 20;
  padding: 0.75rem 1.25rem;
  background: var(--text);
  color: #ffffff;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus-visible {
  top: 0.75rem;
}

.section-inner {
  width: min(100% - 2.5rem, var(--content-width));
  margin-inline: auto;
}

section {
  padding-block: clamp(4.5rem, 12vh, 8rem);
  scroll-margin-top: var(--header-height);
}

.eyebrow {
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.4;
}

.section-summary {
  max-width: 44rem;
  margin-top: 1.25rem;
  color: var(--text-soft);
  font-size: 1.0625rem;
}

/* ---------- 顶栏 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(255 255 255 / 0.72);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}

.site-nav {
  width: min(100% - 2.5rem, var(--content-width));
  min-height: var(--header-height);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 44px;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--text);
  flex: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.875rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: none;
  color: var(--text-soft);
  font: inherit;
  font-size: 0.9375rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.nav-link:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--hover-wash);
}

.language-toggle[data-language="en"] {
  color: var(--text);
  border-color: var(--line-strong);
}

/* ---------- 按钮 ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.25s var(--ease);
}

.button-primary {
  background: var(--text);
  color: #ffffff;
}

.button-primary:hover {
  background: #000000;
  box-shadow: 0 8px 28px rgb(11 110 118 / 0.28);
}

.button-quiet {
  border-color: var(--line-strong);
  color: var(--text);
}

.button-quiet:hover {
  border-color: rgb(27 27 30 / 0.3);
  background: var(--hover-wash);
}

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  min-height: min(92vh, 60rem);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-block: clamp(5rem, 14vh, 9rem);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgb(27 27 30 / 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgb(27 27 30 / 0.035) 1px, transparent 1px);
  background-size: 4.5rem 4.5rem;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, black 30%, transparent 75%);
}

.hero-inner {
  position: relative;
}

.hero-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  letter-spacing: 0.01em;
}

.hero-mark {
  width: clamp(2.75rem, 6vw, 4rem);
  height: auto;
  color: var(--text);
  flex: none;
}

.hero-statement {
  margin-top: 1.75rem;
  font-size: clamp(2rem, 5.4vw, 3.9rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.015em;
  max-width: 22ch;
  text-wrap: balance;
}

.hero-summary {
  margin-top: 1.5rem;
  max-width: 40rem;
  color: var(--text-soft);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 2.5rem;
}

.hero-hint {
  margin-top: 3.5rem;
  color: var(--text-dim);
  font-size: 0.9375rem;
}

/* ---------- 工具来源 ---------- */

.origins {
  background: rgb(27 27 30 / 0.025);
  border-block: 1px solid var(--line);
}

.origin-paths {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1.25rem;
  margin-top: 2.75rem;
}

.origin-path {
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-raised);
  box-shadow: var(--card-toplight);
  display: grid;
  gap: 0.875rem;
  align-content: start;
}

.origin-path p:last-child {
  color: var(--text-soft);
}

.path-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.path-tag::before {
  content: "";
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 2px;
  background: var(--text-dim);
}

.origin-path[data-path="migration"] .path-tag {
  color: var(--accent-migration);
}

.origin-path[data-path="migration"] .path-tag::before {
  background: var(--accent-migration);
}

.origin-path[data-path="gain"] .path-tag {
  color: var(--accent-gain);
}

.origin-path[data-path="gain"] .path-tag::before {
  background: var(--accent-gain);
}

/* ---------- 状态徽章 ---------- */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2rem;
  padding: 0.25rem 0.875rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}

.status-implemented {
  color: var(--accent-migration);
  border-color: color-mix(in srgb, var(--accent-migration) 45%, transparent);
}

.status-implemented::before {
  background: var(--accent-migration);
}

.status-building {
  color: var(--accent-gain);
  border-color: color-mix(in srgb, var(--accent-gain) 45%, transparent);
}

.status-building::before {
  background: var(--accent-gain);
}

.status-media {
  color: var(--text-soft);
  margin-top: 1rem;
}

.status-media::before {
  background: var(--text-dim);
}

.tool-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

/* ---------- 交互原理演示 ---------- */

.demo {
  margin-top: 3rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius-card) * 1.25);
  background: var(--surface-raised);
  box-shadow: var(--card-toplight), var(--card-shadow);
  padding: clamp(1.25rem, 3vw, 2.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

.demo-badge {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.demo-badge::before {
  content: "";
  width: 0.625rem;
  height: 0.625rem;
  border: 1px dashed var(--text-dim);
  border-radius: 2px;
}

/* --- 抽象桌面场景 --- */

.demo-scene {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-inset);
  box-shadow: var(--card-toplight);
  padding: clamp(0.75rem, 2vw, 1.5rem);
}

.scene-desktop {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: calc(var(--radius) * 0.75);
  background:
    linear-gradient(to bottom, rgb(27 27 30 / 0.03), transparent 18%),
    var(--surface);
  overflow: hidden;
}

.scene-window {
  position: absolute;
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  background: var(--surface-raised);
  padding: 0.75rem;
  display: grid;
  gap: 0.5rem;
  align-content: start;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), border-color 0.35s var(--ease);
}

.scene-window-main {
  top: 12%;
  left: 8%;
  width: 46%;
  height: 52%;
}

.scene-window-side {
  top: 24%;
  left: 42%;
  width: 44%;
  height: 48%;
  opacity: 0.55;
}

.scene-window-bar {
  height: 0.5rem;
  border-radius: 999px;
  background: var(--line-strong);
  width: 38%;
}

.scene-line {
  height: 0.375rem;
  border-radius: 999px;
  background: var(--line);
  width: 62%;
}

.scene-line-wide {
  width: 86%;
}

.scene-line-short {
  width: 40%;
}

.scene-cards {
  position: absolute;
  left: 14%;
  bottom: 21%;
  display: flex;
  gap: 0.625rem;
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.scene-card {
  width: clamp(3.5rem, 9vw, 5.5rem);
  aspect-ratio: 16 / 10;
  padding: 0;
  border-radius: 0.375rem;
  border: 1px solid var(--line-strong);
  background: var(--surface-raised);
  cursor: pointer;
  transition: border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.scene-card:hover {
  border-color: var(--text-dim);
}

.scene-menu {
  position: absolute;
  left: 44%;
  bottom: 24%;
  display: grid;
  gap: 0.375rem;
  padding: 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  background: var(--surface-raised);
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.scene-menu-item {
  width: clamp(3.5rem, 8vw, 5rem);
  height: 0.4375rem;
  border-radius: 999px;
  background: var(--line);
}

.scene-pointer {
  position: absolute;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 50% 50% 50% 0;
  background: var(--text);
  left: 30%;
  bottom: 12%;
  transform: rotate(-45deg);
  opacity: 0.9;
  transition: left 0.4s var(--ease), bottom 0.4s var(--ease), opacity 0.3s var(--ease);
}

.scene-dock {
  position: absolute;
  left: 50%;
  bottom: 4%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  padding: 0.4375rem 0.625rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--surface-raised) 88%, transparent);
}

.scene-app {
  width: clamp(1.75rem, 4vw, 2.375rem);
  aspect-ratio: 1;
  border-radius: 0.5rem;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0;
}

.scene-app-target {
  cursor: pointer;
  border-color: var(--accent-migration);
  position: relative;
}

.scene-app-target::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.3125rem;
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 50%;
  background: var(--text-soft);
  transform: translateX(-50%);
}

/* --- 演示四状态 --- */

.demo[data-stage="dock"] .scene-pointer {
  left: 38%;
  bottom: 13%;
}

.demo[data-stage="windows"] .scene-cards,
.demo[data-stage="switch"] .scene-cards,
.demo[data-stage="actions"] .scene-cards {
  opacity: 1;
  transform: translateY(0);
}

.demo[data-stage="windows"] .scene-pointer {
  left: 38%;
  bottom: 13%;
}

.demo[data-stage="switch"] .scene-pointer {
  left: 24%;
  bottom: 30%;
}

.demo[data-stage="switch"] .scene-card-a {
  border-color: var(--accent-migration);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-migration) 40%, transparent);
}

.demo[data-stage="switch"] .scene-window-side {
  opacity: 1;
  border-color: var(--accent-migration);
  transform: translateY(-0.375rem);
}

.demo[data-stage="actions"] .scene-pointer {
  left: 24%;
  bottom: 30%;
}

.demo[data-stage="actions"] .scene-menu {
  opacity: 1;
  transform: translateY(0);
}

.demo[data-stage="actions"] .scene-card-b {
  border-color: var(--accent-gain);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-gain) 40%, transparent);
}

/* --- 演示控制器 --- */

.demo-controls {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.demo-steps-intro {
  color: var(--text-dim);
  font-size: 0.9375rem;
}

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

.demo-step {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 44px;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-soft);
  font: inherit;
  font-size: 0.9375rem;
  text-align: start;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.demo-step:hover {
  color: var(--text);
  border-color: rgb(27 27 30 / 0.3);
  background: var(--hover-wash);
}

.demo-step[aria-pressed="true"] {
  color: var(--text);
  border-color: rgb(27 27 30 / 0.5);
  background: rgb(27 27 30 / 0.05);
}

.demo-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.375rem;
  height: 1.375rem;
  flex: none;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-size: 0.75rem;
}

.demo-status {
  border-left: 2px solid var(--accent-migration);
  padding-left: 1rem;
  display: grid;
  gap: 0.25rem;
  min-height: 5.5rem;
}

.demo-progress {
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.demo-stage-title {
  font-size: 1.125rem;
  font-weight: 650;
}

.demo-stage-description {
  color: var(--text-soft);
}

/* ---------- 能力边界 ---------- */

.boundary-list {
  margin: 2.75rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
  max-width: 44rem;
}

.boundary-list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-soft);
}

.boundary-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: var(--accent-migration);
}

.boundary-note {
  margin-top: 1.25rem;
  max-width: 44rem;
  color: var(--text-dim);
  font-size: 0.9375rem;
}

.tool-media-link {
  margin-top: 2.25rem;
}

/* ---------- 真实运行画面 ---------- */

.media {
  background: rgb(27 27 30 / 0.025);
  border-block: 1px solid var(--line);
}

.media-frame {
  margin-top: 2.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-raised);
  box-shadow: var(--card-toplight), var(--card-shadow);
  padding: clamp(0.75rem, 2vw, 1.5rem);
  display: grid;
  gap: 0.875rem;
}

.media-video,
.media-poster {
  width: 100%;
  height: auto;
  aspect-ratio: 2704 / 1434;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-inset);
}

.media-poster {
  display: none;
}

.media-frame figcaption {
  color: var(--text-dim);
  font-size: 0.9375rem;
}

.media-stills {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
}

.media-still {
  display: grid;
  gap: 0.5rem;
}

.media-still img {
  width: 100%;
  height: auto;
  aspect-ratio: 2704 / 1434;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-inset);
}

.media-still figcaption {
  color: var(--text-dim);
  font-size: 0.875rem;
}

/* ---------- 探索方向 ---------- */

.exploration .button {
  margin-top: 2rem;
}

/* ---------- 获取区 ---------- */

.acquire {
  background: rgb(27 27 30 / 0.025);
  border-block: 1px solid var(--line);
}

.acquire-status {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-raised);
  font-weight: 600;
  max-width: 44rem;
}

.acquire-status[data-state="loading"] {
  color: var(--text-dim);
  font-weight: 400;
}

.acquire-status[data-state="available"] {
  color: var(--accent-migration);
  border-color: color-mix(in srgb, var(--accent-migration) 45%, transparent);
}

.acquire-status[data-state="pending"] {
  color: var(--accent-gain);
  border-color: color-mix(in srgb, var(--accent-gain) 45%, transparent);
}

.acquire-status[data-state="unavailable"] {
  color: var(--text-soft);
}

.acquire-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 1.5rem;
}

.acquire-facts {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: 1rem;
  max-width: 52rem;
}

.acquire-fact {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 1rem 1.25rem;
  background: var(--surface-raised);
  box-shadow: var(--card-toplight);
}

.acquire-fact dt {
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.acquire-fact dd {
  margin-top: 0.375rem;
  font-weight: 600;
}

.acquire-note {
  margin-top: 1.5rem;
  color: var(--text-dim);
  font-size: 0.9375rem;
  max-width: 44rem;
}

/* ---------- 页脚 ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 3rem;
}

.footer-inner {
  display: grid;
  gap: 0.75rem;
  color: var(--text-soft);
}

.footer-privacy {
  color: var(--text-dim);
  font-size: 0.9375rem;
}

/* ---------- 响应式 ---------- */

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

@media (max-width: 40rem) {
  .brand-word {
    font-size: 0.9375rem;
  }

  .nav-link {
    padding-inline: 0.625rem;
    font-size: 0.875rem;
  }

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

/* 窄屏：视频让位给海报图，保持相同容器比例 */
@media (max-width: 44rem) {
  .media-video {
    display: none;
  }

  .media-poster {
    display: block;
  }
}

/* ---------- 减少动态效果 ---------- */

html[data-reduced-motion="true"] *,
html[data-reduced-motion="true"] *::before,
html[data-reduced-motion="true"] *::after {
  animation-duration: 0.001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001s !important;
}

html[data-reduced-motion="true"] .media-video {
  display: none;
}

html[data-reduced-motion="true"] .media-poster {
  display: block;
}
