/* 布局对齐 apple.com：全局导航 + 全宽主推 + 双列瓷砖 + 横向内容带 + 页脚 */

:root {
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --bg: #ffffff;
  --bg-gray: #f5f5f7;
  --line: #d2d2d7;
  --link: #0066cc;
  --link-hover: #0077ed;
  --gnav-h: 44px;
  --font: "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB",
    "Noto Sans SC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.28, 0.11, 0.32, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.47059;
  font-weight: 400;
  letter-spacing: -0.022em;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ========== Global Nav（仿 Apple 顶栏） ========== */
.gnav {
  position: sticky;
  top: 0;
  z-index: 999;
  height: var(--gnav-h);
  background: rgba(22, 22, 23, 0.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  color: #f5f5f7;
}

.gnav__inner {
  max-width: 1024px;
  height: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.gnav-brand {
  flex: 0 0 auto;
  margin-right: 18px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  opacity: 0.92;
}

.gnav-brand:hover {
  opacity: 1;
}

.gnav-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.gnav-list::-webkit-scrollbar {
  display: none;
}

.gnav-link {
  display: block;
  padding: 0 12px;
  font-size: 12px;
  line-height: var(--gnav-h);
  color: #f5f5f7;
  opacity: 0.8;
  white-space: nowrap;
  transition: opacity 0.18s var(--ease);
}

.gnav-link:hover {
  opacity: 1;
}

/* ========== Module / Unit（右图：标题+双胶囊按钮+底部产品图） ========== */
.module {
  text-align: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.module + .module {
  margin-top: 12px;
}

.module__copy {
  position: relative;
  z-index: 2;
  padding: 80px 22px 0;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.module__eyebrow {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.008em;
  color: var(--ink);
}

.module__title {
  margin: 0;
  font-size: clamp(40px, 7vw, 56px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.07;
  color: var(--ink);
}

.module__subhead {
  margin: 10px auto 0;
  max-width: 22em;
  font-size: clamp(19px, 2.4vw, 28px);
  font-weight: 400;
  letter-spacing: 0.004em;
  line-height: 1.14;
  color: var(--ink);
}

.module__links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

/* 胶囊按钮：实心主按钮 + 描边次按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 11px 22px;
  border-radius: 980px;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.17648;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.btn--primary {
  background: #0071e3;
  color: #fff;
  border: 1px solid transparent;
}

.btn--primary:hover {
  background: #0077ed;
}

.btn--secondary {
  background: transparent;
  color: #0071e3;
  border: 1px solid #0071e3;
}

.btn--secondary:hover {
  background: rgba(0, 113, 227, 0.06);
}

/* 兼容旧「进一步了解 ›」文字链（瓷砖区仍可用） */
.more {
  font-size: 17px;
  color: var(--link);
  transition: color 0.2s var(--ease);
}

.more:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.more::after {
  content: " ›";
}

/* 产品图：贴底、自下往上「托出」 */
.module__media {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 420px;
  margin-top: 36px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  overflow: hidden;
}

.module__media img {
  width: min(1100px, 100%);
  height: auto;
  max-height: min(58vh, 560px);
  object-fit: contain;
  object-position: center bottom;
  user-select: none;
  pointer-events: none;
}

.module__media-hint {
  width: min(920px, 92%);
  min-height: 320px;
  border: 1px dashed rgba(0, 0, 0, 0.14);
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 13px;
  background: rgba(255, 255, 255, 0.4);
}

.module__media:has(> img) .module__media-hint {
  display: none;
}

/* 主题变体 */
.module--light {
  background: var(--bg-gray);
  color: var(--ink);
}

.module--dark {
  background: #000;
  color: #f5f5f7;
}

.module--dark .module__eyebrow,
.module--dark .module__title,
.module--dark .module__subhead {
  color: #f5f5f7;
}

.module--dark .module__subhead {
  color: #a1a1a6;
}

.module--dark .btn--primary {
  background: #2997ff;
  color: #fff;
}

.module--dark .btn--primary:hover {
  background: #6cb3ff;
  color: #000;
}

.module--dark .btn--secondary {
  color: #2997ff;
  border-color: #2997ff;
}

.module--dark .btn--secondary:hover {
  background: rgba(41, 151, 255, 0.12);
}

.module--dark .more {
  color: #2997ff;
}

.module--dark .more:hover {
  color: #6cb3ff;
}

.module--dark .module__media-hint {
  border-color: rgba(255, 255, 255, 0.22);
  color: #a1a1a6;
  background: rgba(255, 255, 255, 0.04);
}

.module--tall {
  min-height: 720px;
}

.module--tall .module__media {
  min-height: 480px;
}

/* ========== 主视觉 Hero：通屏大图 ========== */
.module--hero {
  min-height: 0;
  width: 100%;
  background: #f5f5f7;
  color: var(--ink);
  overflow: hidden;
  isolation: isolate;
}

.module--hero .module__copy {
  padding-top: clamp(48px, 7vh, 72px);
  padding-bottom: 0;
}

.module--hero .module__title {
  font-size: clamp(40px, 7vw, 56px);
}

.module--hero .module__subhead {
  margin-top: 10px;
  font-size: clamp(19px, 2.6vw, 24px);
  max-width: 20em;
  color: var(--ink);
}

.module--hero .module__links {
  margin-top: 18px;
  margin-bottom: 0;
  gap: 14px;
}

.module--hero .module__media {
  width: 100%;
  max-width: none;
  margin: 8px auto 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  flex: 0 0 auto;
}

.module--hero .module__media img {
  width: 100%;
  max-width: none;
  height: auto;
  max-height: min(78vh, 900px);
  margin: 0 auto;
  display: block;
  object-fit: contain;
  object-position: center bottom;
  transform: none;
}

/* ========== 主图下方产品条（apple.com/iphone chapternav） ========== */
.chapternav {
  position: relative;
  z-index: 2;
  background: #fff;
  margin-top: 0;
  padding: 44px 0 48px;
  border-top: 1px solid #d2d2d7;
  border-bottom: 1px solid #d2d2d7;
}

.chapternav__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
}

.chapternav-title {
  margin: 0;
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  white-space: nowrap;
  align-self: flex-start;
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.chapternav-items {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px 8px;
  width: 100%;
  max-width: 1100px;
  /* 取消左右滑动 */
  overflow: visible;
  padding: 0;
  margin: 0;
}

.chapternav-item {
  flex: 0 0 auto;
  width: 112px;
  text-align: center;
}

.chapternav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  min-height: 128px;
  transition: opacity 0.2s var(--ease);
}

.chapternav-link:hover {
  opacity: 0.65;
}

.chapternav-icon {
  margin: 0;
  width: 156px;
  height: 120px;
  display: grid;
  place-items: center;
}

.chapternav-icon img {
  width: auto;
  max-width: 156px;
  height: 120px;
  object-fit: contain;
}

.chapternav-label {
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  display: block;
}

.chapternav-badge {
  display: block;
  margin-top: -4px;
  font-size: 11px;
  line-height: 1.2;
  color: #b64400;
}

@media (max-width: 900px) {
  .chapternav {
    padding: 32px 0 36px;
  }

  .chapternav-title {
    font-size: 32px;
    text-align: left;
  }

  .chapternav-item {
    width: 100px;
  }

  .chapternav-icon {
    width: 84px;
    height: 64px;
  }

  .chapternav-icon img {
    max-width: 84px;
    height: 64px;
  }

  .chapternav-label {
    font-size: 13px;
  }
}

/* 未填内容的占位模块先藏起来，避免大块黑屏 */
.module--draft {
  display: none !important;
}

/* ========== Significant others（折叠手风琴） ========== */
.chapternav,
.others {
  scroll-margin-top: calc(var(--gnav-h) + 12px);
}

.others {
  background: #fff;
  padding: 56px 22px 40px;
}

.others + .others {
  padding-top: 24px;
}

.others__wrap {
  max-width: 980px;
  margin: 0 auto;
}

.others__headline {
  margin: 0 0 28px;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  text-align: center;
}

.others__card {
  background: #f5f5f7;
  border-radius: 28px;
  padding: clamp(28px, 4vw, 48px);
  overflow: hidden;
}

.others__grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(300px, 1.15fr);
  gap: clamp(28px, 4vw, 48px);
  align-items: center;
}

.others-accordion {
  margin: 0;
  padding: 0;
  list-style: none;
}

.others-item {
  border-bottom: 1px solid #d2d2d7;
}

.others-item:first-child {
  border-top: 1px solid #d2d2d7;
}

.others-item__title {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.others-item__btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 4px;
  text-align: left;
  color: var(--ink);
}

.others-item__label {
  font-size: clamp(21px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.others-item__chev {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  position: relative;
}

.others-item__chev::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 10px;
  height: 10px;
  border-right: 1.8px solid #1d1d1f;
  border-bottom: 1.8px solid #1d1d1f;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 0.25s var(--ease);
}

.others-item.is-open .others-item__chev::before {
  transform: rotate(-135deg) translate(-1px, -1px);
}

.others-panel {
  padding: 0 4px 22px;
}

.others-panel__sections {
  max-width: 36em;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.others-panel__section {
  margin: 0;
}

.others-panel__heading {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.333;
  color: var(--ink);
}

.others-panel__text {
  margin: 0;
  font-size: 17px;
  line-height: 1.47059;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.others-panel__list {
  margin: 8px 0 0;
  padding-left: 1.25em;
  font-size: 17px;
  line-height: 1.47059;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.others-panel__list li + li {
  margin-top: 6px;
}

.others-panel__mobile-media {
  display: none;
  margin-top: 20px;
}

.others-panel__mobile-media img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.others__media {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.others__media img {
  width: 100%;
  max-width: 560px;
  height: auto;
  display: block;
  object-fit: contain;
}

@media (max-width: 900px) {
  .others__grid {
    grid-template-columns: 1fr;
  }

  .others__media {
    display: none;
  }

  .others-panel__mobile-media {
    display: block;
  }

  .others-item.is-open .others-panel__mobile-media {
    display: block;
  }
}

/* ========== 双列瓷砖（仿 iPad Air / MacBook Pro 等 2-up） ========== */
.tile-grid {
  display: grid;
  gap: 12px;
  padding: 12px 12px 0;
  max-width: 1440px;
  margin: 0 auto;
}

@media (min-width: 834px) {
  .tile-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.tile {
  text-align: center;
  min-height: 580px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-gray);
  color: var(--ink);
}

.tile--dark {
  background: #000;
  color: #f5f5f7;
}

.tile__copy {
  padding: 48px 24px 0;
}

.tile__title {
  margin: 0;
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.tile__subhead {
  margin: 8px auto 0;
  max-width: 22em;
  font-size: 17px;
  line-height: 1.381;
  color: var(--ink-soft);
}

.tile--dark .tile__subhead {
  color: #a1a1a6;
}

.tile__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 12px;
}

.tile--dark .more {
  color: #2997ff;
}

.tile__media {
  flex: 1;
  min-height: 260px;
  margin-top: 24px;
  display: grid;
  place-items: center;
  padding: 0 20px 28px;
}

.tile__media-hint {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 4 / 3;
  border: 1px dashed rgba(0, 0, 0, 0.16);
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  font-size: 12px;
}

.tile--dark .tile__media-hint {
  border-color: rgba(255, 255, 255, 0.2);
  color: #a1a1a6;
}

/* ========== 横向内容带（仿 Endless entertainment） ========== */
.ribbon {
  padding: 56px 0 28px;
  background: var(--bg);
}

.ribbon__head {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 22px 22px;
  text-align: center;
}

.ribbon__title {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.ribbon__shell {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
}

.ribbon__scroller {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 8px max(22px, calc((100% - 1200px) / 2 + 22px)) 20px;
  -webkit-overflow-scrolling: touch;
}

.ribbon__scroller::-webkit-scrollbar {
  display: none;
}

.ribbon-card {
  flex: 0 0 min(72vw, 320px);
  scroll-snap-align: start;
  border-radius: 18px;
  overflow: hidden;
  background: #161617;
  color: #f5f5f7;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  /* 换成海报：background-image / cover */
  background-image: linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.75) 100%),
    linear-gradient(135deg, #2c2c2e, #1c1c1e);
}

.ribbon-card__kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ribbon-card__title {
  margin: 6px 0 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.ribbon-card__copy {
  margin: 6px 0 0;
  font-size: 14px;
  color: #a1a1a6;
  line-height: 1.35;
}

.ribbon__controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 22px 8px;
}

.ribbon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e8e8ed;
  color: var(--ink);
  display: grid;
  place-items: center;
  transition: background 0.2s var(--ease), opacity 0.2s var(--ease);
}

.ribbon-btn:hover:not(:disabled) {
  background: #d2d2d7;
}

.ribbon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.ribbon-btn svg {
  width: 12px;
  height: 12px;
}

/* ========== Footer ========== */
.footer {
  background: #fff;
  color: var(--ink-soft);
  font-size: 12px;
  margin-top: 24px;
  padding: 20px 0 40px;
  border-top: 1px solid var(--line);
}

.footer__inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 22px;
}

.footer__legal {
  margin-top: 0;
  padding-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: flex-start;
}

.footer__copy {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}

.footer__note {
  margin: 0 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  line-height: 1.5;
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

@media (min-width: 834px) {
  .footer__cols {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.footer__col h4 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.footer__col a {
  display: block;
  padding: 4px 0;
  color: var(--ink-soft);
}

.footer__col a:hover {
  text-decoration: underline;
}

.footer__legal {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
}

.footer__copy {
  margin: 0;
}

@media (max-width: 733px) {
  .module__media {
    min-height: 280px;
  }

  .module--tall .module__media {
    min-height: 340px;
  }

  .module--hero {
    min-height: auto;
  }

  .module--hero .module__media {
    margin-top: 10px;
    min-height: 0;
  }

  .module--hero .module__media img {
    height: auto;
    max-height: min(58vh, 560px);
    transform: none;
  }

  .module--hero .module__links {
    flex-direction: column;
    width: 100%;
  }

  .module--hero .btn {
    min-width: 200px;
  }

  .tile {
    min-height: 480px;
  }

  .gnav-brand {
    margin-right: 8px;
  }

  .gnav-link {
    padding: 0 8px;
  }
}

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