/* ============================================================
   优港国际升学中心 · 共用设计系统（首页与详情页通用）
   ============================================================ */
/* VP0 设计令牌基座：单点引入，自动覆盖所有 link 本文件的页面。
   tokens.css 先生效、下方旧规则后覆盖 → 现有页面视觉不变。 */
@import "css/tokens.css";

:root {
  --navy:       #0D2137;
  --navy-2:     #1A3A5C;
  --gold:       #C9A84C;
  --gold-light: #F0E4C0;
  --gold-ink:   #7d6016;   /* 浅底上的金色小字（满足 AA 对比度）*/
  --bg:         #F7F5F0;
  --white:      #FFFFFF;
  --border:     rgba(13, 33, 55, 0.08);

  --text-1:     #111111;
  --text-2:     #555555;
  --text-3:     #6b6b6b;

  --success:    #1D9E75;
  --warning:    #EF9F27;
  --error:      #E24B4A;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;

  --shadow-card: 0 2px 16px rgba(13, 33, 55, 0.07);
  --shadow-lift: 0 12px 34px rgba(13, 33, 55, 0.13);

  --serif: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
  --sans:  'DM Sans', 'Noto Sans SC', system-ui, -apple-system, sans-serif;

  --maxw: 1200px;
  --nav-h: 64px;
}

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

/* ── 统一线性图标系统 ── stroke 继承 currentColor，尺寸随字号 */
.ic { width: 1.2em; height: 1.2em; display: inline-block; vertical-align: -0.2em; flex: none; }
.ic-gold { color: var(--gold); }
.badge-district .ic, .cb-window .ic, .cb-urgent .ic { width: 13px; height: 13px; vertical-align: -2px; }
.cb-urgent .ic { color: var(--error); }
.ic-myth { width: 1.05em; height: 1.05em; vertical-align: -0.18em; color: var(--error); margin-right: 2px; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  font-family: var(--sans); color: var(--text-1); background: var(--white);
  line-height: 1.6; -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility; overflow-x: clip;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul { list-style: none; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 40px; }
.section { padding: 92px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 60px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 13px; letter-spacing: .1em;
  color: var(--gold-ink); margin-bottom: 16px;
}
.eyebrow::before, .eyebrow::after {
  content: ""; width: 26px; height: 1px;
  background: currentColor; opacity: .55; flex: none;
}
.section-title { font-size: clamp(27px, 3.6vw, 38px); color: var(--navy); letter-spacing: .01em; }
.section-sub { margin-top: 15px; font-size: 15.5px; color: var(--text-2); line-height: 1.75; }

/* ── 动效缓动令牌（premium easing，全站统一） ── */
:root {
  --ease-quart: cubic-bezier(.25, 1, .5, 1);
  --ease-quint: cubic-bezier(.22, 1, .36, 1);
  --ease-expo:  cubic-bezier(.16, 1, .3, 1);
}

/* 按钮 */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 27px;
  border-radius: 999px; font-family: var(--sans); font-size: 14px; font-weight: 500;
  cursor: pointer; border: 1px solid transparent;
  transition: transform .22s var(--ease-quint), box-shadow .26s var(--ease-quint), background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(0) scale(.97); }
/* 箭头微移：CTA 更有指向性 */
.btn i.ti-arrow-right, .btn i.ti-chevron-right { transition: transform .28s var(--ease-quint); }
.btn:hover i.ti-arrow-right, .btn:hover i.ti-chevron-right { transform: translateX(3px); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(201,168,76,.36); }
.btn-gold:active { transform: translateY(0) scale(.97); }
/* 金色按钮 hover 光泽扫过（克制的高级感，非廉价闪烁） */
.btn-gold::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none;
  background: linear-gradient(105deg, transparent 32%, rgba(255,255,255,.42) 50%, transparent 68%);
  transform: translateX(-130%);
}
.btn-gold:hover::before { transform: translateX(130%); transition: transform .72s var(--ease-quart); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.45); }
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.8); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: var(--navy); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(201,168,76,.24); }

/* 键盘可达焦点环（可访问性 + 精致） */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.btn:focus-visible { outline-offset: 3px; }

/* 导航栏 */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--nav-h);
  background: var(--navy); border-bottom: 1px solid transparent;
  transition: background .3s ease, backdrop-filter .3s ease, border-color .3s ease;
}
.nav.scrolled {
  background: rgba(13,33,55,.82); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px); border-bottom-color: rgba(255,255,255,.08);
}
.nav-inner { max-width: var(--maxw); margin-inline: auto; padding-inline: 40px;
  height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 8px; background: var(--gold); color: var(--navy);
  display: grid; place-items: center; font-family: var(--serif); font-weight: 700;
  font-size: 17px; letter-spacing: -.02em;
}
.brand-name { display: flex; flex-direction: column; line-height: 1.2; }
.brand-cn { color: var(--white); font-weight: 600; font-size: 16px; letter-spacing: .04em; }
.brand-en { color: rgba(255,255,255,.5); font-size: 10px; letter-spacing: .08em; }
.nav-links { display: flex; gap: 32px; }
.nav-links a { position: relative; color: rgba(255,255,255,.78); font-size: 14px; padding: 6px 0; transition: color .2s ease; }
.nav-links a::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--gold); transition: width .25s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a.active::after, .nav-links a:hover::after { width: 100%; }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.lang-toggle { display: inline-flex; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; overflow: hidden; font-size: 12px; }
.lang-toggle button { background: transparent; border: none; color: rgba(255,255,255,.6); padding: 5px 12px; cursor: pointer; font-family: var(--sans); transition: all .2s ease; }
.lang-toggle button.on { background: var(--gold); color: var(--navy); }
.nav .btn-gold { height: 38px; padding: 0 18px; }
.hamburger { display: none; background: none; border: none; color: var(--white); font-size: 24px; cursor: pointer; line-height: 1; }

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 auto 0; z-index: 99; background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.08); padding: 16px 40px 28px;
  display: none; flex-direction: column; gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a { color: rgba(255,255,255,.8); font-size: 15px; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.mobile-menu .btn { margin-top: 16px; justify-content: center; }
.mobile-menu .lang-toggle { margin-top: 16px; align-self: flex-start; }

/* Footer */
.footer { background: var(--navy); color: var(--white); padding: 64px 0 28px; border-top: 1px solid var(--gold-line, rgba(201,162,75,.26)); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; }
.footer .brand { margin-bottom: 18px; }
.footer-desc { font-size: 12.5px; color: rgba(255,255,255,.45); line-height: 1.85; max-width: 240px; }
.footer-copy { margin-top: 18px; font-size: 12px; color: rgba(255,255,255,.32); }
.footer-col h3 { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; font-weight: 600; }
.footer-col a, .footer-col li { display: block; font-size: 13px; color: rgba(255,255,255,.55); padding: 6px 0; transition: color .2s ease; }
.footer-col a:hover { color: var(--white); }
.contact-row { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.contact-info { display: flex; flex-direction: column; gap: 18px; padding-top: 2px; }
.contact-phone .ci-label { display: block; font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255,255,255,.45); margin-bottom: 5px; }
.contact-phone a { display: inline-flex; align-items: center; gap: 7px; padding: 0;
  font-family: var(--serif); font-size: 21px; color: var(--gold); transition: color .2s ease; }
.contact-phone a:hover { color: var(--gold-light); }
.contact-phone a i { font-size: 18px; }
.qr { margin: 0; }
.qr img { width: 134px; height: 134px; object-fit: contain; background: var(--white); border-radius: 12px; padding: 7px; }
.qr .qr-fallback { display: none; }
.qr figcaption { margin-top: 9px; font-size: 11.5px; color: rgba(255,255,255,.5); max-width: 134px; }
.qr--missing img { display: none; }
.qr--missing .qr-fallback {
  display: grid; place-items: center; gap: 8px; width: 134px; height: 134px; padding: 16px;
  box-sizing: border-box; border: 1px solid rgba(255,255,255,.22); border-radius: 12px;
  color: rgba(255,255,255,.5); font-size: 12px; text-align: center;
}
.qr--missing .qr-fallback i { font-size: 30px; color: rgba(255,255,255,.35); }
.footer-hours { font-size: 12.5px; color: rgba(255,255,255,.5); line-height: 1.7; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 48px; padding-top: 24px; text-align: center; font-size: 12px; color: rgba(255,255,255,.28); }

/* 图表区块 */
.chart-figure {
  margin: 44px auto 0; max-width: 820px; text-align: center;
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 28px 28px 20px;
  box-shadow: var(--shadow-card);
}
.chart-figure img {
  width: 100%; height: auto; border-radius: var(--r-md);
  display: block; margin: 0 auto;
}
.chart-figure figcaption {
  margin-top: 12px; font-size: 12.5px; color: var(--text-3);
  letter-spacing: .01em; line-height: 1.6;
}

/* 滚动淡入 */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .62s cubic-bezier(.22,.61,.36,1), transform .62s cubic-bezier(.22,.61,.36,1); }
.reveal.in { opacity: 1; transform: none; }
/* SEO 内容卡 hover（其它卡片各页已自带 hover） */
.s-card { transition: transform .28s var(--ease-quint), box-shadow .28s var(--ease-quint), border-color .24s ease; }
.s-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(13,33,55,.4); border-color: rgba(201,168,76,.35); }

/* 响应式 */
@media (max-width: 1024px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; } }
@media (max-width: 768px) {
  .wrap, .nav-inner { padding-inline: 22px; }
  .section { padding: 56px 0; }
  .nav-links, .nav-actions .lang-toggle, .nav-actions .btn-gold { display: none; }
  .hamburger { display: block; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .s-card { transition: none; }
  .btn:hover, .btn:active, .s-card:hover { transform: none; }
  .btn-gold::before { display: none; }
  .btn i.ti-arrow-right, .btn i.ti-chevron-right { transition: none; }
}
