/* ================================================================
   DWS Design System — Premium Fintech CSS
   Digital Wallet Services S.A.R.L
================================================================ */

/* ── Fonts ───────────────────────────────────────────────────── */
:root {
  --font-sans:    'Inter', sans-serif;
  --font-display: 'Manrope', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Brand palette */
  --color-primary-950: #040E1A;
  --color-primary-900: #0A2540;
  --color-primary-800: #0D2E4E;
  --color-primary-700: #12375C;
  --color-primary-600: #1E3A8A;
  --color-primary-500: #2563EB;
  --color-primary-400: #3B82F6;
  --color-accent-600:  #00A876;
  --color-accent-500:  #00C48C;
  --color-accent-400:  #22C55E;
}

/* ── Base resets ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ──────────────────────────────────────────────── */
.font-800 { font-weight: 800; }
.font-900 { font-weight: 900; }
.font-700 { font-weight: 700; }

/* ── Gradient Text ───────────────────────────────────────────── */
.text-gradient-accent {
  background: linear-gradient(135deg, #00C48C 0%, #22C55E 50%, #4ADE80 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-primary {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 50%, #1E3A8A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-purple {
  background: linear-gradient(135deg, #A855F7 0%, #8B5CF6 50%, #7C3AED 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Hero Grid Background ────────────────────────────────────── */
.hero-grid-bg {
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.07) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ── Glassmorphism ───────────────────────────────────────────── */
.glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.glass-dark {
  background: rgba(10, 37, 64, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── Premium Shadows ─────────────────────────────────────────── */
.shadow-premium {
  box-shadow:
    0 4px 6px -1px rgba(10, 37, 64, 0.10),
    0 20px 60px -10px rgba(10, 37, 64, 0.15);
}

.shadow-card {
  box-shadow:
    0 1px 3px rgba(10, 37, 64, 0.08),
    0 8px 24px rgba(10, 37, 64, 0.06);
}

.shadow-card-hover {
  box-shadow:
    0 4px 8px rgba(10, 37, 64, 0.12),
    0 20px 40px rgba(10, 37, 64, 0.10);
}

.shadow-glow-blue {
  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.2),
    0 0 40px rgba(37, 99, 235, 0.15);
}

.shadow-glow-green {
  box-shadow:
    0 0 0 3px rgba(0, 196, 140, 0.2),
    0 0 40px rgba(0, 196, 140, 0.15);
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-20px); }
}

@keyframes floatSlow {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-12px); }
}

@keyframes slideUp {
  0%   { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(37, 99, 235, 0.3); }
  50%       { box-shadow: 0 0 50px rgba(37, 99, 235, 0.6); }
}

@keyframes pulseGreen {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 196, 140, 0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(0, 196, 140, 0); }
}

@keyframes counterUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes progressFill {
  from { width: 0%; }
  to   { width: var(--target-width); }
}

@keyframes streamScroll {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── Animation classes ───────────────────────────────────────── */
.animate-float      { animation: float 6s ease-in-out infinite; }
.animate-float-slow { animation: floatSlow 9s ease-in-out infinite; }
.animate-glow       { animation: glow 3s ease-in-out infinite; }
.animate-slide-up   { animation: slideUp 0.6s ease-out both; }
.animate-fade-in    { animation: fadeIn 0.8s ease-out both; }

/* ── Reveal on scroll (progressive enhancement)
   Content is VISIBLE by default. animations-ready is added to <body>
   by JS so that if JS fails, content is always shown.
────────────────────────────────────────────────────────────────── */
.animations-ready .reveal-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
  transition-delay: var(--delay, 0ms);
}

.animations-ready .reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Button base ─────────────────────────────────────────────── */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,0.08));
  opacity: 0;
  transition: opacity 0.2s;
}

.btn-primary:hover::after { opacity: 1; }

/* ── Cards ───────────────────────────────────────────────────── */
.service-card {
  /* Include opacity so the reveal-up transition still works on these cards */
  transition: opacity 0.65s ease, transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(10,37,64,0.12), 0 20px 40px rgba(10,37,64,0.10);
  border-color: #dbeafe;
}

/* ── Metric counter ──────────────────────────────────────────── */
.counter {
  font-variant-numeric: tabular-nums;
}

/* ── Progress bar ────────────────────────────────────────────── */
.progress-bar {
  transition: width 1.5s ease;
}

/* ── Code blocks ─────────────────────────────────────────────── */
.code-block pre {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
}

.code-block code {
  font-family: inherit;
}

/* ── Trust badges row ────────────────────────────────────────── */
.trust-item {
  transition: opacity 0.2s, transform 0.2s;
}

.trust-item:hover {
  transform: translateY(-2px);
}

/* ── Dashboard visual ────────────────────────────────────────── */
.dashboard-card {
  transform: perspective(1000px) rotateX(2deg) rotateY(-5deg);
  transition: transform 0.5s ease;
}

.dashboard-card:hover {
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
}

/* ── Navigation ──────────────────────────────────────────────── */
#navbar { will-change: background; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* ── RTL support ─────────────────────────────────────────────── */
[dir="rtl"] .hero-headline { direction: rtl; }
[dir="rtl"] .text-gradient-accent,
[dir="rtl"] .text-gradient-primary { direction: rtl; }

/* ── Loading skeleton ────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ── Focus ring ──────────────────────────────────────────────── */
*:focus-visible {
  outline: 2px solid #2563EB;
  outline-offset: 2px;
  border-radius: 8px;
}

/* ── Prose overrides ─────────────────────────────────────────── */
.prose h2 { font-family: var(--font-display); font-weight: 700; color: #0A2540; }
.prose p  { color: #475569; }
.prose ul li { color: #475569; }

/* ── Responsive nav height ───────────────────────────────────── */
.h-18 { height: 4.5rem; }

/* ── Transaction stream ──────────────────────────────────────── */
.transaction-stream-inner {
  max-height: 160px;
  overflow: hidden;
}

/* ── Section spacing ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero-headline { font-size: 2.5rem !important; }
}

/* ── Print styles ────────────────────────────────────────────── */
@media print {
  #navbar, footer { display: none; }
  body { background: white; }
}
