/* ============================================================
   DOCGRIT DESIGN SYSTEM 2025
   Modern, Clean, Simple - Inspired by Linear, Vercel, Stripe
   ============================================================ */

/* Import Inter Font (Modern SaaS Standard) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ============================================================
   CSS VARIABLES - Design Tokens
   ============================================================ */
:root {
  /* Colors - Neutral Palette */
  --color-white: #FFFFFF;
  --color-black: #000000;
  --color-gray-50: #F9FAFB;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-300: #D1D5DB;
  --color-gray-400: #9CA3AF;
  --color-gray-500: #6B7280;
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;
  --color-gray-800: #1F2937;
  --color-gray-900: #111827;

  /* Brand Colors */
  --color-primary: #2563EB;
  --color-primary-hover: #1D4ED8;
  --color-secondary: #8B5CF6;
  --color-accent: #06B6D4;

  /* Semantic Colors */
  --color-success: #10B981;
  --color-warning: #F59E0B;
  --color-error: #EF4444;
  --color-info: #3B82F6;

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Monaco', 'Cascadia Code', 'Courier New', monospace;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   GLOBAL RESETS & BASE STYLES
   ============================================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-gray-900);
  background-color: var(--color-white);
}

/* ============================================================
   TYPOGRAPHY SYSTEM
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-gray-900);
}

h1 { font-size: 3rem; font-weight: 800; }
h2 { font-size: 2.25rem; font-weight: 700; }
h3 { font-size: 1.875rem; font-weight: 700; }
h4 { font-size: 1.5rem; font-weight: 600; }
h5 { font-size: 1.25rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 600; }

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
}

p {
  margin-bottom: 1rem;
  color: var(--color-gray-600);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-hover);
}

/* ============================================================
   HEADER - Modern Floating Nav (Arc/Linear Style)
   ============================================================ */
.header-sticky {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: 90%;
  max-width: 1200px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.header-sticky:hover {
  box-shadow: var(--shadow-md);
}

.header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  min-height: 4rem;
  height: 4rem;
}

.header-logo {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-gray-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity var(--transition-fast);
  height: 2rem;
}

.header-logo:hover {
  opacity: 0.8;
}

.header-buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.btn-login {
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--color-gray-700);
  border: none;
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: color var(--transition-fast);
  border-radius: var(--radius-md);
}

.btn-login:hover {
  color: var(--color-gray-900);
  background: var(--color-gray-100);
}

.btn-pro {
  padding: 0.5rem 1rem;
  background: var(--color-gray-900);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-pro:hover {
  background: var(--color-gray-800);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   HERO SECTION - Clean & Minimal
   ============================================================ */
.hero-modern {
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 1rem 4rem;
  background: linear-gradient(to bottom, var(--color-gray-50) 0%, var(--color-white) 100%);
}

.hero-content {
  max-width: 56rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, var(--color-gray-900), var(--color-gray-700));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
}

/* Gradient text for hero highlighting */
.gradient-text {
  background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 50%, #EC4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-gray-600);
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* CTA Button - Primary Action */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.5rem;
  background: var(--color-gray-900);
  color: var(--color-white);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.cta-button:hover {
  background: var(--color-gray-800);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.cta-button:active {
  transform: translateY(0);
}

/* ============================================================
   CARDS - Modern Card System
   ============================================================ */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--color-gray-300);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  background: linear-gradient(to right, var(--color-gray-50), var(--color-gray-100));
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-gray-200);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.card-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gray-900);
  border-radius: var(--radius-lg);
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

/* Feature Cards Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: all var(--transition-base);
}

.feature-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-gray-900);
}

.feature-description {
  font-size: 0.938rem;
  color: var(--color-gray-600);
  line-height: 1.6;
}

/* ============================================================
   BUTTONS - Complete Button System
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  gap: 0.5rem;
}

.btn-primary {
  background: var(--color-gray-900);
  color: var(--color-white);
  box-shadow: var(--shadow-xs);
}

.btn-primary:hover {
  background: var(--color-gray-800);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-gray-700);
  border: 1px solid var(--color-gray-300);
}

.btn-secondary:hover {
  background: var(--color-gray-50);
  border-color: var(--color-gray-400);
}

.btn-ghost {
  background: transparent;
  color: var(--color-gray-700);
}

.btn-ghost:hover {
  background: var(--color-gray-100);
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.813rem;
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================
   FORMS - Modern Input System
   ============================================================ */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-700);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.938rem;
  color: var(--color-gray-900);
  background: var(--color-white);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.form-input:hover {
  border-color: var(--color-gray-400);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
  color: var(--color-gray-400);
}

.form-helper {
  font-size: 0.813rem;
  color: var(--color-gray-500);
  margin-top: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ============================================================
   BADGES & TAGS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-primary {
  background: var(--color-gray-100);
  color: var(--color-gray-700);
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
}

.badge-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
}

.badge-pro {
  background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
  color: var(--color-white);
}

/* ============================================================
   PROGRESS BAR - Usage Indicator
   ============================================================ */
.progress-bar {
  width: 100%;
  height: 0.5rem;
  background: var(--color-gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-full);
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.usage-progress {
  width: 100%;
  height: 0.75rem;
  background: var(--color-gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.usage-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-full);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.upgrade-cta {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: var(--color-white);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
}

.upgrade-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* ============================================================
   FOOTER - Simple & Clean
   ============================================================ */
.footer-modern {
  background: var(--color-gray-900);
  color: var(--color-gray-400);
  padding: 4rem 1rem 2rem;
  margin-top: 6rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.footer-link {
  color: var(--color-gray-400);
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--color-white);
}

.footer-copyright {
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-gray-500);
  margin-top: 2rem;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.social-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--color-gray-800);
  color: var(--color-gray-400);
  transition: all var(--transition-fast);
}

.social-icon:hover {
  background: var(--color-gray-700);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* ============================================================
   ANIMATIONS - Smooth & Subtle
   ============================================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    transform: translateX(-1rem);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

.slide-in {
  animation: slideIn 0.4s ease-out;
}

/* Fade in on scroll */
.fade-in-scroll {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 768px) {
  .header-sticky {
    width: 95%;
    top: 1rem;
  }

  .header-nav {
    padding: 0.625rem 1rem;
    min-height: 3.5rem;
    height: 3.5rem;
  }

  .hero-modern {
    padding: 6rem 1rem 3rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
}

/* ============================================================
   MICRO-INTERACTIONS & HOVER EFFECTS
   ============================================================ */

/* Smooth scale on hover for interactive elements */
.hover-scale {
  transition: transform var(--transition-base);
}

.hover-scale:hover {
  transform: scale(1.02);
}

/* Card tilt effect on hover */
.card-tilt {
  transform-style: preserve-3d;
  transition: transform var(--transition-base);
}

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

/* Smooth glow effect for buttons */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(37, 99, 235, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
  }
}

.btn-glow:hover {
  animation: glow 2s ease-in-out infinite;
}

/* Ripple effect for clicks */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
  width: 300px;
  height: 300px;
}

/* Smooth icon rotation on hover */
.icon-rotate {
  transition: transform var(--transition-base);
}

.icon-rotate:hover {
  transform: rotate(5deg);
}

/* Slide up animation */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-up {
  animation: slideUp 0.6s ease-out;
}

/* Pulse animation for attention */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Smooth underline effect for links */
.link-underline {
  position: relative;
  text-decoration: none;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition-base);
}

.link-underline:hover::after {
  width: 100%;
}

/* Feature card enhanced hover effect */
.feature-card {
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.05), transparent);
  transition: left 0.5s;
}

.feature-card:hover::before {
  left: 100%;
}

/* Smooth shadow expansion */
.shadow-expand {
  transition: box-shadow var(--transition-base);
}

.shadow-expand:hover {
  box-shadow: var(--shadow-xl);
}

/* Badge bounce effect */
@keyframes badgeBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.badge:hover {
  animation: badgeBounce 0.5s ease;
}

/* ============================================================
   PERFORMANCE OPTIMIZATIONS
   ============================================================ */
.gpu-accelerate {
  transform: translateZ(0);
  will-change: transform;
  backface-visibility: hidden;
}
