/* ============================================================
   PDF a EPUB — PREMIUM dark-purple SaaS design (Visuo/Mufi, Gabungin)
   "WAO on open": gradient orbs, glassmorphism, 3D tilt, page thumbs.
   Zero frameworks, zero remote assets.
   Font: Plus Jakarta Sans (OFL), self-hosted.
   ============================================================ */

/* ---------- self-hosted font ---------- */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("assets/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bg-950: #12101d;
  --bg-900: #181527;
  --bg-800: #1f1b33;
  --violet-500: #8b5cf6;
  --violet-400: #a78bfa;
  --violet-700: #6d28d9;
  --orange-400: #fb923c;
  --orange-500: #f97316;

  --ink: #f4f2fb;
  --muted: #a9a3c7;
  --faint: #7c76a0;
  --line: rgba(139, 92, 246, 0.22);
  --card: rgba(31, 27, 51, 0.72);
  --card-solid: #1f1b33;
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.12);
  --success: #34d399;
  --warning: #fbbf24;

  --radius: 16px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --focus-ring: 0 0 0 3px rgba(139, 92, 246, 0.45);
  --shadow-lift: 0 18px 50px -12px rgba(139, 92, 246, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.65;
  background:
    radial-gradient(1100px 480px at 85% -80px, rgba(139, 92, 246, 0.16), transparent 60%),
    radial-gradient(900px 420px at -10% 20px, rgba(249, 115, 22, 0.10), transparent 55%),
    radial-gradient(700px 500px at 50% 110%, rgba(109, 40, 217, 0.12), transparent 60%),
    var(--bg-950);
  min-height: 100vh;
}
[hidden] { display: none !important; }
.sr-live {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 8px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18, 16, 29, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1120px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  font-size: 1.5rem; line-height: 1;
  background: linear-gradient(135deg, var(--violet-400), var(--orange-400));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-name { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.01em; }
.header-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.header-nav a {
  color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 600;
  padding: 8px 12px; border-radius: 10px; transition: color 0.2s, background 0.2s;
}
.header-nav a:hover { color: var(--ink); background: rgba(139, 92, 246, 0.14); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 56px 0 72px; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.orb-1 {
  width: 480px; height: 480px; top: -160px; right: -120px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.35), transparent 70%);
  animation: drift 14s ease-in-out infinite alternate;
}
.orb-2 {
  width: 380px; height: 380px; bottom: -140px; left: -100px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.22), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate-reverse;
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, 30px) scale(1.08); }
}
.hero-inner { position: relative; max-width: 920px; margin: 0 auto; padding: 0 20px; }
.kicker {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--violet-400);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
  background: rgba(139, 92, 246, 0.08); margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.12; letter-spacing: -0.02em;
  margin: 0 0 16px; font-weight: 800;
}
.grad {
  background: linear-gradient(120deg, var(--violet-400), var(--orange-400));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: 1.08rem; color: var(--muted); max-width: 640px; margin: 0 0 36px; }


/* ---------- entrance animations (premium reference system) ---------- */
@keyframes float-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes card-in { from { opacity: 0; transform: translateY(26px) rotateX(6deg); } to { opacity: 1; transform: none; } }
.kicker { animation: float-in 0.7s var(--ease-out) both; }
.hero h1 { animation: float-in 0.7s var(--ease-out) 0.08s both; }
.lede { animation: float-in 0.7s var(--ease-out) 0.16s both; }
.tool-card { animation: card-in 0.8s var(--ease-out) 0.2s both; transform-style: preserve-3d; }

/* ---------- tool card ---------- */
.tool-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: 28px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lift);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  will-change: transform;
}
.tool-card.tilt { transform-style: preserve-3d; }

.dropzone {
  border: 2px dashed rgba(139, 92, 246, 0.45);
  border-radius: var(--radius);
  padding: 44px 24px; text-align: center; cursor: pointer;
  background: rgba(139, 92, 246, 0.05);
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease-out);
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--violet-400);
  background: rgba(139, 92, 246, 0.12);
  transform: translateY(-2px);
}
.dropzone-icon { font-size: 2.6rem; margin-bottom: 8px; }
.dropzone-title { font-size: 1.15rem; font-weight: 700; margin: 0 0 6px; }
.dropzone-sub { color: var(--muted); font-size: 0.92rem; margin: 0; }
.link-like { color: var(--violet-400); font-weight: 700; text-decoration: underline; }

.notice {
  border-radius: 12px; padding: 12px 16px; margin-top: 16px; font-size: 0.92rem;
}
.notice:empty { display: none; }
.notice-error { background: var(--danger-bg); border: 1px solid rgba(248, 113, 113, 0.35); color: #fecaca; }
.notice-line { padding: 4px 0; }

/* file bar */
.file-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 16px; padding: 12px 16px;
  background: rgba(139, 92, 246, 0.08); border: 1px solid var(--line); border-radius: 12px;
}
.file-name { font-weight: 700; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.file-pages { color: var(--muted); font-size: 0.88rem; }
.icon-btn {
  flex: none; width: 34px; height: 34px; border-radius: 10px; border: 1px solid transparent;
  background: rgba(248, 113, 113, 0.12); color: var(--danger); font-size: 1rem; cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.icon-btn:hover { background: rgba(248, 113, 113, 0.22); transform: scale(1.06); }

/* options */
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.opt-group label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 8px; }
.opt-group input[type="text"] {
  width: 100%; padding: 12px 14px; border-radius: 12px; font: inherit;
  background: rgba(18, 16, 29, 0.7); border: 1px solid var(--line); color: var(--ink);
}
.opt-group input[type="text"]::placeholder { color: var(--faint); }
.hint { color: var(--faint); font-size: 0.82rem; margin: 6px 0 0; }
.hint-error { color: var(--danger); }
.dpi-row { display: flex; gap: 10px; }
.dpi-btn {
  flex: 1; padding: 12px 10px; border-radius: 12px; cursor: pointer; font: inherit;
  background: rgba(18, 16, 29, 0.7); border: 1px solid var(--line); color: var(--muted);
  font-weight: 700; font-size: 1rem; transition: all 0.2s;
}
.dpi-btn span { display: block; font-size: 0.75rem; font-weight: 600; color: var(--faint); }
.dpi-btn.is-active {
  border-color: var(--violet-500); color: var(--ink);
  background: rgba(139, 92, 246, 0.16);
  box-shadow: 0 0 0 1px var(--violet-500) inset;
}
.dpi-btn.is-active span { color: var(--violet-400); }

/* thumbnails */
.thumbs { margin-top: 18px; }
.thumbs-title { font-weight: 700; font-size: 0.92rem; margin: 0 0 10px; color: var(--muted); }
.thumbs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.thumb {
  position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: rgba(18, 16, 29, 0.6); aspect-ratio: 3 / 4;
  display: flex; align-items: center; justify-content: center;
}
.thumb-canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumb-label {
  position: absolute; bottom: 4px; left: 4px; font-size: 0.72rem; font-weight: 700;
  background: rgba(18, 16, 29, 0.8); padding: 2px 8px; border-radius: 999px; color: var(--muted);
}
.thumb.loading::after {
  content: ""; width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid rgba(139, 92, 246, 0.25); border-top-color: var(--violet-400);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.thumbs-more { grid-column: 1 / -1; color: var(--faint); font-size: 0.88rem; margin: 4px 0 0; }

/* progress */
.progress { margin-top: 18px; }
.progress-text { font-size: 0.92rem; color: var(--muted); margin: 0 0 8px; }
.progress-bar {
  height: 10px; border-radius: 999px; background: rgba(139, 92, 246, 0.14);
  overflow: hidden; border: 1px solid var(--line);
}
.progress-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--violet-500), var(--orange-400));
  transition: width 0.25s var(--ease-out);
}

/* actions */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.btn {
  font: inherit; font-weight: 700; border-radius: 12px; padding: 14px 26px; cursor: pointer;
  border: 1px solid transparent; transition: transform 0.15s var(--ease-out), box-shadow 0.2s, opacity 0.2s;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:not(:disabled):hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, var(--violet-500), var(--violet-700));
  color: #fff; box-shadow: 0 10px 28px -8px rgba(139, 92, 246, 0.6);
}
.btn-primary:not(:disabled):hover { box-shadow: 0 14px 34px -8px rgba(139, 92, 246, 0.75); }
.btn-secondary {
  background: rgba(139, 92, 246, 0.12); color: var(--ink); border-color: var(--line);
}
.btn-secondary:hover { background: rgba(139, 92, 246, 0.2); }
.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { color: var(--ink); background: rgba(139, 92, 246, 0.08); }
.btn-small { padding: 8px 16px; font-size: 0.86rem; }

/* results */
.results { margin-top: 22px; }
.results h3 { margin: 0 0 6px; font-size: 1.15rem; }
.results-summary { color: var(--muted); font-size: 0.92rem; margin: 0 0 14px; }
.results-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.result-item {
  display: flex; align-items: center; gap: 14px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(18, 16, 29, 0.5);
}
.result-thumb {
  width: 64px; height: 64px; object-fit: contain; border-radius: 8px; flex: none;
  background: #fff; border: 1px solid var(--line);
}
.result-info { flex: 1; min-width: 0; }
.result-name { font-weight: 700; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-meta { color: var(--muted); font-size: 0.82rem; }

.privacy-note {
  margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.86rem; text-align: center;
}

/* ---------- content sections ---------- */
.content { padding: 8px 0 72px; }
.content-inner { max-width: 860px; margin: 0 auto; padding: 0 20px; }
.content h2 { font-size: 1.6rem; letter-spacing: -0.01em; margin: 56px 0 18px; font-weight: 800; }
.content h2:first-child { margin-top: 24px; }
.content p, .content li { color: #d9d4ee; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li {
  position: relative; padding: 16px 18px 16px 58px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 16px; top: 14px; width: 32px; height: 32px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--violet-500), var(--violet-700));
  color: #fff; font-weight: 800; font-size: 0.95rem;
}
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.features li {
  padding: 14px 18px; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px;
}
.features li::before { content: "✓ "; color: var(--success); font-weight: 800; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
table.compare { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 560px; }
.compare caption { text-align: left; padding: 14px 16px; font-weight: 700; background: rgba(139, 92, 246, 0.1); }
.compare th, .compare td { padding: 12px 14px; text-align: left; border-top: 1px solid var(--line); }
.compare thead th { border-top: none; color: var(--muted); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; }
.compare tbody tr.highlight { background: rgba(139, 92, 246, 0.12); }
.compare tbody tr.highlight td:first-child { font-weight: 800; color: var(--violet-400); }

.faq details {
  border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px;
  background: var(--card); overflow: hidden;
}
.faq summary {
  padding: 16px 18px; cursor: pointer; font-weight: 700; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--violet-400); font-size: 1.3rem; font-weight: 800; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq .faq-a { padding: 0 18px 18px; color: var(--muted); }
.faq .faq-a p { margin: 0; }

.honest-box {
  border: 1px solid rgba(251, 191, 36, 0.35); background: rgba(251, 191, 36, 0.07);
  border-radius: var(--radius); padding: 18px 20px; margin-top: 24px;
}
.honest-box h3 { margin: 0 0 8px; font-size: 1.02rem; }
.honest-box p { margin: 0; font-size: 0.93rem; color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); padding: 28px 20px; text-align: center; }
.site-footer p { color: var(--faint); font-size: 0.86rem; margin: 0; }
.site-footer a { color: var(--violet-400); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .hero { padding: 36px 0 52px; }
  .tool-card { padding: 18px; }
  .dropzone { padding: 32px 16px; }
  .options { grid-template-columns: 1fr; }
  .header-nav { display: none; }
  .actions .btn { flex: 1 1 100%; }
  .result-thumb { width: 52px; height: 52px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- book info card (conversion preview) ---------- */
.book-card {
  display: flex; gap: 16px; align-items: flex-start;
  margin-top: 16px; padding: 16px;
  background: rgba(139, 92, 246, 0.08); border: 1px solid var(--line); border-radius: 12px;
}
.book-info { flex: 1; min-width: 0; }
.book-title { font-weight: 800; font-size: 1.02rem; margin: 0 0 4px; }
.book-author { color: var(--muted); font-size: 0.9rem; margin: 0 0 6px; }
.book-chapters { color: var(--faint); font-size: 0.85rem; margin: 0; }
.fidelity-note {
  margin: 12px 0 0; font-size: 0.85rem; color: var(--muted);
  border-left: 3px solid var(--warning); padding-left: 12px;
}

/* ---------- selects ---------- */
.opt-group select {
  width: 100%; padding: 12px 14px; border-radius: 12px; font: inherit;
  background: rgba(18, 16, 29, 0.7); border: 1px solid var(--line); color: var(--ink);
  cursor: pointer;
}
.opt-group select option { background: var(--bg-900); color: var(--ink); }

/* ============================================================
   3D premium enhancements — Visuo/Mufi reference system
   (tilt target for tilt-snippet.js, deep-glow card, overflow-x guard)
   Added 2026-10-12 premium redesign. Class names / IDs untouched.
   ============================================================ */
.tilt-3d { transform-style: preserve-3d; will-change: transform; transition: transform 0.18s ease-out; }
.hero { perspective: 1200px; }
.orb { transform: translateZ(0); }
.hero-orb { transform: translateZ(0); }
.tool-card {
  box-shadow: 0 24px 70px -18px rgba(0, 0, 0, 0.65),
              0 0 0 1px rgba(139, 92, 246, 0.12),
              0 0 44px -12px rgba(139, 92, 246, 0.28);
}
a.brand, a.brand:visited { text-decoration: none; color: inherit; cursor: pointer; }
body { overflow-x: hidden; }
html, body { overflow-x: clip; }
