/* ==========================================================================
   PT. BENUA ANUGRAH NUSANTARA (BENUA LABORATORY)
   Main Stylesheet - Clean, High-Performance, Accessible, B2B Institutional
   ========================================================================== */

:root {
  --color-primary: #002B9A;
  --color-primary-hover: #001F6E;
  --color-primary-light: #EEF4FF;
  --color-accent: #FF5500;
  --color-accent-hover: #E04800;
  --color-accent-light: #FFF2EB;
  --color-dark: #0F172A;
  --color-slate-900: #0F172A;
  --color-slate-800: #1E293B;
  --color-slate-700: #334155;
  --color-slate-600: #475569;
  --color-slate-500: #64748B;
  --color-slate-400: #94A3B8;
  --color-slate-300: #CBD5E1;
  --color-slate-200: #E2E8F0;
  --color-slate-100: #F1F5F9;
  --color-slate-50: #F8FAFC;
  --color-success: #059669;
  --color-success-light: #ECFDF5;
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --shadow-subtle: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-elevated: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.03);
  --shadow-modal: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
}

/* Base resets & Smooth Rendering */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-main);
  color: var(--color-slate-800);
  background-color: #FFFFFF;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}

/* Custom Scrollbar - Minimal & Discrete */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #F8FAFC;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Typography Scale & Hierarchy */
h1, h2, h3, h4, h5, h6 {
  color: inherit;
  letter-spacing: -0.02em;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

.text-balance {
  text-wrap: balance;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* B2B Institutional Cards & Surfaces */
.b2b-card {
  background-color: #FFFFFF;
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-subtle);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.b2b-card:hover {
  border-color: rgba(0, 43, 154, 0.3);
  box-shadow: var(--shadow-elevated);
}

/* Buttons: Refined & High-Contrast */
.btn-primary {
  background-color: var(--color-primary);
  color: #FFFFFF;
  font-weight: 700;
  border-radius: 9999px;
  transition: all 0.18s ease-in-out;
}
.btn-primary:hover {
  background-color: var(--color-primary-hover);
  box-shadow: 0 4px 12px rgba(0, 43, 154, 0.25);
}

.btn-accent {
  background-color: var(--color-accent);
  color: #FFFFFF;
  font-weight: 700;
  border-radius: 9999px;
  transition: all 0.18s ease-in-out;
}
.btn-accent:hover {
  background-color: var(--color-accent-hover);
  box-shadow: 0 4px 12px rgba(255, 85, 0, 0.25);
}

.btn-outline {
  border: 1px solid var(--color-slate-300);
  background-color: #FFFFFF;
  color: var(--color-slate-700);
  font-weight: 600;
  border-radius: 9999px;
  transition: all 0.18s ease-in-out;
}
.btn-outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background-color: var(--color-primary-light);
}

/* Badges - Subtle, Crisp, High-Contrast */
.badge-blue {
  background-color: #EEF4FF;
  color: #002B9A;
  border: 1px solid rgba(0, 43, 154, 0.18);
}
.badge-orange {
  background-color: #FFF2EB;
  color: #C2410C;
  border: 1px solid rgba(255, 85, 0, 0.22);
}
.badge-green {
  background-color: #ECFDF5;
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.badge-slate {
  background-color: #F1F5F9;
  color: #475569;
  border: 1px solid #E2E8F0;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 5.5rem;
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast-notification {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.125rem;
  border-radius: var(--radius-xl);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #FFFFFF;
  box-shadow: var(--shadow-modal);
  animation: slideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: 24rem;
}

.toast-notification.success {
  background-color: #047857;
}
.toast-notification.error {
  background-color: #BE123C;
}
.toast-notification.info {
  background-color: #002B9A;
}
.toast-notification.warning {
  background-color: #B45309;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleUpModal {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-scaleUp {
  animation: scaleUpModal 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Honeypot field (hidden from users, traps bots) */
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
}

/* Accessible Focus Ring */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Reduced Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
