/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}
body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: #ffffff;
  background-color: #0b1d3a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}
:focus-visible {
  outline: 2px solid #00e5ff;
  outline-offset: 2px;
}
::selection {
  background: #00e5ff;
  color: #0b1d3a;
}

/* ===== CSS VARIABLES ===== */
:root {
  --color-primary: #0b1d3a;
  --color-accent: #00e5ff;
  --color-gold: #ffd700;
  --color-white: #ffffff;
  --color-card: #1a2d4a;
  --color-muted: #8a9bb8;
  --color-dark: #050b17;
  --gradient-accent: linear-gradient(135deg, #00e5ff, #00bfff);
  --gradient-gold: linear-gradient(135deg, #ffd700, #f0a500);
  --font-header: "Montserrat", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --text-h1: clamp(2.8rem, 6vw, 4rem);
  --text-h2: clamp(2rem, 4vw, 2.5rem);
  --text-h3: clamp(1.3rem, 2.5vw, 1.75rem);
  --text-body: 1rem;
  --text-caption: 0.85rem;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --max-width: 1280px;
  --header-height: 160px;
  --bevel-size: 12px;
  --transition: 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10000;
  background: var(--color-accent);
  color: var(--color-primary);
  padding: 0.6rem 1.2rem;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 0 0 4px 4px;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* ===== SITE HEADER ===== */
.site-header {
  background-color: var(--color-primary);
  position: relative;
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 229, 255, 0.15);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-md) var(--space-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.brand-masthead {
  text-align: center;
  margin-bottom: var(--space-sm);
}
.brand-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.brand-name {
  font-family: var(--font-header);
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  letter-spacing: 0.06em;
  color: var(--color-white);
  line-height: 1.1;
  text-transform: uppercase;
}
.brand-tagline {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-caption);
  color: var(--color-accent);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.9;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 5px;
  padding: 6px;
  border-radius: 4px;
  transition: background var(--transition);
}
.nav-toggle:hover {
  background: rgba(0, 229, 255, 0.1);
}
.nav-toggle-line {
  display: block;
  width: 28px;
  height: 2.5px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-bar {
  width: 100%;
}
.nav-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.2rem 0.8rem;
}
.nav-item {
  margin: 0;
}
.nav-link {
  display: block;
  padding: 0.3rem 1rem;
  font-family: var(--font-header);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-white);
  letter-spacing: 0.04em;
  border-radius: 4px;
  transition: background var(--transition), color var(--transition);
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}
.nav-link:hover {
  background: rgba(0, 229, 255, 0.08);
  color: var(--color-accent);
}
.nav-link:hover::after {
  width: 60%;
}
.nav-link[aria-current="page"] {
  color: var(--color-accent);
  font-weight: 700;
}
.nav-link[aria-current="page"]::after {
  width: 60%;
  background: var(--color-accent);
}
.header-slash {
  height: 3px;
  background: var(--gradient-accent);
  width: 100%;
}

/* ===== MOBILE NAV ===== */
@media (max-width: 767px) {
  .site-header {
    position: sticky;
    top: 0;
  }
  .header-inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-sm);
  }
  .brand-masthead {
    margin-bottom: 0;
    text-align: left;
  }
  .brand-name {
    font-size: clamp(1.6rem, 5vw, 2.4rem);
  }
  .brand-tagline {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
  }
  .nav-toggle {
    display: flex;
  }
  .nav-bar {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
    margin-top: 0;
  }
  .nav-bar[data-open] {
    max-height: 500px;
    opacity: 1;
    margin-top: var(--space-sm);
  }
  .nav-list {
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
  }
  .nav-link {
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    width: 100%;
    text-align: center;
  }
  .nav-link::after {
    display: none;
  }
  .nav-link[aria-current="page"] {
    background: rgba(0, 229, 255, 0.12);
    border-radius: 6px;
  }
  /* toggle animation */
  [data-nav-toggle][aria-expanded="true"] .nav-toggle-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  [data-nav-toggle][aria-expanded="true"] .nav-toggle-line:nth-child(2) {
    opacity: 0;
  }
  [data-nav-toggle][aria-expanded="true"] .nav-toggle-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* ===== FLOATING CTA ===== */
.floating-cta {
  position: fixed;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
}
.cta-pulse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.6rem;
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-primary);
  background: var(--gradient-accent);
  border-radius: 50px;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: transform var(--transition), box-shadow var(--transition);
  animation: breath 2.2s ease-in-out infinite;
}
.cta-pulse:hover {
  transform: scale(1.06);
  box-shadow: 0 0 32px rgba(0, 229, 255, 0.5);
}
.cta-pulse:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}
@keyframes breath {
  0%, 100% { box-shadow: 0 0 16px rgba(0, 229, 255, 0.2); }
  50% { box-shadow: 0 0 36px rgba(0, 229, 255, 0.5); }
}
@media (max-width: 767px) {
  .floating-cta {
    right: 0.8rem;
    top: auto;
    bottom: 1.5rem;
    transform: none;
  }
  .cta-pulse {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
  }
}

/* ===== SITE FOOTER ===== */
.site-footer {
  background-color: var(--color-dark);
  color: var(--color-white);
  padding: var(--space-lg) var(--space-sm) var(--space-md);
  border-top: 1px solid rgba(0, 229, 255, 0.1);
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient-accent);
  opacity: 0.3;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: var(--space-lg) var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.footer-brand-name {
  font-family: var(--font-header);
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: 0.04em;
  color: var(--color-white);
  display: block;
  margin-bottom: 0.4rem;
}
.footer-trust {
  font-size: var(--text-caption);
  color: var(--color-muted);
  max-width: 360px;
  line-height: 1.7;
}
.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-link {
  font-size: 0.9rem;
  color: var(--color-muted);
  transition: color var(--transition), padding-left var(--transition);
  padding-left: 0;
  position: relative;
}
.footer-link::before {
  content: '›';
  position: absolute;
  left: -0.8rem;
  color: var(--color-accent);
  opacity: 0;
  transition: opacity var(--transition), left var(--transition);
}
.footer-link:hover {
  color: var(--color-accent);
  padding-left: 0.6rem;
}
.footer-link:hover::before {
  opacity: 1;
  left: -0.2rem;
}
.footer-contact {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.8;
}
.contact-item {
  margin-bottom: 0.3rem;
}
.footer-email {
  color: var(--color-accent);
  transition: color var(--transition);
}
.footer-email:hover {
  color: var(--color-gold);
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-sm);
  font-size: 0.8rem;
  color: var(--color-muted);
}
.footer-copyright {
  opacity: 0.8;
}
.footer-icp {
  opacity: 0.7;
}
@media (max-width: 1023px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}
@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    text-align: center;
  }
  .footer-trust {
    max-width: 100%;
  }
  .footer-nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 1.5rem;
  }
  .footer-link::before {
    display: none;
  }
  .footer-link:hover {
    padding-left: 0;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.3rem;
    text-align: center;
  }
}

/* ===== COMMON COMPONENTS ===== */

/* 切角面板 */
.panel-bevel {
  background: var(--color-card);
  border-radius: 0;
  position: relative;
  clip-path: polygon(
    0% var(--bevel-size),
    var(--bevel-size) 0%,
    100% 0%,
    100% calc(100% - var(--bevel-size)),
    calc(100% - var(--bevel-size)) 100%,
    0% 100%
  );
  padding: var(--space-md);
  transition: transform var(--transition), box-shadow var(--transition);
}
.panel-bevel:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

/* 斜线分割 */
.slash-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--color-accent) 30%, var(--color-gold) 70%, transparent 100%);
  width: 100%;
  margin: var(--space-md) 0;
  opacity: 0.4;
}

/* 通用按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.8rem;
  font-family: var(--font-header);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 4px;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  letter-spacing: 0.03em;
  cursor: pointer;
}
.btn-accent {
  background: var(--gradient-accent);
  color: var(--color-primary);
}
.btn-accent:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(0, 229, 255, 0.3);
}
.btn-ghost {
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
}
.btn-ghost:hover {
  background: rgba(0, 229, 255, 0.08);
}

/* 返回顶部按钮 */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 9998;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-card);
  color: var(--color-accent);
  border: 1px solid rgba(0, 229, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.35s ease, transform 0.35s ease, background var(--transition);
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.scroll-top[data-visible] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-top:hover {
  background: var(--color-accent);
  color: var(--color-primary);
  border-color: var(--color-accent);
}
.scroll-top:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-family: var(--font-header);
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-white);
}
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
body, p, li {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--color-white);
}
.caption {
  font-size: var(--text-caption);
  color: var(--color-muted);
}
.gold {
  color: var(--color-gold);
}
.accent {
  color: var(--color-accent);
}

/* ===== MAIN CONTENT WRAPPER ===== */
.main-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-lg) var(--space-sm);
  min-height: 60vh;
}

/* ===== PREFERS REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html {
    scroll-behavior: auto;
  }
  .cta-pulse {
    animation: none;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
  }
  .scroll-top {
    transition: opacity 0.15s ease;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (max-width: 767px) {
  .nav-toggle[aria-expanded="true"] + .nav-bar {
    max-height: 500px;
    opacity: 1;
  }
}

/* ===== IMAGE CONTAINER BASE ===== */
.img-container {
  position: relative;
  overflow: hidden;
  background: var(--color-card);
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: var(--text-caption);
}
.img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-container.portrait {
  aspect-ratio: 3 / 4;
}
.img-container.square {
  aspect-ratio: 1 / 1;
}
