/* ============================================================
 * MySoul Website - Design System
 * 风格：暗黑工业冷峻风 + 赛博哲学美学
 * 完全对齐小程序 app.wxss 设计系统
 * ============================================================ */

/* ---------- Tailwind Import ---------- */
@import url('https://cdn.jsdelivr.net/npm/tailwindcss@3.4.1/dist/tailwind.min.css');

/* ---------- CSS Custom Properties (Design Tokens) ---------- */
:root {
  /* Core Colors */
  --color-pitch-black: #0a0a0c;
  --color-pale-grey: #75878A;
  --color-tiffany-blue: #81D8D0;
  --color-dark-grey: #4A4A4A;
  --color-white: #FFFFFF;

  /* Background Hierarchy */
  --color-bg-primary: #0a0a0c;
  --color-bg-secondary: #14161f;
  --color-bg-tertiary: #1e2130;
  --color-bg-footer: #111114;

  /* Text Opacity Scale */
  --text-primary: rgba(255, 255, 255, 0.9);
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-muted: rgba(255, 255, 255, 0.35);
  --text-faint: rgba(255, 255, 255, 0.2);

  /* Border Opacity Scale */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);
  --border-default: rgba(255, 255, 255, 0.15);
  --border-strong: rgba(255, 255, 255, 0.25);
  --border-highlight: rgba(255, 255, 255, 0.5);

  /* Functional Colors */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --btn-bg: rgba(255, 255, 255, 0.08);
  --card-gradient-start: rgba(255, 255, 255, 0.07);
  --card-gradient-end: rgba(255, 255, 255, 0.015);

  /* Typography */
  --font-serif: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: 'Courier New', monospace;

  /* Spacing System */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
  --space-3xl: 64px;
  --space-4xl: 80px;

  /* Transitions */
  --ease-fast: 0.15s ease;
  --ease-normal: 0.25s ease;
  --ease-slow: 0.4s ease-out;
  --ease-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Shadows */
  --shadow-hard: 4px 4px 0 rgba(0, 0, 0, 0.5);

  /* Border Radius - STRICT: only functional components */
  --radius-none: 0;
  --radius-card: 16px;
  --radius-btn: 0;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--color-bg-primary);
  color: var(--color-pale-grey);
  font-family: var(--font-sans);
  font-weight: 300;
  letter-spacing: 0.02em;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

::selection {
  background: rgba(129, 216, 208, 0.25);
  color: #ffffff;
}

/* Scrollbar - Industrial Style */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--color-bg-primary); }
::-webkit-scrollbar-thumb { background: var(--color-pale-grey); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--color-tiffany-blue); }

/* ---------- Header Styles ---------- */
.header-blur {
  background: rgba(10, 10, 12, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-scrolled {
  background: rgba(10, 10, 12, 0.97);
}

.logo-text {
  font-family: var(--font-mono);
  letter-spacing: 0.5em !important;
  font-weight: 200 !important;
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-tiffany-blue);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}


/* ============================================================
 * HERO SECTION
 * ============================================================ */

/* --- Particle Background (CSS-only) --- */
.particle-bg {
  background:
    radial-gradient(ellipse 800px 600px at 20% 30%, rgba(129, 216, 208, 0.035) 0%, transparent 70%),
    radial-gradient(ellipse 600px 500px at 75% 60%, rgba(129, 216, 208, 0.025) 0%, transparent 65%),
    radial-gradient(ellipse 400px 350px at 50% 80%, rgba(255, 255, 255, 0.018) 0%, transparent 60%),
    radial-gradient(ellipse 300px 250px at 85% 20%, rgba(129, 216, 208, 0.02) 0%, transparent 55%),
    radial-gradient(ellipse 200px 180px at 10% 80%, rgba(255, 255, 255, 0.022) 0%, transparent 50%),
    radial-gradient(circle 3px at 15% 25%, rgba(255, 255, 255, 0.06) 0%, transparent 70%),
    radial-gradient(circle 2px at 70% 15%, rgba(129, 216, 208, 0.07) 0%, transparent 70%),
    radial-gradient(circle 2.5px at 40% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 70%),
    radial-gradient(circle 1.5px at 88% 65%, rgba(129, 216, 208, 0.06) 0%, transparent 70%),
    radial-gradient(circle 2px at 25% 85%, rgba(255, 255, 255, 0.045) 0%, transparent 70%),
    radial-gradient(circle 1.8px at 55% 35%, rgba(129, 216, 208, 0.05) 0%, transparent 70%),
    radial-gradient(circle 1.2px at 92% 42%, rgba(255, 255, 255, 0.055) 0%, transparent 70%),
    var(--color-bg-primary);
  animation: particleFloat 30s ease-in-out infinite alternate;
}

@keyframes particleFloat {
  0%   { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
  25%  { background-position: 2% 3%, -1% 2%, 1% -2%, -2% 1%, 1% 2%, 3% -1%, -1% 2%, 2% 1%, -1% 2%, 1% -1%, 2% 2%, -1% 1%; }
  50%  { background-position: -1% 2%, 1% -1%, -1% 1%, 1% -1%, -2% 1%, -1% 2%, 1% -1%, -1% 2%, 1% -1%, -1% 2%, -1% 1%, 2% -1%; }
  75%  { background-position: 1% -1%, -2% 1%, 2% -1%, -1% 2%, 1% -2%, 2% -2%, -2% -1%, 1% -1%, -2% 2%, 2% 1%, -2% -1%, -1% 2%; }
  100% { background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%; }
}

/* Scanline overlay for cyber feel */
.scanline-overlay {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.01) 2px,
    rgba(255, 255, 255, 0.01) 4px
  );
}

/* Hero Typography */
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 200;
  letter-spacing: 0.8em;
  text-indent: 0.8em;
  line-height: 1.3;
  white-space: nowrap;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
}

/* Hero CTA Button */
.hero-cta-btn {
  border-radius: 0 !important;
  display: inline-block;
  text-decoration: none;
}

/* Bounce Animation for Scroll Arrow */
@keyframes bounceSlight {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.3; }
  50% { transform: translateX(-50%) translateY(8px); opacity: 0.6; }
}
.animate-bounce-slight {
  animation: bounceSlight 2s ease-in-out infinite;
}


/* ============================================================
 * FEATURES SECTION
 * ============================================================ */

/* Glass Card Component - the ONLY element with allowed radius */
.glass-card {
  background: linear-gradient(135deg, var(--card-gradient-start), var(--card-gradient-end));
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.glass-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card-index {
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid rgba(129, 216, 208, 0.25);
  background: rgba(129, 216, 208, 0.05);
  border-radius: 0;
  font-weight: 700;
}


/* ============================================================
 * CTA SECTION
 * ============================================================ */

.qr-container {
  position: relative;
}

/* QR Code Corner Decorations (Industrial Blueprint Style) */
.corner-deco {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: rgba(129, 216, 208, 0.3);
  border-style: solid;
  border-width: 0;
}

.corner-tl { top: 6px; left: 6px; border-top-width: 1.5px; border-left-width: 1.5px; }
.corner-tr { top: 6px; right: 6px; border-top-width: 1.5px; border-right-width: 1.5px; }
.corner-bl { bottom: 6px; left: 6px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.corner-br { bottom: 6px; right: 6px; border-bottom-width: 1.5px; border-right-width: 1.5px; }


/* ============================================================
 * ANIMATIONS
 * ============================================================ */

/* Fade In Up - Core Entrance Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* Scroll-triggered elements start hidden */
.scroll-animate {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transition-delay: var(--delay, 0s);
}

.scroll-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay for feature cards */
.feature-card:nth-child(1).scroll-animate { --delay: 0s; }
.feature-card:nth-child(2).scroll-animate { --delay: 0.15s; }
.feature-card:nth-child(3).scroll-animate { --delay: 0.3s; }


/* ============================================================
 * RESPONSIVE ADJUSTMENTS
 * ============================================================ */

/* Tablet and below */
@media (max-width: 768px) {
  .hero-title {
    letter-spacing: 0.4em !important;
    text-indent: 0.4em !important;
    white-space: normal;
    word-break: keep-all;
  }

  .hero-subtitle {
    letter-spacing: 0.08em !important;
  }

  .hero-cta-btn {
    padding: 14px 36px !important;
    letter-spacing: 0.4em !important;
  }

  .glass-card {
    padding: 32px 28px !important;
  }

  .qr-container {
    width: 180px !important;
    height: 180px !important;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .hero-title {
    font-size: 28px !important;
    letter-spacing: 0.25em !important;
    text-indent: 0.25em !important;
  }

  #header nav {
    gap: 1rem !important;
  }

  .nav-link {
    font-size: 12px !important;
  }
}

/* Large screens - tighten max widths for readability */
@media (min-width: 1440px) {
  body {
    font-size: 17px;
  }

  .glass-card {
    padding: 56px 48px !important;
  }
}


/* ============================================================
 * UTILITY CLASSES
 * ============================================================ */

.font-extralight { font-weight: 200 !important; }
.tracking-widest-custom { letter-spacing: 0.3em !important; }

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--color-tiffany-blue);
  outline-offset: 3px;
}
