/* =================================================================
   CAELUM CO. — PREMIUM GLOBAL DESIGN SYSTEM & STYLE BOOK (style.css)
   Pure Light Theme: Slate Navy Typography, Pure White & Teal Accents
================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Design Tokens */
  --primary: #00A896;
  --primary-dark: #028090;
  --primary-light: rgba(0, 168, 150, 0.08);
  --background: #f8f9fb;
  --surface: #ffffff;
  --surface-alt: #f1f3f7;
  
  --text: #0b192c;
  --muted: #64748b;
  --border: rgba(0, 0, 0, 0.06);
  --border-hover: rgba(0, 168, 150, 0.15);
  
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --container: 1140px;
  
  /* Spring physics easing */
  --spring-easing: linear(0, 0.016 0.5%, 0.06 1%, 0.226 2%, 1.116 5.4%, 1.375 6.6%, 1.527 7.7%, 1.565 8.2%, 1.585 8.8%, 1.581 9.3%, 1.559 9.8%, 1.458 10.9%, 0.937 14.3%, 0.784 15.5%, 0.693 16.6%, 0.67 17.1%, 0.657 17.7%, 0.671 18.7%, 0.729 19.8%, 1.042 23.3%, 1.13 24.5%, 1.182 25.6%, 1.201 26.7%, 1.192 27.7%, 1.156 28.8%, 0.977 32.2%, 0.925 33.4%, 0.894 34.5%, 0.882 35.6%, 0.887 36.6%, 0.907 37.7%, 1.045 42.4%, 1.069 44.5%, 1.059 46.3%, 0.979 50.9%, 0.96 53.4%, 0.966 55.3%, 1.013 59.9%, 1.024 62.3%, 0.986 71.2%, 1.008 79.9%, 0.995 88.9%, 1);
  --transition: all 0.4s var(--spring-easing);
  --transition-fast: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Status indicators */
  --green: #34c759;
  --green-bg: #eafaf1;
  --orange: #ff9500;
  --orange-bg: #fff9f0;
  --red: #ff3b30;
  --red-bg: #ffefee;
}

/* ─── BASE STYLES ────────────────────────────────────────────── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text);
  font-weight: 700;
  line-height: 1.15;
}

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

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

/* ─── LAYOUT UTILITIES ───────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

.section-padding {
  padding: 6rem 0;
}

@media (max-width: 768px) {
  .grid-cols-2, .grid-cols-3, .grid-cols-4 {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  .section-padding {
    padding: 4rem 0;
  }
}

/* ─── STICKY HEADER NAVBAR ───────────────────────────────────── */
.nav-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
  transition: var(--transition-fast);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-logo img {
  width: 32px;
  height: 32px;
}

.brand-logo span {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

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

.desktop-only { display: flex; }
.mobile-only { display: none; }

@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: block; }
}

/* ─── HERO SECTION ───────────────────────────────────────────── */
.hero-section {
  padding: 8rem 0 6rem;
  background: radial-gradient(circle at 80% 20%, rgba(0, 168, 150, 0.04) 0%, transparent 65%), #ffffff;
}

.hero-title {
  font-size: 3.4rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1rem;
}

.hero-title span {
  color: var(--primary);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 540px;
  line-height: 1.55;
  margin-bottom: 2rem;
}

/* Telemetry loop card */
.telemetry-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.02);
}

.telemetry-bar-fill {
  height: 5px;
  border-radius: var(--radius-full);
  background: rgba(0,0,0,0.04);
  overflow: hidden;
  margin-top: 0.35rem;
}

.telemetry-bar-fill-inner {
  height: 100%;
  background: var(--primary);
  width: 0;
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.simulation-log-row {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.03);
  font-size: 0.75rem;
  font-family: monospace;
  color: var(--muted);
  opacity: 0;
  transform: translateY(5px);
  transition: var(--transition);
}

.simulation-log-row.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Pulsing watch dot */
.sys-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  animation: watchPulse 2s infinite ease-in-out;
}

@keyframes watchPulse {
  0% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.5; }
}

/* ─── BUTTONS & BADGES ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  white-space: nowrap;
  gap: 0.4rem;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 168, 150, 0.15);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: var(--background);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-active {
  background-color: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(52, 199, 89, 0.15);
}

.badge-info {
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(0, 168, 150, 0.15);
}

.badge-critical {
  background-color: var(--red-bg);
  color: var(--red);
  border: 1px solid rgba(255, 59, 48, 0.15);
}

/* ─── CARD CONTAINERS ────────────────────────────────────────── */
.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.01);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.02);
}

/* ─── TIMELINE PROGRESS ──────────────────────────────────────── */
.timeline-container {
  position: relative;
  padding-left: 2rem;
}

.timeline-container::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background-color: var(--border);
}

.timeline-step {
  position: relative;
  margin-bottom: 2rem;
  opacity: 0.5;
  transition: opacity 0.4s ease;
}

.timeline-step.active {
  opacity: 1;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--surface);
  border: 3px solid var(--border);
  transition: var(--transition-fast);
}

.timeline-step.active .timeline-dot {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

/* ─── SERVICES GRID ──────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

/* ─── PRICING ────────────────────────────────────────────────── */
.pricing-card {
  border-top: 4px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pricing-card.popular {
  border-top-color: var(--primary);
  transform: scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.03);
}

/* ─── FORMS ──────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background-color: var(--background);
  color: var(--text);
  font-size: 0.88rem;
  transition: var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background-color: var(--surface);
  box-shadow: 0 0 0 3px rgba(0, 168, 150, 0.1);
}

/* ─── FOOTER ─────────────────────────────────────────────────── */
footer {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ─── MOBILE DRAWER OVERLAY ──────────────────────────────────── */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background-color: var(--surface);
  z-index: 10000;
  display: none;
  flex-direction: column;
  padding: 2rem;
}

.mobile-menu-overlay.active {
  display: flex;
}

/* ─── TOAST NOTIFICATION ─────────────────────────────────────── */
#toastContainer {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
