/* ConvertSamurai â€” Production stylesheet */

:root {
  --red: #E63946;
  --red-dark: #9B1C2A;
  --red-soft: #FEE2E2;
  --ink: #0F0F0F;
  --ink-soft: #1F1F1F;
  --paper: #FAFAF7;
  --paper-warm: #F5F1E8;
  --line: #E5E1D8;
  --muted: #6B6B6B;
  --muted-light: #9CA3AF;
  --success: #10B981;
  --shadow-sm: 0 1px 2px rgba(15,15,15,0.04), 0 1px 3px rgba(15,15,15,0.06);
  --shadow-md: 0 4px 6px rgba(15,15,15,0.04), 0 10px 15px rgba(15,15,15,0.08);
  --shadow-lg: 0 20px 25px rgba(15,15,15,0.08), 0 10px 10px rgba(15,15,15,0.04);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --container: 1200px;
  --font-display: 'Playfair Display', 'Times New Roman', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle paper texture background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 25% 10%, rgba(230,57,70,0.04) 0%, transparent 40%),
    radial-gradient(circle at 75% 80%, rgba(155,28,42,0.03) 0%, transparent 40%);
  pointer-events: none;
  z-index: -1;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { color: #2a2a2a; }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,250,247,0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 24px;
}

.logo-link { display: flex; align-items: center; }
.logo-link img { height: 40px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

.nav-links a:hover { color: var(--red); }

.nav-cta {
  background: var(--ink);
  color: var(--paper) !important;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s ease;
}
.nav-cta:hover { background: var(--red); color: var(--paper) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: transform 0.2s ease;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--paper);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }
  .nav-links.is-open { display: flex; }
  .nav-toggle { display: block; }
}

/* Hero */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--red-soft);
  color: var(--red-dark);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}
.hero-badge::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  margin-bottom: 20px;
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
}
.hero h1 em {
  color: var(--red);
  font-style: italic;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 40px;
}

/* Conversion direction selector */
/* Unified converter card â€” format selector + dropzone as one cohesive unit */
[data-converter] {
  max-width: 640px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: visible;
}

.format-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-warm);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  flex-wrap: wrap;
}

.format-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: default;
  transition: border-color 0.15s ease;
  color: var(--ink);
  position: relative;
}
.format-pill[data-dropdown] { cursor: pointer; }
.format-pill[data-dropdown]:hover { border-color: var(--red); }
.format-pill .label { color: var(--muted); font-weight: 500; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; }
.format-pill .value { color: var(--red); font-weight: 700; font-size: 0.95rem; }
.format-arrow { color: var(--muted-light); font-size: 1.1rem; line-height: 1; }

.format-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 50;
  min-width: 260px;
}
.format-dropdown.is-open { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.format-dropdown a {
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-weight: 500;
  font-size: 0.85rem;
  text-align: center;
  transition: background 0.12s ease;
}
.format-dropdown a:hover { background: var(--paper-warm); color: var(--red); }

/* Drop zone â€” sits flush inside the converter card, no jarring border */
.drop-zone {
  margin: 0;
  border: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 36px 32px 32px;
  background: var(--paper);
  text-align: center;
  transition: background 0.2s ease;
  cursor: pointer;
  position: relative;
}
.drop-zone:hover, .drop-zone.is-drag {
  background: var(--red-soft);
}
.drop-zone.is-drag {
  outline: 2px dashed var(--red);
  outline-offset: -10px;
}
.drop-zone-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 14px;
  background: var(--paper-warm);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
}
.drop-zone-cta {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 8px;
  transition: background 0.15s ease;
}
.drop-zone:hover .drop-zone-cta { background: var(--red); }
.drop-zone-hint { color: var(--muted); font-size: 0.85rem; }
.drop-zone input[type=file] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* File queue */
.queue {
  max-width: 720px;
  margin: 32px auto 0;
}
.queue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.queue-header h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; }
.btn {
  background: var(--red);
  color: var(--paper);
  border: 0;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s ease;
}
.btn:hover { background: var(--red-dark); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background: var(--ink); }
.btn-secondary:hover { background: var(--ink-soft); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--paper-warm); color: var(--red); border-color: var(--red); }

.file-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
}
.file-thumb {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  background: var(--paper-warm);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.75rem; color: var(--muted);
  overflow: hidden;
  flex-shrink: 0;
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-meta { flex: 1; min-width: 0; }
.file-name {
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-size { color: var(--muted); font-size: 0.85rem; }
.file-status { font-size: 0.85rem; font-weight: 600; flex-shrink: 0; }
.file-status.pending { color: var(--muted); }
.file-status.processing { color: #D97706; }
.file-status.done { color: var(--success); }
.file-status.error { color: var(--red); }
.file-action {
  background: var(--paper-warm);
  color: var(--ink);
  border: 0;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  flex-shrink: 0;
}
.file-action:hover { background: var(--ink); color: var(--paper); }

.queue-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Sections */
section { padding: 80px 0; }

.section-head { text-align: center; margin-bottom: 56px; }
.section-head h2 { margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 1.1rem; max-width: 640px; margin: 0 auto; }
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--red);
  opacity: 0.18;
  position: absolute;
  top: 16px;
  right: 24px;
  line-height: 1;
}
.step-icon {
  width: 48px; height: 48px;
  background: var(--red-soft);
  color: var(--red);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.step h3 { margin-bottom: 8px; font-size: 1.2rem; }
.step p { color: var(--muted); font-size: 0.95rem; }

/* Format grid */
.formats-section { background: var(--paper-warm); }
.format-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.format-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  display: block;
  color: var(--ink);
  transition: all 0.18s ease;
}
.format-card:hover {
  border-color: var(--red);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}
.format-card-tag {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.format-card h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
.format-card p { color: var(--muted); font-size: 0.9rem; }

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}
.feature h3 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature p { color: var(--muted); }
.feature-icon {
  width: 44px; height: 44px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}

/* FAQ */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  padding: 0;
}
.faq-q::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--red);
  transition: transform 0.2s ease;
}
.faq-q.is-open::after { transform: rotate(45deg); }
.faq-a {
  display: none;
  padding-top: 14px;
  color: var(--muted);
  line-height: 1.7;
}
.faq-a.is-open { display: block; }

/* Ad slot */
.ad-slot {
  margin: 48px auto;
  max-width: 728px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-warm);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted-light);
  font-size: 0.85rem;
  text-align: center;
  padding: 16px;
}
.ad-slot small { color: var(--muted-light); }

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 64px 0 32px;
  margin-top: 80px;
}
.site-footer h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper);
  margin-bottom: 16px;
  opacity: 0.9;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
.footer-brand img { height: 40px; filter: brightness(0) invert(1); margin-bottom: 16px; }
.footer-brand p { color: rgba(250,250,247,0.65); font-size: 0.92rem; max-width: 260px; }
.footer-list { list-style: none; }
.footer-list li { margin-bottom: 10px; }
.footer-list a {
  color: rgba(250,250,247,0.7);
  font-size: 0.92rem;
  transition: color 0.15s ease;
}
.footer-list a:hover { color: var(--red); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(250,250,247,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
  color: rgba(250,250,247,0.5);
}
.footer-bottom a { color: rgba(250,250,247,0.7); }
.footer-bottom a:hover { color: var(--red); }

/* Article (legal pages) */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 0;
}
.article h1 { margin-bottom: 16px; }
.article .article-meta { color: var(--muted); margin-bottom: 40px; font-size: 0.95rem; }
.article h2 { margin: 40px 0 16px; font-size: 1.6rem; }
.article h3 { margin: 28px 0 12px; font-size: 1.2rem; font-family: var(--font-body); }
.article p { margin-bottom: 16px; color: #2a2a2a; }
.article ul, .article ol { margin: 0 0 16px 24px; }
.article li { margin-bottom: 8px; color: #2a2a2a; }
.article strong { font-weight: 700; color: var(--ink); }

/* Forms */
.form-row { margin-bottom: 20px; }
.form-row label { display: block; font-weight: 500; margin-bottom: 6px; font-size: 0.92rem; }
.form-row input, .form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--paper);
  transition: border-color 0.15s ease;
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--red);
}
.form-row textarea { resize: vertical; min-height: 140px; }

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 24px;
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--red); }
.breadcrumbs .sep { margin: 0 8px; color: var(--muted-light); }

/* Notice */
.notice {
  background: var(--red-soft);
  border-left: 3px solid var(--red);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--red-dark);
  margin: 16px 0;
}

/* Utilities */
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.hidden { display: none !important; }

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.5s ease both; }
.fade-up:nth-child(2) { animation-delay: 0.08s; }
.fade-up:nth-child(3) { animation-delay: 0.16s; }
.fade-up:nth-child(4) { animation-delay: 0.24s; }

/* Mobile */
@media (max-width: 640px) {
  section { padding: 56px 0; }
  .hero { padding: 56px 0 40px; }
  .drop-zone { padding: 40px 20px; }
  .file-row { flex-wrap: wrap; }
  .footer-bottom { justify-content: center; text-align: center; }
}
