/* ================================================================
   PDFSqueeze — style.css
   Production-grade CSS. Clean, modern SaaS aesthetic.
   ================================================================ */

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Colors */
  --bg:          #0a0b0f;
  --bg-card:     #111318;
  --bg-card-2:   #16191f;
  --border:      rgba(255,255,255,0.08);
  --border-focus:rgba(255,255,255,0.2);
  --text:        #f0f1f5;
  --text-muted:  #8a8f9e;
  --text-dim:    #555a6a;
  --accent:      #e8503a;
  --accent-2:    #f07052;
  --accent-glow: rgba(232,80,58,0.25);
  --green:       #27c27a;
  --green-glow:  rgba(39,194,122,0.2);
  --yellow:      #f5c842;
  --error:       #e8503a;
  --error-bg:    rgba(232,80,58,0.1);
  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 4px 32px rgba(0,0,0,0.45);
  --shadow-lg:   0 8px 64px rgba(0,0,0,0.6);

  /* Typography */
  --font:        'Sora', sans-serif;
  --mono:        'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }

/* ── Layout ───────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Navbar ───────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,11,15,0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: 7px;
  color: #fff;
}
.logo-accent { color: var(--accent); margin-left: 1px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
  position: relative;
  text-align: center;
  padding: 80px 20px 56px;
  overflow: hidden;
}
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 100% at 50% 0%, black 40%, transparent 100%);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(232,80,58,0.12);
  border: 1px solid rgba(232,80,58,0.3);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-2);
  letter-spacing: 0.03em;
  margin-bottom: 28px;
}
.hero-title {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(130deg, var(--accent), var(--accent-2) 60%, var(--yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Tool Card ────────────────────────────────────────────────── */
.tool-section { padding: 0 0 60px; }
.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  transition: border-color 0.25s;
}
.tool-card:focus-within { border-color: var(--border-focus); }

/* ── Upload Area ──────────────────────────────────────────────── */
.upload-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 320px;
  padding: 48px 32px;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 20px;
}
.upload-area:hover { background: rgba(255,255,255,0.02); }
.upload-area.drag-active { background: rgba(232,80,58,0.05); }

.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.upload-icon {
  width: 80px; height: 80px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(232,80,58,0.1);
  border: 1.5px dashed rgba(232,80,58,0.4);
  border-radius: 20px;
  color: var(--accent);
  margin-bottom: 8px;
  transition: background 0.2s, border-color 0.2s;
}
.upload-area:hover .upload-icon,
.upload-area.drag-active .upload-icon {
  background: rgba(232,80,58,0.18);
  border-color: rgba(232,80,58,0.7);
}
.upload-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.upload-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.link-text {
  color: var(--accent-2);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.upload-limit {
  font-size: 0.78rem;
  font-family: var(--mono);
  color: var(--text-dim);
  margin-top: 4px;
}

/* Drag overlay */
.drag-overlay {
  position: absolute;
  inset: 0;
  background: rgba(232,80,58,0.08);
  border: 2px dashed var(--accent);
  border-radius: 20px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
  z-index: 3;
  pointer-events: none;
}
.upload-area.drag-active .drag-overlay { display: flex; }

/* ── File Preview ─────────────────────────────────────────────── */
.file-preview {
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.file-info {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.file-icon-wrap {
  color: var(--accent);
  flex-shrink: 0;
}
.file-meta { flex: 1; min-width: 0; }
.file-name {
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.file-size {
  font-size: 0.78rem;
  font-family: var(--mono);
  color: var(--text-muted);
  margin-top: 2px;
}
.remove-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.remove-btn:hover { color: var(--error); background: var(--error-bg); }

/* Compression Options */
.compression-opts {}
.opts-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.opts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.opt-item {
  cursor: pointer;
  display: block;
}
.opt-item input[type="radio"] { display: none; }
.opt-box {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 12px;
  background: var(--bg-card-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, background 0.2s;
}
.opt-item:hover .opt-box { border-color: var(--border-focus); }
.opt-item.selected .opt-box,
.opt-item input:checked ~ .opt-box {
  border-color: var(--accent);
  background: rgba(232,80,58,0.07);
}
.opt-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}
.opt-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(232,80,58,0.15);
  border-radius: 100px;
  padding: 1px 7px;
  width: fit-content;
}
.opt-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Compress Button */
.compress-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  letter-spacing: -0.01em;
}
.compress-btn:hover {
  background: var(--accent-2);
  box-shadow: 0 4px 20px var(--accent-glow);
}
.compress-btn:active { transform: scale(0.985); }
.compress-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Progress State ───────────────────────────────────────────── */
.progress-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 300px;
  padding: 48px 32px;
}
.progress-icon { color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }
.progress-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.progress-bar-wrap {
  width: 100%;
  max-width: 340px;
  height: 6px;
  background: var(--bg-card-2);
  border-radius: 100px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 100px;
  transition: width 0.4s ease;
}
.progress-step {
  font-size: 0.82rem;
  font-family: var(--mono);
  color: var(--text-muted);
}

/* ── Result State ─────────────────────────────────────────────── */
.result-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 320px;
  padding: 48px 32px;
}
.result-icon.success {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  background: var(--green-glow);
  border: 2px solid var(--green);
  border-radius: 50%;
  color: var(--green);
}
.result-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
}
.size-comparison {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 24px;
  width: 100%;
  max-width: 380px;
}
.size-box {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.size-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  font-weight: 600;
}
.size-value {
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--text);
  letter-spacing: -0.02em;
}
.size-box.accent .size-value { color: var(--green); }
.size-arrow { color: var(--text-dim); flex-shrink: 0; }
.savings-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--green-glow);
  border: 1px solid rgba(39,194,122,0.3);
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--green);
  font-family: var(--mono);
}
.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 340px;
  padding: 16px 24px;
  background: var(--green);
  color: #0a0b0f;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  letter-spacing: -0.01em;
}
.download-btn:hover {
  background: #34d88a;
  box-shadow: 0 4px 20px var(--green-glow);
}
.download-btn:active { transform: scale(0.985); }
.compress-another-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 0.88rem;
  padding: 10px 20px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.compress-another-btn:hover { border-color: var(--border-focus); color: var(--text); }

/* ── Error Banner ─────────────────────────────────────────────── */
.error-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 24px;
  padding: 12px 16px;
  background: var(--error-bg);
  border: 1px solid rgba(232,80,58,0.3);
  border-radius: var(--radius-sm);
  color: var(--accent-2);
  font-size: 0.88rem;
  font-weight: 500;
}
.error-banner[hidden] { display: none; }
.error-banner svg { flex-shrink: 0; }
.error-banner span:nth-child(2) { flex: 1; }
.error-close {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0 2px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.error-close:hover { opacity: 1; }

/* ── Security Note ────────────────────────────────────────────── */
.security-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.5;
  padding: 0 4px;
}

/* ── Features Section ─────────────────────────────────────────── */
.features-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}
.section-title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  text-align: center;
  margin-bottom: 8px;
}
.section-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 48px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover { border-color: var(--border-focus); transform: translateY(-2px); }
.feature-num {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: var(--mono);
  color: var(--accent);
  opacity: 0.35;
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -0.06em;
}
.feature-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.feature-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── FAQ Section ──────────────────────────────────────────────── */
.faq-section {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.015));
}
.faq-container { max-width: 680px; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item[open] { border-color: var(--border-focus); }
.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.15s;
}
.faq-q:hover { background: rgba(255,255,255,0.02); }
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after {
  content: '+';
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}
details[open] .faq-q::after { transform: rotate(45deg); }
.faq-a {
  padding: 0 20px 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Footer ───────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 28px 20px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-brand {
  font-size: 0.95rem;
  font-weight: 600;
}
.footer-copy {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 680px) {
  .nav-links { display: none; }
  .hero { padding: 52px 20px 36px; }
  .features-grid { grid-template-columns: 1fr; gap: 14px; }
  .opts-grid { grid-template-columns: 1fr; }
  .file-preview { padding: 20px 16px 24px; }
  .size-comparison { max-width: 100%; }
  .upload-area { min-height: 260px; padding: 36px 20px; }
  .result-state, .progress-state { padding: 36px 20px; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .upload-icon { width: 64px; height: 64px; }
  .upload-title { font-size: 1rem; }
  .section-sub { font-size: 0.9rem; }
  .hero-desc { font-size: 0.9rem; }
}