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

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

body {
  min-height: 100vh;
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  background: #0D1B2A;
  color: #F8FAFC;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
}

/* ========== CSS VARIABLES ========== */
:root {
  --color-deep-space: #0D1B2A;
  --color-laser-purple: #6C3BBF;
  --color-neon-orange: #FF6B2B;
  --color-electric-blue: #00E5FF;
  --color-magenta: #D946EF;
  --color-deep-navy: #1B2458;
  --color-astronaut-white: #F8FAFC;
  --color-stardust: #CBD5E1;
  --color-glass: rgba(255, 255, 255, 0.08);
  --color-border: rgba(255, 255, 255, 0.12);

  --font-display: 'Orbitron', 'Noto Sans SC', 'PingFang SC', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  --font-size-hero: clamp(2.5rem, 8vw, 6rem);
  --font-size-h1: clamp(2rem, 5vw, 3.5rem);
  --font-size-section-title: clamp(1.5rem, 4vw, 2.5rem);
  --font-size-body: 1rem;
  --font-size-caption: 0.875rem;

  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-pill: 100px;
  --container-max: 1200px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.02em;
}

p {
  color: var(--color-stardust);
}

.section-title {
  font-size: var(--font-size-section-title);
  color: var(--color-astronaut-white);
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-title::before {
  content: attr(data-index);
  font-size: 0.5em;
  color: var(--color-electric-blue);
  letter-spacing: 0.08em;
  transform: rotate(-90deg);
  transform-origin: center;
  align-self: center;
  opacity: 0.85;
}

/* ========== CONTAINER ========== */
.container {
  width: min(100% - 2rem, var(--container-max));
  margin-inline: auto;
}

/* ========== VISUALLY HIDDEN ========== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.btn-primary {
  background: var(--color-neon-orange);
  color: var(--color-astronaut-white);
  box-shadow: 0 0 24px rgba(255, 107, 43, 0.25);
}

.btn-primary:hover {
  background: #ff7b3f;
  box-shadow: 0 0 36px rgba(255, 107, 43, 0.5);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ========== HEADER ========== */
.site-header {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(100% - 2rem, var(--container-max));
  z-index: 1000;
  background: rgba(13, 27, 42, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  overflow: visible;
}

.site-header::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(0, 229, 255, 0.25), transparent 30%, transparent 70%, rgba(217, 70, 239, 0.25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.site-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.5rem 0.75rem 0.5rem 1rem;
  border-radius: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 9999;
  background: var(--color-neon-orange);
  color: var(--color-deep-space);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-pill);
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease-out);
  box-shadow: 0 4px 20px rgba(255, 107, 43, 0.4);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--color-electric-blue), var(--color-magenta), var(--color-neon-orange));
  border-radius: var(--radius-pill);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.1s linear;
  opacity: 0.8;
}

/* ========== BRAND ========== */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-laser-purple) 0%, var(--color-magenta) 100%);
  box-shadow: 0 0 20px rgba(217, 70, 239, 0.35);
  overflow: hidden;
}

.brand-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.18) 50%, transparent 60%);
  animation: brand-sheen 3.5s ease-in-out infinite;
}

@keyframes brand-sheen {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.brand-mark-core {
  position: relative;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-astronaut-white);
  letter-spacing: 0.04em;
  z-index: 1;
}

.brand-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-astronaut-white);
  letter-spacing: 0.06em;
  white-space: nowrap;
}

/* ========== NAVIGATION ========== */
.site-nav {
  margin-inline: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-stardust);
  transition: color 0.3s var(--ease-out), background 0.3s var(--ease-out);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0.25rem;
  width: 1.5rem;
  height: 2px;
  background: var(--color-electric-blue);
  border-radius: 2px;
  transform: translateX(-50%) scaleX(0);
  transition: transform 0.3s var(--ease-out);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link[aria-current="page"] {
  color: var(--color-astronaut-white);
  background: rgba(255, 255, 255, 0.06);
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link[aria-current="page"]::after {
  transform: translateX(-50%) scaleX(1);
}

/* ========== NAV TOGGLE ========== */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
  border-radius: 12px;
  background: var(--color-glass);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
  flex-shrink: 0;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.4);
}

.nav-toggle-line {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--color-astronaut-white);
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ========== HEADER CTA ========== */
.header-cta {
  flex-shrink: 0;
}

/* ========== FOOTER ========== */
.site-footer {
  position: relative;
  background: linear-gradient(180deg, var(--color-deep-navy) 0%, var(--color-deep-space) 100%);
  border-top: 1px solid var(--color-border);
  padding-top: 3rem;
  margin-top: 5rem;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  right: 10%;
  width: 40rem;
  height: 40rem;
  background: radial-gradient(circle, rgba(108, 59, 191, 0.16) 0%, transparent 65%);
  pointer-events: none;
}

.site-footer-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-electric-blue) 0%, var(--color-magenta) 50%, var(--color-neon-orange) 100%);
  opacity: 0.9;
}

.site-footer-inner {
  position: relative;
  z-index: 1;
}

.footer-top {
  display: grid;
  grid-template-columns: 4fr 2fr 2fr 3fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

/* Footer Brand */
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.footer-brand-link {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-astronaut-white);
  letter-spacing: 0.08em;
  position: relative;
  padding-bottom: 0.2rem;
}

.footer-brand-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2.5rem;
  height: 2px;
  background: linear-gradient(90deg, var(--color-electric-blue), var(--color-magenta));
  border-radius: 2px;
}

.footer-tagline {
  font-size: var(--font-size-caption);
  color: var(--color-electric-blue);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.footer-trust {
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--color-stardust);
  max-width: 32rem;
  border-left: 2px solid rgba(0, 229, 255, 0.35);
  padding-left: 1rem;
}

/* Footer Columns */
.footer-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-astronaut-white);
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1.5rem;
  height: 1px;
  background: var(--color-neon-orange);
  opacity: 0.7;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-link {
  font-size: 0.875rem;
  color: var(--color-stardust);
  transition: color 0.3s var(--ease-out), padding-left 0.3s var(--ease-out);
  position: relative;
}

.footer-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 1px;
  background: var(--color-electric-blue);
  transition: width 0.3s var(--ease-out);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--color-electric-blue);
  padding-left: 1.25rem;
}

.footer-link:hover::before,
.footer-link:focus-visible::before {
  width: 0.75rem;
}

/* Footer Contact */
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-contact li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.5rem 0.75rem;
  background: var(--color-glass);
  border: 1px solid var(--color-border);
  border-radius: 14px;
}

.contact-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-neon-orange);
  opacity: 0.9;
}

.contact-email,
.contact-phone,
.contact-address {
  font-size: 0.85rem;
  color: var(--color-astronaut-white);
  word-break: break-all;
}

/* Footer Bottom */
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--color-border);
  font-size: 0.75rem;
  color: var(--color-stardust);
}

.footer-copyright,
.footer-icp {
  letter-spacing: 0.04em;
}

/* ========== BACK TO TOP ========== */
.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 900;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(13, 27, 42, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.45);
  color: var(--color-electric-blue);
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s var(--ease-out), visibility 0.3s, transform 0.3s var(--ease-out), background 0.3s, border-color 0.3s;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--color-electric-blue);
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.25);
}

.back-to-top-arrow {
  font-size: 1.25rem;
  line-height: 1;
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
  font-size: 0.85rem;
  color: var(--color-stardust);
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  color: var(--color-electric-blue);
  opacity: 0.6;
}

.breadcrumb-item a {
  color: var(--color-electric-blue);
  transition: color 0.3s;
}

.breadcrumb-item a:hover {
  color: var(--color-neon-orange);
}

.breadcrumb-item[aria-current="page"] {
  color: var(--color-astronaut-white);
  font-weight: 600;
}

/* ========== BENTO GRID ========== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}

.bento-item {
  grid-column: 1 / -1;
  border-radius: var(--radius-md);
  background: var(--color-glass);
  border: 1px solid var(--color-border);
  padding: 1.5rem;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background 0.3s var(--ease-out);
}

.bento-item:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

@media (min-width: 640px) {
  .bento-item {
    grid-column: span 6;
  }
}

@media (min-width: 1024px) {
  .bento-item {
    grid-column: span 4;
  }
}

/* ========== MEDIA FRAME ========== */
.media-frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(135deg, rgba(108, 59, 191, 0.3) 0%, rgba(0, 229, 255, 0.08) 50%, rgba(217, 70, 239, 0.12) 100%),
    var(--color-deep-navy);
  border: 1px solid var(--color-border);
  display: grid;
  place-items: center;
}

.media-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 0%, transparent 40%, rgba(255, 255, 255, 0.06) 50%, transparent 60%, transparent 100%);
  background-size: 200% 200%;
  animation: frame-shift 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes frame-shift {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
}

/* ========== DATA REVEAL ========== */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
  will-change: opacity, transform;
}

[data-reveal][data-revealed="true"] {
  opacity: 1;
  transform: translateY(0);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 960px) {
  .site-header {
    border-radius: 26px;
    top: 0.75rem;
  }

  .site-header-inner {
    flex-wrap: wrap;
    padding: 0.5rem;
  }

  .site-nav {
    flex-basis: 100%;
    order: 3;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s var(--ease-out), opacity 0.4s var(--ease-out), margin 0.3s ease;
    margin-inline: 0;
  }

  .site-nav[data-open="true"] {
    max-height: 500px;
    opacity: 1;
    margin-top: 0.5rem;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.5rem;
    border-top: 1px solid var(--color-border);
  }

  .nav-link {
    display: flex;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 14px;
  }

  .nav-link::after {
    left: 1rem;
    transform: none;
    width: 1.5rem;
  }

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

  .header-cta {
    margin-left: auto;
    font-size: 0.82rem;
    padding: 0.55rem 1.1rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

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

@media (max-width: 600px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .footer-trust {
    max-width: none;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
  }

  .brand-text {
    font-size: 0.92rem;
  }
}

@media (max-width: 400px) {
  .header-cta {
    display: none;
  }
}

/* ========== FOCUS VISIBLE ========== */
:focus-visible {
  outline: 2px solid var(--color-electric-blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ========== 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;
    transition-delay: 0ms !important;
  }

  .site-header {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .back-to-top {
    transition: none;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .brand-mark::after {
    animation: none;
  }

  .media-frame::after {
    animation: none;
  }
}
