/* ============ PDFBee — yellow & black, Anthropic-inspired type ============ */
:root {
  --bg: #0d0d0b;
  --surface: #15150f;
  --surface-2: #1c1c15;
  --line: #2b2b20;
  --line-strong: #3a3a2c;
  --text: #f4f0e4;
  --muted: #a49f8e;
  --yellow: #ffd400;
  --yellow-soft: #ffdf47;
  --on-yellow: #111008;
  --danger: #ff6b5e;
  --ok: #7ddc8f;
  --radius: 14px;
  --sans: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--yellow); color: var(--on-yellow); }
a { color: inherit; }
em { font-family: var(--serif); font-style: italic; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; background: var(--yellow); color: var(--on-yellow); padding: 8px 14px; border-radius: 8px; z-index: 99; }

/* ---------- nav ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(16px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(13,13,11,.88); backdrop-filter: blur(10px); z-index: 50;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font-weight: 700; font-size: 21px; letter-spacing: -0.02em; }
.brand-name em { color: var(--yellow); font-weight: 600; }
.brand-badge {
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--yellow); border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 9px;
}
.nav-links { display: flex; gap: 26px; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; transition: color .15s; }
.nav-links a:hover { color: var(--yellow); }

/* ---------- hero ---------- */
.hero { text-align: center; padding: clamp(48px, 9vw, 104px) 20px 26px; max-width: 880px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(38px, 6.4vw, 68px); line-height: 1.06; letter-spacing: -0.03em; font-weight: 700;
}
.hero h1 em { color: var(--yellow); font-weight: 600; }
.hero p.sub { color: var(--muted); font-size: clamp(16px, 2vw, 19px); margin: 22px auto 0; max-width: 640px; }
.trust-strip {
  display: flex; flex-wrap: wrap; gap: 10px 26px; justify-content: center;
  margin: 30px auto 0; color: var(--muted); font-size: 14px; font-weight: 500;
}
.trust-strip span::before { content: "●"; color: var(--yellow); font-size: 9px; vertical-align: 2px; margin-right: 8px; }

/* ---------- search ---------- */
.tool-search { max-width: 560px; margin: 34px auto 0; position: relative; }
.tool-search input {
  width: 100%; padding: 15px 20px 15px 48px; font: 500 16px var(--sans);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 999px; outline: none; transition: border-color .15s;
}
.tool-search input:focus { border-color: var(--yellow); }
.tool-search svg { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); opacity: .5; }

/* ---------- tool grid ---------- */
.tools-wrap { max-width: 1180px; margin: 0 auto; padding: 30px clamp(16px, 4vw, 40px) 60px; }
.cat-section { margin-top: 44px; }
.cat-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.cat-title h2 { font-size: 22px; letter-spacing: -0.01em; }
.cat-title .count { color: var(--muted); font-size: 14px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tool-card {
  display: flex; gap: 14px; align-items: flex-start; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; transition: transform .15s, border-color .15s, background .15s;
}
.tool-card:hover { transform: translateY(-3px); border-color: var(--yellow); background: var(--surface-2); }
.tool-icon {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 11px; background: var(--yellow);
  display: grid; place-items: center; color: var(--on-yellow);
}
.tool-card h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.tool-card p { font-size: 13.5px; color: var(--muted); line-height: 1.45; margin-top: 3px; }
.badge-pro {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  background: var(--yellow); color: var(--on-yellow); padding: 2px 7px; border-radius: 999px; margin-left: 8px; vertical-align: 2px;
  white-space: nowrap; display: inline-block;
}
.no-results { color: var(--muted); text-align: center; padding: 60px 0; font-size: 17px; }

/* ---------- FAQ / about ---------- */
.faq { max-width: 760px; margin: 0 auto; padding: 20px 20px 90px; }
.faq h2 { font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.02em; margin: 54px 0 8px; }
.faq h2 em { color: var(--yellow); }
.faq-item { border-bottom: 1px solid var(--line); padding: 22px 0; }
.faq-item h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.faq-item p { color: var(--muted); font-size: 15px; }
.faq-item p strong { color: var(--text); }

/* ---------- tool page ---------- */
.tool-page { max-width: 860px; margin: 0 auto; padding: 34px clamp(16px, 4vw, 40px) 80px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 500; margin-bottom: 26px; }
.back-link:hover { color: var(--yellow); }
.tool-head { display: flex; gap: 18px; align-items: center; margin-bottom: 10px; }
.tool-head .tool-icon { width: 54px; height: 54px; flex-basis: 54px; border-radius: 14px; }
.tool-head h1 { font-size: clamp(26px, 4vw, 34px); letter-spacing: -0.02em; }
.tool-desc { color: var(--muted); font-size: 16px; max-width: 640px; }

/* steps */
.steps { display: flex; gap: 8px; margin: 30px 0 22px; }
.step {
  flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 13.5px; font-weight: 600;
  transition: border-color .2s, color .2s;
}
.step .n {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); font-size: 12px; flex-shrink: 0; transition: background .2s, color .2s;
}
.step.active { border-color: var(--yellow); color: var(--text); }
.step.active .n { background: var(--yellow); color: var(--on-yellow); }
.step.done { color: var(--ok); border-color: var(--line-strong); }
.step.done .n { background: var(--ok); color: #06130a; }

/* dropzone */
.dropzone {
  border: 2px dashed var(--line-strong); border-radius: var(--radius);
  padding: 44px 24px; text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
  background: var(--surface);
}
.dropzone:hover, .dropzone.dragover { border-color: var(--yellow); background: var(--surface-2); }
.dropzone .dz-icon { color: var(--yellow); margin-bottom: 12px; }
.dropzone .dz-main { font-weight: 600; font-size: 17px; }
.dropzone .dz-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.dropzone input { display: none; }

/* file list */
.file-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.file-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
}
.file-item .f-icon { color: var(--yellow); flex-shrink: 0; }
.file-item .f-name { font-weight: 500; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .f-size { color: var(--muted); font-size: 13px; margin-left: auto; flex-shrink: 0; }
.file-item .f-actions { display: flex; gap: 4px; flex-shrink: 0; }
.icon-btn {
  background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 7px;
  width: 28px; height: 28px; cursor: pointer; font-size: 14px; line-height: 1; display: grid; place-items: center;
  transition: color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--yellow); border-color: var(--yellow); }
.icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }
.add-more { margin-top: 10px; }

/* options */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-top: 18px;
}
.card h3.card-title { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 16px; font-weight: 700; }
.opts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.opt label.opt-label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; }
.opt .hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.opt input[type=text], .opt input[type=password], .opt input[type=number], .opt select {
  width: 100%; padding: 10px 12px; font: 500 14.5px var(--sans);
  background: var(--bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: 9px; outline: none;
}
.opt input:focus, .opt select:focus { border-color: var(--yellow); }
.opt input[type=range] { width: 100%; accent-color: var(--yellow); }
.check-row { display: flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 500; cursor: pointer; }
.check-row input { accent-color: var(--yellow); width: 17px; height: 17px; }
.radio-cards { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-card {
  border: 1px solid var(--line-strong); border-radius: 9px; padding: 8px 14px; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--muted); transition: all .15s; user-select: none;
}
.radio-card:hover { border-color: var(--yellow); }
.radio-card.selected { background: var(--yellow); color: var(--on-yellow); border-color: var(--yellow); font-weight: 600; }

/* process button + progress */
.process-row { margin-top: 22px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn {
  font: 600 16px var(--sans); border: none; border-radius: 11px; cursor: pointer;
  padding: 14px 30px; transition: transform .1s, filter .15s; display: inline-flex; align-items: center; gap: 9px;
  text-decoration: none;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--yellow); color: var(--on-yellow); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:disabled { background: var(--line-strong); color: var(--muted); cursor: not-allowed; filter: none; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--yellow); color: var(--yellow); }
.btn-sm { padding: 9px 16px; font-size: 14px; border-radius: 9px; }

.progress-wrap { margin-top: 20px; }
.progress-bar { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--yellow); width: 0%; transition: width .2s; border-radius: 999px; }
.progress-label { font-size: 13.5px; color: var(--muted); margin-top: 8px; }

/* result */
.result-card {
  margin-top: 22px; border: 1px solid var(--yellow); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,212,0,.07), rgba(255,212,0,.02));
  padding: 26px; text-align: center;
}
.result-card .r-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.result-card .r-note { color: var(--muted); font-size: 14.5px; margin-bottom: 18px; }
.result-card .r-note strong { color: var(--ok); }
.dl-list { display: flex; flex-direction: column; gap: 8px; max-width: 460px; margin: 0 auto 8px; }
.dl-list .btn { justify-content: center; }
.error-card {
  margin-top: 22px; border: 1px solid var(--danger); border-radius: var(--radius);
  background: rgba(255,107,94,.06); padding: 20px; color: var(--danger); font-weight: 500; font-size: 14.5px;
}
.privacy-note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 26px; }
.privacy-note b { color: var(--yellow); font-weight: 600; }

/* organize thumbnails */
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-top: 6px; }
.thumb {
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 10px; padding: 8px;
  cursor: grab; text-align: center; position: relative; transition: border-color .15s, opacity .15s;
}
.thumb.dragging { opacity: .4; }
.thumb.deleted { opacity: .35; }
.thumb.deleted::after { content: "removed"; position: absolute; inset: auto 0 40%; color: var(--danger); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.thumb canvas { max-width: 100%; border-radius: 5px; background: #fff; display: block; margin: 0 auto; transition: transform .2s; }
.thumb .t-num { font-size: 12px; color: var(--muted); margin-top: 6px; font-weight: 600; }
.thumb .t-actions { display: flex; justify-content: center; gap: 5px; margin-top: 6px; }

/* signature pad */
.sig-pad-wrap { background: #fff; border-radius: 10px; position: relative; overflow: hidden; }
.sig-pad-wrap canvas { display: block; width: 100%; touch-action: none; cursor: crosshair; }
.sig-baseline { position: absolute; left: 6%; right: 6%; bottom: 26%; border-bottom: 2px dashed #d8d2c0; pointer-events: none; }
.pos-grid { display: grid; grid-template-columns: repeat(3, 44px); gap: 6px; }
.pos-cell {
  width: 44px; height: 34px; border: 1px solid var(--line-strong); border-radius: 7px; cursor: pointer;
  transition: all .15s;
}
.pos-cell:hover { border-color: var(--yellow); }
.pos-cell.selected { background: var(--yellow); border-color: var(--yellow); }

/* about page */
.about-page { max-width: 720px; margin: 0 auto; padding: 50px 20px 90px; }
.about-page h1 { font-size: clamp(30px, 5vw, 44px); letter-spacing: -0.02em; margin-bottom: 10px; }
.about-page h1 em { color: var(--yellow); }
.about-page p { color: var(--muted); margin: 16px 0; font-size: 16.5px; }
.about-page p strong { color: var(--text); }

/* footer */
.footer { border-top: 1px solid var(--line); margin-top: 20px; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 30px clamp(16px, 4vw, 40px); color: var(--muted); font-size: 14px; }
.footer-inner em { color: var(--yellow); }
.footer-fine { margin-top: 6px; font-size: 12.5px; opacity: .75; }

@media (max-width: 640px) {
  .steps { flex-direction: column; }
  .nav-links { gap: 16px; }
  .brand-badge { display: none; }
}
