/* ===== 1. RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 60% at 70% -20%, rgb(34 211 238 / 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 10% 10%, rgb(167 139 250 / 0.05), transparent),
    var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #7DD3FC;
}

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

ul,
ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 900;
  line-height: 1.25;
  color: var(--color-text);
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

::selection {
  background: rgb(34 211 238 / 0.3);
  color: #fff;
}

/* ===== 2. CSS VARIABLES ===== */
:root {
  --color-bg: #0F1A2C;
  --color-surface: #152334;
  --color-primary: #22D3EE;
  --color-secondary: #A78BFA;
  --color-accent: #F97316;
  --color-text: #F1F5F9;
  --color-muted: #94A3B8;
  --color-border: #1E293B;
  --gradient-brand: linear-gradient(90deg, #22D3EE, #A78BFA);
  --gradient-hot: linear-gradient(90deg, #F97316, #EF4444);
  --font-heading: 'Source Han Sans CN', 'Noto Sans CJK SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Source Han Serif CN', 'Noto Serif CJK SC', 'Songti SC', serif;
  --content-width: 1200px;
  --radius: 3px;
}

/* ===== 3. LAYOUT CONTAINERS ===== */
.container {
  width: min(92%, var(--content-width));
  margin-inline: auto;
}

.section {
  padding-block: 4rem;
  position: relative;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-kicker {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-secondary);
}

.section-title {
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 900;
}

.section-mark {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 2rem;
  line-height: 1;
  color: rgb(34 211 238 / 0.15);
  writing-mode: vertical-rl;
}

/* ===== 4. UTILITIES & ACCESSIBILITY ===== */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 9999;
  background: var(--color-primary);
  color: #0F1A2C;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-heading);
  font-weight: 700;
  border-radius: 0 0 6px 6px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding-block: 0.8rem 0;
  font-size: 0.8rem;
  color: var(--color-muted);
}

.breadcrumb a {
  color: var(--color-muted);
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

/* ===== 5. BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;
  border: none;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #0F1A2C;
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  color: #0F1A2C;
}

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid rgb(34 211 238 / 0.6);
}

.btn-ghost:hover {
  background: rgb(34 211 238 / 0.1);
  color: var(--color-primary);
}

.btn-sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.8rem;
}

/* ===== 6. TAG & PANEL ===== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  background: rgb(167 139 250 / 0.14);
  color: var(--color-secondary);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 2px;
  border: 1px solid rgb(167 139 250 / 0.25);
}

.panel {
  background: var(--color-surface);
  padding: 1.5rem;
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.panel--clip {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 1rem), calc(100% - 1rem) 100%, 0 100%);
}

/* ===== 7. IMAGE FRAME ===== */
.image-frame {
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
}

.image-frame--clip {
  clip-path: polygon(0 0, calc(100% - 1rem) 0, 100% 1rem, 100% 100%, 1rem 100%, 0 calc(100% - 1rem));
}

.image-frame--wide {
  aspect-ratio: 16 / 9;
}

.image-frame--portrait {
  aspect-ratio: 3 / 4;
}

.image-frame--square {
  aspect-ratio: 1 / 1;
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== 8. PAGE HERO ===== */
.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 4rem 0;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 260px;
  height: 260px;
  border: 1px solid rgb(34 211 238 / 0.15);
  transform: rotate(45deg);
  pointer-events: none;
}

.page-hero-flag {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--color-primary);
}

.page-title {
  margin-top: 0.5rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

.page-intro {
  max-width: 60ch;
  margin-top: 1rem;
  color: var(--color-muted);
}

/* ===== 9. HEADER ===== */
.site-header {
  position: relative;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--gradient-brand);
  z-index: 1100;
  transition: width 0.05s ease-out;
  pointer-events: none;
}

.header-skyline {
  height: 6px;
  position: relative;
  background: var(--gradient-brand);
  opacity: 0.95;
}

.header-skyline::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 0 40%, rgb(255 255 255 / 0.25) 40% 50%, transparent 50% 70%, rgb(255 255 255 / 0.2) 70% 80%, transparent 80%);
}

.header-topline {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0.4rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: var(--color-muted);
  border-bottom: 1px solid var(--color-border);
}

.topline-divider {
  color: var(--color-secondary);
  font-size: 0.8rem;
}

.topline-phone {
  color: var(--color-muted);
}

.header-masthead {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--color-text);
}

.brand-en {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1.1;
  color: var(--color-text);
}

.brand-cn {
  margin-top: 0.2rem;
  padding-left: 0.5em;
  font-family: var(--font-heading);
  font-size: clamp(0.85rem, 1.4vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.5em;
  color: var(--color-primary);
}

.brand:hover .brand-cn {
  color: var(--color-secondary);
}

.masthead-number {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: rgb(34 211 238 / 0.1);
  pointer-events: none;
  user-select: none;
}

.site-nav {
  position: relative;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: rgb(15 26 44 / 0.92);
}

.nav-menu {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.35rem 0;
}

.nav-item {
  position: relative;
}

@media (min-width: 768px) {
  .nav-item + .nav-item::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 15%;
    bottom: 15%;
    width: 1px;
    background: var(--color-border);
    transform: rotate(25deg);
  }
}

.nav-link {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 0.6rem 1rem;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-text);
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.15rem;
  height: 2px;
  background: var(--gradient-brand);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.nav-link:hover {
  color: var(--color-primary);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  color: var(--color-primary);
}

.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--color-surface);
  cursor: pointer;
  border: none;
}

.nav-toggle-label {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--color-text);
}

.nav-toggle-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.nav-toggle-line {
  display: block;
  height: 2px;
  background: var(--color-primary);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ===== 10. FOOTER ===== */
.site-footer {
  position: relative;
  margin-top: 4rem;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-accent));
  z-index: 1;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-block: 3.5rem 2rem;
}

.footer-brand-en {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--color-text);
}

.footer-brand-cn {
  margin-top: 0.25rem;
  padding-left: 0.4em;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  color: var(--color-primary);
}

.footer-brand-tag {
  margin-top: 0.6rem;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--color-secondary);
}

.footer-brand-desc {
  max-width: 30ch;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.footer-brand .btn {
  margin-top: 1rem;
}

.footer-heading {
  position: relative;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--color-text);
}

.footer-heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 28px;
  height: 2px;
  background: var(--gradient-brand);
}

.footer-list li {
  margin-bottom: 0.4rem;
}

.footer-list a {
  font-size: 0.85rem;
  color: var(--color-muted);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-list a:hover {
  color: var(--color-primary);
  padding-left: 0.25rem;
}

.footer-trust {
  margin-top: 1rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--color-secondary);
  font-size: 0.72rem;
  color: var(--color-muted);
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  font-size: 0.82rem;
  color: var(--color-muted);
}

.footer-label {
  min-width: 2.6em;
  margin-top: 0.1em;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--color-secondary);
}

.footer-note {
  margin-top: 1rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--color-primary);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--color-muted);
}

.footer-bottom {
  padding-block: 0.9rem;
  background: rgb(15 26 44 / 0.55);
  border-top: 1px solid var(--color-border);
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--color-muted);
}

.footer-icp {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
}

/* ===== 11. RESPONSIVE ===== */
@media (max-width: 1024px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
  }
}

@media (max-width: 767px) {
  .header-masthead {
    padding: 1rem 0.75rem;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.3s ease;
  }

  .site-nav[data-open] .nav-menu {
    max-height: 500px;
  }

  .nav-item {
    border-top: 1px solid rgb(30 41 59 / 0.7);
  }

  .nav-link {
    display: block;
    padding: 0.85rem 1rem;
  }

  .nav-link::after {
    left: 1rem;
    right: auto;
    top: 0;
    bottom: 0;
    width: 3px;
    height: auto;
    transform: scaleY(0);
    transform-origin: center;
  }

  .nav-link:hover::after,
  .nav-link[aria-current="page"]::after {
    transform: scaleY(1);
  }

  .site-nav[data-open] .nav-toggle-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .site-nav[data-open] .nav-toggle-line:nth-child(2) {
    opacity: 0;
  }

  .site-nav[data-open] .nav-toggle-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ===== 12. REDUCED MOTION ===== */
@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;
  }

  .reading-progress {
    transition: none;
  }
}
