/* ==========================================================================
   STUDIO TABART AI PLATFORM - MODERN STYLESHEET
   Design Theme: Calm, Sophisticated, High-Tech Glassmorphism
   ========================================================================== */

:root {
  /* Dark Theme (Default) */
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --bg-surface: rgba(255, 255, 255, 0.04);
  --bg-surface-border: rgba(255, 255, 255, 0.08);
  --bg-surface-border-hover: rgba(99, 102, 241, 0.4);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-primary: #6366f1; /* Calm Indigo */
  --accent-primary-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.25);
  --accent-cyan: #0ea5e9;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;

  --nav-bg: rgba(9, 13, 22, 0.82);
  --nav-border: rgba(255, 255, 255, 0.07);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);

  --canvas-dot-color: rgba(148, 163, 184, 0.35);
  --canvas-line-color: rgba(99, 102, 241, 0.2);
  --canvas-pulse-color: rgba(56, 189, 248, 0.8);
}

[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: #ffffff;
  --bg-surface: rgba(0, 0, 0, 0.03);
  --bg-surface-border: rgba(0, 0, 0, 0.08);
  --bg-surface-border-hover: rgba(79, 70, 229, 0.35);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --accent-primary: #4f46e5;
  --accent-primary-hover: #4338ca;
  --accent-glow: rgba(79, 70, 229, 0.15);
  --accent-cyan: #0284c7;
  --accent-emerald: #059669;
  --accent-amber: #d97706;

  --nav-bg: rgba(248, 250, 252, 0.85);
  --nav-border: rgba(0, 0, 0, 0.06);

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.1);

  --canvas-dot-color: rgba(71, 85, 105, 0.25);
  --canvas-line-color: rgba(79, 70, 229, 0.12);
  --canvas-pulse-color: rgba(14, 165, 233, 0.7);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Pretendard", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--nav-border);
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
  color: #fff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.logo-icon svg {
  width: 20px;
  height: 20px;
}

.logo-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.accent-dot {
  color: var(--accent-primary);
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--bg-surface-border);
  color: var(--accent-primary);
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s ease;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.nav-icon {
  width: 16px;
  height: 16px;
}

.nav-link.info-highlight {
  color: var(--accent-primary);
  background: var(--accent-glow);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-emerald);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.25); }
}

.theme-btn {
  background: var(--bg-surface);
  border: 1px solid var(--bg-surface-border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-btn:hover {
  color: var(--text-primary);
  border-color: var(--bg-surface-border-hover);
  background: var(--bg-card-hover);
}

.theme-btn svg {
  width: 18px;
  height: 18px;
}

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

/* ==========================================================================
   Hero Section & Neural Canvas Animation
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 1.5rem 5rem 1.5rem;
  overflow: hidden;
}

#neural-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: auto;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
  text-align: center;
  margin: 0 auto;
  pointer-events: auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  background: var(--bg-card);
  border: 1px solid var(--bg-surface-border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.badge-icon {
  width: 15px;
  height: 15px;
  color: var(--accent-primary);
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -1.5px;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.gradient-text {
  background: linear-gradient(135deg, #818cf8 0%, #38bdf8 50%, #c084fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .gradient-text {
  background: linear-gradient(135deg, #4f46e5 0%, #0284c7 50%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 2.5rem auto;
  line-height: 1.7;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), #4338ca);
  color: #ffffff;
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--bg-surface-border);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--bg-surface-border-hover);
  transform: translateY(-2px);
}

.hero-server-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  background: var(--bg-surface);
  border: 1px solid var(--bg-surface-border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero-server-tag .tag-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-server-tag svg {
  width: 14px;
  height: 14px;
  color: var(--accent-primary);
}

.tag-divider {
  color: var(--text-muted);
  opacity: 0.5;
}

/* ==========================================================================
   Dashboard Metrics Section (4 Cards)
   ========================================================================== */
.dashboard-section {
  padding: 5rem 1.5rem;
  background: var(--bg-secondary);
  border-top: 1px solid var(--nav-border);
  border-bottom: 1px solid var(--nav-border);
  position: relative;
  z-index: 2;
}

.section-container {
  max-width: 1280px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 3rem;
  text-align: center;
}

.section-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-primary);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.section-subtitle svg {
  width: 14px;
  height: 14px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0.5rem auto 0 auto;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-surface-border);
  border-radius: 16px;
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: var(--bg-surface-border-hover);
  box-shadow: var(--shadow-md);
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.metric-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-icon-wrap svg {
  width: 22px;
  height: 22px;
}

.icon-indigo {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
}

.icon-cyan {
  background: rgba(14, 165, 233, 0.15);
  color: var(--accent-cyan);
}

.icon-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

.icon-slate {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-secondary);
}

.metric-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.metric-badge.active {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.metric-badge.secure {
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.metric-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.metric-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.metric-detail {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.metric-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid var(--bg-surface-border);
  font-size: 0.78rem;
}

.sub-label {
  color: var(--text-muted);
}

.sub-value {
  font-weight: 700;
  color: var(--text-primary);
}

/* ==========================================================================
   Services Launchpad Section
   ========================================================================== */
.services-section {
  padding: 6rem 1.5rem;
  position: relative;
  z-index: 2;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.service-box {
  background: var(--bg-card);
  border: 1px solid var(--bg-surface-border);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.service-box:hover {
  transform: translateY(-4px);
  border-color: var(--bg-surface-border-hover);
  box-shadow: var(--shadow-md);
}

.service-box-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.service-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--bg-surface-border);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-icon-box svg {
  width: 24px;
  height: 24px;
}

.service-category {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: 0.8px;
}

.service-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.service-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.service-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--bg-surface-border);
  transition: all 0.2s ease;
  cursor: pointer;
}

.action-btn svg {
  width: 16px;
  height: 16px;
}

.action-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--bg-surface-border-hover);
  color: var(--accent-primary);
  transform: translateY(-1px);
}

.action-btn.primary {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: transparent;
}

.action-btn.primary:hover {
  background: var(--accent-primary-hover);
  color: #ffffff;
}

.action-btn.full-width {
  width: 100%;
  justify-content: center;
  padding: 0.85rem;
}

.action-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--bg-surface);
  border-color: var(--bg-surface-border);
  color: var(--text-muted);
}

/* ==========================================================================
   Banner Section (/INFO/ highlight)
   ========================================================================== */
.banner-section {
  padding: 2rem 1.5rem 5rem 1.5rem;
  position: relative;
  z-index: 2;
}

.banner-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(14, 165, 233, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 20px;
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  backdrop-filter: blur(16px);
}

.banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-primary);
  letter-spacing: 0.8px;
  margin-bottom: 0.5rem;
}

.banner-badge svg {
  width: 13px;
  height: 13px;
}

.banner-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.banner-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 680px;
}

.btn-banner {
  flex-shrink: 0;
  background: var(--accent-primary);
  color: #ffffff;
  padding: 0.9rem 1.75rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 6px 20px var(--accent-glow);
  transition: all 0.2s ease;
}

.btn-banner:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px var(--accent-glow);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--nav-border);
  padding: 3rem 1.5rem;
  position: relative;
  z-index: 2;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.footer-logo-icon {
  width: 20px;
  height: 20px;
  color: var(--accent-primary);
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.footer-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.footer-info span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-info svg {
  width: 14px;
  height: 14px;
  color: var(--accent-primary);
}

.footer-copyright {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-desc {
    font-size: 1rem;
  }
  .nav-links {
    display: none;
  }
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
  .banner-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-right {
    align-items: flex-start;
  }
}
