/* Colors and Variables */
:root {
  /* High-end Tech Industrial Palette */
  --color-primary: #0F172A;
  /* Deep Navy */
  --color-secondary: #475569;
  /* Steel Gray */
  --color-accent: #38BDF8;
  /* Ice Blue */

  --color-background: #020617;
  /* Very Dark Navy */
  --color-surface: #1E293B;
  /* Card BG */
  --color-surface-hover: #334155;

  --color-text-primary: #F8FAFC;
  --color-text-secondary: #94A3B8;
  --color-border: #334155;

  /* Typography */
  --font-en: 'Inter', 'Manrope', -apple-system, sans-serif;
  --font-cn: 'Noto Sans SC', 'Source Han Sans SC', sans-serif;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 80px;

  /* Utilities */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-en);
  background-color: var(--color-background);
  color: var(--color-text-primary);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Language Switch Logic */
body.lang-en .cn-text {
  display: none !important;
}

body.lang-cn .en-text {
  display: none !important;
}

body.lang-cn {
  font-family: var(--font-cn);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

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

/* Layout */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.hero-section {
  padding: 180px 0 120px 0;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: -30%;
  left: -10%;
  width: 80vw;
  height: 80vw;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.08) 0%, rgba(2, 6, 23, 0) 60%);
  z-index: 0;
  pointer-events: none;
}

.hero-section::after {
  content: "";
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(148, 163, 184, 0.05) 0%, rgba(2, 6, 23, 0) 60%);
  z-index: 0;
  pointer-events: none;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  z-index: 50;
  display: flex;
  align-items: center;
  transition: var(--transition-normal);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-text-primary);
}

.navbar-nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-accent);
}

.navbar-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #020617;
}

.btn-primary:hover {
  background-color: #7DD3FC;
  /* Lighter Ice Blue */
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--color-border);
  color: var(--color-text-primary);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-lang {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

.btn-lang:hover {
  border-color: var(--color-text-secondary);
}

/* Cards */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 32px;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.card:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px -10px rgba(56, 189, 248, 0.05);
  /* Subtle tech glow */
}

/* Sections */
.section {
  padding: 100px 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

.section-subtitle {
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto 64px auto;
  text-align: center;
  font-size: 1.1rem;
}

/* Footer */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 64px 0 32px 0;
  margin-top: 64px;
}

.hero-container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}

.footer-brand {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 16px;
  display: inline-block;
}

.footer-desc {
  color: var(--color-text-secondary);
  margin-bottom: 24px;
  max-width: 300px;
}

.footer-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--color-text-primary);
}

.footer-link {
  display: block;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.footer-link:hover {
  color: var(--color-accent);
}

.footer-bottom {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 0.85rem;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.tag {
  background: rgba(56, 189, 248, 0.1);
  color: var(--color-accent);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Animation utilities */
.fade-in {
  animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Mobile Navigation */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--color-text-primary);
  padding: 6px;
  margin-left: 8px;
  z-index: 100;
  cursor: pointer;
}

body.mobile-menu-open .mobile-menu-toggle .line2 {
  opacity: 0;
}

body.mobile-menu-open .mobile-menu-toggle .line1 {
  transform: translateY(6px) rotate(45deg);
  transform-origin: center;
}

body.mobile-menu-open .mobile-menu-toggle .line3 {
  transform: translateY(-6px) rotate(-45deg);
  transform-origin: center;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .navbar-actions .btn-inquiry-nav {
    display: none !important;
  }

  .navbar-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    background: rgba(2, 6, 23, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 24px 30px;
    z-index: 40;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  body.mobile-menu-open .navbar-nav {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .navbar-nav li {
    width: 100%;
    text-align: center;
  }

  .nav-link {
    display: block;
    padding: 16px 0;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .navbar-nav li:last-child .nav-link {
    border-bottom: none;
  }

  .section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Universal Page Header Tech Aesthetic Override */
body .page-header {
  position: relative;
  overflow: hidden;
  background-color: var(--color-background) !important;
  background-image:
    radial-gradient(circle at right center, rgba(56, 189, 248, 0.08) 0%, rgba(2, 6, 23, 1) 60%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) !important;
  background-size: 100% 100%, 40px 40px, 40px 40px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

body .page-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle at left top, rgba(56, 189, 248, 0.12), transparent 40%) !important;
}

body .page-header>.container {
  position: relative;
  z-index: 2;
}

.clickable-card {
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.clickable-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-accent);
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.1);
}

.app-specs {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 3px solid var(--color-accent);
  border-radius: 2px 8px 8px 2px;
  padding: 0;
  overflow: hidden;
}

.spec-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: 0.93rem;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.spec-row:last-child {
  border-bottom: none;
}

.spec-label {
  color: var(--color-accent);
  font-weight: 600;
  min-width: 56px;
  white-space: nowrap;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  padding-top: 1px;
}

.spec-value {
  color: var(--color-text-secondary);
  line-height: 1.65;
}

.spec-value a {
  color: var(--color-text-primary);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(56, 189, 248, 0.3);
  text-underline-offset: 4px;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

.spec-value a:hover {
  color: var(--color-accent);
  text-decoration-color: var(--color-accent);
}

.spec-value a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {

  .clickable-card,
  .timeline-content,
  .app-thumbnail,
  .spec-value a {
    transition: none !important;
  }
}