:root {
  --primary-dark: #0B172C;
  --secondary-dark: #10213E;
  --royal-blue: #1E40AF;
  --accent-gold: #DAA863;
  --accent-gold-hover: #c4924d;
  --accent-gold-light: rgba(218, 168, 99, 0.12);
  --text-main: #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --bg-light: #F8FAFC;
  --bg-card: #FFFFFF;
  --border-color: #E2E8F0;
  --success: #10B981;
  --danger: #EF4444;
  --radius: 12px;
  --shadow-sm: 0 2px 8px rgba(11, 23, 44, 0.05);
  --shadow-md: 0 8px 24px rgba(11, 23, 44, 0.08);
  --shadow-lg: 0 16px 40px rgba(11, 23, 44, 0.12);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

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

/* ==========================================================================
   Frontend Preloader Animation
   ========================================================================== */
#frontend-preloader {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: radial-gradient(circle at center, #10213E 0%, #0B172C 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#frontend-preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-box {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.preloader-orbit {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
}

.preloader-ring {
  position: absolute;
  inset: 0;
  border: 3px solid rgba(218, 168, 99, 0.15);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spinRing 1s cubic-bezier(0.55, 0.055, 0.675, 0.19) infinite;
}

.preloader-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: rgba(218, 168, 99, 0.1);
  border: 1px solid rgba(218, 168, 99, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  font-size: 18px;
  animation: pulseGlow 1.5s ease-in-out infinite alternate;
}

.preloader-title {
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.preloader-title span {
  color: var(--accent-gold);
}

.preloader-subtitle {
  color: var(--text-light);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.preloader-progress-track {
  width: 140px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  margin-top: 18px;
  overflow: hidden;
  position: relative;
}

.preloader-progress-bar {
  position: absolute;
  left: -50%;
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  animation: loaderSlide 1.2s ease-in-out infinite;
}

@keyframes spinRing {
  to { transform: rotate(360deg); }
}

@keyframes pulseGlow {
  0% { transform: translate(-50%, -50%) scale(0.9); box-shadow: 0 0 0 0 rgba(218, 168, 99, 0.4); }
  100% { transform: translate(-50%, -50%) scale(1.05); box-shadow: 0 0 20px 4px rgba(218, 168, 99, 0.2); }
}

@keyframes loaderSlide {
  0% { left: -50%; }
  100% { left: 100%; }
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11, 23, 44, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-icon-box {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent-gold), #B8860B);
  color: var(--primary-dark);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(218, 168, 99, 0.3);
}

.brand-text-name {
  font-size: 20px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: -0.5px;
}

.brand-text-name span {
  color: var(--accent-gold);
}

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

.nav-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

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

.btn-portal-login {
  background: var(--accent-gold);
  color: var(--primary-dark);
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(218, 168, 99, 0.3);
}

.btn-portal-login:hover {
  background: var(--accent-gold-hover);
  transform: translateY(-1px);
  color: var(--primary-dark);
  box-shadow: 0 6px 18px rgba(218, 168, 99, 0.4);
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: #FFFFFF;
  font-size: 22px;
  cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  background: radial-gradient(circle at 80% 20%, rgba(30, 64, 175, 0.35) 0%, transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(218, 168, 99, 0.15) 0%, transparent 40%),
              linear-gradient(160deg, #0B172C 0%, #10213E 100%);
  color: #FFFFFF;
  padding: 150px 24px 100px;
  overflow: hidden;
}

.hero-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(218, 168, 99, 0.15);
  border: 1px solid rgba(218, 168, 99, 0.3);
  color: var(--accent-gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 30px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(34px, 4.5vw, 54px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.hero-title span {
  background: linear-gradient(135deg, #FFFFFF 30%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  margin-bottom: 34px;
  max-width: 580px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.btn-cta-primary {
  background: linear-gradient(135deg, var(--accent-gold), #c4924d);
  color: var(--primary-dark);
  font-size: 15px;
  font-weight: 700;
  padding: 13px 28px;
  border-radius: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(218, 168, 99, 0.35);
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
}

.btn-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(218, 168, 99, 0.45);
}

.btn-cta-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 26px;
  border-radius: 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
  color: #FFFFFF;
}

.hero-trust-badges {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.trust-item i {
  color: var(--success);
}

/* Hero Visual Box */
.hero-visual-card {
  background: rgba(16, 33, 62, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.visual-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.visual-header-badge {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34D399;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.visual-header-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #34D399;
  border-radius: 50%;
  animation: pulseGreen 1.5s infinite;
}

@keyframes pulseGreen {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.visual-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.visual-stat-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
}

.visual-stat-item .lbl {
  font-size: 11px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.visual-stat-item .val {
  font-size: 20px;
  font-weight: 800;
  color: #FFFFFF;
}

.visual-stat-item .val.gold {
  color: var(--accent-gold);
}

.visual-workflow-flow {
  background: rgba(11, 23, 44, 0.6);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.workflow-step-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.workflow-step-mini:not(:last-child) {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.step-circle.done {
  background: #10B981;
  color: #FFFFFF;
}

.step-circle.current {
  background: var(--accent-gold);
  color: var(--primary-dark);
}

.step-info {
  flex: 1;
}

.step-info .step-name {
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
}

.step-info .step-status {
  font-size: 11px;
  color: var(--text-light);
}

/* ==========================================================================
   Metrics Bar Section
   ========================================================================== */
.metrics-section {
  background: #FFFFFF;
  padding: 50px 24px;
  border-bottom: 1px solid var(--border-color);
}

.metrics-container {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.metric-card {
  text-align: center;
  padding: 10px;
}

.metric-number {
  font-size: 38px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 6px;
  letter-spacing: -1px;
}

.metric-number span {
  color: var(--accent-gold);
}

.metric-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==========================================================================
   Features Grid
   ========================================================================== */
.features-section {
  padding: 90px 24px;
  max-width: 1240px;
  margin: 0 auto;
}

.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 60px;
}

.section-tag {
  color: var(--royal-blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-size: 34px;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-muted);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px 26px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: transparent;
  transition: background 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(30, 64, 175, 0.2);
}

.feature-card:hover::before {
  background: linear-gradient(90deg, var(--royal-blue), var(--accent-gold));
}

.feature-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(30, 64, 175, 0.08);
  color: var(--royal-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 22px;
  transition: all 0.3s ease;
}

.feature-card:hover .feature-icon-box {
  background: var(--royal-blue);
  color: #FFFFFF;
}

.feature-card h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ==========================================================================
   3-Tier Workflow Section
   ========================================================================== */
.workflow-section {
  background: var(--secondary-dark);
  color: #FFFFFF;
  padding: 90px 24px;
}

.workflow-container {
  max-width: 1240px;
  margin: 0 auto;
}

.workflow-section .section-title {
  color: #FFFFFF;
}

.workflow-section .section-desc {
  color: rgba(255, 255, 255, 0.7);
}

.workflow-steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 50px;
}

.workflow-step-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 34px 26px;
  position: relative;
}

.workflow-step-card .tier-badge {
  display: inline-block;
  background: rgba(218, 168, 99, 0.18);
  border: 1px solid rgba(218, 168, 99, 0.4);
  color: var(--accent-gold);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 18px;
}

.workflow-step-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #FFFFFF;
}

.workflow-step-card p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.6;
}

/* ==========================================================================
   Demo Credentials Pill Box
   ========================================================================== */
.demo-box-section {
  background: #FFFFFF;
  border-top: 1px solid var(--border-color);
  padding: 70px 24px;
}

.demo-container {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

.credentials-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.credential-pill {
  background: var(--bg-light);
  border: 1.5px solid var(--border-color);
  padding: 12px 20px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.credential-pill:hover {
  border-color: var(--royal-blue);
  background: rgba(30, 64, 175, 0.05);
  transform: translateY(-2px);
}

.credential-pill .role-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
}

.credential-pill .creds {
  font-size: 12px;
  color: var(--text-muted);
  font-family: monospace;
}

/* ==========================================================================
   Unified Login Modal
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(11, 23, 44, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.login-modal-box {
  background: #FFFFFF;
  border-radius: 18px;
  width: 100%;
  max-width: 460px;
  padding: 34px;
  box-shadow: 0 24px 60px rgba(11, 23, 44, 0.35);
  position: relative;
  animation: modalScaleUp 0.3s ease;
}

@keyframes modalScaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-close-btn:hover {
  color: var(--danger);
}

.modal-header-area {
  margin-bottom: 24px;
}

.modal-header-area h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.modal-header-area p {
  font-size: 13px;
  color: var(--text-muted);
}

.form-group-custom {
  margin-bottom: 18px;
}

.form-group-custom label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.input-with-icon {
  position: relative;
}

.input-with-icon i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.input-with-icon input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
  background: #F8FAFC;
  transition: all 0.2s ease;
}

.input-with-icon input:focus {
  outline: none;
  border-color: var(--royal-blue);
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
}

.input-with-icon input.has-error {
  border-color: var(--danger);
}

.error-feedback {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
  display: block;
}

.btn-submit-login {
  width: 100%;
  padding: 13px;
  background: var(--royal-blue);
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-submit-login:hover {
  background: #1D4ED8;
  box-shadow: 0 6px 18px rgba(30, 64, 175, 0.35);
}

.btn-submit-login:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 50px 24px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.footer-brand h4 {
  color: #FFFFFF;
  font-size: 18px;
  font-weight: 700;
}

.footer-brand h4 span {
  color: var(--accent-gold);
}

.footer-brand p {
  font-size: 13px;
  margin-top: 4px;
}

.footer-copy {
  font-size: 13px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-cta-group {
    justify-content: center;
  }
  .hero-trust-badges {
    justify-content: center;
  }
  .features-grid,
  .workflow-steps-grid {
    grid-template-columns: 1fr 1fr;
  }
  .metrics-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: block;
  }
  .features-grid,
  .workflow-steps-grid {
    grid-template-columns: 1fr;
  }
  .metrics-container {
    grid-template-columns: 1fr;
  }
  .hero-section {
    padding: 120px 20px 70px;
  }
}
