/* ============================================================
   FreeFastPDF — Main CSS
   Design tokens · Reset · Typography · Global components
   ============================================================ */

/* ── TOKENS ── */
:root {
  --bg:       #050816;
  --bg2:      #08102a;
  --bg3:      #0d1640;
  --c1:       rgba(255,255,255,.04);
  --c2:       rgba(255,255,255,.07);
  --c3:       rgba(255,255,255,.11);
  --bd1:      rgba(255,255,255,.08);
  --bd2:      rgba(255,255,255,.15);
  --blue:     #3B82F6;
  --purple:   #8B5CF6;
  --cyan:     #06B6D4;
  --green:    #10B981;
  --amber:    #F59E0B;
  --red:      #EF4444;
  --pink:     #EC4899;
  --t1:       #F1F5F9;
  --t2:       #94A3B8;
  --t3:       #64748B;
  --grad:     linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
  --r:        14px;
  --r-lg:     20px;
  --nav-h:    60px;
  --sb-w:     220px;
  --transition: .18s cubic-bezier(.16,1,.3,1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--t1);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 16px; } /* 16px prevents iOS zoom */
ul, ol { list-style: none; }

/* ── LAYOUT ── */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.sp    { padding: 72px 0; }
.sp-sm { padding: 44px 0; }
.sp-xs { padding: 28px 0; }

/* ── BACKGROUND FX ── */
.bg-fx {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.bg-o {
  position: absolute; border-radius: 50%;
  filter: blur(110px); will-change: transform;
}
.bg-o1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(59,130,246,.12), transparent 65%);
  top: -200px; left: -250px;
}
.bg-o2 {
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(139,92,246,.09), transparent 65%);
  top: 38%; right: -200px;
}
.bg-o3 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(6,182,212,.06), transparent 65%);
  bottom: -80px; left: 25%;
}
.bg-grid {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.011) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.011) 1px, transparent 1px);
  background-size: 64px 64px;
}

/* ── TYPOGRAPHY ── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(139,92,246,.1); border: 1px solid rgba(139,92,246,.22);
  border-radius: 50px; padding: 4px 14px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: #A78BFA; margin-bottom: 14px;
}
.sec-center { text-align: center; margin-bottom: 48px; }
.sh2 {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 900; letter-spacing: -1.4px; line-height: 1.08;
  margin-bottom: 12px;
}
.ssub {
  font-size: 16px; color: var(--t2);
  max-width: 520px; margin: 0 auto; line-height: 1.7;
}
.g {
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── REVEAL ANIMATION ── */
.reveal {
  opacity: 0; transform: translateY(16px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ── BUTTONS ── */
.btn-p {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px;
  background: var(--grad); border: none; border-radius: var(--r);
  color: #fff; font-size: 14.5px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  min-height: 48px; transition: all var(--transition);
  box-shadow: 0 0 24px rgba(59,130,246,.32);
  -webkit-tap-highlight-color: transparent;
}
.btn-p:hover  { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(59,130,246,.5); }
.btn-p:active { transform: translateY(0); }

.btn-g {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px;
  background: var(--c1); border: 1px solid var(--bd2); border-radius: var(--r);
  color: var(--t1); font-size: 14.5px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  min-height: 48px; transition: all var(--transition);
  backdrop-filter: blur(8px);
  -webkit-tap-highlight-color: transparent;
}
.btn-g:hover { background: var(--c2); transform: translateY(-1px); }

.btn-o {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px;
  background: transparent; border: 1px solid var(--bd2); border-radius: var(--r);
  color: var(--t1); font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  min-height: 44px; transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.btn-o:hover { background: var(--c2); }

/* ── LOGO ── */
.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; border: none; background: none;
  cursor: pointer;
}
.logo-mark {
  width: 34px; height: 34px; flex-shrink: 0;
  background: var(--grad); border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px rgba(59,130,246,.35);
}
.logo-name { font-size: 15px; font-weight: 800; letter-spacing: -.3px; color: var(--t1); }
.logo-name b {
  background: var(--grad);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* ── CARDS ── */
.card {
  background: var(--c1); border: 1px solid var(--bd1);
  border-radius: var(--r); padding: 22px;
  transition: all var(--transition);
}
.card:hover { border-color: var(--bd2); box-shadow: 0 12px 36px rgba(0,0,0,.22); }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(0);
  background: rgba(12,18,46,.98); border: 1px solid var(--bd2);
  border-radius: 12px; padding: 11px 20px;
  font-size: 13.5px; color: var(--t1);
  backdrop-filter: blur(16px);
  z-index: 900; pointer-events: none;
  opacity: 0; transition: opacity .25s, transform .25s;
  white-space: nowrap; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-10px); }

/* ── MODAL ── */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.72); z-index: 800;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px); animation: fadeIn .2s;
  padding: 16px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: rgba(8,13,40,.99); border: 1px solid var(--bd2);
  border-radius: 20px; padding: 28px;
  width: 100%; max-width: 400px;
  position: relative; max-height: 90svh; overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,.6);
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--c2); border: 1px solid var(--bd1);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--t2); font-size: 18px; line-height: 1;
}
.modal-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.modal-logo-mark {
  width: 36px; height: 36px; border-radius: 9px;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
}
.modal-logo-name { font-size: 16px; font-weight: 800; color: var(--t1); }
.modal-logo-name em { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-style: normal; }
.modal-tabs {
  display: flex; background: rgba(255,255,255,.06);
  border-radius: 10px; padding: 3px; margin-bottom: 22px;
}
.modal-tab {
  flex: 1; padding: 8px; text-align: center;
  font-size: 13.5px; font-weight: 600; color: var(--t3);
  cursor: pointer; border-radius: 8px; transition: all .14s;
  border: none; background: none;
}
.modal-tab.active { background: rgba(255,255,255,.11); color: var(--t1); }
.modal-lbl {
  font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  color: var(--t3); margin-bottom: 6px; display: block;
}
.modal-inp {
  width: 100%; padding: 11px 14px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px; color: var(--t1); font-size: 16px;
  outline: none; margin-bottom: 14px; transition: border .15s;
}
.modal-inp:focus { border-color: var(--blue); background: var(--c2); }
.modal-inp::placeholder { color: var(--t3); }
.modal-btn {
  width: 100%; padding: 13px;
  background: var(--grad); border: none; border-radius: 11px;
  color: #fff; font-size: 14.5px; font-weight: 700;
  cursor: pointer; min-height: 48px; transition: opacity .18s;
}
.modal-btn:hover { opacity: .92; }
.modal-switch { color: var(--t2); text-align: center; font-size: 13px; margin-top: 14px; }
.modal-switch button { color: #60A5FA; font-weight: 600; cursor: pointer; background: none; border: none; font-size: 13px; }

/* ── COOKIE BANNER ── */
.cookie-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 700;
  background: rgba(7,11,34,.98); border-top: 1px solid var(--bd2);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  animation: slideUp .32s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.cookie-bar p { font-size: 13.5px; color: var(--t2); line-height: 1.55; flex: 1; min-width: 200px; }
.cookie-bar a { color: var(--blue); font-weight: 600; }
.cookie-btns { display: flex; gap: 9px; flex-shrink: 0; }
.cb-accept {
  padding: 10px 20px; background: var(--grad); border: none;
  border-radius: 10px; color: #fff; font-size: 13.5px; font-weight: 700;
  cursor: pointer; min-height: 44px; white-space: nowrap;
}
.cb-reject {
  padding: 10px 20px; background: var(--c2); border: 1px solid var(--bd2);
  border-radius: 10px; color: var(--t1); font-size: 13.5px; font-weight: 600;
  cursor: pointer; min-height: 44px; white-space: nowrap;
}

/* ── INFO BOX ── */
.info-box {
  background: rgba(59,130,246,.07); border: 1px solid rgba(59,130,246,.16);
  border-radius: 10px; padding: 11px 14px;
  font-size: 13px; color: var(--t2); line-height: 1.6; margin-top: 12px;
}

/* ── PULSE BADGE ── */
.pulse-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.22);
  border-radius: 50px; padding: 5px 14px;
  font-size: 12px; font-weight: 700; color: #34D399;
  letter-spacing: .4px; margin-bottom: 20px;
}
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #10B981; box-shadow: 0 0 8px #10B981;
  animation: pulse 2s infinite; flex-shrink: 0;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.82); }
}

/* ── PROGRESS BAR ── */
.prog-wrap { display: none; margin: 10px 0; }
.prog-wrap.visible { display: block; }
.prog-bar { height: 4px; background: var(--c3); border-radius: 4px; overflow: hidden; margin-bottom: 6px; }
.prog-fill { height: 100%; background: var(--grad); border-radius: 4px; transition: width .3s ease; width: 0; }
.prog-label { font-size: 12px; color: var(--t2); }

/* ── FILE LIST ── */
.file-list { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.fl-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--c2); border-radius: 9px; padding: 9px 12px;
  min-height: 44px;
}
.fl-ico { font-size: 18px; flex-shrink: 0; }
.fl-name { flex: 1; font-size: 13px; color: var(--t1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-size { font-size: 11.5px; color: var(--t3); flex-shrink: 0; }
.fl-rm {
  background: none; border: none; cursor: pointer;
  color: var(--t3); font-size: 18px; line-height: 1; padding: 2px 4px;
  transition: color .14s; flex-shrink: 0; min-width: 32px; text-align: center;
}
.fl-rm:hover { color: var(--red); }

/* ── RESULT CARD ── */
.result-card {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 13px; overflow: hidden; margin-bottom: 10px;
}
.rc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: rgba(255,255,255,.03);
  flex-wrap: wrap; gap: 7px;
}
.rc-fn { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--t1); min-width: 0; flex: 1; }
.rc-badge { font-size: 9.5px; font-weight: 700; padding: 2px 6px; border-radius: 4px; flex-shrink: 0; }
.rc-fn-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; flex-shrink: 0; }
.rc-orig { color: var(--t3); text-decoration: line-through; }
.rc-new  { color: var(--green); font-weight: 700; }
.rc-sav  { background: rgba(16,185,129,.12); color: #34D399; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 5px; }
.rc-body { padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; }
.rc-thumb {
  width: 56px; height: 56px; border-radius: 9px; flex-shrink: 0;
  border: 1px solid var(--bd1); display: flex; align-items: center;
  justify-content: center; font-size: 22px; overflow: hidden;
}
.rc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rc-info { flex: 1; min-width: 0; }
.rc-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.rc-chip { font-size: 11px; font-weight: 500; padding: 3px 9px; border-radius: 6px; background: var(--c2); color: var(--t2); }
.rc-dl {
  width: 100%; padding: 10px 14px;
  background: var(--grad); color: #fff;
  border: none; border-radius: 9px; font-size: 13px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; transition: opacity .18s;
}
.rc-dl:hover { opacity: .9; }
.result-banner {
  background: var(--grad); border-radius: 13px;
  padding: 14px 18px; margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 9px;
}
.rb-val { font-size: 16px; font-weight: 800; color: #fff; }
.rb-lbl { font-size: 12px; color: rgba(255,255,255,.75); }
.rb-dlall {
  padding: 8px 16px; background: rgba(255,255,255,.2); color: #fff;
  border: 1px solid rgba(255,255,255,.3); border-radius: 8px;
  font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
}

/* ── FAQ ── */
.faq-wrap { max-width: 740px; margin: 0 auto; }
.faq-item { border: 1px solid var(--bd1); border-radius: var(--r); margin-bottom: 9px; overflow: hidden; transition: border-color .2s; }
.faq-item.open { border-color: var(--bd2); }
.faq-q {
  display: flex; align-items: center; justify-content: space-between;
  padding: 17px 20px; cursor: pointer;
  background: var(--c1); border: none; width: 100%; text-align: left;
  color: var(--t1); font-size: 14.5px; font-weight: 600;
  gap: 14px; transition: background .14s; min-height: 56px;
}
.faq-q:hover { background: var(--c2); }
.faq-arr { font-size: 17px; flex-shrink: 0; transition: transform .22s; color: var(--t3); }
.faq-item.open .faq-arr { transform: rotate(180deg); }
.faq-a { padding: 0 20px; max-height: 0; overflow: hidden; font-size: 14px; color: var(--t2); line-height: 1.75; transition: max-height .3s ease, padding .3s; }
.faq-item.open .faq-a { padding: 14px 20px; max-height: 500px; }

/* ── LOADING SCREEN ── */
#loading {
  position: fixed; inset: 0; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; transition: opacity .4s;
}
#loading.done { opacity: 0; pointer-events: none; }
.ld-logo {
  width: 52px; height: 52px; background: var(--grad); border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  animation: ldpulse 1.2s ease-in-out infinite;
}
@keyframes ldpulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .65; transform: scale(.9); }
}

/* ── UTILITY ── */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-center { text-align: center; }
.mt-4  { margin-top: 4px;  }
.mt-8  { margin-top: 8px;  }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0  { margin-bottom: 0; }
