/* MoKangMedical Design System v3.0 - World Class */
:root {
  --primary: #0a1628; --primary-light: #1a2d4a;
  --accent: #3b82f6; --accent-light: #60a5fa; --accent-glow: rgba(59,130,246,0.3);
  --accent-2: #8b5cf6; --accent-3: #06b6d4; --accent-4: #10b981;
  --text: #e2e8f0; --text-muted: #94a3b8; --text-dim: #64748b;
  --bg: #0f172a; --bg-card: #1e293b; --bg-card-hover: #334155;
  --bg-elevated: #162032;
  --border: #334155; --border-light: #475569;
  --success: #10b981; --warning: #f59e0b; --error: #ef4444;
  --gradient: linear-gradient(135deg, #3b82f6, #8b5cf6);
  --gradient-2: linear-gradient(135deg, #06b6d4, #3b82f6);
  --gradient-3: linear-gradient(135deg, #8b5cf6, #ec4899);
  --gradient-warm: linear-gradient(135deg, #f59e0b, #ef4444);
  --radius: 12px; --radius-lg: 20px; --radius-xl: 28px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(59,130,246,0.15);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: var(--accent-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: #93c5fd; }
img { max-width: 100%; height: auto; }

/* === NAVIGATION === */
.eco-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(15,23,42,0.92); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); padding: 0 2rem;
  display: flex; align-items: center; height: 60px;
  transition: background 0.3s, box-shadow 0.3s;
}
.eco-nav.scrolled {
  background: rgba(15,23,42,0.98);
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.eco-nav .nav-brand {
  font-weight: 800; font-size: 1.15rem; color: var(--text);
  margin-right: auto; display: flex; align-items: center; gap: 0.5rem;
}
.eco-nav .nav-brand .brand-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gradient); display: inline-block;
}
.eco-nav .nav-links { display: flex; gap: 1.75rem; align-items: center; }
.eco-nav .nav-links a { color: var(--text-muted); font-size: 0.9rem; position: relative; }
.eco-nav .nav-links a:hover,
.eco-nav .nav-links a.active { color: var(--accent-light); }
.eco-nav .nav-links a.active::after {
  content: ''; position: absolute; bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--gradient); border-radius: 1px;
}
body { padding-top: 60px; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); cursor: pointer; padding: 0.5rem; }

/* === HERO === */
.hero {
  padding: 6rem 2rem 4rem; text-align: center;
  background: linear-gradient(180deg, var(--primary) 0%, var(--bg) 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 30% 20%, var(--accent-glow) 0%, transparent 70%),
              radial-gradient(ellipse 50% 40% at 70% 80%, rgba(139,92,246,0.12) 0%, transparent 70%);
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(59,130,246,0.06) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
}
.hero > * { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 900; margin-bottom: 1.25rem;
  background: var(--gradient); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  line-height: 1.1; letter-spacing: -0.02em;
}
.hero .subtitle {
  font-size: 1.25rem; color: var(--text-muted); max-width: 700px;
  margin: 0 auto 2.5rem; line-height: 1.7;
}
.hero .badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--accent-glow); border: 1px solid rgba(59,130,246,0.4);
  color: var(--accent-light); padding: 0.4rem 1.2rem;
  border-radius: 24px; font-size: 0.85rem; margin-bottom: 1.5rem;
  font-weight: 500;
}
.hero .badge .badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success); animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.4); }
}

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 2rem; border-radius: 10px; font-weight: 600;
  font-size: 0.95rem; transition: all 0.3s; cursor: pointer; border: none;
  text-decoration: none; position: relative; overflow: hidden;
}
.btn-primary {
  background: var(--gradient); color: #fff;
  box-shadow: 0 4px 15px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px); box-shadow: 0 8px 30px var(--accent-glow); color: #fff;
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0; transition: opacity 0.3s;
}
.btn-primary:hover::after { opacity: 1; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-light); background: var(--accent-glow); }
.btn-ghost { background: transparent; color: var(--text-muted); border: none; padding: 0.5rem 1rem; }
.btn-ghost:hover { color: var(--accent-light); }
.btn-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-sm { padding: 0.6rem 1.25rem; font-size: 0.85rem; border-radius: 8px; }
.btn-icon { width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }

/* === SECTIONS === */
.section { padding: 5rem 2rem; max-width: 1200px; margin: 0 auto; }
.section-title { font-size: 2.25rem; font-weight: 800; text-align: center; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.section-desc { color: var(--text-muted); text-align: center; max-width: 600px; margin: 0 auto 3rem; font-size: 1.05rem; }
.section-label {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--accent-light); font-size: 0.85rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.75rem;
}
.section-full { max-width: 100%; padding: 5rem 0; }

/* === CARDS === */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
  transition: all 0.3s; position: relative;
}
.card:hover {
  border-color: var(--accent); transform: translateY(-4px);
  box-shadow: var(--shadow-lg); background: var(--bg-card-hover);
}
.card-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.card h3 { font-size: 1.2rem; margin-bottom: 0.75rem; font-weight: 700; }
.card p { color: var(--text-muted); font-size: 0.95rem; }

/* === STATS === */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem; text-align: center; padding: 3rem 0;
}
.stat-num {
  font-size: 3rem; font-weight: 900;
  background: var(--gradient); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  font-variant-numeric: tabular-nums;
}
.stat-label { color: var(--text-muted); font-size: 0.9rem; margin-top: 0.25rem; }

/* === DOMAIN CARDS === */
.domain-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}
.domain-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer; text-decoration: none; color: var(--text);
  position: relative; overflow: hidden;
}
.domain-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px; background: var(--gradient); opacity: 0;
  transition: opacity 0.3s;
}
.domain-card:hover {
  border-color: var(--accent); transform: translateY(-6px);
  box-shadow: var(--shadow-glow); background: var(--bg-card-hover);
}
.domain-card:hover::before { opacity: 1; }
.domain-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.domain-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; flex-shrink: 0;
}
.domain-title { font-size: 1.25rem; font-weight: 700; }
.domain-count { color: var(--text-muted); font-size: 0.85rem; }
.domain-projects { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.domain-projects span {
  padding: 0.25rem 0.75rem; border-radius: 20px;
  background: var(--bg); border: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text-muted); transition: all 0.2s;
}
.domain-card:hover .domain-projects span { border-color: var(--accent); color: var(--accent-light); }

/* === TECH STACK === */
.tech-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}
.tech-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem 1rem;
  text-align: center; transition: all 0.3s;
}
.tech-item:hover {
  border-color: var(--accent); transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.tech-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.tech-name { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.25rem; }
.tech-desc { color: var(--text-dim); font-size: 0.75rem; }

/* === CTA === */
.cta-section {
  text-align: center; padding: 5rem 2rem;
  background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(139,92,246,0.08));
  border-radius: var(--radius-xl); margin: 3rem auto; max-width: 1200px;
  border: 1px solid rgba(59,130,246,0.15); position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(59,130,246,0.05), transparent 70%);
}
.cta-section > * { position: relative; z-index: 1; }
.cta-section h2 { font-size: 2.5rem; margin-bottom: 1rem; font-weight: 800; letter-spacing: -0.01em; }
.cta-section p { color: var(--text-muted); max-width: 600px; margin: 0 auto 2rem; font-size: 1.1rem; }

/* === TESTIMONIALS / FEATURES === */
.feature-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem; margin-top: 3rem;
}
.feature-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem;
  transition: all 0.3s; text-align: center;
}
.feature-card:hover {
  border-color: var(--accent); transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.feature-card .feat-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.feature-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; }

/* === WORKFLOW === */
.workflow-steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem; margin-top: 3rem; counter-reset: step;
}
.workflow-step {
  text-align: center; padding: 1.5rem; position: relative;
}
.workflow-step::before {
  counter-increment: step; content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--gradient); color: #fff; font-weight: 800;
  font-size: 1.25rem; margin: 0 auto 1rem;
}
.workflow-step h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.workflow-step p { color: var(--text-muted); font-size: 0.9rem; }

/* === FOOTER === */
.footer {
  background: var(--primary); border-top: 1px solid var(--border);
  padding: 4rem 2rem 2rem; color: var(--text-muted);
}
.footer-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem; padding-bottom: 3rem; border-bottom: 1px solid var(--border);
}
.footer-brand { }
.footer-brand h3 { color: var(--text); font-size: 1.2rem; margin-bottom: 0.75rem; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; }
.footer-col h4 { color: var(--text); font-size: 0.9rem; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.08em; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col ul li a { color: var(--text-muted); font-size: 0.9rem; }
.footer-col ul li a:hover { color: var(--accent-light); }
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 2rem; font-size: 0.85rem; flex-wrap: wrap; gap: 1rem;
}
.footer-bottom a { color: var(--text-muted); }
.footer-bottom a:hover { color: var(--accent-light); }
.footer-links { display: flex; gap: 2rem; justify-content: center; margin-bottom: 1.5rem; flex-wrap: wrap; }
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--accent-light); }

/* === ANIMATIONS === */
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.fade-up { animation: fadeUp 0.6s ease-out both; }
.fade-in { animation: fadeIn 0.6s ease-out both; }
.slide-left { animation: slideInLeft 0.6s ease-out both; }
.slide-right { animation: slideInRight 0.6s ease-out both; }
.float { animation: float 6s ease-in-out infinite; }

/* Staggered animation delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }
.delay-7 { animation-delay: 0.7s; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .eco-nav { padding: 0 1rem; }
  .eco-nav .nav-links {
    display: none; position: fixed; top: 60px; left: 0; right: 0;
    background: rgba(15,23,42,0.98); backdrop-filter: blur(16px);
    flex-direction: column; padding: 1.5rem; gap: 0;
    border-bottom: 1px solid var(--border);
  }
  .eco-nav .nav-links.open { display: flex; }
  .eco-nav .nav-links a {
    padding: 0.75rem 0; border-bottom: 1px solid var(--border);
    width: 100%; text-align: left;
  }
  .nav-toggle { display: block; }
  .hero { padding: 4rem 1rem 2rem; }
  .hero h1 { font-size: 2.25rem; }
  .section { padding: 3rem 1rem; }
  .card-grid { grid-template-columns: 1fr; }
  .domain-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .cta-section { padding: 3rem 1.5rem; margin: 2rem 1rem; }
  .cta-section h2 { font-size: 1.75rem; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .stat-num { font-size: 2.25rem; }
  .tech-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}

/* === HERO CARD === */
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.hero-left h1 { font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 900; line-height: 1.08; margin-bottom: 1.5rem; letter-spacing: -0.02em; }
.hero-left h1 span { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-right { position: relative; }
.hero-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem;
  transform: rotate(1.5deg); box-shadow: var(--shadow-lg);
  position: relative;
}
.hero-card::before {
  content: ''; position: absolute; top: -1px; left: -1px; right: -1px;
  height: 3px; background: var(--gradient); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.hero-card pre {
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
  font-size: 0.85rem; color: var(--accent-light); line-height: 1.7;
  overflow-x: auto;
}
.hero-card .terminal-header {
  display: flex; gap: 0.5rem; margin-bottom: 1.25rem;
  padding-bottom: 1rem; border-bottom: 1px solid var(--border);
}
.hero-card .terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.hero-card .terminal-dot.red { background: #ef4444; }
.hero-card .terminal-dot.yellow { background: #f59e0b; }
.hero-card .terminal-dot.green { background: #10b981; }

@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-right { display: none; }
  .hero-left h1 { font-size: 2.25rem; }
}

/* === NAV CTA === */
.nav-cta {
  background: var(--gradient); color: #fff !important;
  padding: 0.45rem 1.1rem !important; border-radius: 8px;
  font-weight: 600; font-size: 0.85rem !important;
  transition: all 0.3s !important;
}
.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* === FOCUS STYLES (Accessibility) === */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* === SKIP LINK === */
.skip-link {
  position: absolute; top: -100px; left: 1rem;
  background: var(--accent); color: #fff; padding: 0.75rem 1.5rem;
  border-radius: 8px; font-weight: 600; z-index: 10000;
  transition: top 0.3s;
}
.skip-link:focus { top: 0.5rem; }
