/* ============================================
   Acumenus Data Sciences — Custom Styles
   Royal Purple & Gold Design System
   ============================================ */

/* --- Design Tokens --- */
:root {
  --color-bg-base: #080510;
  --color-bg-surface: #0D0A18;
  --color-bg-elevated: #161030;
  --color-accent-purple: #8B5CF6;
  --color-accent-purple-dim: rgba(139, 92, 246, 0.15);
  --color-accent-gold: #D4A843;
  --color-accent-gold-dim: rgba(212, 168, 67, 0.10);
  --color-text-primary: #EEF0F6;
  --color-text-secondary: #A0A4B8;
  --color-text-muted: #5C5E72;
  --color-border: rgba(255, 255, 255, 0.08);
}

/* --- Base Reset & Defaults --- */
* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
  font-size: 18px;
}

body {
  margin: 0;
  background-color: var(--color-bg-base);
  color: var(--color-text-primary);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgba(139, 92, 246, 0.35);
  color: #EEF0F6;
}

:focus-visible {
  outline: 2px solid var(--color-accent-purple);
  outline-offset: 2px;
  border-radius: 6px;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg-base); }
::-webkit-scrollbar-thumb { background: var(--color-text-muted); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-secondary); }

/* --- Glass Morphism --- */
.glass {
  background: rgba(13, 10, 24, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
}

.glass-strong {
  background: rgba(13, 10, 24, 0.9);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--color-border);
}

/* --- Grid Background --- */
.grid-bg {
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* --- Gradient Text --- */
.gradient-text-teal {
  background: linear-gradient(135deg, #8B5CF6, #A78BFA);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-amber {
  background: linear-gradient(135deg, #D4A843, #E8C468);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background: rgba(13, 10, 24, 0.95) !important;
  box-shadow: 0 1px 0 var(--color-border);
}

.nav-link {
  position: relative;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.2s;
  padding: 0.25rem 0;
}

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

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent-purple);
  border-radius: 1px;
}

/* --- Mobile Nav --- */
.mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.mobile-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 300px;
  max-width: 85vw;
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  padding: 1.5rem;
  overflow-y: auto;
}

.mobile-drawer.open {
  transform: translateX(0);
}

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* --- Trust Bar Scroll --- */
@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.trust-scroll {
  animation: scroll-left 35s linear infinite;
}

.trust-scroll:hover {
  animation-play-state: paused;
}

/* --- Product Card Hover --- */
.product-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
}

.product-card[data-color="teal"]:hover {
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.1);
}

.product-card[data-color="amber"]:hover {
  border-color: rgba(212, 168, 67, 0.3);
  box-shadow: 0 0 40px rgba(212, 168, 67, 0.1);
}

/* --- Service Card Hover --- */
.service-card {
  transition: transform 0.2s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-2px);
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.08);
}

/* --- Article Card --- */
.article-card {
  position: relative;
  transition: background 0.2s ease;
}

.article-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-accent-purple);
  border-radius: 2px;
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.article-card:hover::before {
  transform: scaleY(1);
}

.article-card:hover {
  background: rgba(139, 92, 246, 0.04);
}

/* --- Status Badge Pulse --- */
.status-pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

.status-pulse.live { background: #22c55e; }
.status-pulse.dev { background: var(--color-accent-gold); }
.status-pulse.oss { background: var(--color-accent-purple); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* --- Form Styles --- */
.form-input {
  width: 100%;
  padding: 0.875rem 1.125rem;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-accent-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

/* --- Button Styles --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: var(--color-accent-purple);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
}

.btn-primary:hover {
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.25);
  background: #7C4DE3;
}

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

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: transparent;
  color: var(--color-text-primary);
  font-weight: 500;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.btn-outline:hover {
  border-color: rgba(139, 92, 246, 0.4);
  color: var(--color-accent-purple);
}

/* --- Badge --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3rem 0.875rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  border-radius: 9999px;
  border: 1px solid;
  white-space: nowrap;
}

.badge-teal {
  background: rgba(139, 92, 246, 0.1);
  color: var(--color-accent-purple);
  border-color: rgba(139, 92, 246, 0.25);
}

.badge-amber {
  background: rgba(212, 168, 67, 0.1);
  color: var(--color-accent-gold);
  border-color: rgba(212, 168, 67, 0.25);
}

.badge-default {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-secondary);
  border-color: rgba(255, 255, 255, 0.1);
}

/* --- Section Spacing --- */
.section {
  padding: 6rem 1.5rem;
  position: relative;
}

.section-dark {
  background: var(--color-bg-surface);
}

.container {
  max-width: 80rem;
  margin: 0 auto;
  position: relative;
}

/* --- Team initials avatar --- */
.avatar-initials {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'EB Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* --- Team Headshot Photos --- */
.team-headshot {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(100%) brightness(1.1) contrast(1.05);
  border: 2px solid rgba(139, 92, 246, 0.2);
  transition: filter 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
  flex-shrink: 0;
}

.team-headshot:hover {
  filter: grayscale(0%);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.15);
}

.team-headshot-lg {
  width: 5.5rem;
  height: 5.5rem;
  border-width: 2px;
}

@media (max-width: 768px) {
  .team-headshot-lg {
    width: 4.5rem;
    height: 4.5rem;
  }
}

/* --- Testimonial --- */
.testimonial {
  border-left: 3px solid var(--color-accent-purple);
  padding-left: 1.5rem;
}

/* --- Counter --- */
.counter-value {
  font-family: 'EB Garamond', serif;
  font-size: 3.5rem;
  line-height: 1;
  color: var(--color-accent-purple);
}

@media (min-width: 768px) {
  .counter-value { font-size: 4rem; }
}

/* --- Hero canvas --- */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.35;
}

/* --- Logo in nav --- */
.nav-logo {
  height: 60px;
  width: auto;
}

.nav-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.nav-wordmark-name {
  font-family: 'EB Garamond', serif;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--color-text-primary);
}

.nav-wordmark-tagline {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

.footer-logo {
  height: 56px;
  width: auto;
}

/* --- Form status messages --- */
.form-status {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
}

.form-status.success {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.form-status.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  html { font-size: 16px; }
  .section { padding: 4rem 1rem; }
  .nav-logo { height: 48px; }
  .nav-wordmark-name { font-size: 1.05rem; }
  .nav-wordmark-tagline { font-size: 0.55rem; }
}

@media (max-width: 400px) {
  .nav-wordmark { display: none; }
  .nav-logo { height: 40px; }
}
