/* ==========================================================================
   Pandekar Secure Solutions — Design System CSS
   Source of Truth: /design.md
   Version: 1.0 — September 2026

   Color Tokens (do not use raw hex values in templates — use variables)
   ========================================================================== */

:root {
  /* === SURFACES === */
  --color-surface:           #FFFFFF;
  --color-surface-subtle:    #F8FAFC;
  --color-surface-muted:     #F1F5F9;

  /* === BORDERS === */
  --color-border:            #E2E8F0;
  --color-border-strong:     #CBD5E1;

  /* === TEXT (on light backgrounds) === */
  --color-text-primary:      #0F172A;
  --color-text-secondary:    #334155;
  --color-text-muted:        #64748B;
  --color-text-faint:        #94A3B8;

  /* === ACCENT (Electric Blue — strictly controlled) === */
  --color-accent:            #1E6FE8;
  --color-accent-hover:      #1A5FC8;
  --color-accent-subtle:     #EFF6FF;
  --color-accent-ring:       rgba(30, 111, 232, 0.25);

  /* === DARK SURFACES === */
  --color-dark:              #011734;
  --color-dark-navy:         #0A1A3C;
  --color-dark-surface:      #0F1D31;
  --color-dark-border:       rgba(255, 255, 255, 0.10);
  --color-dark-border-strong: rgba(255, 255, 255, 0.18);

  /* === TEXT (on dark backgrounds) === */
  --color-dark-text:         #F1F5F9;
  --color-dark-text-muted:   #94A3B8;

  /* === SEMANTIC === */
  --color-confirm:           #10B981;
  --color-confirm-subtle:    rgba(16, 185, 129, 0.15);
  --color-error:             #EF4444;
  --color-error-subtle:      rgba(239, 68, 68, 0.12);

  /* === LEGACY (backward-compat — do not add new usages) === */
  --brand-navy:   #0A1A3C;
  --brand-dark:   #011734;
  --brand-blue:   #1E6FE8;
  --brand-body:   #334155;
  --brand-border: #E2E8F0;
  --brand-bg-soft: #F8FAFC;

  /* === MOTION === */
  --duration-fast:    150ms;
  --duration-base:    200ms;
  --duration-slow:    300ms;
  --easing-standard:  cubic-bezier(0.16, 1, 0.3, 1);
  --easing-entrance:  cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   Base / Reset
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--color-text-primary);
  background-color: var(--color-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.65;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, .font-display {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.spec-tag,
.font-mono-spec {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Section kicker / overline */
.kicker {
  font-family: ui-monospace, Menlo, Monaco, monospace;
  font-size: 0.6875rem;    /* 11px */
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  display: block;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Scrollbar
   ========================================================================== */

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-surface-muted); }
::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-faint); }

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

/* ==========================================================================
   Accessibility — Focus Rings
   ========================================================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ==========================================================================
   Glassmorphism Panels
   ========================================================================== */

.glass-panel {
  background: rgba(10, 26, 60, 0.80);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--color-dark-border);
}

.glass-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  position: relative;
  background-color: var(--color-dark);
  overflow: hidden;
  color: white;
}

/* Left-heavy directional gradient — lets background photo breathe on the right */
.hero-gradient-overlay {
  background: linear-gradient(
    105deg,
    rgba(1, 23, 52, 0.97) 0%,
    rgba(1, 23, 52, 0.90) 35%,
    rgba(1, 23, 52, 0.70) 60%,
    rgba(1, 23, 52, 0.28) 100%
  );
}

@media (max-width: 1023px) {
  .hero-gradient-overlay {
    background: linear-gradient(
      180deg,
      rgba(1, 23, 52, 0.97) 0%,
      rgba(1, 23, 52, 0.88) 60%,
      rgba(1, 23, 52, 0.72) 100%
    );
  }
}

/* Subtle ambient electric glow — right third of hero only */
.hero-ambient-glow {
  background: radial-gradient(
    ellipse 55% 60% at 80% 40%,
    rgba(30, 111, 232, 0.16) 0%,
    transparent 70%
  );
}

/* ==========================================================================
   Card System
   ========================================================================== */

/* Light card — on white/soft backgrounds */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  transition:
    transform var(--duration-base) var(--easing-standard),
    box-shadow var(--duration-base) var(--easing-standard),
    border-color var(--duration-base) var(--easing-standard);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px -6px rgba(15, 23, 42, 0.08), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  border-color: var(--color-border-strong);
}

/* Dark card — inside dark sections */
.card-dark {
  background: var(--color-dark-surface);
  border: 1px solid var(--color-dark-border);
  border-radius: 16px;
  transition:
    border-color var(--duration-base) var(--easing-standard),
    box-shadow var(--duration-base) var(--easing-standard);
}

.card-dark:hover {
  border-color: var(--color-dark-border-strong);
  box-shadow: 0 0 0 1px var(--color-dark-border-strong);
}

/* Floating badge overlay (on images) */
.float-badge {
  background: rgba(1, 23, 52, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--color-dark-border-strong);
  border-radius: 16px;
  pointer-events: none;
}

/* Legacy aliases */
.card-hover { transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.card-hover:hover { transform: translateY(-4px); box-shadow: 0 16px 32px -8px rgba(10, 26, 60, 0.08); border-color: #CBD5E1; }
.card-engineering { transition: transform 0.22s var(--easing-standard), box-shadow 0.22s var(--easing-standard), border-color 0.22s var(--easing-standard); }
.card-engineering:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -6px rgba(10, 26, 60, 0.09); border-color: #CBD5E1; }
.transition-luxury { transition: all 0.25s var(--easing-standard); }

/* ==========================================================================
   Buttons
   ========================================================================== */

/* Primary — one per decision surface */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  min-height: 44px;
  background: var(--color-accent);
  color: white;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(30, 111, 232, 0.32);
  transition:
    background var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease,
    transform var(--duration-fast) ease;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  box-shadow: 0 6px 20px rgba(30, 111, 232, 0.44);
}

.btn-primary:active {
  transform: scale(0.98);
}

/* Secondary / ghost — on dark backgrounds */
.btn-ghost-dark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  min-height: 44px;
  background: rgba(255, 255, 255, 0.07);
  color: white;
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: 12px;
  border: 1px solid var(--color-dark-border-strong);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition:
    background var(--duration-fast) ease,
    border-color var(--duration-fast) ease;
  text-decoration: none;
}

.btn-ghost-dark:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

/* ==========================================================================
   Badges & Labels
   ========================================================================== */

.badge-accent {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  background: var(--color-accent-subtle);
  color: var(--color-accent);
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 6px;
}

.badge-accent-dark {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  background: rgba(30, 111, 232, 0.12);
  border: 1px solid rgba(30, 111, 232, 0.25);
  color: #93BBFD;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 6px;
}

.badge-confirm {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  background: var(--color-confirm-subtle);
  border: 1px solid rgba(16, 185, 129, 0.30);
  color: #34D399;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 9999px;
}

/* ==========================================================================
   Pulse Live Indicator
   ========================================================================== */

.pulse-live {
  display: inline-block;
  position: relative;
}

.pulse-live::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  background-color: inherit;
  animation: pulse-ring 2.2s var(--easing-standard) infinite;
  opacity: 0.75;
}

@keyframes pulse-ring {
  0%   { transform: translate(-50%, -50%) scale(0.95); opacity: 0.80; }
  65%  { transform: translate(-50%, -50%) scale(2.6);  opacity: 0;    }
  100% { transform: translate(-50%, -50%) scale(2.6);  opacity: 0;    }
}

/* ==========================================================================
   Scroll-reveal Entrance Animation
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.55s var(--easing-entrance),
    transform 0.55s var(--easing-entrance);
}

.reveal.visible,
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* Carousel / Tab Fade-in Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   Forms
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  background: var(--color-surface-muted);
  font-size: 0.875rem;
  color: var(--color-text-primary);
  width: 100%;
  transition:
    border-color var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease,
    background-color var(--duration-fast) ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-ring);
  background: var(--color-surface);
}

/* ==========================================================================
   Performance Utilities
   ========================================================================== */

.cv-auto {
  content-visibility: auto;
  contain-intrinsic-size: 1px 700px;
}

/* ==========================================================================
   Admin Panel (isolated — do not use outside /admin) 
   ========================================================================== */

.admin-navbar {
  background-color: #0A1A3C !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #FFFFFF !important;
}

.admin-nav-item {
  color: #94A3B8 !important;
  background-color: transparent !important;
  text-decoration: none !important;
  font-size: 0.8125rem !important;
  font-weight: 500 !important;
  padding: 0.5rem 0.875rem !important;
  border-radius: 0.5rem !important;
  transition: all 0.15s ease-in-out !important;
  display: inline-flex !important;
  align-items: center !important;
}

.admin-nav-item:hover { color: #FFFFFF !important; background-color: rgba(255, 255, 255, 0.10) !important; }
.admin-nav-item.is-active { color: #FFFFFF !important; background-color: #1E6FE8 !important; font-weight: 600 !important; box-shadow: 0 2px 8px rgba(30, 111, 232, 0.35) !important; }
.admin-btn-action-view { background-color: rgba(255, 255, 255, 0.08) !important; color: #CBD5E1 !important; border: 1px solid rgba(255, 255, 255, 0.15) !important; text-decoration: none !important; }
.admin-btn-action-view:hover { background-color: rgba(255, 255, 255, 0.18) !important; color: #FFFFFF !important; }
.admin-btn-logout { background-color: #DC2626 !important; color: #FFFFFF !important; text-decoration: none !important; }
.admin-btn-logout:hover { background-color: #B91C1C !important; }

/* ==========================================================================
   Orbital Architecture Showcase Responsive Rules
   ========================================================================== */
.orbital-thumb {
  transform: translate(var(--xm), var(--ym));
}
@media (min-width: 640px) {
  .orbital-thumb {
    transform: translate(var(--xd), var(--yd));
  }
}

/* ==========================================================================
   Reduced Motion — Respect user preference
   ========================================================================== */

@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;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

