/* ============================================================
   PharmaDash — Public Site Design System
   ============================================================ */

/* --- Design Tokens --- */
:root {
  /* Colors */
  --primary: #003087;
  --primary-light: #005eb8;
  --primary-dark: #001d54;
  --accent: #00A9CE;
  --accent-green: #009639;
  --accent-green-light: #e6f7ee;
  --text: #0f172a;
  --text-light: #64748b;
  --text-lighter: #94a3b8;
  --bg: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-muted: #f1f5f9;
  --border: #e2e8f0;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.03);
  --shadow-xl: 0 20px 50px -12px rgba(0,0,0,0.12);
  --shadow-2xl: 0 25px 60px -15px rgba(0,0,0,0.18);

  /* Radius */
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Typography */
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 32px;
  --text-4xl: 44px;
  --text-5xl: 52px;
  --text-6xl: 64px;

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { width: 100%; overflow-x: hidden; }

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

/* --- Accessibility --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  padding: 12px 24px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  z-index: 10000;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* --- Animations --- */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}
.fade-left.visible { opacity: 1; transform: translateX(0); }
.fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}
.fade-right.visible { opacity: 1; transform: translateX(0); }

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

@keyframes float-slow {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(2deg); }
}
@keyframes float-medium {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(-1.5deg); }
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}
@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
@keyframes counter-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fade-up, .fade-left, .fade-right { opacity: 1; transform: none; }
}

/* --- Navigation --- */
.pub-nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  z-index: 1000;
  transition: all 0.4s var(--ease-out-expo);
}
.pub-nav.scrolled {
  box-shadow: 0 1px 30px rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.95);
}
.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  text-decoration: none;
}
.logo-icon {
  width: 38px;
  height: 38px;
  background: url('/images/logo-icon.svg') center/contain no-repeat;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  color: transparent;
  text-indent: -9999px;
  overflow: hidden;
  flex-shrink: 0;
}
.logo-wordmark {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}
.logo-wordmark-accent {
  color: #3B82F6;
}
.nav-links {
  display: flex;
  gap: 2.25rem;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-light);
  border-radius: 1px;
  transition: width 0.3s var(--ease-out-expo);
}
.nav-links a:hover { color: var(--primary); }
.nav-links a:hover::after { width: 100%; }
.nav-buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.btn-nav-login {
  padding: 9px 20px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border-radius: 9px;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
  border: none;
}
.btn-nav-login:hover { color: var(--primary); background: var(--bg-subtle); }
.btn-nav-signup {
  padding: 9px 22px;
  background: var(--primary);
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border-radius: 9px;
  transition: all 0.25s;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 2px 8px rgba(0,48,135,0.2);
}
.btn-nav-signup:hover {
  background: var(--primary-light);
  box-shadow: 0 4px 16px rgba(0,48,135,0.3);
  transform: translateY(-1px);
}

/* Mobile menu */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
}
.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s var(--ease-out-expo);
}
.mobile-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-toggle.open span:nth-child(2) {
  opacity: 0;
}
.mobile-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile overlay menu */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s;
}
.mobile-menu-overlay.open {
  opacity: 1;
}
.mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: #fff;
  z-index: 999;
  padding: 1.5rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  transform: translateY(-10px);
  opacity: 0;
  transition: all 0.3s var(--ease-out-expo);
  border-bottom: 1px solid var(--border);
}
.mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
}
.mobile-menu a {
  display: block;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--primary-light); }
.mobile-menu .mobile-menu-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.mobile-menu .mobile-menu-buttons a {
  border-bottom: none;
  text-align: center;
  padding: 12px 0;
  border-radius: 9px;
  flex: 1;
}
.mobile-menu .mobile-menu-buttons .btn-mobile-login {
  background: var(--bg-subtle);
  color: var(--primary);
  font-weight: 600;
}
.mobile-menu .mobile-menu-buttons .btn-mobile-signup {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

/* --- Section Shared --- */
.section-container {
  max-width: 1240px;
  margin: 0 auto;
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: var(--space-md);
  padding: 6px 14px;
  background: rgba(0,94,184,0.06);
  border-radius: 50px;
}
.section-title {
  font-size: var(--text-4xl);
  font-weight: 900;
  letter-spacing: -1.5px;
  color: var(--text);
  margin-bottom: var(--space-md);
  line-height: 1.15;
}
.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-light);
  max-width: 580px;
  line-height: 1.7;
}
.section-header {
  text-align: center;
  margin-bottom: 72px;
}
.section-header .section-subtitle {
  margin: 0 auto;
}

/* --- Buttons --- */
.btn-hero-primary {
  padding: 16px 36px;
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  font-size: 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}
.btn-hero-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: none;
}
.btn-hero-primary:hover::after { animation: shimmer 0.6s ease; }
.btn-hero-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}
.btn-hero-secondary {
  padding: 16px 36px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  border: 1.5px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(4px);
}
.btn-hero-secondary:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.4);
  transform: translateY(-3px);
}
.btn-primary-solid {
  padding: 16px 36px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0,48,135,0.25);
}
.btn-primary-solid:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,48,135,0.3);
}

/* --- Footer --- */
footer {
  background: #080c14;
  color: #fff;
  padding: 72px 2rem 36px;
}
.footer-container {
  max-width: 1240px;
  margin: 0 auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 14px;
  color: #fff;
}
.footer-wordmark { color: #fff; }
.footer-wordmark-accent { color: #3B82F6; }
.footer-brand .footer-logo .logo-icon {
  width: 32px;
  height: 32px;
  font-size: 14px;
  border-radius: 9px;
}
.footer-brand p {
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  line-height: 1.7;
  max-width: 280px;
}
.footer-section h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 1.25rem;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.65rem; }
.footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255,255,255,0.25);
}
.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}
.footer-bottom-links a {
  color: rgba(255,255,255,0.25);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-bottom-links a:hover { color: rgba(255,255,255,0.6); }

/* --- Cookie Consent --- */
#cookieConsent {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  animation: slideUp 0.4s ease-out;
}
.cookie-consent-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-consent-message {
  flex: 1;
  min-width: 250px;
  line-height: 1.5;
}
.cookie-consent-message a {
  color: #ffffff;
  text-decoration: underline;
  font-weight: 500;
  transition: opacity 0.2s ease;
}
.cookie-consent-message a:hover { opacity: 0.8; }
.cookie-consent-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  white-space: nowrap;
}
.cookie-consent-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  min-width: 130px;
}
.cookie-consent-btn-accept {
  background-color: #007399;
  color: #ffffff;
}
.cookie-consent-btn-accept:hover {
  background-color: #005a7a;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.cookie-consent-btn-necessary {
  background-color: transparent;
  color: #ffffff;
  border: 2px solid #ffffff;
}
.cookie-consent-btn-necessary:hover {
  background-color: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}

/* --- Focus States --- */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-buttons { display: none; }
  .mobile-toggle { display: flex; }
  .mobile-menu { display: block; }
  .nav-container { padding: 0 1.25rem; }
  .section-title { font-size: var(--text-3xl); letter-spacing: -1px; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.75rem; text-align: center; }
  .cookie-consent-container { flex-direction: column; align-items: stretch; }
  .cookie-consent-buttons { justify-content: stretch; }
  .cookie-consent-btn { flex: 1; min-width: auto; }
}
@media (min-width: 769px) {
  .mobile-menu { display: none !important; }
  .mobile-menu-overlay { display: none !important; }
}
