@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

:root {
  --bg: #ffffff;
  --bg-secondary: #f8fafc;
  --primary: #e53e3e;
  --primary-hover: #c53030;
  --secondary: #4f46e5;
  --success: #38a169;
  --text: #1a202c;
  --text-muted: #718096;
  --border: #e2e8f0;
  --dropzone-border: #90cdf4;
  --dropzone-bg: #ebf8ff;
  --dropzone-bg-hover: #bee3f8;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── HEADER ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 2px;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}
.logo-free { color: var(--text); }
.logo-pdf  { color: var(--primary); }
.logo-tools { color: var(--text); }
.logo-tld  { color: var(--text-muted); font-weight: 400; font-size: 1rem; }
.logo-tagline {
  font-size: .7rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 8px;
  display: none;
}
@media (min-width: 600px) { .logo-tagline { display: inline; } }

.site-nav { display: flex; gap: 24px; align-items: center; }
.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: .9rem;
  font-weight: 500;
  transition: color .15s;
}
.site-nav a:hover { color: var(--primary); }

/* ── BREADCRUMB ── */
.breadcrumb {
  padding: 12px 24px;
  font-size: .82rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 6px; }

/* ── PRIVACY BADGE ── */
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0fff4;
  color: #276749;
  border: 1px solid #9ae6b4;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: .8rem;
  font-weight: 500;
}

/* ── HERO ── */
.hero {
  background: var(--bg-secondary);
  text-align: center;
  padding: 64px 24px 56px;
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  max-width: 700px;
  margin: 0 auto 16px;
}
.hero h1 .accent { color: var(--primary); }
.hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 28px;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow);
}

/* ── SECTION ── */
.section {
  padding: 56px 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.section-sub {
  color: var(--text-muted);
  margin-bottom: 36px;
  font-size: .95rem;
}

/* ── TOOLS GRID ── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.tool-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
  position: relative;
}
.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.tool-card.coming-soon { opacity: .6; pointer-events: none; }

.tool-card-icon { font-size: 2.2rem; line-height: 1; }
.tool-card-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: .7rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}
.badge-free { background: #f0fff4; color: #276749; border: 1px solid #9ae6b4; }
.badge-soon { background: #fefcbf; color: #975a16; border: 1px solid #faf089; }

.tool-card h3 { font-size: 1.05rem; font-weight: 600; }
.tool-card p  { font-size: .88rem; color: var(--text-muted); flex: 1; }
.tool-card a.btn { align-self: flex-start; margin-top: 4px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background .15s, transform .1s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #2f855a; }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: #fff5f5; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ── HOW IT WORKS ── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
}
.step {
  text-align: center;
  padding: 28px 20px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}
.step-icon { font-size: 2rem; margin-bottom: 10px; }
.step h3 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.step p  { font-size: .85rem; color: var(--text-muted); }

/* ── PRIVACY SECTION ── */
.privacy-section {
  background: #f0fff4;
  border: 1px solid #9ae6b4;
  border-radius: var(--radius);
  padding: 36px 32px;
  text-align: center;
}
.privacy-section h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 12px; }
.privacy-section p  { color: #2d6a4f; font-size: .95rem; max-width: 600px; margin: 0 auto; }

/* ── FOOTER ── */
.site-footer {
  background: var(--text);
  color: #a0aec0;
  padding: 48px 24px 28px;
}
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-family {
  margin-bottom: 28px;
}
.footer-family h4 {
  color: #e2e8f0;
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 12px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-links a {
  color: #a0aec0;
  text-decoration: none;
  font-size: .85rem;
  transition: color .15s;
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #2d3748;
  padding-top: 20px;
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: .8rem;
}
.footer-bottom a { color: #a0aec0; text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

/* ── TOOL PAGE LAYOUT ── */
.tool-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 24px 64px;
}
.tool-page h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 12px;
}
.tool-header-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

/* ── DROP ZONE ── */
.dropzone {
  border: 2.5px dashed var(--dropzone-border);
  background: var(--dropzone-bg);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  position: relative;
}
.dropzone.drag-over {
  background: var(--dropzone-bg-hover);
  border-color: #4299e1;
}
.dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.dropzone-icon { font-size: 3rem; margin-bottom: 12px; line-height: 1; }
.dropzone h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.dropzone p  { font-size: .85rem; color: var(--text-muted); }
.dropzone .browse { color: var(--secondary); font-weight: 500; cursor: pointer; }

/* ── OPTIONS ── */
.options-panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 16px;
}
.options-panel h4 {
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 14px;
}
.options-row:last-child { margin-bottom: 0; }
.option-group { display: flex; flex-direction: column; gap: 6px; min-width: 140px; }
.option-group label {
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-muted);
}
.option-group select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  cursor: pointer;
}
.radio-group { display: flex; flex-direction: column; gap: 8px; }
.radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  cursor: pointer;
}
.radio-item input { accent-color: var(--primary); cursor: pointer; }

/* ── FILE LIST ── */
.file-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .88rem;
}
.file-item-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.file-item-icon { font-size: 1.5rem; flex-shrink: 0; }
.file-item-info { flex: 1; min-width: 0; }
.file-item-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-item-meta { color: var(--text-muted); font-size: .8rem; }
.file-item-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 4px;
  border-radius: 4px;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}
.file-item-remove:hover { color: var(--primary); background: #fff5f5; }
.file-item-num {
  width: 22px;
  height: 22px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ── STATUS / RESULT ── */
.status-box {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  display: none;
}
.status-box.show { display: block; }
.status-info    { background: #ebf8ff; color: #2b6cb0; border: 1px solid #bee3f8; }
.status-success { background: #f0fff4; color: #276749; border: 1px solid #9ae6b4; }
.status-error   { background: #fff5f5; color: #c53030; border: 1px solid #fed7d7; }
.status-warning { background: #fffaf0; color: #975a16; border: 1px solid #fbd38d; }

/* ── TABS ── */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  gap: 0;
}
.tab-btn {
  background: none;
  border: none;
  padding: 10px 18px;
  font-size: .88rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .15s, border-color .15s;
}
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── FAQ ── */
.faq { margin-top: 56px; }
.faq h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 20px; }
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-a { font-size: .9rem; color: var(--text-muted); line-height: 1.7; }

/* ── RELATED TOOLS ── */
.related { margin-top: 48px; }
.related h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }
.related-links { display: flex; flex-wrap: wrap; gap: 10px; }
.related-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  background: var(--bg-secondary);
  transition: border-color .15s, color .15s;
}
.related-links a:hover { border-color: var(--primary); color: var(--primary); }

/* ── HOW TO USE (tool page) ── */
.how-to { margin-top: 48px; }
.how-to h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; }
.how-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}
.how-step {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
}
.how-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}
.how-step-icon { font-size: 1.5rem; margin-bottom: 8px; }
.how-step h4 { font-size: .88rem; font-weight: 600; margin-bottom: 4px; }
.how-step p  { font-size: .8rem; color: var(--text-muted); }

/* ── DISCLAIMER ── */
.disclaimer {
  background: #fffaf0;
  border: 1px solid #fbd38d;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: .83rem;
  color: #975a16;
  margin-top: 12px;
  line-height: 1.6;
}

/* ── SPINNER ── */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── SIZE DISPLAY ── */
.size-display {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: .9rem;
}
.size-before { color: var(--text-muted); }
.size-after  { color: var(--success); font-weight: 600; }
.size-arrow  { color: var(--text-muted); }
.reduction-pill {
  background: #f0fff4;
  color: #276749;
  border: 1px solid #9ae6b4;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: .8rem;
  font-weight: 600;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .site-header { padding: 0 16px; }
  .hero { padding: 40px 16px 36px; }
  .section { padding: 36px 16px; }
  .tool-page { padding: 24px 16px 48px; }
  .options-row { flex-direction: column; gap: 12px; }
  .tabs { overflow-x: auto; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

/* page input styling */
.page-input {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.page-input label { font-size: .9rem; font-weight: 500; min-width: 80px; }
.page-input input[type="number"],
.page-input input[type="text"] {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-family: inherit;
  width: 80px;
}
.page-input input[type="text"] { width: 200px; }
.page-input input:focus { outline: 2px solid var(--primary); border-color: transparent; }

.add-more-btn {
  background: none;
  border: 1.5px dashed var(--dropzone-border);
  color: var(--secondary);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: .85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  margin-top: 10px;
  transition: background .15s;
  width: 100%;
}
.add-more-btn:hover { background: var(--dropzone-bg); }
