/* ============================================
   PlayWithPDF - Custom Theme Styles
   A distinctive, professional design system
   ============================================ */

/* ===========================================
   CSS VARIABLES - Design Tokens
   =========================================== */
:root {
  /* Primary - Deep Ocean Blue (trust, reliability) */
  --primary-700: #1d4ed8;
  --primary-600: #1e40af;
  --primary-500: #3b82f6;
  --primary-400: #60a5fa;
  --primary-300: #93c5fd;
  --primary-200: #bfdbfe;
  --primary-100: #dbeafe;
  --primary-50: #eff6ff;

  /* Accent - Warm Coral (energy, action, CTA) */
  --accent-600: #ea580c;
  --accent-500: #f97316;
  --accent-400: #fb923c;
  --accent-300: #fdba74;
  --accent-200: #fed7aa;
  --accent-100: #ffedd5;

  /* Success - Emerald */
  --success-600: #059669;
  --success-500: #10b981;
  --success-400: #34d399;
  --success-100: #d1fae5;

  /* Warning - Amber */
  --warning-500: #f59e0b;
  --warning-400: #fbbf24;
  --warning-100: #fef3c7;

  /* Danger - Rose */
  --danger-600: #dc2626;
  --danger-500: #ef4444;
  --danger-400: #f87171;
  --danger-100: #fee2e2;

  /* Neutrals - Stone (warm grays) */
  --neutral-950: #0c0a09;
  --neutral-900: #1c1917;
  --neutral-800: #292524;
  --neutral-700: #44403c;
  --neutral-600: #57534e;
  --neutral-500: #78716c;
  --neutral-400: #a8a29e;
  --neutral-300: #d6d3d1;
  --neutral-200: #e7e5e4;
  --neutral-100: #f5f5f4;
  --neutral-50: #fafaf9;

  /* Surfaces */
  --surface-page: #fafaf9;
  --surface-card: #ffffff;
  --surface-elevated: #ffffff;
  --surface-overlay: rgba(28, 25, 23, 0.6);

  /* Typography */
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

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

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);
  --shadow-glow-accent: 0 0 20px rgba(249, 115, 22, 0.3);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-Index Scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-tooltip: 600;
}

/* ===========================================
   BASE STYLES
   =========================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--neutral-800);
  background: var(--surface-page);
  background-image: 
    radial-gradient(at 20% 20%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
    radial-gradient(at 80% 80%, rgba(249, 115, 22, 0.03) 0%, transparent 50%);
  min-height: 100vh;
}

/* Hide scrollbar but keep functionality */
.hide-scrollbar {
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ===========================================
   TYPOGRAPHY
   =========================================== */
h1, h2, h3, h4, h5, h6,
.heading {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--neutral-900);
}

.home-page-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.15;
  color: var(--neutral-900);
  text-align: center;
  margin: 0 auto var(--space-4);
  max-width: 900px;
  letter-spacing: -0.02em;
}

.home-title-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2.5vw, 1.375rem);
  font-weight: 400;
  line-height: 1.6;
  color: var(--neutral-600);
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-10);
}

/* ===========================================
   BUTTONS
   =========================================== */
.btn-primary-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md), 0 0 0 0 rgba(59, 130, 246, 0.4);
}

.btn-primary-custom:hover {
  background: linear-gradient(135deg, var(--primary-400), var(--primary-500));
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-primary-custom:active {
  transform: translateY(0) scale(0.98);
}

/* Upload Button - Main CTA */
.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-spring);
  box-shadow: var(--shadow-lg), 0 0 0 0 rgba(249, 115, 22, 0.4);
  text-decoration: none;
}

.upload-button:hover {
  background: linear-gradient(135deg, var(--accent-400), var(--accent-500));
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-xl), var(--shadow-glow-accent);
}

.upload-button:active {
  transform: translateY(0) scale(0.98);
}

@media (min-width: 640px) {
  .upload-button {
    font-size: var(--text-xl);
    padding: var(--space-5) var(--space-10);
  }
}

/* Upload Button Title */
.upload-button-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 400;
  color: var(--primary-600);
  text-align: center;
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

/* Upload Button Description */
.upload-button-desc {
  font-family: var(--font-body);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  color: var(--neutral-500);
  text-align: center;
  margin-bottom: var(--space-6);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Download Button - Success Action */
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-8);
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, var(--success-500), var(--success-600));
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-spring);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.download-button:hover {
  background: linear-gradient(135deg, var(--success-400), var(--success-500));
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-xl), 0 0 20px rgba(16, 185, 129, 0.3);
}

.download-button:active {
  transform: translateY(0) scale(0.98);
}

@media (min-width: 640px) {
  .download-button {
    font-size: var(--text-xl);
    padding: var(--space-5) var(--space-10);
  }
}

/* ===========================================
   CARDS & SURFACES
   =========================================== */
.card-elevated {
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--neutral-100);
  transition: all var(--transition-base);
}

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

/* Tool Card */
.tool-card {
  position: relative;
  background: var(--surface-card);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  border: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-500);
  transform: scaleY(0);
  transition: transform var(--transition-base);
}

.tool-card:hover {
  border-color: var(--primary-200);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.tool-card:hover::before {
  transform: scaleY(1);
}

.tool-card-icon {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
  transition: transform var(--transition-spring);
}

.tool-card:hover .tool-card-icon {
  transform: scale(1.1);
}

.tool-card-title {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--neutral-900);
  margin-bottom: var(--space-2);
}

.tool-card-description {
  font-size: var(--text-sm);
  color: var(--neutral-500);
  line-height: 1.5;
}

/* ===========================================
   HEADER & NAVIGATION
   =========================================== */
.sticky-top {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nav-link-custom {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--neutral-700);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-link-custom:hover {
  color: var(--primary-600);
  background: var(--primary-50);
}

.nav-link-custom.active {
  color: var(--primary-600);
  font-weight: 600;
}

/* Dropdown Menu */
.dropdown-menu-custom {
  background: var(--surface-card);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: var(--space-2);
  min-width: 220px;
}

.dropdown-item-custom {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--neutral-700);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.dropdown-item-custom:hover {
  background: var(--primary-50);
  color: var(--primary-700);
}

/* Mega Menu */
.mega-menu {
  background: var(--surface-card);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-6);
}

.mega-menu-category {
  margin-bottom: var(--space-4);
}

.mega-menu-category-title {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--neutral-400);
  margin-bottom: var(--space-3);
}

/* ===========================================
   FOOTER
   =========================================== */
.footer-custom {
  background: linear-gradient(180deg, var(--neutral-800), var(--neutral-900));
  color: var(--neutral-300);
  padding: var(--space-16) 0 var(--space-8);
}

.footer-logo {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: white;
  margin-bottom: var(--space-4);
}

.footer-section-title {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--neutral-400);
  margin-bottom: var(--space-4);
}

.footer-link {
  display: block;
  color: var(--neutral-300);
  font-size: var(--text-sm);
  padding: var(--space-1) 0;
  transition: color var(--transition-fast);
  text-decoration: none;
}

.footer-link:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid var(--neutral-700);
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--neutral-500);
}

/* ===========================================
   SECTIONS
   =========================================== */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--neutral-900);
  text-align: center;
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--neutral-500);
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-10);
}

/* Trust Section */
.trust-section {
  background: linear-gradient(135deg, var(--primary-50), var(--neutral-50));
  border-radius: var(--radius-2xl);
  padding: var(--space-12) var(--space-6);
  margin-top: var(--space-16);
}

/* How It Works */
.step-card {
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-100);
  transition: all var(--transition-base);
}

.step-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: var(--primary-100);
  color: var(--primary-700);
  font-weight: 700;
  font-size: var(--text-sm);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

.step-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--neutral-900);
  margin-bottom: var(--space-2);
}

/* FAQ Section */
.faq-item {
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-100);
  transition: all var(--transition-base);
}

.faq-item:hover {
  border-color: var(--primary-200);
}

.faq-question {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--neutral-900);
  margin-bottom: var(--space-2);
}

.faq-answer {
  font-size: var(--text-sm);
  color: var(--neutral-600);
  line-height: 1.6;
}

/* ===========================================
   UPLOAD / TOOL AREA
   =========================================== */
.upload-zone {
  background: var(--surface-card);
  border: 2px dashed var(--neutral-300);
  border-radius: var(--radius-2xl);
  padding: var(--space-12);
  text-align: center;
  transition: all var(--transition-base);
  cursor: pointer;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--primary-400);
  background: var(--primary-50);
}

.upload-zone.drag-over {
  border-style: solid;
  transform: scale(1.01);
}

.upload-icon {
  font-size: 4rem;
  color: var(--primary-400);
  margin-bottom: var(--space-4);
  transition: transform var(--transition-spring);
}

.upload-zone:hover .upload-icon {
  transform: translateY(-5px);
}

/* Processing State */
.processing-overlay {
  position: fixed;
  inset: 0;
  background: var(--surface-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
}

.processing-card {
  background: var(--surface-card);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  text-align: center;
  box-shadow: var(--shadow-xl);
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--neutral-200);
  border-top-color: var(--primary-500);
  border-radius: var(--radius-full);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Progress Bar */
.progress-bar-custom {
  height: 8px;
  background: var(--neutral-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}

/* ===========================================
   BLOG STYLES
   =========================================== */
.blog-card {
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-100);
  transition: all var(--transition-base);
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-card-content {
  padding: var(--space-5);
}

.blog-card-title {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-xl);
  color: var(--neutral-900);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.blog-card-excerpt {
  font-size: var(--text-sm);
  color: var(--neutral-500);
  line-height: 1.6;
}

/* Blog Post Content */
.prose-custom {
  color: var(--neutral-800);
  line-height: 1.8;
}

.prose-custom h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  color: var(--neutral-900);
}

.prose-custom h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
  color: var(--neutral-900);
}

.prose-custom p {
  margin-bottom: var(--space-4);
}

.prose-custom a {
  color: var(--primary-600);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.prose-custom a:hover {
  color: var(--primary-700);
}

.prose-custom ul,
.prose-custom ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

.prose-custom li {
  margin-bottom: var(--space-2);
}

.prose-custom img {
  border-radius: var(--radius-xl);
  margin: var(--space-8) 0;
}

/* WordPress Block Styles */
.wp-block-image {
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-xl);
  margin: var(--space-8) 0;
  overflow: hidden;
}

.wp-block-cover__image-background {
  border-radius: var(--radius-xl);
}

/* ===========================================
   ANIMATIONS
   =========================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fade-in {
  animation: fadeIn var(--transition-slow) ease-out;
}

.animate-slide-up {
  animation: slideUp var(--transition-slow) ease-out;
}

.animate-slide-down {
  animation: slideDown var(--transition-base) ease-out;
}

/* Staggered animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* ===========================================
   UTILITY CLASSES
   =========================================== */
.text-gradient {
  background: linear-gradient(135deg, var(--primary-600), var(--accent-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
}

.bg-gradient-accent {
  background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
}

.bg-gradient-surface {
  background: linear-gradient(180deg, var(--surface-page), var(--neutral-100));
}

.border-gradient {
  border: 2px solid transparent;
  background: 
    linear-gradient(var(--surface-card), var(--surface-card)) padding-box,
    linear-gradient(135deg, var(--primary-500), var(--accent-500)) border-box;
}

/* Glass Effect */
.glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Focus States */
.focus-ring:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-200);
}

/* Badge */
.badge-custom {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
}

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

.badge-success {
  background: var(--success-100);
  color: var(--success-600);
}

.badge-warning {
  background: var(--warning-100);
  color: var(--warning-500);
}

/* ===========================================
   RESPONSIVE ADJUSTMENTS
   =========================================== */
@media (max-width: 768px) {
  .mega-menu {
    flex-direction: column;
  }
  
  .tool-card {
    padding: var(--space-4);
  }
  
  .upload-zone {
    padding: var(--space-8);
  }
}

@media (max-width: 480px) {
  :root {
    --space-16: 3rem;
    --space-12: 2rem;
  }
  
  .home-page-title {
    font-size: 1.75rem;
  }
  
  .upload-button {
    width: 100%;
    max-width: 280px;
  }
}
