/* =====================================================================
   Home page only - loaded solely by views/pages/home.ejs, scoped with a
   "rd-" prefix. Plain hand-written CSS, not Tailwind utility classes, so
   it needs no purge/build step - see public/css/style.css for the
   site-wide equivalent (search bars, tool cards, footer).
   ===================================================================== */

.rd-page { -webkit-font-smoothing: antialiased; }
.rd-wrap { max-width: 1160px; margin: 0 auto; padding: 0 40px; }
.rd-page a { text-decoration: none; color: inherit; }

/* ---- hero ---- */
.rd-hero {
    position: relative; overflow: hidden;
    background: radial-gradient(60% 70% at 82% 0%, rgba(37,99,235,.08) 0%, rgba(37,99,235,0) 70%), #ffffff;
    padding: 84px 0 96px;
}
.rd-hero__grid { display: grid; grid-template-columns: 1fr 460px; gap: 64px; align-items: center; }
.rd-eyebrow {
    display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
    color: #1d4ed8; background: #eff6ff; border: 1px solid #dbeafe;
    padding: 7px 14px; border-radius: 999px; margin: 0 0 24px;
}
.rd-hero h1 { font-size: 52px; line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 20px; color: #0f172a; }
.rd-hero p.rd-lede { font-size: 18px; line-height: 1.6; color: #475569; margin: 0 0 32px; max-width: 520px; }
.rd-cta-row { display: flex; align-items: center; gap: 14px; margin: 0 0 36px; flex-wrap: wrap; }
.rd-btn {
    display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700;
    padding: 14px 26px; border-radius: 10px; border: 1.5px solid transparent; cursor: pointer;
}
.rd-page .rd-btn--primary { background: linear-gradient(135deg, #2563eb, #4f46e5); color: #fff; box-shadow: 0 12px 24px -10px rgba(37,99,235,.5); transition: transform .15s ease, box-shadow .15s ease; }
.rd-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -8px rgba(37,99,235,.55); }
.rd-btn--ghost { background: #fff; color: #0f172a; border-color: #e2e8f0; transition: transform .15s ease, border-color .15s ease; }
.rd-btn--ghost:hover { transform: translateY(-2px); border-color: #c7d2fe; }
.rd-trust-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.rd-trust-row__item { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: #64748b; }
.rd-trust-row__item svg { color: #16a34a; flex-shrink: 0; }

/* hero visual: product window mock */
.rd-window { background: #fff; border: 1px solid #eef0f3; border-radius: 18px; box-shadow: 0 30px 60px -25px rgba(15,23,42,.25); overflow: hidden; }
.rd-window__bar { display: flex; align-items: center; gap: 6px; padding: 14px 16px; border-bottom: 1px solid #f1f5f9; }
.rd-window__dot { width: 9px; height: 9px; border-radius: 999px; background: #e2e8f0; }
.rd-window__body { padding: 28px 24px 32px; }
.rd-dropzone { border: 1.5px dashed #cbd5e1; border-radius: 14px; padding: 28px 20px; text-align: center; color: #64748b; background: #f8fafc; }
.rd-dropzone svg { color: #2563eb; margin-bottom: 10px; }
.rd-dropzone__title { font-size: 14px; font-weight: 700; color: #1e293b; margin: 0 0 4px; }
.rd-dropzone__sub { font-size: 12px; margin: 0; }
.rd-result-row { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px 16px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 12px; }
.rd-result-row svg.rd-check { color: #16a34a; flex-shrink: 0; }
.rd-result-row__label { font-size: 13px; font-weight: 700; color: #14532d; }
.rd-result-row__meta { font-size: 12px; color: #4d7c62; }

/* ---- section heading ---- */
.rd-section { padding: 88px 0; }
.rd-section--tight { padding-top: 0; }
.rd-section-head { text-align: center; margin: 0 0 44px; }
.rd-kicker { display: block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #2563eb; margin: 0 0 10px; }
.rd-section-head h2 { font-size: 32px; font-weight: 800; margin: 0 0 10px; letter-spacing: -0.01em; color: #0f172a; }
.rd-section-head p { font-size: 16px; color: #64748b; margin: 0; }

/* ---- popular tools ---- */
.rd-popular-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; }
.rd-pop-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid #eef0f3; border-radius: 16px; padding: 26px; gap: 14px; box-shadow: 0 2px 6px rgba(15,23,42,.04); transition: transform .18s ease, box-shadow .18s ease; }
.rd-pop-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -18px rgba(15,23,42,.22); }
.rd-pop-card__badge { position: absolute; top: 18px; right: 18px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #1d4ed8; background: #eff6ff; padding: 4px 9px; border-radius: 999px; }
.rd-pop-card__icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #eff6ff; color: #1d4ed8; }
.rd-pop-card h3 { font-size: 16px; font-weight: 700; margin: 0; color: #0f172a; }
.rd-pop-card p { font-size: 13px; color: #64748b; margin: 0; line-height: 1.5; }
.rd-pop-card__go { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: #1d4ed8; margin-top: auto; }
.rd-pop-card__go svg { width: 13px; height: 13px; transition: transform .18s ease; }
.rd-pop-card:hover .rd-pop-card__go svg { transform: translateX(3px); }

/* ---- directory: search + tabs ---- */
.rd-search { max-width: 620px; margin: 0 auto 20px; display: flex; align-items: center; gap: 10px; padding: 13px 18px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; box-shadow: 0 1px 3px rgba(15,23,42,.05); }
.rd-search svg { color: #94a3b8; flex-shrink: 0; }
.rd-search input { flex: 1; min-width: 0; border: none; outline: none; font-size: 14px; color: #0f172a; background: transparent; font-family: inherit; }
.rd-search input::placeholder { color: #94a3b8; }
.rd-tabs { display: flex; justify-content: center; gap: 8px; margin: 0 0 56px; flex-wrap: wrap; }
.rd-tab { font-size: 13px; font-weight: 700; padding: 9px 18px; border-radius: 999px; border: 1px solid #e2e8f0; color: #475569; background: #fff; cursor: pointer; transition: all .15s ease; }
.rd-tab:hover { border-color: #c7d2fe; color: #1d4ed8; }
.rd-tab.is-active { background: #0f172a; border-color: #0f172a; color: #fff; }
.rd-tab.is-active:hover { color: #fff; }

/* ---- category divider ---- */
.rd-cat-divider { display: flex; align-items: center; gap: 14px; margin: 0 0 28px; }
.rd-cat-divider__dot { width: 9px; height: 9px; border-radius: 999px; flex-shrink: 0; }
.rd-cat-divider__label { font-size: 13px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.rd-cat-divider__line { height: 1px; background: #eef0f3; width: 100%; }
.rd-cat-divider__count { font-size: 12px; font-weight: 600; color: #94a3b8; white-space: nowrap; }
.rd-cat-block { margin: 0 0 56px; }
.rd-cat-block:last-child { margin-bottom: 0; }

.rd-group { margin: 0 0 30px; }
.rd-group:last-child { margin-bottom: 0; }
.rd-group h4 { font-size: 14px; font-weight: 700; color: #334155; margin: 0 0 14px; }

.rd-tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.rd-tool-card { display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid #eef0f3; border-radius: 14px; padding: 18px; min-height: 128px; transition: transform .15s ease, box-shadow .15s ease; }
.rd-tool-card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -16px rgba(15,23,42,.25); }
.rd-tool-card__icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.rd-tool-card h5 { font-size: 14px; font-weight: 700; margin: 0; line-height: 1.35; color: #0f172a; }
.rd-tool-card p { font-size: 12.5px; color: #64748b; margin: 0; line-height: 1.5; }

.rd-cat--pdf .rd-tool-card__icon { background: #eff6ff; color: #1d4ed8; }
.rd-cat--pdf .rd-cat-divider__dot { background: #2563eb; }
.rd-cat--pdf .rd-cat-divider__label { color: #1d4ed8; }

.rd-cat--image .rd-tool-card__icon { background: #ecfdf5; color: #059669; }
.rd-cat--image .rd-cat-divider__dot { background: #059669; }
.rd-cat--image .rd-cat-divider__label { color: #059669; }

.rd-cat--label .rd-tool-card__icon { background: #fff7ed; color: #c2410c; }
.rd-cat--label .rd-cat-divider__dot { background: #ea580c; }
.rd-cat--label .rd-cat-divider__label { color: #c2410c; }

/* convert-format matrix */
.rd-matrix { background: #fff; border: 1px solid #eef0f3; border-radius: 14px; padding: 24px 28px; }
.rd-matrix__cols { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 24px; }
.rd-matrix__col-title { display: inline-flex; align-items: center; font-size: 12px; font-weight: 800; letter-spacing: .04em; color: #059669; background: #ecfdf5; border-radius: 6px; padding: 3px 8px; margin: 0 0 12px; }
.rd-matrix__link { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #334155; padding: 6px 0; }
.rd-matrix__link:hover { color: #059669; }
.rd-matrix__link svg { color: #94a3b8; flex-shrink: 0; }
.rd-matrix__note { margin-top: 18px; padding-top: 16px; border-top: 1px solid #f1f5f9; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #334155; }

/* shipping label cards */
.rd-label-card { display: flex; flex-direction: column; gap: 14px; background: #fff; border: 1px solid #eef0f3; border-radius: 16px; padding: 22px; transition: transform .15s ease, box-shadow .15s ease; }
.rd-label-card:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -16px rgba(15,23,42,.25); }
.rd-label-card__logo { width: 44px; height: 44px; border-radius: 12px; background: #fff7ed; display: flex; align-items: center; justify-content: center; padding: 8px; }
.rd-label-card__logo img { width: 100%; height: 100%; object-fit: contain; }
.rd-label-card h5 { font-size: 15px; font-weight: 700; margin: 0; color: #0f172a; }
.rd-label-card p { font-size: 13px; color: #64748b; margin: 0; line-height: 1.5; }

.rd-empty-state { display: none; text-align: center; color: #6b7280; font-size: 14px; padding: 40px 1rem; border: 1px dashed #e5e7eb; border-radius: 1rem; }

/* ---- trust ---- */
.rd-trust { border-radius: 28px; padding: 56px 40px; text-align: center; position: relative; overflow: hidden; isolation: isolate; background: radial-gradient(120% 160% at 100% 0%, #16264a 0%, #0f1b2e 55%, #0b1524 100%); }
.rd-trust h2 { font-size: 30px; font-weight: 800; color: #fff; margin: 0 0 40px; }
.rd-trust__grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 36px; max-width: 880px; margin: 0 auto; }
.rd-trust__icon { width: 52px; height: 52px; border-radius: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; color: #93c5fd; }
.rd-trust__item h3 { font-size: 16px; font-weight: 700; color: #fff; margin: 0 0 8px; }
.rd-trust__item p { font-size: 13.5px; color: #94a3b8; margin: 0; line-height: 1.6; }

/* ---- single-column hero variant (PDF/Image Tools hub pages: no two-column
   product-window mockup, just the intro) ---- */
.rd-hero--single { padding: 48px 0 64px; }
.rd-hero--single h1 { font-size: 44px; }

/* ---- responsive ---- */
@media (max-width: 980px) {
    .rd-hero__grid { grid-template-columns: 1fr; gap: 40px; }
    .rd-hero__grid > div:last-child { max-width: 460px; }
    .rd-popular-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .rd-tool-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .rd-matrix__cols { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .rd-trust__grid { grid-template-columns: 1fr; max-width: 420px; }
}
@media (max-width: 640px) {
    .rd-wrap { padding: 0 20px; }
    .rd-hero { padding: 40px 0 48px; }
    .rd-hero h1 { font-size: 32px; }
    .rd-hero p.rd-lede { font-size: 15.5px; }
    .rd-cta-row { flex-direction: column; align-items: stretch; }
    .rd-trust-row { flex-direction: column; align-items: flex-start; gap: 10px; }
    .rd-section { padding: 48px 0; }
    .rd-section-head h2 { font-size: 24px; }
    .rd-popular-grid { grid-template-columns: 1fr; }
    .rd-tool-grid { grid-template-columns: 1fr; }
    .rd-matrix__cols { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px 16px; }
    .rd-tabs { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
    .rd-tab { flex-shrink: 0; }
    .rd-trust { padding: 40px 24px; }
    .rd-trust h2 { font-size: 24px; }
}
