/* ============================================================
   PDFForge - Design System
   Modern, fast, accessible. CWV-optimized (no layout shift).
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f9fdf4;
  --bg-elev: #ffffff;
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-mute: #64748b;
  --line: #e6efe0;
  --line-strong: #d4e4c8;

  --brand: #84cc16;          /* lime */
  --brand-ink: #4d7c0f;
  --brand-soft: #f7fee7;
  --accent: #65a30d;         /* deep lime */
  --accent-soft: #ecfccb;
  --ok: #15a36a;
  --warn: #d97706;

  --grad: linear-gradient(135deg, #bef264 0%, #a3e635 45%, #84cc16 100%);
  --grad-cool: linear-gradient(135deg, #a3e635 0%, #65a30d 100%);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .18);
  --shadow-lg: 0 24px 60px -18px rgba(15, 23, 42, .28);

  --maxw: 1160px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --bg-soft: #0f152a;
    --bg-elev: #131a31;
    --ink: #eef1f8;
    --ink-soft: #c2c9da;
    --ink-mute: #8e98b1;
    --line: #232c47;
    --line-strong: #2c3658;
    --brand-soft: #1a260c;
    --accent-soft: #1a260c;
    --shadow: 0 10px 30px -12px rgba(0,0,0,.5);
    --shadow-lg: 0 24px 60px -18px rgba(0,0,0,.6);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1rem; color: var(--ink-soft); }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.muted { color: var(--ink-mute); }
.center { text-align: center; }
.eyebrow {
  display: inline-block; font-weight: 700; font-size: .8rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand); background: var(--brand-soft);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 14px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 18px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px; background: var(--grad);
  display: grid; place-items: center; color: #fff; font-weight: 900; font-size: .8rem;
  box-shadow: var(--shadow-sm);
}
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-links a { color: var(--ink-soft); font-weight: 600; font-size: .94rem; padding: 8px 12px; border-radius: 9px; }
.nav-links a:hover { color: var(--ink); background: var(--bg-soft); text-decoration: none; }
.nav-spacer { flex: 1; }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; cursor: pointer; color: var(--ink); }

/* dropdown */
.has-drop { position: relative; }
.has-drop > a::after { content: "\25BE"; font-size: .7em; margin-left: 5px; color: var(--ink-mute); }
.drop {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 520px;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 14px; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: .16s ease; display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
}
.has-drop:hover .drop, .has-drop:focus-within .drop { opacity: 1; visibility: visible; transform: translateY(0); }
.drop a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 9px; color: var(--ink-soft); font-weight: 600; font-size: .9rem; }
.drop a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.drop .ico { width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: .85rem; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: .95rem; padding: 11px 18px; border-radius: 11px;
  border: 1px solid transparent; cursor: pointer; transition: .15s ease; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-ink); color: #fff; }
.btn-ghost { background: var(--bg-soft); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-elev); border-color: var(--line-strong); color: var(--ink); }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; border-radius: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(700px 360px at 12% -8%, rgba(132,204,22,.16), transparent 60%),
    radial-gradient(680px 340px at 92% 0%, rgba(190,242,100,.16), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 38ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 18px; }
.trust { display: flex; gap: 20px; flex-wrap: wrap; color: var(--ink-mute); font-size: .9rem; font-weight: 600; }
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust .dot { color: var(--ok); }

/* ---------- Dropzone / Tool ---------- */
.tool-card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 22px;
}
.dropzone {
  border: 2px dashed var(--line-strong); border-radius: var(--radius);
  background: var(--bg-soft); padding: 40px 22px; text-align: center; cursor: pointer;
  transition: .18s ease;
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone .dz-ico {
  width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 16px; background: var(--grad);
  display: grid; place-items: center; color: #fff; font-size: 1.6rem; box-shadow: var(--shadow);
}
.dropzone h3 { margin-bottom: 4px; }
.dropzone .hint { color: var(--ink-mute); font-size: .9rem; margin: 0; }
.dz-formats { margin-top: 12px; font-size: .8rem; color: var(--ink-mute); }

.file-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.file-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.file-row .fi { width: 34px; height: 34px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: .7rem; flex: none; }
.file-row .meta { flex: 1; min-width: 0; }
.file-row .meta b { display: block; font-size: .9rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .meta small { color: var(--ink-mute); }
.file-row .rm { background: none; border: none; cursor: pointer; color: var(--ink-mute); font-size: 1.1rem; padding: 4px 8px; border-radius: 8px; }
.file-row .rm:hover { background: var(--brand-soft); color: var(--brand); }

.tool-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.tool-opts { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.field { display: flex; flex-direction: column; gap: 5px; font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field select {
  padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 9px; font: inherit;
  background: var(--bg); color: var(--ink); min-width: 120px;
}
.status { font-size: .9rem; font-weight: 600; color: var(--ink-mute); min-height: 1.2em; }
.status.ok { color: var(--ok); }
.status.err { color: var(--brand); }
.progress { height: 8px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; margin-top: 12px; display: none; }
.progress.show { display: block; }
.progress > i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .25s ease; }
.results { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.result-row {
  display: flex; align-items: center; gap: 12px; padding: 11px 13px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: var(--radius-sm);
}
.result-row .meta { flex: 1; min-width: 0; }
.result-row .meta b { color: var(--ink); display: block; font-size: .9rem; }

.privacy-note { margin-top: 14px; font-size: .82rem; color: var(--ink-mute); display: flex; gap: 8px; align-items: flex-start; }
.privacy-note .lk { color: var(--ok); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; transition: .16s ease; box-shadow: var(--shadow-sm);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.tool-tile { display: block; color: inherit; }
.tool-tile:hover { text-decoration: none; }
.tool-tile .ti {
  width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center;
  font-size: 1.15rem; margin-bottom: 12px; background: var(--brand-soft); color: var(--brand);
}
.tool-tile.alt .ti { background: var(--accent-soft); color: var(--accent); }
.tool-tile h3 { font-size: 1.02rem; margin-bottom: 3px; }
.tool-tile p { font-size: .86rem; margin: 0; color: var(--ink-mute); }

.feature .fi { font-size: 1.6rem; margin-bottom: 10px; }
.feature h3 { font-size: 1.08rem; }
.feature p { font-size: .92rem; margin: 0; }

/* ---------- GEO content blocks ---------- */
.answer-box {
  border-left: 4px solid var(--brand); background: var(--brand-soft);
  padding: 18px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 22px;
}
.answer-box b { color: var(--brand-ink); }
.answer-box p:last-child { margin-bottom: 0; }
.keyfacts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.keyfacts li { display: flex; gap: 10px; align-items: flex-start; }
.keyfacts li::before { content: "\2713"; color: var(--ok); font-weight: 900; flex: none; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: flex; gap: 14px; align-items: flex-start; }
.steps li::before {
  content: counter(s); flex: none; width: 32px; height: 32px; border-radius: 50%;
  background: var(--grad); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: .95rem;
}
.steps li b { color: var(--ink); }

.prose { max-width: 760px; }
.prose h2 { margin-top: 2em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { color: var(--ink-soft); padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }

table.cmp { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--bg-elev); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
table.cmp th, table.cmp td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
table.cmp thead th { background: var(--bg-soft); font-weight: 800; color: var(--ink); }
table.cmp tbody tr:last-child td { border-bottom: none; }
table.cmp .yes { color: var(--ok); font-weight: 800; }
table.cmp .no { color: var(--brand); font-weight: 800; }
table.cmp .hl { background: color-mix(in srgb, var(--brand-soft) 60%, transparent); font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { text-align: center; padding: 22px 14px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); }
.stat b { display: block; font-size: 2rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: .86rem; color: var(--ink-mute); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 18px;
}
.faq details[open] { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.faq summary {
  cursor: pointer; font-weight: 700; color: var(--ink); padding: 14px 0; list-style: none;
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--brand); font-weight: 400; transition: .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 16px; margin: 0; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--grad); border-radius: var(--radius-lg); padding: 44px; text-align: center; color: #fff; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.92); max-width: 52ch; margin: 0 auto 22px; }
.cta-band .btn-ghost { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); color: #fff; }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.26); color: #fff; }
.cta-band .btn-primary { background: #fff; color: var(--brand-ink); }

/* ---------- Breadcrumb ---------- */
.crumbs { font-size: .85rem; color: var(--ink-mute); padding: 16px 0 0; }
.crumbs a { color: var(--ink-mute); }
.crumbs a:hover { color: var(--brand); }
.crumbs span { margin: 0 6px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 56px 0 28px; margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 28px; }
.foot-grid h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-mute); }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot-grid a { color: var(--ink-soft); font-size: .9rem; }
.foot-grid a:hover { color: var(--brand); }
.foot-bottom { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: var(--ink-mute); font-size: .85rem; }

/* ---------- Utilities ---------- */
.hide { display: none !important; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.pill.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero .lead { max-width: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute; top: 66px; left: 0; right: 0;
    background: var(--bg-elev); border-bottom: 1px solid var(--line); padding: 12px; gap: 4px; box-shadow: var(--shadow);
  }
  .nav-links.open a { width: 100%; }
  .nav-links.open .drop { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; grid-template-columns: 1fr; padding: 4px 0 4px 16px; min-width: 0; }
  .has-drop > a::after { display: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
}
