/* ============================================================================
 * PDF Tools — styles.css
 * ==========================================================================*/
:root {
    --brand: #e5322d;
    --brand-2: #ff6a5e;
    --brand-dark: #b71f23;
    --ink-1: #1b1d28;
    --ink-2: #5b6072;
    --line: #e7e9f0;
    --bg: #f6f7fb;
    --card: #ffffff;
    --ok: #18a058;
    --radius: 14px;
    --shadow-sm: 0 1px 3px rgba(20, 22, 40, .08);
    --shadow-md: 0 10px 30px rgba(20, 22, 40, .10);
    --maxw: 1120px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: var(--font);
    color: var(--ink-1);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
body.no-translate { visibility: hidden; opacity: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* --- Buttons --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5em;
    font: inherit; font-weight: 600; cursor: pointer;
    padding: .7em 1.25em; border-radius: 10px; border: 1px solid transparent;
    background: #eef0f6; color: var(--ink-1); transition: .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(229, 50, 45, .28); }
.btn--primary:hover { background: var(--brand-dark); }
.btn--ghost { background: transparent; border-color: var(--line); }
.btn--small { padding: .45em .85em; font-size: .9rem; border-radius: 9px; }
.btn--block { width: 100%; }
.btn--lg { padding: .9em 1.8em; font-size: 1.05rem; border-radius: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* --- Header --- */
.sticky-header { position: sticky; top: 0; z-index: 50; }
.topbar { background: rgba(255,255,255,.9); backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line); }
.topbar__inner { max-width: var(--maxw); margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 18px; }
.logo { display: flex; align-items: center; gap: 9px; color: var(--brand); font-weight: 800; font-size: 1.2rem; }
.logo-text { color: var(--ink-1); }
.logo-text__accent { color: var(--brand); }
.nav { display: flex; gap: 4px; margin-left: 10px; flex: 1; }
.nav-link { padding: .5em .7em; border-radius: 8px; color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.nav-link:hover { background: #f1f2f7; color: var(--ink-1); }
.topbar__actions { display: flex; align-items: center; gap: 10px; }
.premium-badge { background: linear-gradient(120deg, #ffd56a, #ffb020); color: #5a3b00; font-weight: 700; font-size: .8rem; padding: .3em .7em; border-radius: 20px; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--ink-1); }
.nav-drawer { display: none; flex-direction: column; gap: 6px; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.nav-drawer.is-open { display: flex; }

/* --- Hero --- */
.hero { padding: 64px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
.hero .lead { color: var(--ink-2); font-size: 1.15rem; max-width: 640px; margin: 0 auto 8px; }
.hero__trust { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; color: var(--ink-2); font-size: .95rem; margin-top: 14px; }

/* --- Tool grid --- */
.section { padding: 40px 0; }
.section__title { text-align: center; font-size: 1.8rem; }
.section__subtitle { text-align: center; color: var(--ink-2); max-width: 600px; margin: 0 auto 28px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.tool-card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 22px; box-shadow: var(--shadow-sm); transition: .2s; display: flex; flex-direction: column; gap: 8px;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d9b3b3; }
.tool-card__icon { width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center; color: var(--brand); background: #fdeceb; }
.tool-card__title { font-weight: 700; font-size: 1.1rem; }
.tool-card__desc { color: var(--ink-2); font-size: .92rem; }

/* --- Tool page --- */
.tool-hero { padding: 48px 0 18px; text-align: center; }
.tool-hero h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.tool-hero p { color: var(--ink-2); max-width: 560px; margin: 0 auto; }
.workspace { max-width: 760px; margin: 0 auto 50px; padding: 0 20px; }

.dropzone {
    background: var(--card); border: 2px dashed #d4d8e6; border-radius: var(--radius);
    padding: 48px 24px; text-align: center; cursor: pointer; transition: .18s; margin-top: 20px;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--brand); background: #fff7f6; }
.dropzone__icon { font-size: 2.4rem; }
.dropzone__title { font-weight: 700; font-size: 1.15rem; margin-top: 8px; }
.dropzone__hint { color: var(--ink-2); font-size: .92rem; }
.dropzone input[type=file] { display: none; }

.filelist { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 8px; }
.fileitem {
    display: flex; align-items: center; gap: 12px; background: var(--card);
    border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow-sm);
}
.fileitem__handle { cursor: grab; color: var(--ink-2); font-size: 1.1rem; }
.fileitem.dragging { opacity: .5; }
.fileitem__name { flex: 1; font-weight: 600; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fileitem__size { color: var(--ink-2); font-size: .85rem; }
.fileitem__remove { background: none; border: 0; cursor: pointer; color: var(--ink-2); font-size: 1.2rem; line-height: 1; }
.fileitem__remove:hover { color: var(--brand); }

.options { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 18px; box-shadow: var(--shadow-sm); }
.options h3 { font-size: 1.05rem; }
.field { margin-top: 12px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 5px; }
.field input[type=text], .field input[type=number], .field select {
    width: 100%; padding: .65em .8em; border: 1px solid var(--line); border-radius: 9px; font: inherit; background: #fff;
}
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-row label { display: flex; align-items: center; gap: 6px; padding: .5em .8em; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-weight: 500; }
.radio-row input { accent-color: var(--brand); }

.action-bar { display: flex; justify-content: center; margin-top: 22px; }
.warn { background: #fff7ec; border: 1px solid #ffd98a; color: #8a5a00; padding: 10px 14px; border-radius: 10px; font-size: .9rem; margin-top: 14px; }
.progress { height: 8px; background: #eef0f6; border-radius: 6px; overflow: hidden; margin-top: 16px; }
.progress__bar { height: 100%; width: 0; background: var(--brand); transition: width .2s; }
.result { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; text-align: center; margin-top: 22px; box-shadow: var(--shadow-sm); }
.result h3 { font-size: 1.3rem; }
.result .stat { color: var(--ink-2); margin: 6px 0 16px; }
.result .stat strong { color: var(--ok); }
.hidden { display: none !important; }

/* --- Modal / paywall --- */
.modal { position: fixed; inset: 0; background: rgba(20,22,40,.55); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal.show { display: flex; }
.modal-content { background: #fff; border-radius: 18px; max-width: 440px; width: 100%; padding: 30px; position: relative; box-shadow: var(--shadow-md); }
.modal-content h2 { font-size: 1.5rem; }
.modal-desc { color: var(--ink-2); }
.close { position: absolute; top: 12px; right: 14px; background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--ink-2); }
.paywall-bullets { list-style: none; padding: 0; margin: 16px 0; }
.paywall-bullets li { padding: 7px 0 7px 28px; position: relative; }
.paywall-bullets li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.payment-link-button {
    display: flex; align-items: center; justify-content: center; gap: .5em; width: 100%;
    background: var(--brand); color: #fff; font-weight: 700; padding: .9em; border-radius: 12px; margin-top: 8px;
    box-shadow: 0 6px 16px rgba(229,50,45,.3); transition: .18s;
}
.payment-link-button:hover { background: var(--brand-dark); }
.lock-icon { width: 18px; height: 18px; }
.payment-secure-note { text-align: center; color: var(--ink-2); font-size: .82rem; margin-top: 10px; }

/* --- Lead form --- */
.lead-offer { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 30px auto 0; max-width: 560px; text-align: center; box-shadow: var(--shadow-sm); }
.lead-form__row { display: flex; gap: 8px; margin-top: 10px; }
.lead-form__row input { flex: 1; padding: .7em .9em; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.lead-form__help { color: var(--ink-2); font-size: .82rem; margin-top: 8px; }
.lead-form__error { color: var(--brand); font-size: .85rem; }
.lead-form__success { color: var(--ok); font-size: .85rem; }

/* --- FAQ --- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { color: var(--ink-2); margin: 10px 0 0; }

/* --- Footer --- */
.footer { background: #fff; border-top: 1px solid var(--line); margin-top: 40px; padding: 40px 20px 24px; }
.footer__tools { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; }
.footer__col h4 { font-size: .95rem; }
.footer__col a { display: block; color: var(--ink-2); font-size: .9rem; padding: 3px 0; }
.footer__col a:hover { color: var(--brand); }
.footer__col--about p { color: var(--ink-2); font-size: .9rem; }
.footer__note { text-align: center; color: var(--ink-2); font-size: .85rem; margin-top: 28px; }

/* --- Responsive --- */
@media (max-width: 860px) {
    .nav { display: none; }
    .nav-toggle { display: block; }
}
@media (max-width: 620px) {
    .hero { padding: 40px 0 24px; }
    .lead-form__row { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
