/* ==========================================================================
   WONLAI AI - Core Stylesheet & Design System
   Theme: Deep Cyber / Autonomous Robotics Tech Aesthetic
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&family=Noto+Sans+TC:wght@300;400;500;700;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* Color Palette - Deep Cyber & Physical AI */
  --bg-primary: #060911;
  --bg-secondary: #0b111e;
  --bg-tertiary: #111a2d;
  --bg-card: rgba(15, 23, 42, 0.72);
  --bg-card-hover: rgba(26, 38, 66, 0.85);
  --bg-glass: rgba(11, 18, 33, 0.75);
  
  /* Accents */
  --cyan-500: #00e5ff;
  --cyan-400: #38ef7d;
  --cyan-glow: rgba(0, 229, 255, 0.35);
  
  --orange-500: #ff6b00;
  --orange-400: #ff9100;
  --orange-glow: rgba(255, 107, 0, 0.35);
  
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-glow: rgba(59, 130, 246, 0.3);
  
  --purple-500: #8b5cf6;
  --purple-glow: rgba(139, 92, 246, 0.25);
  
  --emerald-400: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  
  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-highlight: #38bdf8;
  
  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 229, 255, 0.3);
  --border-card: rgba(148, 163, 184, 0.12);
  
  /* Fonts */
  --font-heading: 'Outfit', 'Noto Sans TC', sans-serif;
  --font-body: 'Inter', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Gradients */
  --gradient-cyber: linear-gradient(135deg, #00e5ff 0%, #3b82f6 50%, #8b5cf6 100%);
  --gradient-amber: linear-gradient(135deg, #ff6b00 0%, #ff9100 50%, #ffc107 100%);
  --gradient-dark: linear-gradient(180deg, rgba(11, 17, 30, 0.9) 0%, rgba(6, 9, 17, 0.98) 100%);
  --gradient-glow-cyan: radial-gradient(circle at 50% 50%, rgba(0, 229, 255, 0.15), transparent 70%);
  --gradient-glow-orange: radial-gradient(circle at 50% 50%, rgba(255, 107, 0, 0.15), transparent 70%);
  
  /* Shadows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 25px -3px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 40px -5px rgba(0, 0, 0, 0.7);
  --shadow-cyan-glow: 0 0 25px rgba(0, 229, 255, 0.35);
  --shadow-orange-glow: 0 0 25px rgba(255, 107, 0, 0.35);
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Layout */
  --max-width: 1280px;
  --header-height: 76px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  position: relative;
  overflow-x: hidden;
}

/* Background Canvas */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
}

.ambient-glow-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background: 
    radial-gradient(circle at 15% 20%, rgba(0, 229, 255, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 35%, rgba(255, 107, 0, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 50% 75%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
}

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

ul, ol {
  list-style: none;
}

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

button, input, textarea {
  font-family: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

/* Container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.section {
  padding: 6.5rem 0;
  position: relative;
}

@media (max-width: 768px) {
  .section {
    padding: 4.5rem 0;
  }
}

/* Section Header Shared */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 4rem auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
}

.section-tag.cyan {
  color: var(--cyan-500);
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.15);
}

.section-tag.orange {
  color: var(--orange-400);
  border-color: rgba(255, 107, 0, 0.3);
  box-shadow: 0 0 15px rgba(255, 107, 0, 0.15);
}

.section-tag.blue {
  color: var(--blue-500);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 1.25rem;
  font-weight: 800;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Gradient Text Utilities */
.text-gradient-cyan {
  background: linear-gradient(135deg, #ffffff 10%, #00e5ff 70%, #38ef7d 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-orange {
  background: linear-gradient(135deg, #ffffff 10%, #ff8800 70%, #ff5100 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-cyber {
  background: var(--gradient-cyber);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glassmorphism Card Utility */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.6), 0 0 25px rgba(0, 229, 255, 0.15);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-normal);
  text-align: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary-cyan {
  background: linear-gradient(135deg, #00e5ff 0%, #0099ff 100%);
  color: #060911;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

.btn-primary-cyan:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.6);
  color: #000;
}

.btn-primary-orange {
  background: linear-gradient(135deg, #ff6b00 0%, #ff9100 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(255, 107, 0, 0.4);
}

.btn-primary-orange:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 107, 0, 0.6);
}

.btn-primary-green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.btn-primary-green:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.6);
  color: #ffffff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-outline-cyan {
  background: rgba(0, 229, 255, 0.06);
  color: var(--cyan-500);
  border: 1px solid rgba(0, 229, 255, 0.35);
}

.btn-outline-cyan:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: var(--cyan-500);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.25);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 1.1rem 2.2rem;
  font-size: 1.05rem;
}

/* Pulse Dot */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

.pulse-dot.cyan {
  background-color: var(--cyan-500);
  box-shadow: 0 0 8px var(--cyan-500);
}

.pulse-dot.cyan::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--cyan-500);
  animation: pulse-ring 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.pulse-dot.orange {
  background-color: var(--orange-500);
  box-shadow: 0 0 8px var(--orange-500);
}

.pulse-dot.orange::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--orange-500);
  animation: pulse-ring 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Accessibility / Focus */
:focus-visible {
  outline: 2px solid var(--cyan-500);
  outline-offset: 3px;
}
