/* ==========================================================================
   NexusCraft Design System & Main Stylesheet
   Brand Palette: Royal Electric Blue (#2563EB) & Deep Purple (#6366F1)
   Light-Mode SaaS Aesthetic | 12px Rounded Borders | Glassmorphic Elements
   ========================================================================== */

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

:root {
  /* Brand Color Palette */
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #EFF6FF;
  --primary-glow: rgba(37, 99, 235, 0.2);
  
  --secondary: #6366F1;
  --secondary-dark: #4F46E5;
  --secondary-light: #EEF2FF;
  
  --gradient-primary: linear-gradient(135deg, #2563EB 0%, #6366F1 100%);
  --gradient-subtle: linear-gradient(135deg, #EFF6FF 0%, #EEF2FF 100%);
  --gradient-text: linear-gradient(135deg, #0F172A 30%, #2563EB 100%);
  --gradient-accent: linear-gradient(135deg, #2563EB 0%, #4F46E5 50%, #9333EA 100%);

  /* Backgrounds & Surfaces */
  --bg-main: #FFFFFF;
  --bg-subtle: #F8FAFC;
  --bg-card: #FFFFFF;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --bg-glass-darker: rgba(248, 250, 252, 0.9);

  /* Typography & Slate Scale */
  --text-main: #0F172A;
  --text-body: #334155;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;

  /* Borders & Shadows */
  --border-color: #E2E8F0;
  --border-hover: #CBD5E1;
  --border-focus: #93C5FD;
  
  --radius-sm: 8px;
  --radius-md: 12px; /* Mandatory 12px rounded borders */
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.03);
  --shadow-sm: 0 2px 4px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 6px 12px -2px rgba(15, 23, 42, 0.08), 0 3px 6px -3px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.1), 0 8px 16px -6px rgba(15, 23, 42, 0.05);
  --shadow-glow: 0 10px 30px -5px rgba(37, 99, 235, 0.25);

  /* Layout & Transitions */
  --container-max: 1240px;
  --nav-height: 80px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Dark Navy Theme Overrides
   Activated via html[data-theme="dark"]
   ========================================================================== */
html[data-theme="dark"] {
  /* Backgrounds & Surfaces */
  --bg-main: #0B132B;
  --bg-subtle: #1C2541;
  --bg-card: #1C2541;
  --bg-glass: rgba(11, 19, 43, 0.92);
  --bg-glass-darker: rgba(28, 37, 65, 0.95);

  /* Typography */
  --text-main: #E8EDF5;
  --text-body: #C3CDE0;
  --text-muted: #8B9DC3;
  --text-subtle: #5A7099;

  /* Borders & Shadows */
  --border-color: #2A3A5C;
  --border-hover: #3A506B;
  --border-focus: #4A8FE7;

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.15);
  --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
  --shadow-md: 0 6px 12px -2px rgba(0, 0, 0, 0.3), 0 3px 6px -3px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.35), 0 8px 16px -6px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 10px 30px -5px rgba(37, 99, 235, 0.35);

  /* Gradients */
  --gradient-subtle: linear-gradient(135deg, #0B132B 0%, #1C2541 100%);
  --gradient-text: linear-gradient(135deg, #E8EDF5 30%, #4A8FE7 100%);

  /* Primary Light tweaked for dark bg */
  --primary-light: rgba(37, 99, 235, 0.15);
  --secondary-light: rgba(99, 102, 241, 0.15);
}

html[data-theme="dark"] .header {
  background: rgba(11, 19, 43, 0.92);
}

html[data-theme="dark"] .header.scrolled {
  background: rgba(11, 19, 43, 0.97);
}

html[data-theme="dark"] .nav-link {
  color: var(--text-body);
}

html[data-theme="dark"] .brand-logo {
  color: var(--text-main);
}

html[data-theme="dark"] .mobile-nav-drawer {
  background: #0B132B;
}

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

html {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
  background-color: var(--bg-main);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

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

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

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

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

/* Page Views System */
.page-view {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--transition-normal), transform var(--transition-normal);
  padding-top: calc(var(--nav-height) + 2rem);
  padding-bottom: 5rem;
  flex: 1;
}

.page-view.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Sticky Glassmorphism Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.header.scrolled {
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, 0.95);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem; /* gap-6 */
  height: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-main);
  letter-spacing: -0.03em;
  cursor: pointer;
  text-decoration: none;
}

.brand-logo img {
  height: 36px;       /* h-9 */
  width: auto;
  object-fit: contain;
  background: none;   /* no background — logo PNG is already transparent */
  border-radius: 0;   /* no clipping — let the logo shape render naturally */
  display: block;
}

.brand-logo-svg {
  height: 42px;       /* Prominent header brand logo (h-10/h-11) */
  width: auto;
  display: block;
  background: transparent !important;
}

.brand-badge {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem; /* space-x-6 (24px) spacing */
  list-style: none;
}

.nav-link {
  font-size: 14px; /* text-sm */
  font-weight: 500; /* font-medium */
  color: #334155; /* Dark Slate (#334155) */
  position: relative;
  padding: 0.5rem 0;
  transition: color var(--transition-fast);
  cursor: pointer;
  white-space: nowrap; /* Prevent line wrap and vertical stacking */
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-normal);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: #F1F5F9;
  border-color: var(--border-hover);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 0.9rem 2rem;
  font-size: 1.05rem;
}

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

/* Badges & Pills */
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  background: var(--primary-light);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.25rem;
}

.pill-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--primary);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

/* Typography Utilities */
.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 650px;
  margin-bottom: 2.5rem;
}

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

/* Global Footer */
.footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  padding-top: 4rem;
  padding-bottom: 2rem;
  margin-top: auto;
}

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

.footer-col-bio img {
  height: 42px;
  margin-bottom: 1.25rem;
}

.footer-bio-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

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

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  font-size: 0.95rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
  cursor: pointer;
}

.footer-link:hover {
  color: var(--primary);
}

.contact-info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-info-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

.whatsapp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #25D366;
  color: #FFFFFF !important;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-md);
  margin-top: 0.75rem;
  transition: transform var(--transition-fast);
}

.whatsapp-btn:hover {
  transform: translateY(-2px);
  background: #1DA851;
}

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

/* Toast Notification System */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--text-main);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 500;
  animation: slide-toast 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-success {
  border-left: 4px solid #10B981;
}

@keyframes slide-toast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Mobile Drawer Overlay */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 999;
}

.mobile-nav-overlay.open {
  display: block;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: calc(-1 * min(300px, 85vw));
  width: min(300px, 85vw);
  height: 100%;
  background: var(--bg-main);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 1001;
  transition: right var(--transition-normal);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
}

.mobile-nav-drawer.open {
  right: 0;
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}

.mobile-nav-link {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 70px;
  }

  .nav-links, .header-actions .btn {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  :root {
    --nav-height: 64px;
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .page-view {
    padding-top: calc(var(--nav-height) + 1.5rem);
    padding-bottom: 3rem;
  }

  .brand-logo-svg {
    height: 34px;
  }

  .btn-lg {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }

  .toast-container {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
  }

  .toast {
    font-size: 0.85rem;
    padding: 0.85rem 1rem;
  }

  .mobile-nav-drawer {
    padding: 1.5rem 1.25rem;
  }
}

.hidden {
  display: none !important;
}

/* Theme Toggle Button */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
  flex-shrink: 0;
  padding: 0;
}

.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: scale(1.05);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-sun {
  display: none;
}

html[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

html[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}
