/* ==========================================================
   iPhone 18 概念发布会
   设计系统：还原 Apple 产品页的字阶、留白、色彩与动效节奏
   ========================================================== */

:root {
  --text: #1d1d1f;
  --text-secondary: #86868b;
  --text-tertiary: #6e6e73;
  --surface-light: #f5f5f7;
  --surface-tile: #151517;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --link-dark: #2997ff;
  --orange: #ff8a3d;
  --ease-out: cubic-bezier(.25, .1, .25, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: #000;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
h1, h2 { font-weight: 700; text-wrap: balance; }

/* ---------- 固定顶部推广栏 ---------- */
/* 配色取自 Apple 官网 globalnav：rgba(22,22,23,.8) + 毛玻璃 */
.promo-nav {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  width: 100%;
  height: 52px;
  padding: 0 max(22px, calc((100vw - 1200px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #f5f5f7;
  background: rgba(22,22,23,.8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.apple-logo { font-size: 21px; line-height: 1; opacity: .92; transition: opacity .2s; }
.apple-logo:hover { opacity: .6; }
.promo-right { display: flex; align-items: center; gap: 16px; }
.promo-title { font-size: 14px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.promo-sub {
  font-size: 12px;
  white-space: nowrap;
  background: linear-gradient(92deg, #ffd0a3, #ff8a3d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* 顶部导航内的小号预购按钮 */
.promo-button {
  border: none;
  cursor: pointer;
  padding: 8px 18px;
  color: #fff;
  background: linear-gradient(100deg, #0a84ff, #6a5cff 30%, #ff5fa2 55%, #ff9f45 75%, #0a84ff);
  background-size: 300% 100%;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  animation: cta-flow 4.5s linear infinite, promo-blink 1.4s ease-in-out infinite;
  transition: transform .25s var(--ease-out);
}
.promo-button:hover { transform: scale(1.06); animation-play-state: running, paused; opacity: 1; }

/* 固定在页面底部的大号预购按钮 */
.floating-reserve-button {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  width: min(520px, calc(100vw - 40px));
  border: none;
  cursor: pointer;
  padding: 17px 28px;
  color: #fff;
  background: linear-gradient(100deg, #0a84ff, #6a5cff 30%, #ff5fa2 55%, #ff9f45 75%, #0a84ff);
  background-size: 300% 100%;
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
  box-shadow: 0 14px 42px rgba(24, 34, 88, .38), 0 0 0 1px rgba(255, 255, 255, .18) inset;
  transform: translateX(-50%);
  animation: cta-flow 4.5s linear infinite, promo-blink 1.4s ease-in-out infinite;
  transition: transform .25s var(--ease-out), box-shadow .25s;
}
.floating-reserve-button strong:first-child { font-size: 13px; line-height: 1.2; opacity: .9; }
.floating-reserve-button strong:last-child { font-size: 18px; line-height: 1.25; }
.floating-reserve-button:hover {
  transform: translateX(-50%) scale(1.035);
  box-shadow: 0 18px 52px rgba(44, 55, 140, .5), 0 0 0 1px rgba(255, 255, 255, .24) inset;
  animation-play-state: running, paused;
  opacity: 1;
}
@keyframes promo-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}

/* ---------- 发布会首屏 ---------- */
.event-hero {
  position: relative;
  height: 100svh;
  min-height: 680px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  color: #f5f5f7;
  text-align: center;
  background: #6685b3;
}
.event-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform-origin: center 30%;
  animation: hero-settle 2.4s var(--ease-out) both;
  will-change: transform;
}
/* 用独立的 scale 属性做入场沉降，避免与 JS 视差的 transform 冲突 */
@keyframes hero-settle { from { scale: 1.06; } to { scale: 1; } }
.event-copy { position: relative; z-index: 2; padding: 0 24px 8vh; text-shadow: 0 1px 18px rgba(35,58,96,.28); }
.concept-label { margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .72; }
.event-copy h1 {
  margin: 0;
  font-size: clamp(52px, 6vw, 92px);
  line-height: 1.03;
  letter-spacing: -.03em;
  background: linear-gradient(180deg, #fff 30%, #cfe2ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.event-time { margin: 16px 0 6px; font-size: clamp(19px, 2vw, 28px); font-weight: 500; letter-spacing: -.02em; }
.countdown { min-height: 1.3em; margin: 0 0 26px; font-size: 14px; font-weight: 500; letter-spacing: .04em; opacity: .78; font-variant-numeric: tabular-nums; }
.hero-actions { display: flex; justify-content: center; align-items: center; gap: 26px; }
/* 流动渐变 CTA（GIF 式闪动感，用 CSS 动画实现，矢量清晰） */
.cta-button {
  display: inline-block;
  border: 0;
  cursor: pointer;
  padding: 13px 30px;
  color: #fff;
  background: linear-gradient(100deg, #0a84ff, #6a5cff 30%, #ff5fa2 55%, #ff9f45 75%, #0a84ff);
  background-size: 300% 100%;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: 0 8px 30px rgba(50,80,210,.45);
  animation: cta-flow 4.5s linear infinite;
  transition: transform .25s var(--ease-out), box-shadow .25s;
}
.cta-button:hover { transform: scale(1.06); box-shadow: 0 12px 44px rgba(90,110,255,.6); }
@keyframes cta-flow { to { background-position: -300% 0; } }

/* 首屏文案交错入场 */
.rise { opacity: 0; transform: translateY(26px); animation: rise-in 1s var(--ease-out) forwards; }
.event-copy .rise:nth-child(1) { animation-delay: .25s; }
.event-copy .rise:nth-child(2) { animation-delay: .4s; }
.event-copy .rise:nth-child(3) { animation-delay: .6s; }
.event-copy .rise:nth-child(4) { animation-delay: .72s; }
.event-copy .rise:nth-child(5) { animation-delay: .85s; }
@keyframes rise-in { to { opacity: 1; transform: none; } }

.scroll-down { position: absolute; z-index: 3; bottom: 20px; left: 50%; width: 28px; height: 28px; transform: translateX(-50%); }
.scroll-down span { display: block; width: 10px; height: 10px; margin: 5px auto; border-right: 1.5px solid rgba(255,255,255,.8); border-bottom: 1.5px solid rgba(255,255,255,.8); transform: rotate(45deg); animation: scroll-arrow 2s infinite; }
@keyframes scroll-arrow { 0%,100% { opacity: .2; transform: translateY(0) rotate(45deg); } 50% { opacity: 1; transform: translateY(7px) rotate(45deg); } }

/* ---------- 通用段落语汇 ---------- */
.dark-section { color: #f5f5f7; background: #000; }
.section-eyebrow { margin: 0 0 18px; color: var(--text-secondary); font-size: clamp(17px, 1.6vw, 21px); font-weight: 600; letter-spacing: -.01em; }
.eyebrow-orange { color: var(--orange); }
.eyebrow-green { color: #62d97e; }
.stat-orange {
  background: linear-gradient(92deg, #ffd0a3, #ff8a3d 55%, #ff6b1a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 滚动入场 */
.reveal { opacity: 0; transform: translateY(38px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.reveal.visible { opacity: 1; transform: none; }
/* .reveal-group 子元素的交错延迟由 script.js 动态设置，避免影响 hover 反馈 */

/* ---------- iPhone 18 Pro 主视觉 ---------- */
.iphone-hero { position: relative; overflow: hidden; padding: 110px 0 0; text-align: center; }
.pro-eyebrow { margin: 0 0 10px; color: var(--orange); font-size: clamp(19px, 2vw, 24px); font-weight: 600; letter-spacing: .01em; }
.iphone-title h2 {
  margin: 0;
  font-size: clamp(48px, 7vw, 104px);
  line-height: 1.02;
  letter-spacing: -.04em;
  background: linear-gradient(97deg, #fff 25%, #ffd9b8 60%, #ff9a4d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub { margin: 18px 0 0; color: var(--text-secondary); font-size: clamp(19px, 2vw, 26px); font-weight: 500; letter-spacing: -.02em; }
/* 原图顶部约 30% 烧录了 "iPhone 17 PRO" 字样，通过负向偏移精确裁掉 */
.pro-image-wrap {
  --proW: min(100vw, 1500px);
  position: relative;
  width: 100%;
  height: calc(var(--proW) * .41);
  max-height: 740px;
  margin: 34px auto 0;
  overflow: hidden;
}
.pro-image-wrap img {
  position: absolute;
  top: calc(var(--proW) * -.177);
  left: 50%;
  width: var(--proW);
  /* --proShift 用于小屏时把构图中心移向三摄镜头组 */
  transform: translateX(calc(-50% + var(--proShift, 0px)));
  will-change: transform;
}
.pro-glow {
  position: absolute;
  z-index: 0;
  top: 4%;
  left: 50%;
  width: min(78vw, 900px);
  aspect-ratio: 2 / 1;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(255,138,61,.34), transparent 68%);
  filter: blur(30px);
  pointer-events: none;
}
.image-fade-bottom { position: absolute; z-index: 2; bottom: 0; left: 0; width: 100%; height: 16%; background: linear-gradient(transparent, #000 92%); pointer-events: none; }

/* ---------- 重点速览 ---------- */
.highlights { padding: 130px max(24px, calc((100vw - 1200px) / 2)) 40px; }
.highlights-title { margin: 0 0 44px; font-size: clamp(38px, 4.5vw, 64px); letter-spacing: -.04em; }
.highlight-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.highlight-card {
  padding: 30px 26px 60px;
  background: var(--surface-tile);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 24px;
  transition: transform .45s var(--ease-out), background .45s, opacity .9s var(--ease-out);
}
.highlight-card:hover { transform: translateY(-6px); background: #1c1c1f; }
.card-eyebrow { margin: 0 0 14px; color: var(--text-secondary); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.highlight-card > p:last-child { margin: 0; font-size: clamp(19px, 1.8vw, 24px); font-weight: 600; line-height: 1.3; letter-spacing: -.02em; }
.hl-orange { background: linear-gradient(92deg, #ffc397, #ff8a3d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hl-green { background: linear-gradient(92deg, #a5ecb3, #45c65f); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- 设计 ---------- */
.statement { padding: 170px max(24px, calc((100vw - 1050px) / 2)) 190px; }
.statement h2 { max-width: 920px; margin: 0; font-size: clamp(46px, 6.5vw, 96px); line-height: 1.03; letter-spacing: -.045em; }
.statement h2 span { color: var(--text-secondary); }
.statement-body { max-width: 640px; margin: 34px 0 0; color: var(--text-secondary); font-size: clamp(19px, 1.8vw, 24px); font-weight: 500; line-height: 1.5; letter-spacing: -.015em; }
.spec-row { margin-top: 96px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.spec-row > div {
  padding: 42px 38px;
  background: var(--surface-tile);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 26px;
  transition: transform .45s var(--ease-out), opacity .9s var(--ease-out);
}
.spec-row > div:hover { transform: translateY(-6px); }
.spec-row strong { display: block; font-size: clamp(34px, 3.6vw, 54px); font-weight: 700; letter-spacing: -.04em; }
.spec-row span { display: block; margin-top: 10px; color: var(--text-secondary); font-size: 15px; }

/* ---------- 芯片 ---------- */
.chip-section { padding: 150px 24px 170px; text-align: center; }
.chip-section h2 { margin: 0; font-size: clamp(46px, 6.5vw, 96px); line-height: 1.03; letter-spacing: -.045em; }
.chip-stage { position: relative; width: 200px; margin: 76px auto 0; }
.chip-glow {
  position: absolute;
  inset: -70px;
  background: radial-gradient(circle at center, rgba(255,138,61,.4), transparent 65%);
  filter: blur(24px);
  animation: chip-breathe 4.5s ease-in-out infinite;
}
@keyframes chip-breathe { 0%,100% { opacity: .55; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.04); } }
.chip-die {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background:
    linear-gradient(150deg, rgba(255,255,255,.09), rgba(255,255,255,0) 42%),
    linear-gradient(150deg, #232326, #0b0b0d 70%);
  border: 1px solid rgba(255,178,120,.32);
  border-radius: 30px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.14),
    0 24px 70px rgba(0,0,0,.7);
}
.chip-brand { font-size: 26px; opacity: .9; }
.chip-name { font-size: 25px; font-weight: 600; letter-spacing: -.01em; }
.chip-stats { width: min(880px, 100%); margin: 90px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.chip-stats > div { padding: 8px; }
.chip-stats strong { display: block; font-size: clamp(40px, 4.5vw, 64px); font-weight: 700; letter-spacing: -.04em; }
.chip-stats span { display: block; margin-top: 10px; color: var(--text-secondary); font-size: 15px; }

/* ---------- 影像 ---------- */
.camera-section { padding: 150px 24px 170px; text-align: center; }
.camera-section h2 { margin: 0; font-size: clamp(46px, 6.5vw, 96px); line-height: 1.03; letter-spacing: -.045em; }
.camera-body { max-width: 560px; margin: 30px auto 0; color: var(--text-secondary); font-size: clamp(19px, 1.8vw, 22px); line-height: 1.55; }
.camera-stats { width: min(880px, 100%); margin: 90px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.camera-stats > div { padding: 8px; }
.camera-stats strong { display: block; font-size: clamp(40px, 4.5vw, 64px); font-weight: 700; letter-spacing: -.04em; white-space: nowrap; }
.camera-stats span { display: block; margin-top: 10px; color: var(--text-secondary); font-size: 15px; }

/* ---------- 续航 ---------- */
.battery-section { padding: 160px 24px 180px; text-align: center; }
.battery-section h2 { margin: 0; font-size: clamp(46px, 6.5vw, 96px); line-height: 1.03; letter-spacing: -.045em; }
.battery-section h2 span { color: var(--text-secondary); }
.battery-number {
  margin: 60px 0 0;
  font-size: clamp(88px, 13vw, 200px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.05em;
  background: linear-gradient(180deg, #c8f5d2, #45c65f 65%, #2aa348);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.battery-caption { margin: 18px 0 0; color: var(--text-secondary); font-size: 17px; }

/* ---------- 外观配色 ---------- */
.colors-section {
  --glow: 255, 138, 61;
  position: relative;
  overflow: hidden;
  padding: 160px 24px 170px;
  text-align: center;
}
.colors-section::before {
  content: "";
  position: absolute;
  top: 32%;
  left: 50%;
  width: min(90vw, 1100px);
  aspect-ratio: 2.2 / 1;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(var(--glow), .26), transparent 65%);
  filter: blur(36px);
  transition: background 1s ease;
  pointer-events: none;
}
.colors-section h2 { position: relative; margin: 0; font-size: clamp(46px, 6.5vw, 96px); line-height: 1.03; letter-spacing: -.045em; }
.color-stage { position: relative; margin-top: 70px; }
.color-name {
  margin: 0 0 40px;
  font-size: clamp(30px, 3.6vw, 54px);
  font-weight: 700;
  letter-spacing: -.03em;
  background: linear-gradient(180deg, #fff, rgba(var(--glow), 1));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity .35s ease;
}
.color-name.switching { opacity: 0; }
.swatch-row { display: flex; justify-content: center; gap: 22px; }
.swatch {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  outline-offset: 5px;
  box-shadow: inset 0 1px 3px rgba(255,255,255,.4), 0 4px 14px rgba(0,0,0,.5);
  transition: transform .3s var(--ease-out), box-shadow .3s;
}
.swatch:hover { transform: scale(1.12); }
.swatch.is-active { box-shadow: inset 0 1px 3px rgba(255,255,255,.4), 0 4px 14px rgba(0,0,0,.5), 0 0 0 2px #000, 0 0 0 4px rgba(255,255,255,.85); }
.swatch-orange { background: radial-gradient(circle at 32% 30%, #ffb376, #f07822 70%); }
.swatch-cherry { background: radial-gradient(circle at 32% 30%, #8f4d63, #52293a 70%); }
.swatch-blue { background: radial-gradient(circle at 32% 30%, #7d9fd4, #33538c 70%); }
.swatch-silver { background: radial-gradient(circle at 32% 30%, #f2f3f5, #b9bcc2 70%); }

/* ---------- 全系产品 ---------- */
.lineup-section { min-height: 780px; overflow: hidden; padding: 110px 0 100px; color: var(--text); text-align: center; background: var(--surface-light); }
.lineup-copy { position: relative; z-index: 2; }
.lineup-copy .section-eyebrow { color: var(--text); }
.lineup-copy h2 { margin: 0; font-size: clamp(50px, 6vw, 84px); letter-spacing: -.04em; }
.lineup-copy > p { margin: 14px 0 0; font-size: clamp(19px, 2vw, 24px); color: var(--text-tertiary); }
/* 四款配色整机图（用户提供素材 1200x800） */
.lineup-media { width: min(960px, 100% - 48px); margin: 32px auto 0; }
.lineup-media img { width: 100%; height: auto; display: block; }

/* ---------- 页脚（Apple 官网风格） ---------- */
footer { padding: 30px 0 120px; color: var(--text-tertiary); background: var(--surface-light); border-top: 1px solid #d2d2d7; font-size: 12px; line-height: 1.6; }
.footer-inner { width: min(100% - 44px, 980px); margin: auto; }
.footer-columns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.footer-col h3 { margin: 0 0 12px; color: var(--text); font-size: 12px; font-weight: 600; }
.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li { margin: 0 0 9px; }
.footer-col a { color: #424245; transition: color .2s; }
.footer-col a:hover { color: #000; text-decoration: underline; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .highlight-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .promo-nav { height: 54px; padding: 0 14px; }
  .apple-logo { font-size: 19px; }
  /* 手机端标题与促销语上下两行叠排，预购按钮固定在底部 */
  .promo-right {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "title button" "sub button";
    column-gap: 10px;
    row-gap: 1px;
    align-items: center;
    text-align: right;
  }
  .promo-title { grid-area: title; font-size: 12px; line-height: 1.2; }
  .promo-sub { grid-area: sub; font-size: 10px; line-height: 1.2; }
  .promo-button {
    grid-area: button;
    padding: 7px 13px;
    font-size: 12px;
  }
  .floating-reserve-button {
    bottom: max(14px, env(safe-area-inset-bottom));
    width: calc(100vw - 24px);
    padding: 16px 22px;
    font-size: 16px;
  }

  .event-hero { min-height: 700px; }
  .event-copy { padding-bottom: 72px; }
  .event-copy h1 { font-size: 48px; }
  .event-time { font-size: 18px; }
  .hero-actions { flex-direction: column; gap: 18px; }

  .iphone-hero { padding-top: 90px; }
  .pro-image-wrap { --proW: 780px; --proShift: 90px; height: calc(var(--proW) * .3); margin-top: 26px; }

  .highlights { padding-top: 100px; }
  .highlight-cards { grid-template-columns: 1fr; }
  .highlight-card { padding-bottom: 44px; }

  .statement { padding-top: 120px; padding-bottom: 120px; }
  .spec-row { grid-template-columns: 1fr; margin-top: 60px; }

  .chip-section { padding: 110px 24px 130px; }
  .chip-stats { grid-template-columns: 1fr; gap: 44px; margin-top: 70px; }

  .camera-section { padding: 110px 24px 130px; }
  .camera-stats { grid-template-columns: 1fr; gap: 44px; margin-top: 70px; }

  .battery-section { padding: 110px 24px 130px; }

  .colors-section { padding: 110px 24px 130px; }

  .lineup-section { min-height: auto; padding-top: 85px; padding-bottom: 70px; }
  /* 放大裁掉图片自带的四周留白，让产品撑满屏宽 */
  .lineup-media { width: 100%; margin-top: 24px; overflow: hidden; }
  .lineup-media img { width: 118%; margin-left: -9%; }

  .footer-columns { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
}

/* ---------- 无障碍：减弱动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .rise { opacity: 1; transform: none; }
}
