/*
Theme Name: imagenapdf
Theme URI: https://imagenapdf.com/
Author: Sofia Digital Ventures
Author URI: https://sofia.enterprises/
Description: Premium tool-site theme for imagenapdf.com — image to PDF converter.
Version: 2.0.0
License: GPL-2.0-or-later
Text Domain: imagenapdf
*/

/* ============================================
   Design tokens — premium visual system
   ============================================ */

:root {
  /* Colors */
  --bg-body: #FAFAFB;
  --bg-surface: #FFFFFF;
  --bg-hero: #F5F7FA;
  --bg-muted: #F1F5F9;
  --bg-dark: #0F172A;

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-inverse: #F8FAFC;

  --border-subtle: #E2E8F0;
  --border-strong: #CBD5E1;

  --brand: #2563EB;
  --brand-dark: #1D4ED8;
  --brand-darker: #1E3A8A;
  --brand-light: #DBEAFE;
  --brand-softer: #EFF6FF;

  --success: #059669;
  --success-light: #ECFDF5;

  --warning: #D97706;
  --warning-light: #FFFBEB;

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, #1E3A8A 0%, #2563EB 50%, #3B82F6 100%);
  --gradient-soft: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  --gradient-glow: radial-gradient(ellipse at top, rgba(59,130,246,0.08), transparent 70%);

  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(15,23,42,0.04);
  --shadow-sm: 0 1px 3px 0 rgba(15,23,42,0.06), 0 1px 2px -1px rgba(15,23,42,0.06);
  --shadow-md: 0 4px 6px -1px rgba(15,23,42,0.07), 0 2px 4px -2px rgba(15,23,42,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15,23,42,0.08), 0 4px 6px -4px rgba(15,23,42,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(15,23,42,0.10), 0 8px 10px -6px rgba(15,23,42,0.05);
  --shadow-glow: 0 0 0 4px rgba(37,99,235,0.12);
  --shadow-brand: 0 8px 20px -4px rgba(37,99,235,0.35);

  /* Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tracking-tight: -0.025em;
  --tracking-tighter: -0.04em;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
}

/* ============================================
   Reset & base
   ============================================ */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-secondary);
  background: var(--bg-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv02","cv03","cv04","cv11";
}

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

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 {
  color: var(--text-primary);
  margin: 0 0 0.5em;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); letter-spacing: var(--tracking-tighter); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); letter-spacing: var(--tracking-tighter); }
h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: var(--tracking-tight); }
p  { margin: 0 0 1rem; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

@media (min-width: 640px) {
  .container { padding: 0 2rem; }
}

/* ============================================
   Header — glassy, sticky, refined
   ============================================ */

.site-header {
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid rgba(226,232,240,0.7);
  box-shadow: 0 1px 3px 0 rgba(15,23,42,0.04);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-brand a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

.site-brand a:hover { color: var(--brand); text-decoration: none; }

.brand-icon {
  color: var(--brand);
  flex-shrink: 0;
}

.main-nav { display: none; }

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.main-nav a:hover {
  color: var(--text-primary);
  background: var(--bg-muted);
}

.main-nav a.is-active,
.main-nav a[aria-current="page"] {
  color: var(--brand);
  background: var(--brand-softer);
}

.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.menu-toggle:hover {
  background: var(--bg-muted);
}

.menu-toggle .icon {
  width: 22px;
  height: 22px;
}

.mobile-nav {
  display: none;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 0 1.25rem;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav a {
  display: block;
  padding: 0.875rem 1rem;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
}

.mobile-nav a:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
  text-decoration: none;
}

.mobile-nav.is-open { display: block; }

@media (min-width: 768px) {
  .menu-toggle { display: none; }
  .main-nav { display: block; }
  .mobile-nav { display: none !important; }
}

/* ============================================
   Hero — elevated, centered, premium
   ============================================ */

.page-hero {
  position: relative;
  padding: 4rem 0 2rem;
  text-align: center;
  background: linear-gradient(180deg, #EEF3FB 0%, #F5F7FA 60%, #FAFAFB 100%);
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% -5%, rgba(37,99,235,0.14), transparent 70%),
    radial-gradient(ellipse 40% 40% at 85% 20%, rgba(59,130,246,0.10), transparent 70%),
    radial-gradient(ellipse 40% 40% at 15% 20%, rgba(30,58,138,0.08), transparent 70%),
    repeating-linear-gradient(
      90deg,
      rgba(15,23,42,0.025) 0,
      rgba(15,23,42,0.025) 1px,
      transparent 1px,
      transparent 72px
    ),
    repeating-linear-gradient(
      0deg,
      rgba(15,23,42,0.025) 0,
      rgba(15,23,42,0.025) 1px,
      transparent 1px,
      transparent 72px
    );
  pointer-events: none;
}

.page-hero .container { position: relative; z-index: 1; }

.page-hero h1 {
  max-width: 820px;
  margin: 0 auto 1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.page-hero .lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 1.5rem;
  font-weight: 400;
}

@media (min-width: 768px) {
  .page-hero { padding: 5rem 0 3rem; }
  .page-hero .lead { font-size: 1.25rem; }
}

/* ============================================
   Converter card — floating, premium
   ============================================ */

.converter-section {
  padding: 0 0 5rem;
  position: relative;
  z-index: 10;
  margin-top: -2rem;
}

.converter-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  padding: 1.5rem;
  max-width: 920px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.converter-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(37,99,235,0.15), rgba(148,163,184,0.08));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@media (min-width: 768px) {
  .converter-card { padding: 2rem; }
}

/* Dropzone */

.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  background: var(--bg-body);
  padding: 3rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--brand);
  background: var(--brand-softer);
  box-shadow: var(--shadow-glow);
}

.dropzone-icon {
  width: 56px;
  height: 56px;
  color: var(--brand);
  margin: 0 auto 0.75rem;
  padding: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  box-shadow: 0 4px 12px -2px rgba(37,99,235,0.20);
  transition: transform 0.2s ease;
}

.dropzone:hover .dropzone-icon,
.dropzone.dragover .dropzone-icon {
  transform: translateY(-2px);
}

.dropzone-text {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

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

.format-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  justify-content: center;
  margin-top: 1rem;
}

.format-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.secondary-dropzone {
  margin-top: 1.25rem;
  padding: 2rem 1.5rem;
}

/* Options */

.options-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0 0;
}

@media (min-width: 640px) {
  .options-bar { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .options-bar { grid-template-columns: repeat(5, 1fr); }
}

@media (min-width: 1280px) {
  .options-bar { grid-template-columns: repeat(6, 1fr); }
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.option-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.option-group select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: all 0.15s ease;
  cursor: pointer;
}

.option-group select:hover,
.option-group select:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: var(--shadow-glow);
}

/* File list */

.file-list {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
}

.file-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.file-item.dragging { opacity: 0.5; }

.file-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  cursor: zoom-in;
  transition: transform 0.15s ease;
}

.file-thumb:hover { transform: scale(1.05); }

.file-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--brand-softer);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  flex-shrink: 0;
}

.file-icon .icon { width: 22px; height: 22px; }

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

.file-name {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.file-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.file-action {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.file-action:hover {
  background: var(--bg-muted);
  color: var(--brand);
}

.remove-file {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.remove-file:hover {
  background: #FEF2F2;
  color: #DC2626;
}

/* Image preview modal */

.image-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.image-preview-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.75);
  backdrop-filter: blur(4px);
}

.image-preview-box {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 0.5rem;
  overflow: auto;
}

.image-preview-box img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  display: block;
}

.image-preview-close {
  position: absolute;
  top: -0.75rem;
  right: -0.75rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview-close:hover {
  background: var(--bg-muted);
}

/* Actions & buttons */

.converter-actions {
  display: flex;
  gap: 0.875rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.9375rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: var(--tracking-wide);
}

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 25px -5px rgba(37,99,235,0.45);
  text-decoration: none;
  color: #fff;
}

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

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

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-muted);
  text-decoration: none;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #047857;
  text-decoration: none;
}

/* Progress */

.progress-area {
  margin-top: 1.5rem;
  display: none;
}

.progress-area.is-visible { display: block; }

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.progress-label { color: var(--text-secondary); }
.progress-percent { font-weight: 600; color: var(--text-primary); }

.progress-track {
  height: 10px;
  background: var(--bg-muted);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--gradient-brand);
  border-radius: 9999px;
  transition: width 0.2s ease;
}

/* Result */

.result-area {
  display: none;
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: var(--success-light);
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-lg);
}

.result-area.is-visible { display: block; }

.converter-message {
  margin-top: 1rem;
  font-size: 0.9375rem;
  min-height: 1.5rem;
  color: var(--text-muted);
}

.converter-message.is-error { color: #DC2626; }
.converter-message.is-success { color: var(--success); }

/* ============================================
   Content sections — spacious, alternating
   ============================================ */

.content-section {
  padding: 4rem 0;
}

.content-section.alt {
  background: var(--bg-hero);
}

.content-section h2 {
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1.5rem;
}

.content-section > .container > p,
.content-section .section-intro {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 2rem;
  color: var(--text-muted);
  font-size: 1.125rem;
}

/* Steps */

.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.step {
  position: relative;
  padding-left: 4rem;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-brand);
}

.step h3 { margin-bottom: 0.375rem; }
.step p { margin-bottom: 0; color: var(--text-muted); }

/* Cards */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}

.info-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

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

.info-card h3 {
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.0625rem;
}

.info-card p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.icon-brand { color: var(--brand); }
.icon-green { color: var(--success); }

/* Tables */

.table-wrap {
  overflow-x: auto;
  margin-top: 2rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th, td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

th {
  background: var(--bg-muted);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

tr:last-child td { border-bottom: none; }

.comparison-table th,
.comparison-table td { text-align: center; }

.comparison-table td:first-child { text-align: left; font-weight: 500; }

.check { color: var(--success); font-weight: 600; }
.cross { color: #EF4444; font-weight: 600; }

/* FAQ */

.faq-list {
  max-width: 800px;
  margin: 2rem auto 0;
}

.faq-item {
  border-bottom: 1px solid var(--border-subtle);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: color 0.15s ease;
}

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

.faq-icon {
  width: 22px;
  height: 22px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  color: var(--text-muted);
}

.faq-item.is-open .faq-icon { transform: rotate(180deg); }

.faq-answer {
  display: none;
  padding: 0 0 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.faq-item.is-open .faq-answer { display: block; }

/* Breadcrumbs */

.breadcrumbs {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 1rem 0;
}

.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--brand); }

.breadcrumbs span[aria-current="page"] {
  color: var(--text-primary);
  font-weight: 500;
}

/* CTA */

.cta-box {
  background: var(--bg-dark);
  color: var(--text-inverse);
  border-radius: var(--radius-2xl);
  padding: 3rem 2rem;
  text-align: center;
  margin-top: 3rem;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(59,130,246,0.15), transparent 70%);
}

.cta-box h2 {
  color: var(--text-inverse);
  margin-bottom: 0.75rem;
  position: relative;
}

.cta-box p {
  margin-bottom: 1.5rem;
  color: #CBD5E1;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
}

.cta-box a { color: #93C5FD; }
.cta-box a:hover { color: #BFDBFE; }

.cta-box .btn-primary {
  position: relative;
  background: #FFFFFF;
  color: var(--text-primary);
  box-shadow: none;
}

.cta-box .btn-primary:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}

/* Page links pills */

.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.page-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 1.125rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.page-link:hover {
  border-color: var(--brand);
  color: var(--brand);
  text-decoration: none;
  background: var(--brand-softer);
}

/* ============================================
   Footer — dark, refined
   ============================================ */

.site-footer {
  background: var(--bg-dark);
  color: #94A3B8;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr repeat(3, 1fr); }
}

.footer-brand {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-inverse);
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand .brand-dot { color: var(--brand); }

.footer-col h4 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-bottom: 1rem;
  color: var(--text-inverse);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li { margin-bottom: 0.5rem; }

.footer-col a {
  color: #94A3B8;
  font-size: 0.9375rem;
  transition: color 0.15s ease;
}

.footer-col a:hover { color: #E2E8F0; }

.footer-bottom {
  border-top: 1px solid rgba(148,163,184,0.2);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: #64748B;
}

/* ============================================
   Utilities
   ============================================ */

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

/* ============================================
   Tool cards — internal linking grid
   ============================================ */

.tool-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .tool-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .tool-cards { grid-template-columns: repeat(3, 1fr); }
}

.tool-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.375rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
  color: var(--text-secondary);
}

.tool-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}

.tool-card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  color: var(--brand);
}

.tool-card-icon svg { width: 100%; height: 100%; }

.tool-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.tool-card-body strong {
  color: var(--text-primary);
  font-size: 1rem;
  letter-spacing: var(--tracking-tight);
}

.tool-card-body span {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.tool-card-arrow {
  margin-left: auto;
  flex-shrink: 0;
  color: var(--brand);
  font-weight: 600;
  transition: transform 0.2s ease;
}

.tool-card:hover .tool-card-arrow { transform: translateX(3px); }

/* ============================================
   Rich content — in-depth prose sections
   ============================================ */

.rich-content {
  max-width: 800px;
  margin: 1.5rem auto 0;
}

.rich-content h3 {
  font-size: 1.125rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.rich-content h3:first-child { margin-top: 0; }

.rich-content p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
}

.rich-content a { font-weight: 500; }

/* ============================================
   Hero badges — pill trust signals
   ============================================ */

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  box-shadow: var(--shadow-xs);
}

.hero-badge svg {
  width: 16px;
  height: 16px;
  color: var(--brand);
}

/* ============================================
   Stats strip — key metric callouts
   ============================================ */

.stats-strip {
  padding: 0 0 1rem;
  position: relative;
  z-index: 5;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 920px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .stat-cards { grid-template-columns: repeat(4, 1fr); }
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: all 0.2s ease;
}

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

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: var(--tracking-tighter);
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  line-height: 1.1;
}

.stat-unit { font-size: 1.125rem; }

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ============================================
   Guide grid — cardified step-by-step content
   ============================================ */

.guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
}

.guide-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.guide-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.guide-grid a.guide-card {
  text-decoration: none;
  color: inherit;
}

.guide-card-tag {
  align-self: flex-start;
  padding: 0.25rem 0.75rem;
  background: var(--brand-softer);
  color: var(--brand);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  margin-bottom: 0.875rem;
}

.guide-card h3 { margin-bottom: 0.5rem; }

.guide-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  flex: 1;
}

.guide-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-top: 0.75rem;
}

.guide-card-link span { transition: transform 0.15s ease; }
.guide-card-link:hover span { transform: translateX(3px); }

/* ============================================
   Format grid — per-format cards
   ============================================ */

.format-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .format-grid { grid-template-columns: repeat(3, 1fr); }
}

.format-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: 1.375rem;
  transition: all 0.2s ease;
}

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

.format-ext {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: var(--bg-dark);
  color: #93C5FD;
  border-radius: var(--radius-sm);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.format-card strong {
  display: block;
  color: var(--text-primary);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.format-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ============================================
   Bento grid — feature highlight + satellites
   ============================================ */

.bento-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-feature { grid-column: span 2; }
}

@media (min-width: 1024px) {
  .bento-grid { grid-template-columns: repeat(4, 1fr); }
  .bento-feature { grid-column: span 2; grid-row: span 1; }
}

.bento-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 1.75rem;
  transition: all 0.2s ease;
}

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

.bento-feature {
  background: linear-gradient(135deg, #0F172A 0%, #1E3A8A 100%);
  border-color: transparent;
  color: #CBD5E1;
}

.bento-feature h3 { color: #FFFFFF; }
.bento-feature p { color: #CBD5E1; }

.bento-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  color: var(--brand);
  margin-bottom: 1rem;
}

.bento-feature .bento-icon {
  background: rgba(59,130,246,0.2);
  color: #93C5FD;
}

.bento-icon svg { width: 100%; height: 100%; }

.bento-card h3 { margin-bottom: 0.5rem; }

.bento-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.bento-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.bento-pill {
  padding: 0.375rem 0.875rem;
  border: 1px solid rgba(147,197,253,0.35);
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #93C5FD;
}

/* ============================================
   Table badges — check / cross pills
   ============================================ */

.badge-check,
.badge-cross {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-check {
  background: var(--success-light);
  color: var(--success);
}

.badge-cross {
  background: #FEF2F2;
  color: #DC2626;
}

/* ============================================
   Table of contents
   ============================================ */

.toc {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
  max-width: 720px;
  margin: 0 auto;
}

.toc-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
  counter-reset: toc;
}

.toc-list li {
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
  counter-increment: toc;
}

.toc-list li::before {
  content: counter(toc) ".";
  font-weight: 700;
  color: var(--brand);
  min-width: 1.5rem;
}

.toc-list a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.toc-list a:hover { color: var(--brand); }

.table-note {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* ============================================
   Responsive fine-tuning
   ============================================ */

@media (max-width: 640px) {
  .page-hero { padding: 3rem 0 1.5rem; }
  .converter-section { margin-top: -1rem; }
  .dropzone { padding: 2rem 1rem; }
  .content-section { padding: 2.5rem 0; }
  .step { padding-left: 3.5rem; }
  .step::before { width: 40px; height: 40px; font-size: 1rem; }
  .cta-box { padding: 2rem 1.25rem; }
}
