/* ============================================================
   PDF Puf Pro – Enterprise-Grade CSS
   ============================================================ */

/* ----- CSS Custom Properties (Design Tokens) ----- */
:root {
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-tertiary: #F1F5F9;
  --surface: #FFFFFF;
  --surface-hover: #F8FAFC;
  --surface-elevated: #FFFFFF;

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --text-inverse: #FFFFFF;

  --border-primary: #E2E8F0;
  --border-secondary: #CBD5E1;

  --accent-primary: #4F46E5;
  --accent-primary-hover: #4338CA;
  --accent-primary-light: #EEF2FF;
  --accent-primary-dark: #3730A3;

  --success: #10B981;
  --success-light: #D1FAE5;
  --warning: #F59E0B;
  --warning-light: #FEF3C7;
  --error: #EF4444;
  --error-light: #FEE2E2;
  --info: #3B82F6;
  --info-light: #DBEAFE;

  --shadow-xs: 0 1px 2px 0 rgba(0,0,0,0.03);
  --shadow-sm: 0 1px 3px 0 rgba(0,0,0,0.04), 0 1px 2px -1px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.05), 0 8px 10px -6px rgba(0,0,0,0.02);
  --shadow-xl: 0 20px 40px -5px rgba(0,0,0,0.08);
  --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.12);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --nav-height: 72px;
  --max-width: 1280px;
  --content-padding: 24px;

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

[data-theme="dark"] {
  --bg-primary: #0F172A;
  --bg-secondary: #1E293B;
  --bg-tertiary: #334155;
  --surface: #1E293B;
  --surface-hover: #334155;
  --surface-elevated: #1E293B;

  --text-primary: #E2E8F1;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --text-inverse: #0F172A;

  --border-primary: #334155;
  --border-secondary: #475569;

  --accent-primary: #6366F1;
  --accent-primary-hover: #818CF8;
  --accent-primary-light: #1E1B4B;
  --accent-primary-dark: #4F46E5;

  --shadow-xs: 0 1px 2px 0 rgba(0,0,0,0.2);
  --shadow-sm: 0 1px 3px 0 rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.3);
  --shadow-xl: 0 20px 40px -5px rgba(0,0,0,0.4);
  --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.5);

  --success-light: #064E3B;
  --warning-light: #78350F;
  --error-light: #7F1D1D;
  --info-light: #1E3A5F;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition-base), color var(--transition-base);
}

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

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

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

/* ----- Typography ----- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

p { margin-bottom: 1em; }

/* ----- Utility Classes ----- */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-primary), #7C3AED);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  box-shadow: 0 1px 3px rgba(79,70,229,0.3);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  border-color: var(--accent-primary-hover);
  box-shadow: 0 4px 12px rgba(79,70,229,0.4);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-primary);
}

.btn-ghost:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--border-secondary);
}

.btn-icon {
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  width: 40px;
  height: 40px;
}

.btn-icon:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.btn-sm { padding: 6px 14px; font-size: 0.8125rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius-lg); }

.btn .btn-spinner {
  animation: spin 0.8s linear infinite;
  display: none;
}

.btn.loading .btn-text { opacity: 0.6; }
.btn.loading .btn-spinner { display: block; }
.btn.loading { pointer-events: none; }

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

/* ----- Navigation ----- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-primary);
  transition: background var(--transition-base), border-color var(--transition-base);
}

[data-theme="dark"] .navbar {
  background: rgba(15,23,42,0.8);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary) !important;
  text-decoration: none;
}

.logo-icon { flex-shrink: 0; }

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-accent { color: var(--accent-primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary) !important;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary) !important;
  background: var(--surface-hover);
}

.nav-actions { display: flex; align-items: center; gap: 8px; }

.nav-menu-btn { display: none !important; }

/* Sun/Moon icons for theme toggle */
.sun-icon { display: block; }
.moon-icon { display: none; }

[data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }

/* ----- Main Content ----- */
.main-content {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

.page { display: none; }
.page.active-page { display: block; }

/* ----- Cookie Consent ----- */
.cookie-consent {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  max-width: 420px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2xl);
  padding: 20px;
  transform: translateY(120%);
  opacity: 0;
  transition: all var(--transition-slow);
}

.cookie-consent.show {
  transform: translateY(0);
  opacity: 1;
}

.cookie-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cookie-icon { color: var(--accent-primary); }

.cookie-content p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.cookie-content .btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ----- Hero Section ----- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px var(--content-padding) 60px;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
}

.shape-1 {
  width: 600px;
  height: 600px;
  background: linear-gradient(135deg, var(--accent-primary), #7C3AED);
  top: -200px;
  right: -150px;
  animation: floatShape 20s ease-in-out infinite;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, #3B82F6, #06B6D4);
  bottom: -100px;
  left: -100px;
  animation: floatShape 15s ease-in-out infinite reverse;
}

.shape-3 {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, #8B5CF6, #EC4899);
  top: 50%;
  left: 60%;
  animation: floatShape 25s ease-in-out infinite;
}

@keyframes floatShape {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--accent-primary-light);
  color: var(--accent-primary);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease-in-out infinite;
}

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

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.hero-search {
  position: relative;
  max-width: 560px;
  margin: 0 auto 32px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.hero-search input {
  width: 100%;
  padding: 16px 20px 16px 48px;
  font-family: var(--font-sans);
  font-size: 1rem;
  background: var(--surface);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
}

.hero-search input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(79,70,229,0.1), var(--shadow-md);
}

.hero-search input::placeholder { color: var(--text-muted); }

.trust-bar {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.trust-item svg { flex-shrink: 0; color: var(--success); }

/* ----- Category Tabs ----- */
.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 36px;
}

.cat-tab {
  padding: 8px 20px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cat-tab:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.cat-tab.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

/* ----- Category Headings (within grid) ----- */
.category-heading {
  grid-column: 1 / -1;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  padding: 16px 0 8px;
  margin-top: 8px;
  border-bottom: 2px solid var(--accent-primary);
  letter-spacing: -0.01em;
}

.category-heading:first-of-type {
  margin-top: 0;
}

.category-heading[data-category="organize"] { border-color: #10B981; }
.category-heading[data-category="optimize"] { border-color: #3B82F6; }
.category-heading[data-category="convert"] { border-color: #8B5CF6; }
.category-heading[data-category="edit"] { border-color: #EF4444; }
.category-heading[data-category="security"] { border-color: #06B6D4; }

.tool-card.coming-soon {
  opacity: 0.7;
}

.tool-card.coming-soon .tool-card-btn {
  pointer-events: none;
}

.tool-card[data-category].hidden-by-cat {
  display: none;
}

/* ----- Tools Section ----- */
.tools-section {
  padding: 60px var(--content-padding) 80px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ----- Tool Cards ----- */
.tool-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: all var(--transition-base);
  cursor: pointer;
}

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

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

.tool-card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.tool-card-badge.popular {
  background: #FEF3C7;
  color: #92400E;
}

.tool-card-badge.new {
  background: #DBEAFE;
  color: #1E40AF;
}

[data-theme="dark"] .tool-card-badge.popular {
  background: #78350F;
  color: #FDE68A;
}

[data-theme="dark"] .tool-card-badge.new {
  background: #1E3A5F;
  color: #93C5FD;
}

.tool-card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--accent-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--tool-color, var(--accent-primary));
  transition: transform var(--transition-base);
}

.tool-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.tool-card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.tool-card-btn {
  width: 100%;
}

/* Highlight matching tools in search */
.tool-card.hidden { display: none; }

/* ----- Workspace (Tool View) ----- */
.workspace {
  padding: 32px var(--content-padding) 60px;
  max-width: var(--max-width);
  margin: 0 auto;
  animation: fadeUp 0.35s ease;
}

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

.workspace-container {
  max-width: 720px;
  margin: 0 auto;
}

.workspace-back {
  margin-bottom: 24px;
  font-size: 0.875rem;
}

.workspace-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.workspace-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--accent-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.workspace-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.workspace-desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin: 4px 0 0;
}

.workspace-body {
  min-height: 300px;
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  background: var(--bg-secondary);
  position: relative;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--accent-primary);
  background: var(--accent-primary-light);
}

.upload-icon {
  color: var(--text-muted);
  margin-bottom: 16px;
  transition: color var(--transition-base);
}

.upload-zone:hover .upload-icon,
.upload-zone.dragover .upload-icon {
  color: var(--accent-primary);
}

.upload-text {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin: 0;
}

.upload-text strong { color: var(--text-primary); }

.upload-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* File List */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  animation: fadeUp 0.2s ease;
}

.file-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--accent-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
}

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

.file-item-name {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-item-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.file-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.file-item-remove:hover {
  color: var(--error);
  background: var(--error-light);
}

/* Tool Options */
.tool-options {
  margin-bottom: 20px;
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
}

.option-group {
  margin-bottom: 16px;
}

.option-group:last-child { margin-bottom: 0; }

.option-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.option-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.option-input,
.option-select {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.option-input:focus,
.option-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

.option-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.875rem;
}

.option-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-primary);
}

.option-radio-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.option-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.option-radio:hover {
  border-color: var(--accent-primary);
}

.option-radio input[type="radio"] {
  accent-color: var(--accent-primary);
}

.option-radio.active {
  border-color: var(--accent-primary);
  background: var(--accent-primary-light);
}

/* Page thumbnails */
.page-thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.page-thumb {
  position: relative;
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition-fast);
  aspect-ratio: 3/4;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-thumb:hover { border-color: var(--accent-primary); }
.page-thumb.selected { border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.2); }

.page-thumb canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-thumb-label {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(0,0,0,0.6);
  color: white;
  font-size: 0.6875rem;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Workspace Actions */
.workspace-actions {
  text-align: center;
  margin-top: 20px;
}

/* Result */
.workspace-result {
  text-align: center;
  padding: 40px 20px;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--success);
  margin-bottom: 16px;
}

.result-header h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
}

.result-info {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 0.9375rem;
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ----- Static Pages (About, Contact, Privacy, etc.) ----- */
.static-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px var(--content-padding) 64px;
}

.static-page h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.static-page h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 32px 0 12px;
}

.static-page p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 12px;
}

.static-page .last-updated {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin: 24px 0;
}

.feature-item {
  padding: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--transition-base);
}

.feature-item:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.feature-item svg {
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.feature-item h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-item p {
  font-size: 0.875rem;
  margin: 0;
}

/* Contact Form */
.contact-form {
  margin-top: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  background: var(--surface);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
}

/* ----- Ad Section ----- */
.ad-section {
  padding: 32px var(--content-padding);
  max-width: var(--max-width);
  margin: 0 auto;
}

.ad-container {
  text-align: center;
  padding: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
}

.ad-placeholder p {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.ad-box {
  width: 728px;
  max-width: 100%;
  height: 90px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ----- Footer ----- */
.footer {
  border-top: 1px solid var(--border-primary);
  background: var(--bg-secondary);
  padding: 48px var(--content-padding) 24px;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 32px;
  gap: 8px;
}

.footer-logo-text {
  font-size: 1.125rem;
  font-weight: 700;
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.footer-col h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  padding: 4px 0;
  font-size: 0.875rem;
  color: var(--text-secondary) !important;
}

.footer-col a:hover { color: var(--text-primary) !important; }

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-primary);
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

/* ----- Toast Notifications ----- */
.toast-container {
  position: fixed;
  top: calc(var(--nav-height) + 16px);
  right: 16px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease forwards;
  animation-delay: 0s, 3s;
  max-width: 360px;
  font-size: 0.875rem;
}

.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--error); }
.toast-info { border-left: 3px solid var(--info); }

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

/* ----- Progress Bar ----- */
.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  margin: 16px 0;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), #7C3AED);
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

/* ----- Skeleton Loader ----- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--surface-hover) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ----- Processing Modal ----- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9997;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--surface-elevated);
  border-radius: var(--radius-xl);
  padding: 40px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow-2xl);
  animation: scaleIn 0.25s ease;
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-primary);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

.modal-content h3 {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.modal-content p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

/* Page transition */
.page-transition {
  animation: pageIn 0.3s ease;
}

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

/* Sign tool - canvas */
.signature-canvas {
  border: 2px solid var(--border-primary);
  border-radius: var(--radius-md);
  cursor: crosshair;
  touch-action: none;
  width: 100%;
  height: 200px;
  background: white;
}

/* ----- Responsive ----- */
@media (max-width: 1024px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --nav-height: 64px; }
  
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--surface-elevated);
    border-bottom: 1px solid var(--border-primary);
    padding: 12px;
    box-shadow: var(--shadow-lg);
  }
  
  .nav-menu-btn { display: inline-flex !important; }

  .hero { padding: 48px 16px 40px; }
  .hero-title { font-size: 1.75rem; }
  .hero-subtitle { font-size: 1rem; }

  .tools-grid { grid-template-columns: 1fr; }
  .tools-section { padding: 32px 16px 48px; }
  
  .trust-bar { gap: 12px; flex-direction: column; align-items: center; }
  
  .workspace { padding: 24px 16px 40px; }
  
  .cookie-consent {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
  }

  .footer-links { grid-template-columns: 1fr 1fr; gap: 16px; }
  .static-page { padding: 32px 16px 48px; }
  
  .features-grid { grid-template-columns: 1fr; }
  .page-thumbnails { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .page-thumbnails { grid-template-columns: repeat(2, 1fr); }
  .result-actions { flex-direction: column; }
  .result-actions .btn { width: 100%; }
}
