/* ============================================
   TOKENS
============================================ */
:root {
  --bg: #0B0F1A;
  --bg-elevated: #131A2B;
  --bg-panel: #171F33;
  --border: #263252;
  --border-soft: #1D273F;
  --ink: #EEF1F8;
  --ink-dim: #9AA6C3;
  --ink-faint: #6B7597;
  --accent: #F0B429;
  --accent-ink: #1A1200;
  --accent-soft: rgba(240, 180, 41, 0.14);
  --blue: #5B8CFF;
  --success: #34D399;
  --success-soft: rgba(52, 211, 153, 0.12);
  --error: #FB7185;
  --error-soft: rgba(251, 113, 133, 0.12);
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;
  --font-display: "Outfit", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --shadow-panel: 0 20px 60px -20px rgba(0,0,0,0.6);
  --header-h: 72px;
}

[data-theme="light"] {
  --bg: #F7F7FB;
  --bg-elevated: #FFFFFF;
  --bg-panel: #FFFFFF;
  --border: #E4E6EF;
  --border-soft: #ECEEF5;
  --ink: #171B2B;
  --ink-dim: #565F7E;
  --ink-faint: #8A91AB;
  --accent: #C4870C;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(196, 135, 12, 0.1);
  --blue: #3B63D4;
  --success: #0F9D69;
  --success-soft: rgba(15, 157, 105, 0.09);
  --error: #D6355B;
  --error-soft: rgba(214, 53, 91, 0.08);
  --shadow-panel: 0 20px 50px -24px rgba(30, 34, 60, 0.25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .25s ease, color .25s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 999;
  background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.section-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section-inner.narrow { max-width: 780px; }
.eyebrow {
  display: inline-block; font-family: var(--font-display); font-size: 13px; font-weight: 600;
  color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px;
}
.eyebrow.center { display: block; text-align: center; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; margin-bottom: 12px; }
.section-title.center { text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; margin-bottom: 48px; }

/* ============================================
   HEADER
============================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.main-nav { display: none; }
.nav-list { list-style: none; display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; }
.nav-list > li > a, .nav-dropdown-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: var(--radius-s);
  font-size: 14.5px; font-weight: 500; color: var(--ink-dim);
  background: none; border: none; transition: background .15s, color .15s;
}
.nav-list > li > a:hover, .nav-dropdown-btn:hover { background: var(--bg-elevated); color: var(--ink); }

.has-dropdown { position: relative; }
.dropdown-panel {
  position: absolute; top: 100%; left: 0; margin-top: 8px;
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: var(--radius-m); box-shadow: var(--shadow-panel);
  padding: 10px; width: 300px; max-height: 60vh; overflow-y: auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.has-dropdown.open .dropdown-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-panel a { padding: 8px 10px; border-radius: 7px; font-size: 13px; color: var(--ink-dim); }
.dropdown-panel a:hover { background: var(--accent-soft); color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-elevated); color: var(--ink-dim); display: flex; align-items: center; justify-content: center;
  transition: color .15s, border-color .15s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }

.nav-toggle { width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-elevated); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.nav-toggle span { width: 16px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-nav {
  display: flex; flex-direction: column; max-height: 0; overflow: hidden;
  border-bottom: 1px solid var(--border-soft); background: var(--bg-elevated);
  transition: max-height .25s ease;
}
.mobile-nav.open { max-height: 620px; overflow-y: auto; }
.mobile-nav > a, .mobile-dropdown-btn {
  padding: 14px 24px; border-bottom: 1px solid var(--border-soft);
  font-size: 15px; font-weight: 500; text-align: left; background: none; border-left: none; border-right: none; border-top: none; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; width: 100%;
}
.mobile-dropdown-panel { max-height: 0; overflow: hidden; background: var(--bg); transition: max-height .2s ease; }
.mobile-dropdown-panel.open { max-height: 600px; overflow-y: auto; }
.mobile-dropdown-panel a { display: block; padding: 12px 24px 12px 36px; font-size: 14px; color: var(--ink-dim); border-bottom: 1px solid var(--border-soft); }

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

/* ============================================
   BREADCRUMB
============================================ */
.breadcrumb { max-width: 1180px; margin: 0 auto; padding: 18px 24px 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; font-size: 13px; color: var(--ink-faint); }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--ink-faint); }
.breadcrumb a { color: var(--ink-dim); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb li[aria-current="page"] { color: var(--ink); }

/* ============================================
   HERO
============================================ */
.hero { padding: 40px 0 80px; }
.hero-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1fr; gap: 44px; align-items: start;
}
.hero-copy h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 800; line-height: 1.08; margin-bottom: 18px; }
.hero-sub { font-size: 17px; color: var(--ink-dim); max-width: 46ch; margin-bottom: 24px; }
.hero-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hero-points li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink-dim); }
.hero-points svg { color: var(--success); flex-shrink: 0; }

/* Tool Card */
.tool-card {
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-l);
  padding: 26px; box-shadow: var(--shadow-panel);
}
.dropzone {
  border: 1.5px dashed var(--border); border-radius: var(--radius-m);
  padding: 30px 20px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
  min-height: 168px; display: flex; align-items: center; justify-content: center;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.drag-over { border-color: var(--accent); background: var(--accent-soft); }
.dz-content svg { color: var(--ink-faint); margin: 0 auto 12px; }
.dz-content p { font-size: 14.5px; color: var(--ink-dim); margin-bottom: 6px; }
.dz-content strong { color: var(--ink); }
.dz-hint { font-size: 12.5px; color: var(--ink-faint); }

.dz-file { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.dz-file svg { color: var(--accent); flex-shrink: 0; }
.dz-file-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dz-file-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-file-size { font-size: 12.5px; color: var(--ink-faint); }
.dz-remove { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--ink-dim); font-size: 18px; line-height: 1; flex-shrink: 0; }
.dz-remove:hover { color: var(--error); border-color: var(--error); }

.field { margin-top: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-dim); margin-bottom: 8px; }
.password-input { position: relative; }
.password-input input {
  width: 100%; padding: 13px 44px 13px 15px; border-radius: var(--radius-s); border: 1px solid var(--border);
  background: var(--bg-elevated); color: var(--ink); font-size: 15px; transition: border-color .15s;
}
.password-input input:focus { border-color: var(--accent); }
.password-input input.invalid { border-color: var(--error); }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 7px; border: none; background: none; color: var(--ink-faint); display: flex; align-items: center; justify-content: center; }
.pw-toggle:hover { color: var(--ink); }

.field-error { color: var(--error); font-size: 13px; margin-top: 8px; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: var(--accent-ink); border: none; border-radius: var(--radius-s);
  padding: 13px 22px; font-weight: 700; font-size: 15px; transition: transform .12s, box-shadow .12s, opacity .12s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px -8px var(--accent); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-submit { width: 100%; margin-top: 22px; position: relative; }
.btn-spinner { display: none; width: 16px; height: 16px; border: 2px solid var(--accent-ink); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn-submit.loading .btn-label { opacity: 0.7; }
.btn-submit.loading .btn-spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--bg-elevated); color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius-s);
  padding: 13px 22px; font-weight: 600; font-size: 15px; transition: border-color .15s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost {
  background: none; border: 1px solid transparent; color: var(--ink-dim); border-radius: var(--radius-s);
  padding: 13px 18px; font-weight: 600; font-size: 15px;
}
.btn-ghost:hover { color: var(--ink); text-decoration: underline; }

.tool-note { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-faint); margin-top: 16px; }
.tool-note svg { flex-shrink: 0; color: var(--ink-faint); }

.progress-panel { margin-top: 20px; }
.progress-track { height: 6px; border-radius: 4px; background: var(--border-soft); overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--blue)); border-radius: 4px; transition: width .3s ease; }
.progress-label { font-size: 13px; color: var(--ink-dim); margin-top: 10px; text-align: center; }

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.05fr 0.95fr; gap: 60px; }
}

/* ============================================
   RESULTS
============================================ */
.results-section { padding: 0 0 70px; scroll-margin-top: 90px; }
.results-inner { max-width: 640px; margin: 0 auto; padding: 0 24px; }
.result-state {
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-l);
  padding: 40px 30px; text-align: center; box-shadow: var(--shadow-panel);
}
.result-icon { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.result-icon.success { background: var(--success-soft); color: var(--success); }
.result-icon.error { background: var(--error-soft); color: var(--error); }
.result-state h2 { font-size: 1.5rem; margin-bottom: 8px; }
.result-state p { color: var(--ink-dim); font-size: 14.5px; margin-bottom: 26px; }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.copy-toast { margin-top: 14px; font-size: 13px; color: var(--success); margin-bottom: 0; }

/* ============================================
   TOOLS STRIP
============================================ */
.tools-strip { padding: 50px 0; border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); background: var(--bg-elevated); }
.strip-inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.strip-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--ink-dim); margin-bottom: 18px; }
.strip-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.strip-scroll a {
  flex-shrink: 0; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-panel); font-size: 13.5px; color: var(--ink-dim); white-space: nowrap; transition: border-color .15s, color .15s;
}
.strip-scroll a:hover { border-color: var(--accent); color: var(--accent); }

/* ============================================
   FEATURES
============================================ */
.features { padding: 90px 0; }
.features-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.feature-card { background: var(--bg-elevated); border: 1px solid var(--border-soft); border-radius: var(--radius-m); padding: 26px; }
.feature-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--ink-dim); }
@media (min-width: 700px) { .features-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1050px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }

/* ============================================
   HOW IT WORKS
============================================ */
.how-it-works { padding: 0 0 90px; }
.steps { display: grid; grid-template-columns: 1fr; gap: 20px; }
.step { position: relative; padding: 30px 24px; border: 1px solid var(--border-soft); border-radius: var(--radius-m); background: var(--bg-elevated); }
.step-index { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: 0.08em; }
.step h3 { font-size: 17px; margin: 10px 0 8px; }
.step p { font-size: 14px; color: var(--ink-dim); }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* ============================================
   ARTICLE
============================================ */
.article { padding: 0 0 90px; }
.article p { color: var(--ink-dim); font-size: 15.5px; margin-bottom: 18px; }
.article strong { color: var(--ink); font-weight: 600; }

/* ============================================
   FAQ
============================================ */
.faq { padding: 0 0 90px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--border-soft); border-radius: var(--radius-m); background: var(--bg-elevated); padding: 6px 22px; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 16px 0; font-weight: 600; font-size: 15px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-plus { flex-shrink: 0; width: 20px; height: 20px; position: relative; }
.faq-plus::before, .faq-plus::after { content: ""; position: absolute; background: var(--ink-dim); border-radius: 2px; top: 50%; left: 50%; }
.faq-plus::before { width: 12px; height: 2px; transform: translate(-50%, -50%); }
.faq-plus::after { width: 2px; height: 12px; transform: translate(-50%, -50%); transition: transform .15s; }
.faq-item[open] .faq-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item p { padding-bottom: 18px; color: var(--ink-dim); font-size: 14.5px; }

/* ============================================
   CTA
============================================ */
.cta { padding: 0 24px 90px; }
.cta-inner {
  max-width: 1180px; margin: 0 auto; background: linear-gradient(135deg, var(--bg-panel), var(--bg-elevated));
  border: 1px solid var(--border); border-radius: var(--radius-l); padding: 56px 30px; text-align: center;
}
.cta h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 12px; }
.cta p { color: var(--ink-dim); max-width: 46ch; margin: 0 auto 26px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ============================================
   FOOTER
============================================ */
.site-footer { border-top: 1px solid var(--border-soft); background: var(--bg-elevated); padding: 60px 24px 0; }
.footer-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 34px; padding-bottom: 40px; }
.footer-col h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 14px; color: var(--ink-dim); padding: 6px 0; }
.footer-col a:hover { color: var(--accent); }
.footer-brand p { font-size: 13.5px; color: var(--ink-faint); margin-top: 10px; max-width: 32ch; }
.footer-bottom { max-width: 1180px; margin: 0 auto; border-top: 1px solid var(--border-soft); padding: 22px 0 30px; display: flex; flex-direction: column; gap: 8px; }
.footer-bottom p { font-size: 12.5px; color: var(--ink-faint); }
.disclaimer { max-width: 80ch; }

@media (min-width: 640px) { .footer-inner { grid-template-columns: 1.2fr 1fr 1fr; } }
@media (min-width: 900px) { .footer-inner { grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; } }

/* ============================================
   COOKIE BANNER
============================================ */
.cookie-banner {
  position: fixed; bottom: 16px; left: 16px; right: 16px; z-index: 200;
  max-width: 480px; margin: 0 auto;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius-m);
  padding: 20px; box-shadow: var(--shadow-panel);
  display: flex; flex-direction: column; gap: 14px;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { font-size: 13.5px; color: var(--ink-dim); }
.cookie-banner a { color: var(--accent); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; justify-content: flex-end; }
.cookie-actions .btn-primary, .cookie-actions .btn-ghost { padding: 10px 18px; font-size: 13.5px; }

/* ============================================
   RESPONSIVE SAFETY
============================================ */
html, body { max-width: 100%; overflow-x: hidden; }