/* ============================================
   WPS Office Landing Page - Global Styles
   Pure Native CSS - No Frameworks
   ============================================ */

/* ---- CSS Variables ---- */
:root {
  --bg-core: #0A0A0A;
  --bg-elevated: #141414;
  --bg-card: #1A1A1A;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-muted: rgba(255, 255, 255, 0.4);
  --accent-red: #FF3333;
  --accent-neon: #FF4D4D;
  --accent-orange: #FF8C00;
  --accent-green: #00C853;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-core);
  color: var(--text-primary);
  line-height: 1.8;
  letter-spacing: 0.02em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* ---- Animations ---- */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 51, 51, 0.3); }
  50% { box-shadow: 0 0 20px rgba(255, 51, 51, 0.6); }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes grid-pan {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-50%, -50%); }
}

@keyframes wave {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---- Layout Containers ---- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.section-padding {
  padding: 160px 0;
}

/* ---- Utility Classes ---- */
.text-center {
  text-align: center;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

/* ---- Glass Card Utility ---- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent-red);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(255, 51, 51, 0.3);
}

.btn-primary:hover {
  background-color: #FF5555;
  box-shadow: 0 6px 24px rgba(255, 51, 51, 0.5);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-small {
  padding: 10px 20px;
  font-size: 13px;
}

/* ---- Typography ---- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-red);
  margin-bottom: 20px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--accent-red);
}

.section-title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

.section-desc {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 600px;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: all var(--transition-base);
}

.header.scrolled {
  background: rgba(10, 10, 10, 0.9);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 36px;
  height: 36px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  position: relative;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--accent-red);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-base);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: 0 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--accent-red);
  border-radius: 50%;
  animation: pulse-glow 2s infinite;
}

.hero-title {
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #FFFFFF 0%, #A0A0A0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 48px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-carousel {
  position: relative;
  width: 80%;
  max-width: 900px;
  height: 380px;
  margin: 60px auto 0;
  perspective: 1200px;
}

.hero-slide {
  position: absolute;
  width: 70%;
  max-width: 600px;
  left: 50%;
  top: 0;
  transform-origin: center center;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-slide img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}

.hero-slide.active {
  transform: translateX(-50%) translateZ(0) scale(1);
  z-index: 3;
  opacity: 1;
}

.hero-slide.prev {
  transform: translateX(-80%) translateZ(-100px) scale(0.85) rotateY(8deg);
  z-index: 2;
  opacity: 0.6;
}

.hero-slide.next {
  transform: translateX(-20%) translateZ(-100px) scale(0.85) rotateY(-8deg);
  z-index: 2;
  opacity: 0.6;
}

.hero-slide.hidden {
  transform: translateX(-50%) translateZ(-200px) scale(0.7);
  z-index: 1;
  opacity: 0;
}

.hero-slide-label {
  position: absolute;
  bottom: 16px;
  left: 16px;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.carousel-nav {
  position: absolute;
  bottom: -50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid transparent;
  transition: all var(--transition-base);
  cursor: pointer;
}

.carousel-dot.active {
  background: var(--accent-red);
  border-color: rgba(255, 51, 51, 0.4);
  transform: scale(1.2);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin-top: 80px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 36px;
  font-weight: 700;
  color: var(--accent-orange);
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   FEATURES SECTION (Capabilities)
   ============================================ */
.features {
  position: relative;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 60px;
}

.feature-card {
  padding: 40px 32px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.feature-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 51, 51, 0.1);
  border-radius: var(--radius-sm);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
  color: var(--accent-red);
}

.feature-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.feature-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Volumetric light columns panel */
.features-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-top: 100px;
}

.showcase-text {
  max-width: 520px;
}

.showcase-panel {
  position: relative;
  height: 480px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

#light-columns-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.panel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(10,10,10,0.3) 0%, rgba(10,10,10,0.6) 100%);
  z-index: 1;
}

.panel-content {
  position: relative;
  z-index: 2;
  padding: 32px;
  font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
  font-size: 12px;
}

.panel-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0, 200, 83, 0.15);
  border: 1px solid rgba(0, 200, 83, 0.3);
  border-radius: 6px;
  color: var(--accent-green);
  font-size: 11px;
  margin-bottom: 16px;
}

.panel-status .dot {
  width: 6px;
  height: 6px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulse-glow 2s infinite;
}

.panel-data {
  color: var(--text-muted);
  line-height: 2;
}

.panel-data .value {
  color: var(--accent-neon);
}

/* ============================================
   ECOSYSTEM SECTION (Grid)
   ============================================ */
.ecosystem {
  position: relative;
  overflow: hidden;
}

.ecosystem-header {
  text-align: center;
  margin-bottom: 80px;
}

.ecosystem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
}

.eco-card {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
}

.eco-card:hover {
  transform: scale(1.08) translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.eco-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  transition: opacity var(--transition-base);
}

.eco-card:hover img {
  opacity: 1;
}

.eco-card-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ecosystem-dock {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 60px;
}

.dock-btn {
  padding: 12px 28px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-base);
}

.dock-btn:hover,
.dock-btn.active {
  background: rgba(255, 51, 51, 0.15);
  border-color: rgba(255, 51, 51, 0.3);
  color: var(--text-primary);
}

/* ============================================
   PLATFORM SECTION
   ============================================ */
.platform {
  position: relative;
  overflow: hidden;
}

.platform-showcase {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  margin-top: 60px;
  flex-wrap: wrap;
}

.phone-mockup {
  position: relative;
  width: 280px;
  flex-shrink: 0;
}

.phone-mockup img {
  width: 100%;
  border-radius: 36px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.platform-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 440px;
}

.platform-card {
  padding: 28px 24px;
  text-align: center;
  transition: all var(--transition-base);
}

.platform-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
}

.platform-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--accent-orange);
}

.platform-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.platform-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.platform-version {
  font-size: 11px;
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
}

/* ============================================
   TECH FOUNDATION SECTION
   ============================================ */
.tech-foundation {
  text-align: center;
}

.isometric-container {
  position: relative;
  width: 400px;
  height: 400px;
  margin: 60px auto;
  perspective: 800px;
}

.perspective-box {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(55deg) rotateZ(40deg);
  position: relative;
}

.icon-grid {
  position: relative;
  transform-style: preserve-3d;
  width: 100%;
  height: 100%;
  animation: grid-pan 120s linear infinite;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.5rem;
  list-style: none;
}

.icon-grid__item {
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
  will-change: transform;
}

.icon-grid__icon {
  width: 2rem;
  height: 2rem;
  color: rgba(255, 255, 255, 0.15);
}

.surface {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateZ(3rem);
  pointer-events: auto;
  background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
}

.tech-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 600px;
  margin: 0 auto;
}

.tech-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tech-item:last-child {
  border-bottom: none;
}

.tech-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: var(--accent-red);
}

.tech-text h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.tech-text p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 120px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 80px;
}

.footer-brand .logo {
  margin-bottom: 20px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 300px;
}

.footer-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.copyright {
  font-size: 13px;
  color: var(--text-muted);
}

/* Staircase text effect */
.staircase-text {
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: 1px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em;
}

.staircase-word {
  display: inline-flex;
  overflow: hidden;
}

.staircase-char-mask {
  display: inline-block;
  overflow: hidden;
  position: relative;
}

.staircase-char-inner {
  display: inline-block;
  transform: translateY(0);
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .section-padding {
    padding: 100px 0;
  }

  .features-showcase {
    grid-template-columns: 1fr;
  }

  .showcase-panel {
    height: 360px;
    order: -1;
  }

  .footer-main {
    grid-template-columns: 1fr 1fr;
  }

  .hero-carousel {
    height: 300px;
  }

  .hero-slide img {
    height: 260px;
  }
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 40px 24px;
    gap: 0;
    transform: translateX(100%);
    transition: transform var(--transition-base);
  }

  .nav.open {
    transform: translateX(0);
  }

  .nav-link {
    padding: 16px 0;
    font-size: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
  }

  .nav-link::after {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .header-actions .btn {
    display: none;
  }

  .hero-stats {
    gap: 30px;
  }

  .platform-cards {
    grid-template-columns: 1fr;
    max-width: 280px;
  }

  .platform-showcase {
    flex-direction: column;
  }

  .phone-mockup {
    width: 220px;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .isometric-container {
    width: 280px;
    height: 280px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .ecosystem-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero-carousel {
    width: 95%;
    height: 240px;
  }

  .hero-slide img {
    height: 200px;
  }

  .hero-stats {
    gap: 20px;
  }

  .stat-number {
    font-size: 28px;
  }

  .ecosystem-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
