/* ============================================================
   Cathay Pacific Air — 虛擬航空公司
   設計方向：Apple 產品頁（黑底 Hero、霧面導覽、大字排版）
   ============================================================ */

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --accent: #0071e3;
  --accent-press: #0060c2;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);
  --black: #000000;
  --hero-ink: #f5f5f7;
  --hero-ink-2: rgba(245, 245, 247, 0.64);
  --radius: 18px;
  --radius-lg: 28px;
  --wrap: 1120px;
  --nav-h: 52px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.32, 0.64, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", "PingFang TC", "Microsoft JhengHei", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font-family: inherit; }

.wrap {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
}

/* ---------- 排版 ---------- */

.display {
  margin: 0;
  font-size: clamp(2.6rem, 6.4vw, 4.75rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-optical-sizing: auto;
}

.section__title {
  margin: 0 0 48px;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.02em;
  max-width: 18em;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- 導覽列（霧面半透明） ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: rgba(245, 245, 247, 0.72);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom: 0.5px solid transparent;
  transition: background 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}

.nav.is-scrolled {
  background: rgba(245, 245, 247, 0.86);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

.nav__inner {
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}

.nav__mark {
  width: 26px;
  height: 26px;
  color: var(--ink);
  flex: none;
}

.nav__name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav__badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  border: 1px solid rgba(0, 113, 227, 0.35);
  border-radius: 999px;
  padding: 2px 7px;
  line-height: 1.4;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__links a {
  font-size: 13px;
  color: var(--ink);
  text-decoration: none;
  padding: 7px 13px;
  border-radius: 999px;
  transition: background 0.2s var(--ease-out), transform 0.1s ease-out;
}

.nav__links a:hover { background: rgba(0, 0, 0, 0.05); }
.nav__links a:active { transform: scale(0.97); }

.nav__cta {
  background: var(--accent) !important;
  color: #fff !important;
  font-weight: 500;
  margin-left: 6px;
}
.nav__cta:hover { background: var(--accent-press) !important; }

.nav__toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  padding: 10px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  border-radius: 10px;
  transition: background 0.2s;
}
.nav__toggle:active { transform: scale(0.94); }
.nav__toggle span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.nav__sheet {
  display: none;
  flex-direction: column;
  padding: 8px 24px 20px;
  background: rgba(245, 245, 247, 0.96);
  backdrop-filter: blur(22px);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
}
.nav__sheet a {
  font-size: 17px;
  text-decoration: none;
  padding: 13px 4px;
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.07);
  transition: opacity 0.15s;
}
.nav__sheet a:last-child { border-bottom: 0; color: var(--accent); font-weight: 500; }
.nav__sheet a:active { opacity: 0.5; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--black);
  color: var(--hero-ink);
  min-height: min(92vh, 860px);
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 72px) 0 96px;
  overflow: hidden;
}

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

.hero__route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__contrail {
  stroke: rgba(245, 245, 247, 0.28);
  stroke-width: 1.5;
  stroke-dasharray: 6 10;
  stroke-linecap: round;
}

.hero__plane {
  color: var(--hero-ink);
}

.hero__glow {
  position: absolute;
  left: 50%;
  bottom: -38%;
  width: 140%;
  height: 70%;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at center,
    rgba(0, 113, 227, 0.34) 0%,
    rgba(0, 113, 227, 0.1) 42%,
    transparent 70%
  );
}

.hero__content {
  position: relative;
  width: min(var(--wrap), calc(100% - 48px));
  margin-inline: auto;
}

.hero .eyebrow { color: #2997ff; }

.hero__sub {
  margin: 26px 0 0;
  max-width: 34em;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.65;
  color: var(--hero-ink-2);
  letter-spacing: 0;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}

.hero__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 40px 0 0;
  font-size: 13px;
  color: rgba(245, 245, 247, 0.55);
  border: 0.5px solid rgba(245, 245, 247, 0.22);
  background: rgba(245, 245, 247, 0.06);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  padding: 9px 16px;
  max-width: 100%;
}
.hero__chip svg { width: 15px; height: 15px; flex: none; }

/* ---------- 按鈕 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  padding: 15px 28px;
  border-radius: 999px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  transition: transform 0.12s ease-out, background 0.2s var(--ease-out),
    color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); transition-duration: 0.1s; }

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-press); }

.btn--ghost {
  background: transparent;
  color: var(--hero-ink);
  border: 1px solid rgba(245, 245, 247, 0.35);
}
.btn--ghost:hover { background: rgba(245, 245, 247, 0.1); }

/* ---------- 免責聲明 ---------- */

.notice {
  background: var(--bg);
  padding: 72px 0 24px;
}

.notice__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 48px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}
.notice__card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), #2997ff);
}

.notice__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 10px;
}

.notice__card h2 {
  margin: 0 0 18px;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.notice__card p {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.75;
}
.notice__card p:last-child { margin-bottom: 0; }
.notice__card strong { color: var(--ink); font-weight: 600; }

/* ---------- 通用區塊 ---------- */

.section { padding: 96px 0; }

.section--alt {
  background: var(--surface);
  border-block: 0.5px solid var(--line);
}

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

/* ---------- 卡片 ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px 32px;
  transition: transform 0.35s var(--spring), box-shadow 0.35s var(--ease-out);
}
.section--alt .card { background: var(--bg); }
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.22);
}
.card:active { transform: translateY(-1px) scale(0.99); }

.card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0, 113, 227, 0.1);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.card__icon svg { width: 24px; height: 24px; }

.card h3 {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
}

/* ---------- 機隊 ---------- */

.fleet {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 30px;
  transition: transform 0.35s var(--spring), box-shadow 0.35s var(--ease-out);
}
.section:not(.section--alt) .fleet { background: var(--surface); }
.fleet:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.2);
}

.fleet__art {
  height: 96px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  color: #fff;
}
.fleet__art svg { width: 78%; height: auto; }
.fleet__art--a350 { background: linear-gradient(135deg, #05203c, #0b4f8a); }
.fleet__art--b777 { background: linear-gradient(135deg, #102018, #1c5c46); }

.fleet h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.fleet__meta {
  margin: 0 0 12px !important;
  font-size: 13px !important;
  color: var(--accent) !important;
  font-weight: 500;
}
.fleet p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--ink-2); }

/* ---------- 航線 ---------- */

.routes {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.route {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 26px;
  border-bottom: 0.5px solid var(--line);
  transition: background 0.2s var(--ease-out);
}
.route:last-child { border-bottom: 0; }
.route:hover { background: rgba(0, 113, 227, 0.04); }

.route__code {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}
.route__city { font-size: 15px; color: var(--ink-2); }

.route__line {
  flex: 1;
  height: 1px;
  min-width: 40px;
  background: repeating-linear-gradient(
    90deg,
    var(--line-strong) 0 6px,
    transparent 6px 12px
  );
  position: relative;
}
.route__line::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -3.5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.routes__note {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--ink-3);
}

/* ---------- 加入我們 / 登機證 ---------- */

.section--join {
  background: var(--surface);
  border-top: 0.5px solid var(--line);
}

.pass {
  display: grid;
  grid-template-columns: 1fr 300px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 24px 60px -32px rgba(0, 0, 0, 0.3);
}

.pass__main { padding: clamp(26px, 3.5vw, 40px); }

.pass__row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

.pass__label {
  margin: 0 0 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.pass__big {
  margin: 0;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.pass__plane {
  width: 48px;
  color: var(--accent);
  flex: none;
}

.pass__to { text-align: right; }

.pass__meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 22px;
  border-top: 0.5px dashed var(--line-strong);
}
.pass__meta p:not(.pass__label) {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pass__stub {
  background: var(--ink);
  color: var(--hero-ink);
  padding: clamp(26px, 3.5vw, 40px) 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  border-left: 1.5px dashed rgba(245, 245, 247, 0.25);
  position: relative;
}

.pass__stub .pass__label { color: rgba(245, 245, 247, 0.5); }

.pass__hint {
  margin: 0;
  font-size: 15px;
  color: rgba(245, 245, 247, 0.75);
}

.wechat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  background: rgba(245, 245, 247, 0.1);
  border: 1px solid rgba(245, 245, 247, 0.22);
  color: var(--hero-ink);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  transition: transform 0.12s ease-out, background 0.2s var(--ease-out),
    border-color 0.2s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.wechat:hover { background: rgba(245, 245, 247, 0.16); }
.wechat:active { transform: scale(0.97); }
.wechat.is-copied {
  background: rgba(52, 199, 89, 0.18);
  border-color: rgba(52, 199, 89, 0.5);
}

.wechat__id {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

.wechat__action {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(245, 245, 247, 0.65);
  white-space: nowrap;
}
.wechat.is-copied .wechat__action { color: #34c759; }

.pass__foot {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: rgba(245, 245, 247, 0.45);
  line-height: 1.6;
}

/* ---------- 步驟 ---------- */

.steps {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: step;
}

.step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.step__n {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.step h3 {
  margin: 2px 0 8px;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.step p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-2);
}
.step strong { color: var(--ink); font-weight: 600; }

/* ---------- 頁尾 ---------- */

.footer {
  background: var(--black);
  color: var(--hero-ink);
  padding: 64px 0 40px;
}

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 36px;
  border-bottom: 0.5px solid rgba(245, 245, 247, 0.14);
}

.footer__brand {
  display: flex;
  gap: 14px;
  align-items: center;
}
.footer__brand .nav__mark { color: var(--hero-ink); width: 32px; height: 32px; }

.footer__name {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.footer__tag {
  margin: 3px 0 0;
  font-size: 13px;
  color: rgba(245, 245, 247, 0.5);
}

.footer__label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(245, 245, 247, 0.45);
  text-transform: uppercase;
}
.footer__contact p:not(.footer__label) {
  margin: 0;
  font-size: 15px;
  color: rgba(245, 245, 247, 0.8);
}

.footer__wechat {
  background: rgba(245, 245, 247, 0.12);
  border: 1px solid rgba(245, 245, 247, 0.25);
  color: #2997ff;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  margin-left: 6px;
  transition: transform 0.12s ease-out, background 0.2s;
}
.footer__wechat:hover { background: rgba(245, 245, 247, 0.2); }
.footer__wechat:active { transform: scale(0.96); }
.footer__wechat.is-copied { color: #34c759; border-color: rgba(52, 199, 89, 0.5); }

.footer__disclaimer {
  padding: 28px 0;
  border-bottom: 0.5px solid rgba(245, 245, 247, 0.14);
}
.footer__disclaimer p {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(245, 245, 247, 0.5);
  max-width: 76em;
}
.footer__disclaimer strong { color: rgba(245, 245, 247, 0.8); font-weight: 600; }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 24px;
}
.footer__bottom p {
  margin: 0;
  font-size: 12.5px;
  color: rgba(245, 245, 247, 0.4);
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 16px);
  background: rgba(29, 29, 31, 0.92);
  color: #f5f5f7;
  font-size: 14.5px;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: 999px;
  backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out), transform 0.4s var(--spring);
  z-index: 200;
  max-width: calc(100% - 48px);
  text-align: center;
}
.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 捲動浮現 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 響應式 ---------- */

@media (max-width: 960px) {
  .grid--3, .steps { grid-template-columns: 1fr 1fr; }
  .pass { grid-template-columns: 1fr; }
  .pass__stub { border-left: 0; border-top: 1.5px dashed rgba(245, 245, 247, 0.25); }
}

@media (max-width: 720px) {
  .nav__links { display: none; }
  .nav__toggle { display: flex; }
  .nav__sheet:not([hidden]) { display: flex; }

  .grid--3, .steps { grid-template-columns: 1fr; }
  .grid--2 { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .hero { min-height: auto; padding: calc(var(--nav-h) + 56px) 0 72px; }

  .pass__row { flex-wrap: wrap; gap: 14px; }
  .pass__to { text-align: left; }
  .pass__plane { transform: rotate(90deg); width: 36px; }
  .pass__meta { grid-template-columns: 1fr 1fr; }

  .route { flex-wrap: wrap; gap: 10px 14px; padding: 18px 20px; }
  .route__line { min-width: 24px; }

  .footer__top { flex-direction: column; }
}

@media (max-width: 420px) {
  .wrap, .nav__inner, .hero__content { width: calc(100% - 32px); }
  .nav__name { font-size: 14px; }
}

/* ---------- 減少動態 ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .hero__plane { display: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .nav, .nav__sheet, .toast {
    background: #f5f5f7;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .footer { background: #000; }
}

@media (prefers-contrast: more) {
  .nav { border-bottom-color: rgba(0, 0, 0, 0.4); }
  .card, .fleet, .routes, .notice__card { border-color: rgba(0, 0, 0, 0.55); }
}
