/* ============================================
   mergepdf.dev — Main Stylesheet
   Palette: Soft Blue · White · Warm Accents
   ============================================ */

/* Google Fonts loaded via <link> in HTML head — do NOT @import here (causes chained blocking request) */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Primary blues — calm, trustworthy */
  --blue-50:  #EFF6FF;
  --blue-100: #DBEAFE;
  --blue-200: #BFDBFE;
  --blue-400: #60A5FA;
  --blue-500: #3B82F6;
  --blue-600: #2563EB;
  --blue-700: #1D4ED8;
  --blue-800: #1E40AF;
  
  /* Warm accents — welcoming, not cold */
  --warm-50:  #FFF7ED;
  --warm-100: #FFEDD5;
  --warm-400: #FB923C;
  --warm-500: #F97316;
  
  /* Soft sky — relaxing backgrounds */
  --sky-50:   #F0F9FF;
  --sky-100:  #E0F2FE;
  --sky-200:  #BAE6FD;
  
  /* Neutrals */
  --white:    #FFFFFF;
  --gray-50:  #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;
  --gray-900: #0F172A;
  
  /* Functional */
  --success:  #10B981;
  --error:    #EF4444;
  
  /* Typography */
  --font-heading: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --font-body: 'Inter', 'DM Sans', sans-serif;
  
  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Shadows — soft, not harsh */
  --shadow-sm: 0 1px 3px rgba(59,130,246,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(59,130,246,0.10), 0 2px 4px rgba(0,0,0,0.05);
  --shadow-lg: 0 8px 32px rgba(59,130,246,0.14), 0 4px 8px rgba(0,0,0,0.06);
  --shadow-blue: 0 4px 20px rgba(59,130,246,0.25);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--gray-800);
  background: linear-gradient(180deg, var(--sky-50) 0%, var(--white) 400px);
  min-height: 100vh;
}

/* --- NAV --- */
nav.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--blue-700);
  text-decoration: none;
}

.site-logo span {
  color: var(--warm-500);
}

/* --- HERO --- */
.hero {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px 40px; /* Reduced from 72px 24px 56px */
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: var(--blue-50);
  border: 1px solid var(--blue-200);
  color: var(--blue-700);
  font-size: 12px; /* Reduced from 13px */
  font-weight: 600;
  padding: 4px 14px; /* Reduced padding */
  border-radius: 100px;
  margin-bottom: 16px; /* Reduced from 24px */
  letter-spacing: 0.3px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 5.5vw, 48px); /* Reduced max from 62px to 48px */
  font-weight: 800;
  line-height: 1.15; /* Tighter line height */
  letter-spacing: -1.2px; /* Reduced from -1.5px */
  color: var(--gray-900);
  margin-bottom: 14px; /* Reduced from 16px */
}

.hero h1 .text-blue {
  color: var(--blue-600);
}

.hero-subtitle {
  font-size: clamp(14px, 2vw, 17px); /* Reduced max from 19px to 17px */
  color: var(--gray-600);
  line-height: 1.6; /* Tighter line height */
  max-width: 600px; /* Reduced from 640px */
  margin: 0 auto 20px; /* Reduced from 24px */
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 16px; /* Reduced gap */
  margin-bottom: 28px; /* Reduced from 32px */
  font-size: 12px; /* Reduced from 13px */
  color: var(--gray-600);
  font-weight: 500;
}

.trust-row span::before {
  content: '✓ ';
  color: var(--success);
  font-weight: 700;
}

/* --- DROP ZONE --- */
.drop-zone {
  background: var(--sky-50);
  border: 2px dashed var(--blue-200);
  border-radius: var(--radius-xl);
  padding: 40px 32px; /* Reduced from 56px */
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--blue-500);
  background: var(--blue-50);
  box-shadow: var(--shadow-blue);
  transform: translateY(-2px);
}

.drop-icon {
  font-size: 44px; /* Reduced from 52px */
  margin-bottom: 12px; /* Reduced from 16px */
  display: block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.drop-title {
  font-family: var(--font-heading);
  font-size: 20px; /* Reduced from 22px */
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px; /* Reduced from 8px */
}

.drop-hint {
  font-size: 14px; /* Reduced from 15px */
  color: var(--gray-500);
  margin-bottom: 20px; /* Reduced from 24px */
}

.btn-primary {
  background: var(--blue-600);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 28px; /* Reduced from 13px 32px */
  font-size: 14px; /* Reduced from 15px */
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  box-shadow: var(--shadow-blue);
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--blue-700);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.drop-formats {
  font-size: 11px; /* Reduced from 12px */
  color: var(--gray-400);
  margin-top: 12px; /* Reduced from 14px */
}

.drop-privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px; /* Reduced from 12px */
  font-size: 11px; /* Reduced from 12px */
  color: var(--blue-600);
  font-weight: 500;
}

/* --- PDF CARDS --- */
.pdf-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  cursor: grab;
  transition: all 0.2s;
  user-select: none;
  box-shadow: var(--shadow-sm);
}

.pdf-card:hover {
  border-color: var(--blue-300);
  box-shadow: var(--shadow-md);
}

.pdf-card.dragging {
  opacity: 0.4;
  border-color: var(--blue-500);
}

.pdf-card.drag-over {
  border-color: var(--blue-500);
  background: var(--blue-50);
  box-shadow: 0 0 0 2px var(--blue-200);
}

.pdf-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.pdf-info {
  flex: 1;
  min-width: 0;
}

.pdf-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--gray-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdf-meta {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
}

.pdf-remove {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  background: var(--gray-100);
  color: var(--gray-500);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.pdf-remove:hover {
  background: #FEE2E2;
  color: var(--error);
}

/* Keyboard reorder controls — WCAG 2.1 SC 2.1.1 */
.pdf-reorder {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
  margin-right: 4px;
}

.pdf-move-btn {
  width: 24px;
  height: 24px;
  background: var(--gray-100);
  color: var(--gray-500);
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s;
  line-height: 1;
}

.pdf-move-btn:hover:not(:disabled) {
  background: var(--blue-50);
  color: var(--blue-600);
  border-color: var(--blue-300);
}

.pdf-move-btn:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 1px;
}

.pdf-move-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* --- BUTTONS --- */
.btn-secondary {
  background: var(--white);
  color: var(--blue-600);
  border: 1.5px solid var(--blue-200);
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-merge {
  background: var(--blue-600);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  box-shadow: var(--shadow-blue);
  transition: all 0.2s;
  width: 100%;
}

.btn-merge:hover {
  background: var(--blue-700);
  transform: translateY(-1px);
}

.btn-merge:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* --- ACTION BAR (replaces floating buttons) --- */
/* Full-width sticky bar at the bottom — always visible, impossible to miss */
#floatingButtons {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--gray-200);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}

/* "+ Add more" button — floating above the bar, bottom-right */
.fab-add {
  position: fixed;
  bottom: 90px;
  right: 32px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--blue-300);
  color: var(--blue-600);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,99,235,0.2);
  transition: all 0.2s ease;
  z-index: 1001;
}

.fab-add:hover {
  background: var(--blue-50);
  border-color: var(--blue-500);
  transform: rotate(90deg) scale(1.1);
  box-shadow: 0 8px 32px rgba(37,99,235,0.3);
}

.fab-add:active {
  transform: rotate(90deg) scale(0.95);
}

/* "Merge PDFs" button — full width inside the bar */
.fab-merge {
  width: 100%;
  max-width: 600px;
  background: var(--blue-600);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 15px 24px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37,99,235,0.35);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  min-height: 50px;
}

.fab-merge:hover {
  background: var(--blue-700);
  box-shadow: 0 6px 24px rgba(37,99,235,0.45);
  transform: translateY(-1px);
}

.fab-merge:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

.fab-merge:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.fab-merge:disabled:hover {
  background: var(--blue-600);
  transform: none;
  box-shadow: none;
}

/* Push page content up so the bar doesn't cover the last card */
#pdfListContainer {
  padding-bottom: 120px !important;
}

/* Mobile */
@media (max-width: 480px) {
  #floatingButtons {
    padding: 10px 16px;
    padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
  }

  .fab-add {
    bottom: 82px;
    right: 20px;
    width: 52px;
    height: 52px;
  }

  .fab-merge {
    font-size: 15px;
    padding: 13px 20px;
    min-height: 46px;
  }
}

/* --- PROGRESS --- */
.progress-wrap {
  height: 6px;
  background: var(--gray-100);
  border-radius: 100px;
  overflow: hidden;
  margin-top: 12px;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue-400), var(--blue-600));
  border-radius: 100px;
  transition: width 0.3s ease;
}

/* --- SUCCESS STATE --- */
.state-success {
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: none;
  align-items: center;
  gap: 12px;
  color: #065F46;
  font-weight: 500;
  margin-top: 24px;
}

.state-success.active {
  display: flex;
}

.success-checkmark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--success);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

/* --- SPINNER --- */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--blue-100);
  border-top-color: var(--blue-600);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

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

/* --- CARDS --- */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px; /* Reduced from 24px */
  box-shadow: var(--shadow-sm);
}

/* --- HOW IT WORKS --- */
.how-it-works {
  padding: 48px 24px; /* Reduced from 64px */
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px; /* Reduced from 24px */
  margin-top: 32px; /* Reduced from 40px */
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; /* Reduced from 32px */
  height: 30px;
  background: var(--blue-600);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 13px; /* Reduced from 14px */
  margin-bottom: 10px; /* Reduced from 12px */
}

.step-icon {
  font-size: 28px; /* Reduced from 32px */
  margin-bottom: 10px; /* Reduced from 12px */
}

.steps-grid h3 {
  font-family: var(--font-heading);
  font-size: 17px; /* Reduced from 18px */
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px; /* Reduced from 8px */
}

.steps-grid p {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.6;
}

/* --- SEO CONTENT --- */
.seo-section {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 24px; /* Reduced from 64px */
}

.seo-section h2 {
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 28px); /* Reduced max from 32px to 28px */
  font-weight: 800;
  color: var(--gray-900);
  margin: 32px 0 14px; /* Reduced from 40px 0 16px */
  letter-spacing: -0.5px;
}

.seo-section h2:first-child {
  margin-top: 0;
}

.seo-section h3 {
  font-family: var(--font-heading);
  font-size: 18px; /* Reduced from 20px */
  font-weight: 700;
  color: var(--gray-900);
  margin: 28px 0 10px; /* Reduced from 32px 0 12px */
}

.seo-section p {
  font-size: 15px; /* Reduced from 16px */
  color: var(--gray-600);
  line-height: 1.7; /* Reduced from 1.8 */
  margin-bottom: 16px; /* Reduced from 18px */
}

.seo-section ul,
.seo-section ol {
  padding-left: 20px;
  margin-bottom: 16px; /* Reduced from 18px */
}

.seo-section li {
  font-size: 15px; /* Reduced from 16px */
  color: var(--gray-600);
  line-height: 1.7; /* Reduced from 1.8 */
  margin-bottom: 6px; /* Reduced from 8px */
}

.seo-section strong {
  color: var(--gray-800);
}

/* --- FAQ --- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item.open {
  border-color: var(--blue-300);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 18px 20px;
  text-align: left;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-question::after {
  content: '+';
  font-size: 20px;
  color: var(--blue-600);
  transition: transform 0.2s;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-question:hover {
  color: var(--blue-600);
}

.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.7;
}

.faq-item.open .faq-answer {
  max-height: 300px;
  padding-bottom: 18px;
}

/* --- FOOTER --- */
footer {
  background: var(--gray-900);
  color: #94A3B8;
  padding: 56px 24px 32px;
  margin-top: 120px; /* Add space above footer */
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand-name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 10px;
}

.footer-brand-name span {
  color: var(--warm-400);
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: #94A3B8;
  text-decoration: none;
  margin-bottom: 8px;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--blue-400);
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  border-top: 1px solid #1E293B;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

/* --- UTILITY --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  min-height: 60vh; /* Ensure container has minimum height */
}

section {
  padding: 48px 0; /* Reduced from 64px */
}

/* Mobile optimization for sections */
@media (max-width: 768px) {
  section {
    padding: 32px 0; /* Reduced padding on mobile */
  }
  
  .how-it-works {
    padding: 32px 16px; /* More compact */
  }
  
  .seo-section {
    padding: 32px 16px; /* More compact */
  }
  
  .section-label {
    font-size: 11px;
    margin-bottom: 8px;
  }
  
  .section-title {
    margin-bottom: 10px;
  }
  
  .section-desc {
    font-size: 15px;
    margin-bottom: 28px;
  }
}

/* Add minimum height to main content area */
main {
  min-height: calc(100vh - 60px - 200px); /* viewport height - nav height - footer height */
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.7px;
  margin-bottom: 14px;
}

.section-desc {
  font-size: 17px;
  color: var(--gray-500);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 40px;
}

.count-info {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-600);
  margin-bottom: 12px;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  
  .hero {
    padding: 40px 16px 32px; /* Reduced padding significantly */
  }
  
  .hero-badge {
    font-size: 11px;
    padding: 4px 12px;
    margin-bottom: 16px;
  }
  
  .hero h1 {
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
  }
  
  .hero-subtitle {
    line-height: 1.5;
    margin-bottom: 20px;
  }
  
  .trust-row {
    gap: 4px 12px;
    font-size: 11px;
    margin-bottom: 24px;
  }
  
  .drop-zone {
    padding: 32px 20px; /* Reduced from 36px */
  }
  
  .drop-icon {
    font-size: 40px; /* Smaller icon */
    margin-bottom: 12px;
  }
  
  .drop-title {
    font-size: 18px; /* Smaller title */
    margin-bottom: 6px;
  }
  
  .drop-hint {
    font-size: 13px;
    margin-bottom: 20px;
  }
  
  .btn-primary {
    padding: 12px 24px;
    font-size: 14px;
  }
  
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 16px; /* Reduced gap */
  }
  
  .card {
    padding: 20px; /* Reduced padding */
  }
  
  .step-number {
    width: 28px;
    height: 28px;
    font-size: 13px;
    margin-bottom: 10px;
  }
  
  .step-icon {
    font-size: 28px;
    margin-bottom: 10px;
  }
  
  .steps-grid h3 {
    font-size: 16px;
    margin-bottom: 6px;
  }
  
  .steps-grid p {
    font-size: 13px;
  }
}

@media (max-width: 520px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
  
  .hero {
    padding: 32px 16px 24px; /* Even more compact */
  }
  
  .hero h1 {
    letter-spacing: -0.3px;
  }
  
  .trust-row {
    gap: 4px 10px;
    font-size: 10px;
  }
  
  .pdf-remove {
    width: 32px;
    height: 32px;
  }
  
  .drop-zone {
    padding: 28px 16px;
  }
  
  .drop-formats {
    font-size: 11px;
  }
  
  .drop-privacy-note {
    font-size: 11px;
  }
}

/* ============================================
   Legal, About, Contact & Guide page styles
   are in assets/css/legal.css — loaded only
   on those pages, not on tool pages.
   ============================================ */

/* --- CLS PREVENTION --- */
/* Reserve space for hero to prevent layout shift during font load */
.hero h1 {
  min-height: 1.15em; /* Matches line-height */
}

.drop-zone {
  min-height: 280px; /* Prevent CLS when drop zone renders */
}

/* Font fallback stack — prevents FOIT (Flash of Invisible Text) */
body {
  font-display: swap;
}

/* --- ACCESSIBILITY: Skip to Content --- */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  background: var(--blue-600);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-to-content:focus {
  top: 12px;
}

/* --- ACCESSIBILITY: Focus Visible Ring --- */
*:focus-visible {
  outline: 3px solid var(--blue-500);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Remove outline for mouse clicks */
*:focus:not(:focus-visible) {
  outline: none;
}

/* --- REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .drop-icon {
    animation: none;
  }
}

/* --- PRINT STYLES --- */
@media print {
  nav.site-nav,
  .drop-zone,
  #floatingButtons,
  .fab-add,
  #processingState,
  footer,
  .hero-badge,
  .trust-row,
  .faq-list {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
    line-height: 1.5;
  }

  .seo-section {
    max-width: 100%;
    padding: 0;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  a[href^="#"]::after,
  a[href^="javascript"]::after {
    content: "";
  }
}

/* --- HIGH CONTRAST MODE --- */
@media (forced-colors: active) {
  .btn-primary,
  .fab-merge {
    border: 2px solid ButtonText;
  }

  .drop-zone {
    border: 2px solid ButtonText;
  }
}
