/* PDFMagnum clone — design tokens from original site */
:root {
  --red: #da2d26;
  --red-hover: #b82520;
  --red-pressed: #a0211c;
  --blue: #248af6;
  --blue-hover: #096ed9;
  --navy-1: #101b41;
  --navy-2: #1c4d93;
  --text-black: #303030;
  --text-gray: #585858;
  --text-gray-80: #8c8c8c;
  --bg-gray: #f7f7f7;
  --border-gray: #d7d7d7;
  --border-soft: rgba(0,0,0,0.1);
  --shadow-1: 0 0 20px 0 rgba(0,0,0,0.08);
  --shadow-2: 0 4px 4px 0 rgba(0,0,0,0.25);
  --radius: 10px;
  --poppins: "Poppins", sans-serif;
  --opensans: "Open Sans", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--opensans); color: var(--text-black); background: #fff; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { display: block; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ============ header ============ */
.header {
  position: sticky; top: 0; z-index: 30; background: #fff;
  border-bottom: 1px solid var(--border-soft);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--poppins); font-weight: 700; font-size: 22px; color: var(--text-black); }
.logo-mark { width: 36px; height: 36px; border-radius: 9px; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 19px; }
.nav { display: flex; align-items: center; gap: 6px; flex: 1; }
.nav > li { position: relative; }
.nav-link { display: flex; align-items: center; gap: 6px; padding: 10px 14px; font-size: 15px; font-weight: 600; color: var(--text-gray); border-radius: 8px; transition: 0.15s; }
.nav-link:hover { color: var(--red); background: #faefef; }
.nav-link .chev { width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-btn { display: flex; align-items: center; gap: 6px; color: var(--text-gray); font-size: 14px; font-weight: 600; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 12px 26px; font-size: 15px; font-weight: 600;
  transition: 0.15s; font-family: var(--poppins);
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-hover); }
.btn-red:active { background: var(--red-pressed); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-hover); }
.btn-outline { border: 1px solid var(--border-gray); color: var(--text-gray); background: #fff; }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-white { background: #fff; color: var(--navy-1); }
.btn-white:hover { background: #bfdfff; }

/* mega menu */
.mega { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(8px);
  background: #fff; border: 1px solid var(--border-soft); border-radius: 14px; box-shadow: var(--shadow-1);
  padding: 24px; display: none; grid-template-columns: repeat(4, 200px); gap: 20px; width: max-content; opacity: 0; }
.nav > li:hover .mega, .nav > li:focus-within .mega { display: grid; opacity: 1; transform: translateX(-50%) translateY(0); }
.mega h4 { font-family: var(--poppins); font-size: 13px; color: var(--text-gray-80); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 10px; }
.mega a { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-gray); padding: 6px 8px; border-radius: 6px; }
.mega a:hover { color: var(--blue); background: var(--bg-gray); }

/* ============ hero ============ */
.hero { background: linear-gradient(135deg, var(--navy-1) 0%, #15214b 45%, var(--navy-2) 100%); padding: 64px 0 72px; color: #fff; }
.hero h1 { font-family: var(--poppins); font-size: 40px; font-weight: 700; text-align: center; margin-bottom: 32px; }
.hero h1 span { color: #92c5fb; }
.dropzone {
  max-width: 620px; margin: 0 auto; background: #fff; border-radius: 16px; padding: 40px 32px 28px;
  box-shadow: var(--shadow-2); text-align: center; color: var(--text-black);
  border: 2px dashed transparent; transition: 0.2s; cursor: pointer; position: relative;
}
.dropzone.dragover { border-color: var(--blue); background: #f3f8fe; }
.dropzone .dz-icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: #ffe8e8; display: grid; place-items: center; }
.dropzone .dz-title { font-family: var(--poppins); font-size: 18px; font-weight: 600; color: var(--text-gray); margin-bottom: 14px; }
.dropzone .dz-or { font-size: 12px; color: var(--text-gray-80); text-transform: uppercase; letter-spacing: 1px; margin: 16px 0; }
.dropzone .dz-hint { font-size: 12px; color: var(--text-gray-80); margin-top: 18px; line-height: 1.5; }
.cloud-row { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.cloud-btn { display: flex; align-items: center; gap: 7px; border: 1px solid var(--border-gray); border-radius: 8px; padding: 8px 12px; font-size: 12.5px; color: var(--text-gray); font-weight: 600; background: #fff; transition: 0.15s; }
.cloud-btn:hover { border-color: var(--blue); color: var(--blue); }
.hero-badges { display: flex; align-items: center; justify-content: center; gap: 28px; margin-top: 26px; color: #cdd9f5; font-size: 13.5px; flex-wrap: wrap; }
.hero-badges .stars { color: #ffcb11; letter-spacing: 2px; }
.hero-badges b { color: #fff; }

/* ============ trust strip ============ */
.trust { padding: 40px 0; border-bottom: 1px solid var(--border-soft); }
.trust p { text-align: center; font-size: 13px; color: var(--text-gray-80); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 22px; }
.trust-logos { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; }
.trust-logos span { font-family: var(--poppins); font-weight: 700; font-size: 19px; color: #b9bec6; letter-spacing: 0.5px; }

/* ============ tools section ============ */
.tools-sec { padding: 68px 0 20px; background: var(--bg-gray); }
.sec-head { text-align: center; margin-bottom: 36px; }
.sec-head h2 { font-family: var(--poppins); font-size: 30px; font-weight: 700; color: var(--text-black); }
.sec-head p { color: var(--text-gray-80); margin-top: 8px; font-size: 15px; }
.tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 30px; flex-wrap: wrap; }
.tab { padding: 9px 20px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--text-gray); background: #fff; border: 1px solid var(--border-gray); transition: 0.15s; }
.tab.active, .tab:hover { background: var(--red); color: #fff; border-color: var(--red); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; padding-bottom: 48px; }
.card { background: #fff; border-radius: var(--radius); padding: 24px; box-shadow: 0 1px 3px 0 rgba(0,0,0,0.08); transition: 0.15s; border: 1px solid transparent; cursor: pointer; }
.card:hover { box-shadow: var(--shadow-1); border-color: #e0edff; transform: translateY(-2px); }
.card .c-icon { width: 42px; height: 42px; border-radius: 10px; background: #e0edff; color: var(--blue); display: grid; place-items: center; margin-bottom: 14px; font-size: 19px; }
.card h3 { font-family: var(--poppins); font-size: 15.5px; font-weight: 600; margin-bottom: 8px; }
.card p { font-size: 13px; color: var(--text-gray-80); line-height: 1.55; }

/* ============ steps ============ */
.steps { padding: 68px 0; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.step { text-align: center; padding: 34px 24px; border-radius: 14px; background: var(--bg-gray); }
.step .num { width: 52px; height: 52px; margin: 0 auto 18px; border-radius: 50%; background: var(--red); color: #fff; font-family: var(--poppins); font-weight: 700; font-size: 22px; display: grid; place-items: center; }
.step h3 { font-family: var(--poppins); font-size: 16px; font-weight: 600; margin-bottom: 10px; }
.step p { font-size: 13.5px; color: var(--text-gray-80); line-height: 1.6; }

/* ============ reviews ============ */
.reviews { padding: 60px 0; background: linear-gradient(180deg, #fff 0%, #f3f8fe 100%); }
.reviews-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 36px; }
.review { background: #fff; border-radius: 12px; padding: 24px; box-shadow: var(--shadow-1); }
.review .r-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.review .avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 16px; }
.review .r-name { font-family: var(--poppins); font-weight: 600; font-size: 14.5px; }
.review .r-role { font-size: 12px; color: var(--text-gray-80); }
.review p { font-size: 13.5px; color: var(--text-gray); line-height: 1.65; }
.reviews-more { text-align: center; margin-top: 24px; }

/* ============ why ============ */
.why { padding: 68px 0; }
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 40px 0; }
.why-card { background: var(--bg-gray); border-radius: 12px; padding: 26px 22px; }
.why-card .c-icon { width: 44px; height: 44px; border-radius: 10px; background: #ffe8e8; color: var(--red); display: grid; place-items: center; margin-bottom: 16px; font-size: 20px; }
.why-card h3 { font-family: var(--poppins); font-size: 15.5px; font-weight: 600; margin-bottom: 10px; }
.why-card p { font-size: 13px; color: var(--text-gray-80); line-height: 1.6; }
.why-cta { text-align: center; }

/* ============ faq ============ */
.faq { padding: 60px 0 76px; background: var(--bg-gray); }
.faq-list { max-width: 760px; margin: 36px auto 0; }
.faq-item { background: #fff; border-radius: 10px; margin-bottom: 12px; box-shadow: 0 1px 3px 0 rgba(0,0,0,0.06); overflow: hidden; }
.faq-q { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; font-size: 15px; font-weight: 600; color: var(--text-black); font-family: var(--poppins); }
.faq-q .chev { flex: none; width: 9px; height: 9px; border-right: 2px solid var(--text-gray-80); border-bottom: 2px solid var(--text-gray-80); transform: rotate(45deg); transition: 0.2s; }
.faq-item.open .chev { transform: rotate(225deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.3s; }
.faq-a p { padding: 0 22px 20px; font-size: 14px; color: var(--text-gray); line-height: 1.7; }

/* ============ cta band ============ */
.cta-band { background: linear-gradient(135deg, var(--navy-1), var(--navy-2)); color: #fff; padding: 60px 0; text-align: center; }
.cta-band h2 { font-family: var(--poppins); font-size: 30px; font-weight: 700; margin-bottom: 10px; }
.cta-band p { color: #cdd9f5; margin-bottom: 26px; }

/* ============ footer ============ */
.footer { background: #101223; color: #9aa3b8; padding: 48px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.footer .logo { color: #fff; margin-bottom: 12px; }
.footer-col h4 { color: #fff; font-family: var(--poppins); font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13.5px; padding: 5px 0; color: #9aa3b8; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #23263b; padding-top: 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12.5px; }
.sec-badges { display: flex; gap: 14px; }
.sec-badge { border: 1px solid #2a2e49; border-radius: 6px; padding: 5px 12px; font-size: 11px; letter-spacing: 0.5px; }

/* ============ editor app ============ */
.ed-body { display: flex; flex-direction: column; height: 100vh; overflow: hidden; background: #eef1f5; }
.ed-topbar { display: flex; align-items: center; gap: 16px; height: 60px; background: #fff; border-bottom: 1px solid var(--border-soft); padding: 0 18px; z-index: 10; }
.ed-topbar .tool-title { font-family: var(--poppins); font-weight: 600; font-size: 16px; flex: 1; text-align: center; color: var(--text-black); }
.ed-main { flex: 1; display: flex; min-height: 0; }
.ed-sidebar { width: 218px; background: #fff; border-right: 1px solid var(--border-soft); overflow-y: auto; padding: 14px 10px; }
.ed-sidebar h5 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-gray-80); margin: 16px 8px 8px; font-family: var(--poppins); }
.ed-tool { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; font-size: 13.5px; color: var(--text-gray); font-weight: 600; }
.ed-tool:hover { background: var(--bg-gray); color: var(--blue); }
.ed-tool.active { background: #e0edff; color: var(--blue); }
.ed-workspace { flex: 1; display: flex; min-width: 0; }
.ed-canvas-area { flex: 1; overflow-y: auto; padding: 26px; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.ed-panel { width: 300px; background: #fff; border-left: 1px solid var(--border-soft); overflow-y: auto; padding: 18px; flex: none; }
.ed-panel h4 { font-family: var(--poppins); font-size: 15px; margin-bottom: 14px; color: var(--text-black); }
.ed-panel label { display: block; font-size: 12px; font-weight: 600; color: var(--text-gray); margin: 12px 0 5px; text-transform: uppercase; letter-spacing: 0.4px; }
.ed-panel input[type="text"], .ed-panel input[type="number"], .ed-panel input[type="password"], .ed-panel select, .ed-panel textarea {
  width: 100%; border: 1px solid var(--border-gray); border-radius: 7px; padding: 8px 10px; font-size: 13.5px; font-family: var(--opensans); color: var(--text-black); outline: none;
}
.ed-panel input:focus, .ed-panel select:focus { border-color: var(--blue); }
.ed-panel .row { display: flex; gap: 10px; }
.ed-panel .row > * { flex: 1; }
.ed-panel .check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-gray); margin: 10px 0; text-transform: none; letter-spacing: 0; font-weight: 400; }
.ed-panel .check input { width: auto; }
.ed-note { font-size: 11.5px; color: var(--text-gray-80); line-height: 1.5; margin-top: 10px; background: var(--bg-gray); border-radius: 6px; padding: 8px 10px; }
.ed-btnrow { display: flex; gap: 10px; margin-top: 18px; }
.ed-btnrow .btn { flex: 1; padding: 10px 14px; font-size: 13.5px; }

.page-wrap { position: relative; background: #fff; box-shadow: var(--shadow-1); border-radius: 2px; }
.page-wrap canvas { display: block; }
.page-wrap.selected { outline: 3px solid var(--blue); outline-offset: 3px; }
.page-label { position: absolute; top: -20px; left: 0; font-size: 11.5px; color: var(--text-gray-80); font-weight: 600; }
.anno-layer { position: absolute; inset: 0; }
.anno-el { position: absolute; cursor: move; }
.anno-el.textbox { border: 1px dashed transparent; }
.anno-el.textbox:hover, .anno-el.textbox.sel { border-color: var(--blue); }
.anno-el .resize { position: absolute; right: -5px; bottom: -5px; width: 11px; height: 11px; background: var(--blue); border-radius: 3px; cursor: nwse-resize; display: none; }
.anno-el.sel .resize { display: block; }
.anno-el .del { position: absolute; top: -10px; left: -10px; width: 18px; height: 18px; border-radius: 50%; background: var(--red); color: #fff; font-size: 11px; line-height: 18px; text-align: center; cursor: pointer; display: none; }
.anno-el.sel .del { display: block; }
.anno-el img, .anno-el canvas { width: 100%; height: 100%; pointer-events: none; }

/* drop screen inside editor */
.ed-drop { flex: 1; display: grid; place-items: center; padding: 30px; }
.ed-drop .dropzone { max-width: 520px; width: 100%; }

/* grid mode (organize) */
.grid-mode { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; width: 100%; }
.grid-page { position: relative; background: #fff; box-shadow: var(--shadow-1); border-radius: 3px; overflow: hidden; cursor: grab; border: 2px solid transparent; }
.grid-page.dragging { opacity: 0.4; }
.grid-page.drop-target { border-color: var(--blue); }
.grid-page canvas { width: 100%; display: block; }
.grid-page .g-tools { position: absolute; top: 6px; right: 6px; display: flex; gap: 5px; opacity: 0; transition: 0.15s; }
.grid-page:hover .g-tools { opacity: 1; }
.grid-page .g-btn { width: 24px; height: 24px; border-radius: 5px; background: rgba(255,255,255,0.95); box-shadow: 0 1px 3px rgba(0,0,0,0.25); font-size: 12px; color: var(--text-gray); }
.grid-page .g-btn:hover { color: var(--red); }
.grid-page .g-num { position: absolute; bottom: 6px; left: 6px; background: rgba(0,0,0,0.55); color: #fff; font-size: 11px; border-radius: 4px; padding: 2px 7px; }
.grid-page.removed { opacity: 0.25; filter: grayscale(1); }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 60; display: none; place-items: center; }
.modal-back.open { display: grid; }
.modal { background: #fff; border-radius: 14px; padding: 26px; max-width: 520px; width: calc(100% - 40px); box-shadow: var(--shadow-2); }
.modal h3 { font-family: var(--poppins); margin-bottom: 14px; font-size: 17px; }
.sig-pad { border: 1px solid var(--border-gray); border-radius: 8px; background: #fff; touch-action: none; cursor: crosshair; display: block; margin: 0 auto; }

/* toast */
#toast-host { position: fixed; top: 18px; right: 18px; z-index: 10000; display: flex; flex-direction: column; gap: 10px; }
.toast { background: #fff; border-radius: 8px; box-shadow: var(--shadow-2); padding: 13px 18px; font-size: 13.5px; color: var(--text-black); min-width: 240px; max-width: 340px; animation: toastIn 0.25s; border-left: 4px solid var(--blue); }
.toast.err { border-left-color: var(--red); }
.toast.ok { border-left-color: #00bb61; }
@keyframes toastIn { from { transform: translateX(40px); opacity: 0; } }

/* progress overlay */
#prog-overlay { position: fixed; inset: 0; background: rgba(255,255,255,0.75); z-index: 200; display: none; place-items: center; flex-direction: column; gap: 14px; }
#prog-overlay.open { display: grid; }
.spin { width: 42px; height: 42px; border: 4px solid #e0edff; border-top-color: var(--blue); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#prog-text { font-family: var(--poppins); font-weight: 600; color: var(--text-gray); font-size: 14px; }

@media (max-width: 960px) {
  .nav { display: none; }
  .steps-grid, .why-grid { grid-template-columns: 1fr 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .ed-panel { position: absolute; right: 0; top: 60px; bottom: 0; box-shadow: var(--shadow-2); z-index: 5; }
}
@media (max-width: 620px) {
  .hero h1 { font-size: 28px; }
  .steps-grid, .why-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
