/* ==========================================================================
   COPERSADA AI & IoT — Core Design System & Stylesheet
   PT Cipta Optima Persada (KBLI 62090, 63112, 62019)
   ========================================================================== */

:root {
  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Color Palette - Light Mode */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-tertiary: #e2e8f0;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: #ffffff;
  --border-color: #cbd5e1;
  --border-hover: #94a3b8;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverted: #f8fafc;

  --accent-primary: #0284c7;
  --accent-primary-hover: #0369a1;
  --accent-cyan: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #0284c7 0%, #06b6d4 50%, #3b82f6 100%);
  --accent-secondary: #10b981;
  --accent-gold: #f59e0b;
  --accent-danger: #ef4444;

  --glow-primary: rgba(2, 132, 199, 0.20);
  --glow-cyan: rgba(6, 182, 212, 0.25);
  --glow-emerald: rgba(16, 185, 129, 0.25);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 8px 10px -6px rgba(0, 0, 0, 0.06);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

[data-theme="dark"] {
  --bg-primary: #070b14;
  --bg-secondary: #0c1222;
  --bg-tertiary: #151f38;
  --bg-card: rgba(12, 18, 34, 0.85);
  --bg-card-hover: rgba(21, 31, 56, 0.95);
  --border-color: rgba(51, 65, 85, 0.6);
  --border-hover: #475569;

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

  --accent-primary: #38bdf8;
  --accent-primary-hover: #7dd3fc;
  --accent-cyan: #22d3ee;
  --accent-gradient: linear-gradient(135deg, #0284c7 0%, #38bdf8 50%, #22d3ee 100%);
  --accent-secondary: #34d399;

  --glow-primary: rgba(56, 189, 248, 0.25);
  --glow-cyan: rgba(34, 211, 238, 0.30);
  --glow-emerald: rgba(52, 211, 153, 0.25);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.6);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.7);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.8);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.9);
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: 106px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

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

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

.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

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

.section-sm {
  padding: 3rem 0;
}

/* ==========================================================================
   Fixed Top Header (Dua Baris Sesuai Standar Copersada)
   ========================================================================== */
.fixed-top-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: all var(--transition-normal);
}

/* Baris 1: Top Bar */
.header-top-bar {
  background-color: #ECEFF1;
  border-bottom: 1px solid #CFD8DC;
  padding: 8px 0;
  transition: background-color var(--transition-normal);
}

[data-theme="dark"] .header-top-bar {
  background-color: #0c1222;
  border-bottom: 1px solid #1e293b;
}

.header-top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.header-logo-img {
  height: 46px;
  width: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.header-brand:hover .header-logo-img {
  transform: scale(1.06);
}

.header-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  line-height: 1.1;
}

.brand-title-main {
  font-size: 1.35rem;
  font-weight: 900;
  color: #001A72;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: var(--font-sans);
  line-height: 1.1;
  text-align: center;
  width: 100%;
}

[data-theme="dark"] .brand-title-main {
  color: #F8FAFC;
}

.brand-title-sub {
  font-size: 0.80rem;
  font-weight: 800;
  color: #0284C7;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-family: var(--font-sans);
  margin-top: 2px;
  line-height: 1;
  text-align: center;
  width: 100%;
}

[data-theme="dark"] .brand-title-sub {
  color: #38BDF8;
}

.header-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Status Indicator Pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  color: #059669;
}

[data-theme="dark"] .status-pill {
  color: #34d399;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

/* Theme Toggle Button */
.btn-theme-toggle {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-theme-toggle:hover {
  background-color: var(--glow-primary);
  color: var(--accent-primary);
}

/* WA Button Header */
.btn-wa-header {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #ffffff !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.84rem;
  border: none;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn-wa-header:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
}

/* Baris 2: Main Navigation Bar */
.header-nav-bar {
  background-color: #000088;
  padding: 0;
  transition: background-color var(--transition-normal);
}

[data-theme="dark"] .header-nav-bar {
  background-color: #050811;
  border-bottom: 1px solid #1e293b;
}

.header-nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 48px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  height: 100%;
  margin: 0;
  padding: 0;
}

.nav-item {
  color: #FFFFFF !important;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0 16px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.3px;
  transition: background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.nav-item:hover, .nav-item.active {
  background-color: rgba(255, 255, 255, 0.18);
}

[data-theme="dark"] .nav-item:hover, [data-theme="dark"] .nav-item.active {
  background-color: rgba(56, 189, 248, 0.2);
  color: #38bdf8 !important;
}

.nav-quick-cta {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff !important;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-quick-cta:hover {
  background: #ffffff;
  color: #000088 !important;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: 4.5rem 0 5rem;
  background: radial-gradient(circle at 50% 0%, var(--glow-primary) 0%, transparent 60%);
  position: relative;
  overflow: hidden;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid rgba(2, 132, 199, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
  max-width: 900px;
}

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

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 780px;
  margin-bottom: 2.25rem;
  line-height: 1.7;
}

.hero-cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff !important;
  box-shadow: 0 4px 14px var(--glow-primary);
}

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

.btn-secondary {
  background: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-primary) !important;
}

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

/* Hero Showcase Image & Live Chips */
.hero-visual-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
}

.hero-visual-img {
  width: 100%;
  height: auto;
  display: block;
}

.floating-chip {
  position: absolute;
  background: rgba(12, 18, 34, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.floating-chip-1 {
  top: 20px;
  left: 20px;
}

.floating-chip-2 {
  bottom: 20px;
  right: 20px;
}

/* ==========================================================================
   Three Main Pillars Cards
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.75rem;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-xl), 0 0 20px var(--glow-primary);
}

.service-icon-box {
  width: 58px;
  height: 58px;
  background: var(--glow-primary);
  border: 1px solid rgba(2, 132, 199, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  margin-bottom: 1.25rem;
}

.service-title {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

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

.service-features {
  list-style: none;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.service-features li {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-features li span {
  color: var(--accent-secondary);
  font-weight: bold;
}

/* ==========================================================================
   Interactive Live Telemetry & Terminal Simulator
   ========================================================================== */
.simulator-container {
  background: #060913;
  border: 1px solid #1e293b;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.simulator-header {
  background: #0c1222;
  border-bottom: 1px solid #1e293b;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.simulator-tabs {
  display: flex;
  gap: 8px;
}

.sim-tab-btn {
  background: transparent;
  border: 1px solid #334155;
  color: #94a3b8;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sim-tab-btn.active, .sim-tab-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

.simulator-body {
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.sim-metric-card {
  background: #0c1222;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 16px;
}

.sim-metric-title {
  font-size: 0.76rem;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.sim-metric-value {
  font-size: 1.8rem;
  font-weight: 900;
  color: #38bdf8;
  font-family: var(--font-mono);
}

.terminal-box {
  background: #02040a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #34d399;
  height: 220px;
  overflow-y: auto;
  line-height: 1.5;
}

/* ==========================================================================
   Pricing Section
   ========================================================================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.pricing-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.2s ease;
}

.pricing-card.featured {
  border-color: var(--accent-primary);
  box-shadow: 0 10px 30px var(--glow-primary);
  transform: scale(1.03);
}

.featured-badge {
  position: absolute;
  top: -12px;
  right: 24px;
  background: var(--accent-gradient);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.pricing-name {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
}

.pricing-features {
  list-style: none;
  margin-bottom: 2rem;
}

.pricing-features li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 4.5rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1024px) {
  .services-grid, .pricing-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .simulator-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 70px;
  }
  .header-nav-bar {
    display: none;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
