/* ============================================================
   Apple 风格 Demo —— 应用 modern-web-showcase 规范
   规则来源：craft-rules.md（排印/配色/对比度）+ motion-tokens.md
   ============================================================ */

:root {
  /* 中性层 90% */
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --ink: #1d1d1f;
  --ink-dim: #6e6e73;
  --line: #d2d2d7;

  /* 强调色：仅 Apple 蓝，一屏 ≤2 处 */
  --accent: #0071e3;
  --accent-hover: #0077ed;

  /* 字体：SF Pro 不可商用，回退系统栈 */
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter',
               'Noto Sans SC', 'PingFang SC', 'Helvetica Neue', sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display',
                  'Inter', 'Noto Sans SC', 'PingFang SC', sans-serif;

  /* 动效 token（来源：motion-tokens.md） */
  --m-in: 140ms;
  --m-out: 200ms;
  --m-press: 90ms;
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
  --nav-h: 48px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.47;
  padding-top: var(--nav-h);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- 跳转链接 ---------- */
.skip-link {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: 10px; left: 10px; z-index: 999;
  width: auto; height: auto; clip-path: none;
  padding: 10px 16px; border-radius: 8px;
  background: var(--ink); color: #fff; font-size: 14px;
}

/* ---------- 全局导航 ---------- */
.gnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.gnav-inner {
  max-width: 1024px; height: 100%; margin: 0 auto;
  padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between;
}
.gnav-logo { color: #f5f5f7; opacity: 0.9; padding: 4px; flex: 0 0 auto; }
.gnav-logo svg { fill: currentColor; }
.gnav-logo:hover { opacity: 1; }

.gnav-links { display: flex; gap: 30px; }
.gnav-links a {
  font-size: 12px; color: rgba(245, 245, 247, 0.9);
  letter-spacing: 0.01em; opacity: 0.85;
  transition: opacity var(--m-in) var(--ease);
}
.gnav-links a:hover { opacity: 1; text-decoration: none; }

.gnav-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.gnav-icon {
  background: none; border: 0; cursor: pointer; padding: 6px;
  color: rgba(245, 245, 247, 0.85);
  transition: opacity var(--m-in) var(--ease);
}
.gnav-icon:hover { opacity: 1; }
.gnav-burger {
  display: none; width: 20px; height: 14px; background: none;
  border: 0; cursor: pointer; padding: 0; position: relative;
}
.gnav-burger span {
  position: absolute; left: 0; width: 100%; height: 1.5px;
  background: rgba(245, 245, 247, 0.9);
  transition: transform var(--m-in) var(--ease);
}
.gnav-burger span:nth-child(1) { top: 0; }
.gnav-burger span:nth-child(2) { top: 12px; }

/* ---------- 公告条 ---------- */
.promo-bar {
  background: var(--bg-alt);
  padding: 14px 22px;
  text-align: center;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.4;
}
.promo-bar p { max-width: 62ch; margin: 0 auto; }
.promo-bar a { margin-left: 4px; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  padding: 40px 22px 80px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  overflow: hidden;
}
.hero--iphone { background: #fbfbfd; }

.hero-copy { position: relative; z-index: 2; }

/* eyebrow：小字 + 正字距（craft-rules：标签 13px/500，不做 tracked caps） */
.eyebrow {
  font-size: 15px; font-weight: 600; color: var(--accent);
  margin-bottom: 6px;
}

/* 中文大标题：行高 1.3，字距 0（craft-rules CJK 规则） */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.3;          /* CJK 强制 1.3+ */
  letter-spacing: 0;         /* CJK 不用负字距 */
  color: var(--ink);
}
.hero-sub {
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  font-weight: 500;
  line-height: 1.4;
  color: var(--ink-dim);
  margin-top: 6px;
}
.hero-price {
  font-size: 13px; color: var(--ink-dim);
  margin-top: 18px; letter-spacing: 0.01em;
}

.hero-actions { margin-top: 22px; display: flex; gap: 26px; justify-content: center; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; cursor: pointer;
  font-size: 17px; line-height: 1.2;
  transition: background-color var(--m-in) var(--ease),
              color var(--m-in) var(--ease),
              transform var(--m-press) var(--ease);
}
.btn:active { transform: scale(0.985); }

/* 填充按钮 */
.btn--primary {
  background: var(--accent); color: #fff;
  padding: 12px 22px; border-radius: 980px;
  font-weight: 400;
}
.btn--primary:hover { background: var(--accent-hover); text-decoration: none; }

/* 链接按钮 */
.btn--link { color: var(--accent); }
.btn--link:hover { text-decoration: underline; }
.btn--link span { display: inline-block; transition: transform var(--m-in) var(--ease); }
.btn--link:hover span { transform: translateX(3px); }

.btn--sm { font-size: 15px; }
.btn--sm.btn--primary { padding: 9px 18px; }

/* ---------- Hero 视觉：手机 ---------- */
.hero-visual {
  position: relative; z-index: 1;
  width: 100%; max-width: 900px;
  margin-top: 44px; flex: 1;
  display: flex; align-items: flex-end; justify-content: center;
}
.phone-stack { position: relative; display: flex; gap: -40px; align-items: flex-end; }

.phone {
  position: relative; border-radius: 44px;
  background: linear-gradient(160deg, #3a3a3c 0%, #1c1c1e 40%, #2c2c2e 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.16);
  will-change: transform;
}
.phone--back {
  width: 200px; height: 400px; margin-right: -50px;
  background: linear-gradient(155deg, #4a4a4d 0%, #2a2a2c 45%, #38383a 100%);
  transform: translateY(12px) rotate(-3deg);
}
.phone--front { width: 220px; height: 440px; z-index: 2; }
.phone-screen {
  position: absolute; inset: 6px; border-radius: 39px; overflow: hidden;
  background: #000;
}
.phone-notch {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 88px; height: 24px; border-radius: 14px; background: #000; z-index: 3;
}
.phone-wallpaper {
  position: absolute; inset: 0;
  background:
    radial-gradient(65% 45% at 28% 22%, rgba(255, 138, 76, 0.95), transparent 62%),
    radial-gradient(55% 42% at 76% 62%, rgba(140, 82, 255, 0.9), transparent 64%),
    radial-gradient(50% 50% at 40% 88%, rgba(52, 132, 255, 0.85), transparent 66%),
    linear-gradient(180deg, #16161a 0%, #1d1d22 100%);
  animation: wallpaper-drift 14s ease-in-out infinite alternate;
}
@keyframes wallpaper-drift {
  from { transform: scale(1.02) translateY(0); }
  to   { transform: scale(1.08) translateY(-10px); }
}

/* ============================================================
   双卡产品网格
   ============================================================ */
.grid-duo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 12px; background: var(--bg);
}
.card {
  position: relative; overflow: hidden;
  min-height: 620px;
  border-radius: 18px;
  padding: 48px 32px 0;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.card--dark { background: #000; color: #f5f5f7; }
.card--light { background: var(--bg-alt); color: var(--ink); }

.card-copy { position: relative; z-index: 2; }
.card-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 700;
  line-height: 1.3; letter-spacing: 0;
}
.card--dark .card-title { color: #f5f5f7; }
.card--light .card-title { color: var(--ink); }
.card-sub {
  font-size: clamp(1rem, 1.6vw, 1.25rem); font-weight: 500;
  margin-top: 4px; line-height: 1.4;
}
.card--dark .card-sub { color: #a1a1a6; }
.card--light .card-sub { color: var(--ink-dim); }
.card-actions { margin-top: 14px; display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; }

/* Mac 视觉 */
.mac-visual { position: relative; margin-top: auto; width: 100%; max-width: 460px; }
.mac-screen {
  position: relative; aspect-ratio: 16 / 10; border-radius: 12px 12px 0 0;
  background: linear-gradient(150deg, #1c1c1e 0%, #000 55%, #232326 100%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
.mac-glare {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.09) 48%, transparent 60%);
}
.mac-base {
  height: 12px; border-radius: 0 0 12px 12px;
  background: linear-gradient(180deg, #d8d8dc 0%, #b8b8bd 100%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  margin: 0 -34px;
}

/* iPad 视觉 */
.ipad-visual { margin-top: auto; width: 100%; display: flex; justify-content: center; }
.ipad-frame {
  width: 300px; height: 400px; border-radius: 24px; padding: 12px;
  background: linear-gradient(160deg, #dcdce0 0%, #b4b4b9 100%);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.16);
  transform: rotate(-4deg);
  will-change: transform;
}
.ipad-screen {
  width: 100%; height: 100%; border-radius: 14px;
  background:
    radial-gradient(60% 45% at 30% 25%, rgba(255, 170, 90, 0.9), transparent 62%),
    radial-gradient(55% 45% at 74% 70%, rgba(90, 150, 255, 0.9), transparent 64%),
    linear-gradient(170deg, #1a1a1e 0%, #26262b 100%);
}

/* ============================================================
   特性滚动段
   ============================================================ */
.feature-scroll {
  position: relative;
  padding: 140px 22px 160px;
  background: #000; color: #f5f5f7;
  text-align: center;
}
.feature-sticky { min-height: 40vh; display: flex; align-items: center; justify-content: center; }
.feature-heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4.2rem); font-weight: 700;
  line-height: 1.3; letter-spacing: 0;
}
.feature-heading .line { display: block; }
.line--dim { color: #86868b; font-weight: 600; }

.feature-body { max-width: 900px; margin: 0 auto; }
.feature-lead {
  font-size: clamp(1.05rem, 1.8vw, 1.3rem); font-weight: 400;
  line-height: 1.75; color: #d2d2d7;
  max-width: 58ch; margin: 0 auto;
}
.spec-row {
  margin-top: 70px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
}
.spec strong {
  display: block; font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 700;
  line-height: 1.2; letter-spacing: 0;
  color: #f5f5f7;
}
.spec span { display: block; margin-top: 6px; font-size: 15px; color: #86868b; }

/* ============================================================
   Watch
   ============================================================ */
.watch-section {
  position: relative; overflow: hidden;
  background: #000; color: #f5f5f7;
  min-height: 92vh;
  padding: 120px 22px;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 60px;
}
.watch-copy { text-align: left; }
.watch-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 700;
  line-height: 1.3; letter-spacing: 0;
}
.watch-sub { font-size: clamp(1.05rem, 1.8vw, 1.3rem); font-weight: 500; color: #a1a1a6; margin-top: 4px; }
.watch-visual { position: relative; display: flex; justify-content: center; align-items: center; height: 460px; }
.watch-case {
  position: relative; z-index: 2;
  width: 210px; height: 244px; border-radius: 52px;
  padding: 9px;
  background: linear-gradient(150deg, #4d4d50 0%, #232326 55%, #3a3a3d 100%);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55);
  will-change: transform;
}
.watch-screen {
  width: 100%; height: 100%; border-radius: 44px;
  background: #000; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.watch-rings { position: relative; width: 130px; height: 130px; }
.ring {
  position: absolute; inset: 0; border-radius: 50%;
  border-width: 9px; border-style: solid; border-color: transparent;
}
.ring--1 { border-top-color: #ff375f; transform: rotate(28deg); }
.ring--2 { inset: 18px; border-top-color: #a2f900; transform: rotate(200deg); }
.ring--3 { inset: 36px; border-top-color: #40c8e0; transform: rotate(120deg); }
.watch-band {
  position: absolute; top: 0; bottom: 0; width: 96px; z-index: 1;
  background: linear-gradient(180deg, #2c2c2e 0%, #3d3d40 50%, #2c2c2e 100%);
}

/* ============================================================
   服务网格
   ============================================================ */
.services {
  padding: 90px 22px 110px;
  background: var(--bg-alt);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.svc {
  background: #fff; border-radius: 18px;
  padding: 34px 28px;
  min-height: 210px;
  transition: transform var(--m-out) var(--ease), box-shadow var(--m-out) var(--ease);
}
.svc:hover { transform: translateY(2px); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.07); }
.svc h3 { font-size: 21px; font-weight: 600; letter-spacing: 0; }
.svc p { margin: 8px 0 16px; font-size: 15px; line-height: 1.6; color: var(--ink-dim); max-width: 34ch; }
.svc .btn { font-size: 15px; }

/* ============================================================
   页脚
   ============================================================ */
.footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding: 42px 22px 34px; }
.footer-inner { max-width: 1024px; margin: 0 auto; }
.footer-note { font-size: 12px; color: var(--ink-dim); line-height: 1.5; max-width: 70ch; }
.footer-cols {
  margin: 26px 0 22px; padding: 20px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.footer-col h4 { font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 9px; }
.footer-col a {
  display: block; font-size: 12px; color: var(--ink-dim);
  margin-bottom: 7px; line-height: 1.4;
}
.footer-col a:hover { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-dim); }
.footer-legal { display: flex; gap: 9px; align-items: center; }
.footer-legal a { color: var(--ink-dim); }

/* ============================================================
   动效初始态
   ============================================================ */
.fade-in { opacity: 0; transform: translateY(34px); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1068px) {
  .gnav-links { gap: 20px; }
  .gnav-links a { font-size: 11px; }
}
@media (max-width: 833px) {
  .gnav-links { display: none; }
  .gnav-burger { display: block; }
  .grid-duo { grid-template-columns: 1fr; }
  .card { min-height: 540px; }
  .watch-section { grid-template-columns: 1fr; text-align: center; min-height: auto; }
  .watch-copy { text-align: center; }
  .watch-visual { height: 380px; order: -1; }
  .spec-row { grid-template-columns: 1fr; gap: 34px; }
  .services { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .hero { padding-top: 32px; }
  .hero-actions { gap: 16px; }
  .phone--front { width: 180px; height: 360px; }
  .phone--back { width: 164px; height: 328px; margin-right: -42px; }
  .card { padding: 36px 20px 0; min-height: 480px; }
  .ipad-frame { width: 230px; height: 308px; }
  .footer-cols { grid-template-columns: 1fr; }
}

/* ============================================================
   减少动态效果 —— 剥离轴向运动，保留淡入
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; }
  .phone-wallpaper { animation: none; }
  .btn, .btn--link span, .svc, .phone, .ipad-frame, .watch-case { transition: none !important; }
  .btn--link:hover span { transform: none; }
  .svc:hover { transform: none; }
}
