/* ============================================
   PharmX - Production Styles
   Clean, Elegant, Performance-Optimized
   ============================================ */

/* CSS Custom Properties */
:root {
  /* Colors */
  --color-bg: #ffffff;
  --color-bg-elevated: #f8f9fa;
  --color-text: #111111;
  --color-text-muted: #666666;
  --color-text-subtle: #999999;
  --color-border: #e5e5e5;
  --color-border-hover: #cccccc;
  
  /* Accent Gradient */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-glow: radial-gradient(circle, rgba(102, 126, 234, 0.08) 0%, transparent 70%);
  
  /* Typography */
  --font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;
  --font-size-5xl: 3.5rem;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Shadows */
  --shadow-glow: 0 0 60px rgba(102, 126, 234, 0.1);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-card-hover: 0 4px 16px rgba(0, 0, 0, 0.1);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Canvas Background */
#canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
}

/* Header */
.pharmx-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.pharmx-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pharmx-header__logo-link {
  display: flex;
  align-items: center;
}

.pharmx-header__logo {
  height: 50px;
  width: 50px;
  margin: 0;
}

@media (min-width: 481px) {
  .pharmx-header__logo {
    height: 1.2rem;
    width: auto;
    position: relative;
    top: 2px;
    margin: 0 16px;
  }
}

.pharmx-header__nav {
  display: flex;
  align-items: center;
}

.pharmx-header__login {
  margin-left: 12px;
  border-radius: 6px;
  display: inline-block;
  text-align: center;
  transition: opacity 0.2s ease;
  background: #042dac;
  color: #fff;
  border: 1px solid #000;
  min-width: 80px;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  text-decoration: none;
  font-family: var(--font-family);
  font-weight: 500;
}

.pharmx-header__login:hover {
  opacity: 0.9;
}

@media (min-width: 768px) {
  .pharmx-header__login {
    min-width: 100px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

/* Main Layout */
.main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: calc(var(--spacing-2xl) + 80px) var(--spacing-xl) var(--spacing-2xl); /* Account for fixed header */
  padding-bottom: calc(var(--spacing-2xl) + 60px); /* Account for fixed footer */
}

.container {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xl);
}

/* Logo */
.logo-wrapper {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.2s;
}

.logo {
  width: 180px;
  height: auto;
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.1));
  transition: var(--transition-base);
}

.logo:hover {
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.2));
}

/* Headline */
.headline {
  text-align: center;
  font-weight: 600;
  font-size: var(--font-size-4xl);
  line-height: 1.15;
  letter-spacing: -0.03em;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.3s;
  margin-bottom: var(--spacing-xs);
}

.headline-line {
  display: block;
}

.gradient-text {
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #d946ef, #ec4899, #d946ef, #8b5cf6, #6366f1);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s linear infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

/* Subtitle */
.subtitle {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
  font-weight: 400;
  text-align: center;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.4s;
  margin-bottom: var(--spacing-md);
}

/* Cards Grid */
.cards {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  width: 100%;
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.5s;
}

/* Card */
.card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: var(--spacing-md) var(--spacing-xl);
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--transition-slow), background var(--transition-slow), box-shadow var(--transition-slow);
}

.card:hover {
  border-color: #042dac;
  background: linear-gradient(135deg, rgba(4, 45, 172, 0.03) 0%, rgba(4, 45, 172, 0.06) 100%);
  box-shadow: 0 4px 12px rgba(4, 45, 172, 0.15);
}

.card:focus-visible {
  outline: 2px solid #042dac;
  outline-offset: 2px;
}

/* Card Label */
.card-label {
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: -0.01em;
  transition: color var(--transition-base);
}

.card:hover .card-label {
  color: #042dac;
}

/* Card Arrow */
.card-arrow {
  color: var(--color-text-muted);
  transition: color var(--transition-base);
}

.card:hover .card-arrow {
  color: #042dac;
}

/* Social Proof Avatars */
.avatar-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin-bottom: var(--spacing-lg);
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.1s;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-left: -16px;
}

.avatar:first-child {
  margin-left: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.avatar.negarin img {
  object-position: top;
}

.avatar:hover {
  transform: scale(1.08);
  z-index: 2;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

/* Footer */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-lg) var(--spacing-xl);
  text-align: center;
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.7);
  background: #000000;
  z-index: 1;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
  :root {
    --font-size-4xl: 3rem;
  }
  
  .container {
    max-width: 520px;
  }
  
  .avatar {
    width: 80px;
    height: 80px;
  }
}

/* Desktop (1024px - 1439px) */
@media (min-width: 1024px) and (max-width: 1439px) {
  .container {
    max-width: 440px;
  }
}

/* Tablet & Small Laptop (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .container {
    max-width: 400px;
  }
  
  .headline {
    font-size: var(--font-size-3xl);
  }
}

/* Mobile (max-width: 767px) */
@media (max-width: 767px) {
  .main {
    padding: var(--spacing-xl) var(--spacing-lg);
    padding-bottom: calc(var(--spacing-xl) + 60px);
  }
  
  .container {
    max-width: 100%;
    gap: var(--spacing-lg);
  }
  
  .headline {
    font-size: var(--font-size-3xl);
  }
  
  .avatar {
    width: 64px;
    height: 64px;
    margin-left: -12px;
    border-width: 2px;
  }
  
  .avatar:first-child {
    margin-left: 0;
  }
  
  .card {
    padding: var(--spacing-md) var(--spacing-lg);
  }
  
  .card-label {
    font-size: var(--font-size-sm);
  }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
  .headline {
    font-size: var(--font-size-2xl);
  }
  
  .subtitle {
    font-size: var(--font-size-sm);
  }
  
  .avatar {
    width: 56px;
    height: 56px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  #canvas {
    display: none;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --color-border: #999999;
    --color-text-muted: #444444;
  }
}
