/* ==========================================================================
   PDFtoWord — Design tokens
   ========================================================================== */

:root {
  /* Color */
  --background: #FAFAF9;
  --surface: #FFFFFF;
  --surface-sunken: #F3F4F6;
  --text: #14181F;
  --text-muted: #5B6472;
  --border: #E4E7EC;
  --border-strong: #D0D5DD;

  --primary: #2954E5;
  --primary-hover: #1E3FC4;
  --primary-tint: #EEF2FF;

  --accent-pdf: #E5484D;
  --accent-pdf-tint: #FDECEC;

  --success: #16A34A;
  --success-tint: #EAF7EF;
  --danger: #DC2626;
  --danger-tint: #FDECEC;

  /* Type */
  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Layout */
  --max-width: 1160px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 31, 0.05);
  --shadow-md: 0 8px 24px -12px rgba(20, 24, 31, 0.16);
  --shadow-lg: 0 24px 48px -20px rgba(20, 24, 31, 0.22);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --background: #0F1115;
  --surface: #171A21;
  --surface-sunken: #1D2029;
  --text: #F1F3F5;
  --text-muted: #9AA2B1;
  --border: #2A2E38;
  --border-strong: #3A3F4C;

  --primary: #6C8CFF;
  --primary-hover: #86A0FF;
  --primary-tint: #1B2140;

  --accent-pdf: #F17075;
  --accent-pdf-tint: #34191C;

  --success: #3FCC7A;
  --success-tint: #12271B;
  --danger: #F3696B;
  --danger-tint: #2E1517;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px -12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 48px -20px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background 200ms var(--ease), color 200ms var(--ease);
}

h1, h2, h3 { font-family: var(--font-display); color: var(--text); margin: 0; line-height: 1.15; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
svg { display: block; }

img, svg { max-width: 100%; }

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top 150ms var(--ease);
  font-weight: 600;
  font-size: 14px;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

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

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--primary);
  text-transform: uppercase;
  margin: 0 0 12px;
  font-weight: 500;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: background 150ms var(--ease), border-color 150ms var(--ease), transform 150ms var(--ease), box-shadow 150ms var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

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

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { color: var(--text); }

.btn-large { padding: 14px 22px; font-size: 16px; }
.btn-small { padding: 8px 16px; font-size: 14px; }
.btn-full { width: 100%; }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--background) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.logo-accent { color: var(--primary); font-weight: 500; }

.main-nav { flex: 1; }
.main-nav ul { display: flex; gap: 28px; }
.main-nav a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 150ms var(--ease);
}
.main-nav a:hover { color: var(--text); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  transition: color 150ms var(--ease), border-color 150ms var(--ease);
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  padding: 0;
}
.mobile-menu-toggle span {
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 200ms var(--ease), opacity 200ms var(--ease);
}
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  border-top: 1px solid var(--border);
  padding: 16px 24px 24px;
}
.mobile-menu ul { display: flex; flex-direction: column; gap: 4px; }
.mobile-menu a {
  display: block;
  padding: 12px 4px;
  font-weight: 500;
  font-size: 16px;
  border-bottom: 1px solid var(--border);
}
.mobile-menu-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.mobile-menu-actions .btn { flex: 1; }

/* ==========================================================================
   Hero + Converter
   ========================================================================== */

.hero { padding: 64px 24px 96px; }

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(32px, 4vw, 46px);
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 46ch;
  margin-bottom: 24px;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}
.trust-strip li { position: relative; padding-left: 18px; }
.trust-strip li::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
}

/* Converter card */
.converter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tool-state { width: 100%; }

/* Dropzone */
.dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 40px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color 150ms var(--ease), background 150ms var(--ease);
}
.dropzone:hover { border-color: var(--primary); background: var(--primary-tint); }
.dropzone:focus-visible { border-color: var(--primary); background: var(--primary-tint); }
.dropzone.drag-active {
  border-color: var(--primary);
  background: var(--primary-tint);
  border-style: solid;
}
.dropzone.drag-invalid {
  border-color: var(--danger);
  background: var(--danger-tint);
}

.dropzone-icon { margin-bottom: 8px; }
.dropzone-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
}
.dropzone-or { color: var(--text-muted); font-size: 13px; margin: 2px 0; }
.dropzone-hint {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 10px;
}


b{
  color: #2954E5;
}

.tool-error {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--danger-tint);
  color: var(--danger);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
}

/* File selected card */
.file-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  animation: fileCardIn 220ms var(--ease);
}
@keyframes fileCardIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.file-card-icon { flex-shrink: 0; }
.file-card-meta { flex: 1; min-width: 0; }
.file-card-name {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-card-detail {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 3px;
}
.status-ready { color: var(--success); }

.file-card-remove {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  transition: color 150ms var(--ease), border-color 150ms var(--ease);
}
.file-card-remove:hover { color: var(--danger); border-color: var(--danger); }

/* Converting state */
.converting-visual { display: flex; justify-content: center; margin-bottom: 18px; }
.morph-page { animation: morphColor 1.8s ease-in-out infinite; }
@keyframes morphColor {
  0%, 100% { fill: var(--accent-pdf); }
  50% { fill: var(--primary); }
}
.converting-title {
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 18px;
}
.progress-track {
  height: 6px;
  background: var(--surface-sunken);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 400ms var(--ease);
}

/* Success state */
.success-icon { display: flex; justify-content: center; margin-bottom: 14px; }
.success-circle { transform-origin: center; animation: circleIn 400ms var(--ease); }
.success-check {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: checkIn 350ms var(--ease) 200ms forwards;
}
@keyframes circleIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
@keyframes checkIn { to { stroke-dashoffset: 0; } }

.success-title {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  margin-bottom: 6px;
}
.success-filename {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 22px;
}
.success-actions { display: flex; flex-direction: column; gap: 10px; }

/* Failed state */
.error-icon { display: flex; justify-content: center; margin-bottom: 14px; }
.error-title {
  text-align: center;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
}
.error-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

/* ==========================================================================
   How it works
   ========================================================================== */

.how-it-works { border-top: 1px solid var(--border); }
.how-it-works h2, .features h2, .pricing h2, .faq h2 {
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.01em;
  max-width: 22ch;
  margin-bottom: 44px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.step-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  display: block;
  margin-bottom: 14px;
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--text-muted); font-size: 15px; }

/* ==========================================================================
   Features
   ========================================================================== */

.features { background: var(--surface-sunken); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 32px;
}
.feature-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-tint);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}
.feature h3 { font-size: 16.5px; margin-bottom: 6px; }
.feature p { color: var(--text-muted); font-size: 14.5px; }

/* ==========================================================================
   Security
   ========================================================================== */

.security-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}
.security-list { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.security-list li {
  position: relative;
  padding-left: 24px;
  color: var(--text-muted);
  font-size: 15px;
}
.security-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--success);
}
.security-visual { display: flex; justify-content: center; }

/* ==========================================================================
   Pricing
   ========================================================================== */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 640px;
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
}
.price-card-featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}
.price-badge {
  position: absolute;
  top: -12px;
  left: 28px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}
.price-card h3 { font-size: 17px; margin-bottom: 10px; }
.price-amount {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 20px;
}
.price-amount span { font-size: 15px; font-weight: 500; color: var(--text-muted); }
.price-features { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.price-features li {
  font-size: 14.5px;
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
}
.price-features li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.faq-list { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 4px;
  background: transparent;
  border: none;
  text-align: left;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15.5px;
  color: var(--text);
}
.faq-caret { flex-shrink: 0; transition: transform 200ms var(--ease); color: var(--text-muted); }
.faq-question[aria-expanded="true"] .faq-caret { transform: rotate(180deg); }

.faq-answer {
  overflow: hidden;
  padding: 0 4px 20px;
}
.faq-answer p { color: var(--text-muted); font-size: 14.5px; max-width: 62ch; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { border-top: 1px solid var(--border); background: var(--surface-sunken); }
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 56px 24px 32px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand p { color: var(--text-muted); font-size: 14px; margin-top: 12px; max-width: 30ch; }
.footer-col h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 14px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14.5px; color: var(--text); }
.footer-col a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
}
.footer-bottom p { color: var(--text-muted); font-size: 13px; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { text-align: left; max-width: 640px; }
  .security-inner { grid-template-columns: 1fr; }
  .security-visual { order: -1; }
}

@media (max-width: 860px) {
  .main-nav, .header-actions .btn-ghost, .header-actions .btn-primary { display: none; }
  .mobile-menu-toggle { display: flex; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .section-inner { padding: 64px 20px; }
  .hero { padding: 40px 16px 64px; }
  .converter-card { padding: 20px; min-height: 0; }
  .dropzone { padding: 32px 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .trust-strip { gap: 8px 16px; }
  .header-inner { padding: 12px 16px; }
}
