/* ===========================
   word2pdf.win — Minimalist Redesign
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg:         #fafaf9;
  --bg2:        #f3f2f0;
  --surface:    #ffffff;
  --border:     #e5e3df;
  --border-strong: #c9c5be;
  --text:       #18181b;
  --text-2:     #52525b;
  --muted:      #a1a1aa;
  --accent:     #e84b1a;
  --brand:      #e84b1a;
  --accent-dim: rgba(232, 75, 26, 0.08);
  --accent-mid: rgba(232, 75, 26, 0.18);
  --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow:     0 4px 16px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.04);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.05);
  --radius-sm:  6px;
  --radius:     12px;
  --radius-lg:  18px;
  --font-head:  'Instrument Serif', Georgia, serif;
  --font-body:  'DM Sans', -apple-system, sans-serif;
  --ease:       cubic-bezier(.25, .46, .45, .94);
  --transition: .22s var(--ease);
}

[data-theme="dark"] {
  --bg:         #0f0f0f;
  --bg2:        #161616;
  --surface:    #1c1c1c;
  --border:     #2a2a2a;
  --border-strong: #3f3f3f;
  --text:       #fafafa;
  --text-2:     #a8a8a8;
  --muted:      #5a5a5a;
  --accent:     #f05a2a;
  --brand:      #f05a2a;
  --accent-dim: rgba(240, 90, 42, 0.1);
  --accent-mid: rgba(240, 90, 42, 0.2);
  --shadow-sm:  0 1px 3px rgba(0,0,0,.3);
  --shadow:     0 4px 20px rgba(0,0,0,.4);
  --shadow-lg:  0 12px 48px rgba(0,0,0,.5);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background var(--transition), color var(--transition);
  min-height: 100vh;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── Navigation ─── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border), 0 2px 12px rgba(0,0,0,.04);
  transition: background var(--transition), border-color var(--transition);
}

[data-theme="dark"] nav {
  background: rgba(15,15,15,0.85);
}

.nav-inner {
  max-width: 1160px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 64px;
}

.logo {
  font-family: var(--font-body);
  font-size: 1rem; font-weight: 600;
  color: var(--text); text-decoration: none;
  display: flex; align-items: center; gap: 10px;
  letter-spacing: -.02em;
}

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

.logo-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  /* Remove flat bg — SVG carries its own gradient */
  background: none;
}

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

.nav-links a {
  font-size: .825rem; font-weight: 500;
  color: var(--text-2); text-decoration: none;
  transition: color var(--transition);
  letter-spacing: -.005em;
}

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

.nav-right { display: flex; align-items: center; gap: 10px; }

/* ─── Theme Toggle ─── */
.theme-toggle {
  width: 72px; height: 34px;
  background: var(--bg2);
  border: 1.5px solid var(--border-strong);
  border-radius: 34px;
  cursor: pointer; position: relative;
  transition: background var(--transition), border-color var(--transition);
  flex-shrink: 0;
  display: flex; align-items: center;
  padding: 0 6px;
  justify-content: space-between;
}

.theme-toggle::after {
  content: '';
  position: absolute; top: 4px; left: 4px;
  width: 24px; height: 24px;
  background: var(--surface);
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
  z-index: 1;
}

[data-theme="dark"] .theme-toggle {
  background: #1e2a3a;
  border-color: #2d3f55;
}
[data-theme="dark"] .theme-toggle::after {
  transform: translateX(36px);
  background: #2a3f5a;
}

.theme-icon {
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  position: relative; z-index: 0;
  pointer-events: none;
  color: var(--muted);
  flex-shrink: 0;
}

.theme-icon svg { width: 13px; height: 13px; }

[data-theme="dark"] .theme-icon.moon { color: #7ab3e8; }
[data-theme="light"] .theme-icon.sun { color: #e8a020; }

/* ─── Hero ─── */
.hero {
  max-width: 1160px; margin: 0 auto;
  padding: 88px 28px 72px;
  display: flex; flex-direction: column; align-items: center;
  gap: 48px; text-align: center;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent-mid);
  padding: 4px 12px; border-radius: 100px;
  font-size: .72rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; margin-bottom: 22px;
}

.hero-badge::before { content: ''; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; }

h1 {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  font-weight: 400; line-height: 1.1;
  letter-spacing: -.01em;
  margin-bottom: 20px;
  color: var(--text);
}

h1 em {
  font-style: italic;
  color: var(--accent);
}

h1 .highlight {
  color: var(--accent);
  position: relative; display: inline-block;
}

h1 .highlight::after {
  content: '';
  position: absolute; bottom: -2px; left: 0; right: 0;
  height: 2px; background: var(--accent);
  border-radius: 2px; opacity: .25;
}

.hero-desc {
  font-size: 1rem;
  color: var(--text-2);
  margin-bottom: 36px;
  max-width: 480px;
  margin-left: auto; margin-right: auto;
  line-height: 1.7;
  font-weight: 400;
}

.hero-stats {
  display: flex; gap: 0;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  justify-content: center;
}

.stat {
  text-align: center;
  padding: 0 32px;
  border-right: 1px solid var(--border);
}

.stat:last-child {
  border-right: none;
}

/* ─── Upload Area — centered ─── */
.upload-area {
  width: 100%;
  max-width: 520px;
}
.stat-num {
  font-family: var(--font-head);
  font-size: 1.7rem; font-weight: 400; color: var(--text);
  line-height: 1;
  letter-spacing: -.02em;
}
.stat-label { font-size: .775rem; color: var(--muted); margin-top: 3px; font-weight: 500; letter-spacing: .01em; }

/* ─── Upload Card ─── */
.upload-card {
  background: var(--surface);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 52px 36px;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}

.upload-card:hover, .upload-card.drag-over {
  border-color: var(--accent);
  border-style: solid;
  background: var(--accent-dim);
  box-shadow: var(--shadow), 0 0 0 4px var(--accent-dim);
}

.upload-icon {
  width: 80px; height: 80px; margin: 0 auto 20px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  border: none;
  background: none;
}

.upload-card:hover .upload-icon svg circle { fill: var(--accent); }
.upload-card:hover .upload-icon {
  background: none;
  border-color: transparent;
}

.upload-title {
  font-family: var(--font-body);
  font-size: 1.05rem; font-weight: 600; margin-bottom: 6px;
  color: var(--text);
  letter-spacing: -.015em;
}

.upload-sub { font-size: .825rem; color: var(--muted); margin-bottom: 22px; }

.upload-btn {
  display: inline-block;
  background: var(--accent); color: white;
  padding: 10px 24px; border-radius: var(--radius-sm);
  font-weight: 500; font-size: .875rem;
  cursor: pointer; border: none;
  font-family: var(--font-body);
  letter-spacing: -.01em;
  transition: opacity var(--transition), transform var(--transition);
}

.upload-btn:hover {
  opacity: .87;
  transform: translateY(-1px);
}

.file-types { font-size: .72rem; color: var(--muted); margin-top: 14px; letter-spacing: .02em; }

/* ─── Progress & Result ─── */
#progress-section, #result-section { display: none; }
#progress-section.active, #result-section.active { display: block; }

.progress-wrap {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 36px; box-shadow: var(--shadow);
  text-align: center; border: 1px solid var(--border);
}

.progress-bar-bg {
  background: var(--bg2); border-radius: 100px;
  height: 5px; margin: 20px 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%; background: var(--accent);
  border-radius: 100px; width: 0%;
  transition: width .5s var(--ease);
  position: relative;
}

.progress-bar::after {
  content: '';
  position: absolute; right: 0; top: 0;
  width: 24px; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5));
  animation: shimmer 1.2s ease infinite;
}

@keyframes shimmer {
  0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; }
}

.result-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 36px; box-shadow: var(--shadow);
  text-align: center; border: 1px solid var(--border);
}

.result-icon {
  width: 60px; height: 60px; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  background: none;
}

.download-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: white;
  padding: 13px 32px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 1rem;
  font-family: var(--font-body);
  text-decoration: none; border: none; cursor: pointer;
  letter-spacing: -.015em;
  margin-top: 20px;
  box-shadow: 0 4px 14px rgba(232,75,26,.35);
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
}

.download-btn:hover {
  opacity: .9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232,75,26,.45);
}

.convert-another {
  display: inline-block; margin-top: 14px;
  color: var(--muted); font-size: .825rem;
  cursor: pointer; text-decoration: none;
  background: none; border: none;
  font-family: var(--font-body);
  transition: color var(--transition);
}
.convert-another:hover { color: var(--text); }

/* ─── Ad Zones ─── */
.ad-zone {
  background: var(--bg2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: .7rem;
  text-transform: uppercase; letter-spacing: .1em;
  margin: 28px auto;
}

.ad-zone.banner { max-width: 1160px; height: 80px; padding: 0 28px; }
.ad-zone.rectangle { width: 300px; height: 250px; }

/* ─── Sections ─── */
.section {
  max-width: 1160px; margin: 0 auto;
  padding: 72px 28px;
}

.section-label {
  font-size: .72rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.9rem, 3.2vw, 2.8rem);
  font-weight: 400; margin-bottom: 14px;
  letter-spacing: -.01em;
  line-height: 1.15;
}

.section-sub { font-size: .975rem; color: var(--text-2); max-width: 500px; line-height: 1.7; }

/* ─── Features Grid ─── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px; margin-top: 48px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.feature-card:hover {
  border-color: var(--accent-mid);
  box-shadow: var(--shadow), 0 0 0 1px var(--accent-mid);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px; height: 48px;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
  border: 1px solid var(--accent-mid);
  transition: background var(--transition), transform var(--transition);
}

.feature-card:hover .feature-icon {
  background: var(--accent);
  color: white;
  transform: scale(1.06);
}

.feature-title {
  font-family: var(--font-body);
  font-size: 1rem; font-weight: 600; margin-bottom: 8px;
  letter-spacing: -.015em;
}

.feature-desc { font-size: .85rem; color: var(--text-2); line-height: 1.65; }

/* ─── How It Works ─── */
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2px; margin-top: 48px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.step {
  text-align: left; position: relative;
  background: var(--surface);
  padding: 32px 28px;
  transition: background var(--transition);
}

.step:hover { background: var(--bg2); }

.step-num {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-dim);
  border: 1px solid var(--accent-mid);
  border-radius: 50%;
  font-family: var(--font-body);
  font-size: .8rem; font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 0;
}

.step-title {
  font-family: var(--font-body);
  font-weight: 600; font-size: 1rem;
  margin-bottom: 8px;
  letter-spacing: -.01em;
}

.step-desc { font-size: .85rem; color: var(--text-2); line-height: 1.65; }

/* ─── FAQ ─── */
.faq { margin-top: 48px; display: flex; flex-direction: column; }

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

.faq-item:first-child { border-top: 1px solid var(--border); }

.faq-q {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 0; cursor: pointer;
  font-weight: 500; font-size: .9rem;
  gap: 16px;
  transition: color var(--transition);
}

.faq-item.open .faq-q { color: var(--accent); }

.faq-chevron {
  flex-shrink: 0;
  color: var(--muted);
  font-size: .65rem;
  transition: transform var(--transition), color var(--transition);
  line-height: 1;
}

.faq-item.open .faq-chevron { transform: rotate(180deg); color: var(--accent); }

.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height .4s var(--ease);
  font-size: .875rem; color: var(--text-2); line-height: 1.75;
}

.faq-item.open .faq-a { max-height: 240px; }
.faq-a-inner { padding: 0 0 20px; }

/* ─── CTA Banner ─── */
.cta-banner {
  background: var(--text);
  color: white; text-align: center;
  padding: 80px 28px;
}

[data-theme="dark"] .cta-banner { background: var(--surface); border-top: 1px solid var(--border); }

.cta-banner h2 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 400; margin-bottom: 14px;
  letter-spacing: -.01em;
}

.cta-banner p { opacity: .65; font-size: 1rem; margin-bottom: 36px; }

.cta-btn-white {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: white;
  padding: 13px 32px; border-radius: var(--radius-sm);
  font-weight: 500; font-size: .95rem;
  font-family: var(--font-body);
  text-decoration: none; cursor: pointer;
  border: none; letter-spacing: -.01em;
  transition: opacity var(--transition), transform var(--transition);
}

.cta-btn-white:hover { opacity: .85; transform: translateY(-1px); }

/* ─── Footer ─── */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 56px 28px 28px;
}

.footer-inner {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: .825rem; color: var(--muted);
  margin-top: 12px; max-width: 240px;
  line-height: 1.7;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-weight: 600; font-size: .75rem;
  letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 16px;
}

.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.footer-col a {
  font-size: .825rem; color: var(--text-2);
  text-decoration: none;
  transition: color var(--transition);
}

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

.footer-bottom {
  max-width: 1160px; margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: .775rem; color: var(--muted);
  flex-wrap: wrap; gap: 10px;
}

/* ─── Inner Pages ─── */
.page-hero {
  border-bottom: 1px solid var(--border);
  padding: 72px 28px;
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  margin-bottom: 14px;
}

.page-hero p { color: var(--text-2); font-size: 1rem; }

.page-content {
  max-width: 720px; margin: 72px auto;
  padding: 0 28px;
}

.page-content h2 {
  font-family: var(--font-head);
  font-size: 1.5rem; font-weight: 400;
  margin: 44px 0 14px;
  color: var(--text);
  letter-spacing: -.01em;
}

.page-content h2:first-child { margin-top: 0; }

.page-content p {
  color: var(--text-2); font-size: .9rem;
  line-height: 1.8; margin-bottom: 16px;
}

.page-content ul {
  color: var(--text-2); font-size: .9rem;
  line-height: 1.8; margin-bottom: 16px;
  padding-left: 18px;
}

.page-content ul li { margin-bottom: 8px; }

/* ─── Contact ─── */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 56px; align-items: start;
}

.contact-info { display: flex; flex-direction: column; gap: 20px; }

.contact-item {
  display: flex; gap: 14px; align-items: flex-start;
}

.contact-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--bg2);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  border: 1px solid var(--border);
}

.contact-item h4 { font-weight: 600; margin-bottom: 3px; font-size: .9rem; }
.contact-item p { font-size: .825rem; color: var(--text-2); }

.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

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

.form-group label {
  display: block; font-size: .8rem; font-weight: 600;
  margin-bottom: 7px; color: var(--text);
  letter-spacing: -.005em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: .875rem;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group textarea { resize: vertical; min-height: 110px; }

.form-submit {
  width: 100%; padding: 12px;
  background: var(--accent); color: white;
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 500; font-size: .925rem;
  cursor: pointer; letter-spacing: -.01em;
  transition: opacity var(--transition), transform var(--transition);
}

.form-submit:hover { opacity: .85; transform: translateY(-1px); }

.success-msg {
  background: #f0fdf4; color: #15803d;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm); padding: 11px 14px;
  font-size: .825rem; margin-top: 12px; display: none;
}

/* ─── Utilities ─── */
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.divider {
  height: 1px; background: var(--border);
  max-width: 1160px; margin: 0 auto;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero-stats { gap: 24px; }
  .footer-inner { grid-template-columns: 1fr; }
  .page-hero { padding: 48px 20px; }
  .hero { padding: 48px 20px; }
  .section { padding: 48px 20px; }
  .cta-banner { padding: 56px 20px; }
  .steps { grid-template-columns: 1fr; }
  .upload-area { max-width: 100%; }
}

/* ─── Animations ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.fade-up { animation: fadeUp .55s var(--ease) both; }
.fade-up-1 { animation-delay: .06s; }
.fade-up-2 { animation-delay: .14s; }
.fade-up-3 { animation-delay: .22s; }
.fade-up-4 { animation-delay: .30s; }

/* ─── File Input Hidden ─── */
#file-input { display: none; }
