/* Design tokens adapted from privapdf.org for visual consistency. */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-deep: #ffffff;
  --bg-primary: #f7f8fa;
  --bg-card: #ffffff;
  --bg-elevated: #f0f1f5;
  --red: #e63946;
  --red-dark: #c1121f;
  --red-glow: rgba(230, 57, 70, 0.1);
  --text-primary: #1a1d26;
  --text-muted: #5a6070;
  --text-dim: #8b92a8;
  --border: rgba(0, 0, 0, 0.08);
  --green: #0d9488;
  --font-heading: "DM Serif Display", serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* SVG noise overlay — subtle texture that prevents flat-look. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.015;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* Faint grid behind the page. */
.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.06) 1px, transparent 1px);
  background-size: 80px 80px;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ── Nav ── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.nav-brand .brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  box-shadow: 0 2px 12px rgba(230, 57, 70, 0.25);
}

.nav-brand span {
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover { color: var(--text-primary); }

/* ── Section divider ── */

.section-divider {
  border: none;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--border),
    rgba(230, 57, 70, 0.08),
    var(--border),
    transparent
  );
  margin: 0;
}

/* ── Hero ── */

.hero {
  padding: 118px 0 42px;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  text-align: center;
  max-width: 980px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--red);
  background: var(--red-glow);
  border: 1px solid rgba(230, 57, 70, 0.25);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3.8rem;
  line-height: 1.15;
  margin-bottom: 14px;
  color: var(--text-primary);
  font-weight: 400;
}

.hero-sub {
  font-size: 1.08rem;
  color: var(--text-muted);
  margin: 0 auto 22px;
  max-width: 580px;
  line-height: 1.7;
}

.demo-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 116px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  margin: 0 auto 22px;
  max-width: 860px;
}

.demo-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.07);
  padding: 14px;
  text-align: left;
}

.demo-card-top,
.demo-meta,
.demo-action {
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.demo-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.demo-card-top strong {
  color: var(--red);
  font-weight: 500;
  text-transform: uppercase;
}

.demo-after .demo-card-top strong {
  color: var(--green);
}

.demo-image {
  min-height: 150px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(230, 57, 70, 0.3), rgba(13, 148, 136, 0.2)),
    radial-gradient(circle at 24% 28%, #ffffff 0 8%, transparent 9%),
    radial-gradient(circle at 74% 32%, rgba(255,255,255,0.75) 0 9%, transparent 10%),
    linear-gradient(145deg, #ffe5e8, #eef8f7 58%, #ffffff);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.demo-social-post {
  background:
    linear-gradient(#fff 0 50px, transparent 50px),
    linear-gradient(135deg, rgba(230, 57, 70, 0.3), rgba(13, 148, 136, 0.2)),
    radial-gradient(circle at 24% 46%, #ffffff 0 8%, transparent 9%),
    radial-gradient(circle at 74% 50%, rgba(255,255,255,0.75) 0 9%, transparent 10%),
    linear-gradient(145deg, #ffe5e8, #eef8f7 58%, #ffffff);
}

.demo-social-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  height: 50px;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.demo-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 48% 36%, #fff3ec 0 16%, transparent 17%),
    radial-gradient(circle at 50% 55%, #f2b79a 0 32%, transparent 33%),
    linear-gradient(135deg, #e63946, #0d9488);
}

.demo-social-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
  line-height: 1.1;
}

.demo-social-copy strong {
  color: #15171d;
  font-size: 0.86rem;
  font-weight: 700;
}

.demo-social-copy > span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #15171d;
  font-size: 0.82rem;
}

.demo-ai-icon {
  width: 14px;
  height: 14px;
  border: 1.8px solid #15171d;
  border-radius: 3px;
  position: relative;
  flex: 0 0 auto;
}

.demo-ai-icon::before,
.demo-ai-icon::after {
  content: "";
  position: absolute;
  background: #15171d;
}

.demo-ai-icon::before {
  width: 6px;
  height: 1.5px;
  right: -4px;
  top: -3px;
  transform: rotate(45deg);
}

.demo-ai-icon::after {
  width: 1.5px;
  height: 6px;
  right: -2px;
  top: -5px;
  transform: rotate(45deg);
}

.demo-dots {
  color: #15171d;
  font-weight: 700;
  letter-spacing: 0.08em;
  transform: translateY(-6px);
}

.demo-image::before,
.demo-image::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 0;
  height: 48%;
  background: linear-gradient(135deg, rgba(26, 29, 38, 0.78), rgba(26, 29, 38, 0.22));
  clip-path: polygon(0 100%, 30% 32%, 48% 64%, 68% 18%, 100% 100%);
}

.demo-image::after {
  left: 44%;
  right: 8%;
  height: 32%;
  opacity: 0.55;
}

.demo-label {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(193, 18, 31, 0.92);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
}

.clean-label {
  background: rgba(13, 148, 136, 0.94);
}

.demo-meta {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.demo-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.demo-meta span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.1);
}

.clean-meta span::before {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
}

.demo-action {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.demo-action span {
  display: block;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(230, 57, 70, 0.75), transparent);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 8px 28px rgba(230, 57, 70, 0.22);
}

.hero-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 8px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
}

.hero-pill svg {
  width: 14px;
  height: 14px;
  color: var(--green);
}

/* ── Tool section ── */

.tool-section {
  padding: 24px 0 60px;
  position: relative;
}

.content-section {
  padding: 60px 0;
  position: relative;
}

.section-intro {
  max-width: 720px;
  margin-bottom: 28px;
}

.section-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 10px;
}

.section-intro h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.2;
  font-weight: 400;
  margin-bottom: 14px;
}

.section-intro p {
  color: var(--text-muted);
  font-size: 1rem;
}

.info-grid,
.faq-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.info-card,
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.03);
}

.info-card h3,
.faq-item h3 {
  font-size: 1rem;
  margin-bottom: 10px;
}

.info-card p,
.faq-item p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.info-card ul {
  margin: 14px 0 0 18px;
  color: var(--text-muted);
}

.info-card li {
  margin-bottom: 8px;
}

.format-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.format-strip span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.dropzone {
  position: relative;
  background: var(--bg-card);
  border: 2px dashed rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  padding: 56px 24px;
  text-align: center;
  cursor: pointer;
  outline: none;
  transition:
    border-color 0.25s ease,
    background-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.08s ease;
}

.dropzone:hover {
  border-color: rgba(230, 57, 70, 0.4);
  box-shadow: 0 4px 24px rgba(230, 57, 70, 0.06);
}

.dropzone:focus-visible,
.dropzone.drag {
  border-color: var(--red);
  background: linear-gradient(180deg, rgba(230, 57, 70, 0.04), transparent);
  box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.1);
}

.dropzone.drag {
  transform: scale(1.005);
}

.drop-inner {
  pointer-events: none;
  color: var(--text-muted);
}

.drop-inner svg {
  color: var(--red);
  margin-bottom: 14px;
}

.drop-inner p {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--text-primary);
}

.drop-inner .hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}

.drop-inner button {
  pointer-events: auto;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  border: 0;
  padding: 8px 18px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  margin: 0 4px;
  box-shadow: 0 2px 12px rgba(230, 57, 70, 0.2);
  transition: all 0.2s ease;
}

.drop-inner button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(230, 57, 70, 0.32);
}

/* ── Controls bar ── */

.controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 0;
  flex-wrap: wrap;
}

.controls .check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  cursor: pointer;
  flex: 1 1 auto;
  user-select: none;
}

.controls .check input { margin: 0; accent-color: var(--red); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.25);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(230, 57, 70, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-elevated);
  transform: translateY(-1px);
}

.btn-text {
  background: transparent;
  color: var(--text-muted);
  border: 0;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  font-family: var(--font-body);
  transition: color 0.2s;
}

.btn-text:hover:not(:disabled) { color: var(--text-primary); }

.btn:disabled,
.btn-text:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Results list ── */

.results {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.2s ease;
  animation: row-in 0.2s ease-out;
  position: relative;
  overflow: hidden;
}

.thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb img[hidden] { display: none; }

.thumb-fallback {
  color: var(--text-dim);
  display: grid;
  place-items: center;
}

.thumb-fallback svg {
  width: 26px;
  height: 26px;
}

.thumb-fallback[hidden] { display: none; }

.row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(230, 57, 70, 0.05) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.row:hover {
  border-color: rgba(230, 57, 70, 0.25);
  box-shadow:
    0 0 24px rgba(230, 57, 70, 0.06),
    0 4px 16px rgba(0, 0, 0, 0.05);
}

.row:hover::before { opacity: 1; }

@keyframes row-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.row-main { min-width: 0; position: relative; z-index: 1; }

.filename {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-primary);
  word-break: break-all;
  margin-bottom: 4px;
}

.meta,
.detail {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.detail {
  margin-top: 4px;
  font-size: 0.7rem;
  color: var(--text-dim);
}

.status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 100px;
  white-space: nowrap;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.status.processing {
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.status.clean {
  color: var(--green);
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.2);
}

.status.stripped {
  color: var(--red);
  background: var(--red-glow);
  border: 1px solid rgba(230, 57, 70, 0.25);
}

.status.partial {
  color: #b97a00;
  background: rgba(185, 122, 0, 0.08);
  border: 1px solid rgba(185, 122, 0, 0.25);
}

.status.error {
  color: var(--red-dark);
  background: rgba(193, 18, 31, 0.08);
  border: 1px solid rgba(193, 18, 31, 0.25);
}

/* Per-row download button shrunk variant */
.row .btn-secondary {
  padding: 7px 14px;
  font-size: 0.8rem;
  position: relative;
  z-index: 1;
}

/* ── Explainer ── */

.explainer {
  margin-top: 48px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.explainer summary {
  padding: 18px 22px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background-color 0.2s ease;
}

.explainer summary:hover { background: var(--bg-primary); }
.explainer summary::-webkit-details-marker { display: none; }

.explainer summary::before {
  content: "+";
  display: inline-block;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  font-weight: 400;
  color: var(--red);
  font-size: 1.1rem;
  flex: 0 0 auto;
}

.explainer[open] summary::before { content: "−"; }

.explainer > div {
  padding: 0 22px 22px 52px;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.explainer p { margin: 0 0 12px; }

.explainer .note {
  border-left: 2px solid var(--red);
  padding-left: 14px;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-dim);
  background: rgba(230, 57, 70, 0.02);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
}

/* ── Footer ── */

.footer {
  padding: 48px 0 64px;
  text-align: center;
  position: relative;
}

.footer-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ── Responsive ── */

@media (max-width: 900px) {
  .hero h1 { font-size: 3rem; }
}

@media (max-width: 640px) {
  .hero { padding: 98px 0 34px; }
  .hero h1 { font-size: 2.15rem; }
  .hero-sub { font-size: 0.95rem; }
  .demo-flow {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .demo-action {
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  .demo-image { min-height: 132px; }
  .content-section { padding: 44px 0; }
  .dropzone { padding: 40px 16px; }
  .row {
    grid-template-columns: 48px 1fr auto;
    padding: 14px 16px;
    gap: 12px;
  }
  .thumb { width: 48px; height: 48px; }
  .row .btn-secondary {
    grid-column: 1 / -1;
    justify-self: end;
  }
  .controls { flex-direction: column; align-items: stretch; }
  .controls .check { justify-content: flex-start; }
  .controls .btn,
  .controls .btn-text { width: 100%; justify-content: center; }
  .info-grid,
  .faq-list { grid-template-columns: 1fr; }
  .info-card,
  .faq-item { padding: 18px; }
}
