/**
 * MediVanz Design Tokens & Visual Design Language
 * Pixel-accurate preservation of typography, colors, animations, and button geometry.
 */

:root {
  /* Typography Variables */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, Cambria, 'Times New Roman', Times, serif;
  --font-mono: 'Hanken Grotesk', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Color Palette */
  --medivanz-bg: #F8F3ED;
  --medivanz-bg-dark: #020617;
  --medivanz-hero-bg: #E9E4DB;
  --medivanz-hero-border: #DCD5C9;
  --medivanz-navy: #0C182B;
  --medivanz-navy-hover: #162742;
  --medivanz-gold: #B8965E;
  --medivanz-teal: #006D77;
  --medivanz-teal-bright: #0D9488;
  --medivanz-mint: #83C5BE;
  --medivanz-footer-bg: #0B111E;
  --medivanz-footer-border: #1E293B;

  /* Swatch Colors */
  --swatch-black: #000000;
  --swatch-navy: #0B132B;
  --swatch-burgundy: #7A0C2E;
  --swatch-charcoal: #4B5563;
  --swatch-white: #FFFFFF;

  /* Current Active Theme Background & Text */
  --body-bg: var(--medivanz-bg);
  --body-text: #0F172A;
  --card-bg: #FFFFFF;
  --card-border: rgba(226, 232, 240, 0.9);
  --muted-text: #64748B;
}

/* Dark Mode Overrides */
html.dark {
  --body-bg: var(--medivanz-bg-dark);
  --body-text: #F8FAFC;
  --card-bg: #0B111E;
  --card-border: rgba(30, 41, 59, 0.9);
  --muted-text: #94A3B8;
}

/* Global Reset & Base Typography */
body {
  font-family: var(--font-sans);
  background-color: var(--body-bg);
  color: var(--body-text);
  margin: 0;
  padding: 0;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-editorial, .font-serif {
  font-family: var(--font-serif);
  letter-spacing: -0.01em;
  font-weight: 700;
}

.font-mono {
  font-family: var(--font-mono);
}

.font-sans {
  font-family: var(--font-sans);
}

/* Editorial Pill Buttons matching Reference Design */
.btn-editorial-primary {
  background-color: #0C182B;
  color: #FFFFFF !important;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 9999px;
  padding: 0.875rem 2rem;
  border: none;
  box-shadow: 0 10px 25px -5px rgba(12, 24, 43, 0.25);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  text-decoration: none;
  cursor: pointer;
}

.btn-editorial-primary:hover {
  background-color: #162742;
  transform: translateY(-1px);
  box-shadow: 0 15px 30px -5px rgba(12, 24, 43, 0.35);
  color: #FFFFFF !important;
}

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

.btn-editorial-outline {
  background-color: transparent;
  color: #0C182B !important;
  border: 1px solid #0C182B;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 9999px;
  padding: 0.875rem 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  text-decoration: none;
  cursor: pointer;
}

html.dark .btn-editorial-outline {
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.8);
}

.btn-editorial-outline:hover {
  background-color: #0C182B;
  color: #FFFFFF !important;
}

html.dark .btn-editorial-outline:hover {
  background-color: #FFFFFF;
  color: #0C182B !important;
}

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

/* Conic gradient rotating animation for Kinetic AI Input & badges */
@keyframes spin-gradient {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.animate-spin-gradient {
  animation: spin-gradient 4s linear infinite;
}

/* Shimmer animation for luxury buttons and badges */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-shimmer {
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0) 100%);
  background-size: 200% 100%;
  animation: shimmer 2.5s infinite;
}

/* Pulse glow for status indicators */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 15px rgba(20, 184, 166, 0.4); }
  50% { box-shadow: 0 0 30px rgba(20, 184, 166, 0.8); }
}

.glow-teal-pulse {
  animation: pulse-glow 3s infinite ease-in-out;
}

/* Glassmorphism utility card */
.glass-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

html.dark .glass-card {
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Custom dashed tech grid background */
.bg-tech-grid {
  background-image: radial-gradient(rgba(13, 148, 136, 0.18) 1px, transparent 1px),
                    linear-gradient(to right, rgba(148, 163, 184, 0.08) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 24px 24px, 48px 48px, 48px 48px;
}

html.dark .bg-tech-grid {
  background-image: radial-gradient(rgba(20, 184, 166, 0.25) 1px, transparent 1px),
                    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 24px 24px, 48px 48px, 48px 48px;
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}

html.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}

::-webkit-scrollbar-thumb:hover {
  background: #0D9488;
}

/* Hide scrollbar utility */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Success Green Checkmark Animation */
@keyframes checkmark-pop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes checkmark-stroke {
  0% { stroke-dashoffset: 50; }
  100% { stroke-dashoffset: 0; }
}

@keyframes green-ripple {
  0% { transform: scale(0.8); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 0.3; }
  100% { transform: scale(1.35); opacity: 0; }
}

.animate-checkmark-circle {
  animation: checkmark-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.animate-checkmark-check {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: checkmark-stroke 0.5s 0.35s ease-out forwards;
}

.animate-green-ripple {
  animation: green-ripple 2s infinite ease-out;
}

/* Official Print Styles */
@media print {
  header, footer, nav, button, input, select, textarea, .no-print, [role="navigation"] {
    display: none !important;
  }
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-family: system-ui, -apple-system, sans-serif !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}
