/* ZepoPDF — custom styles (Tailwind CDN handles the rest).
 * New UI: red-orange gradient glow, dark mode, scroll animations. */
:root {
  --nova-violet: #7c3aed;
  --nova-fuchsia: #d946ef;
  --nova-ember: #f97316;
  --nova-amber: #f59e0b;
  --nova-ink: #1e1b2e;
  --bg: #faf9ff;
  --surface: #ffffff;
  --surface-soft: #f5f3ff;
  --text: #1e1b2e;
  --muted: #64748b;
  --border: #e5e7eb;
}
[data-theme="dark"] {
  --bg: #12101f;
  --surface: #1b1830;
  --surface-soft: #241f3d;
  --text: #eceaf6;
  --muted: #a5a1bd;
  --border: #322d52;
}
html { scroll-behavior: smooth; }
h1, h2, h3, section { scroll-margin-top: 100px; }
body { font-family: 'Inter', system-ui, sans-serif; color: var(--text); background: var(--bg); transition: background .3s, color .3s; }
h1, h2, h3, .font-display { font-family: 'Sora', 'Inter', sans-serif; }

/* ---- Red-orange gradient (brand) ---- */
.grad-text { background: linear-gradient(92deg, #7c3aed, #d946ef 45%, #f97316 80%, #f59e0b); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* Hero stats: after the count-up finishes, the numbers keep breathing — a
   soft glow pulse plus the gradient colours slowly flowing across them,
   so the stats stay alive and catch the eye. Gentle on purpose: no harsh
   blinking. */
.stat-glow { background-size: 200% 100%; animation: stat-glow-pulse 1.4s ease-in-out infinite, stat-gradient-flow 3.5s linear infinite; }
@keyframes stat-glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 1px rgba(217, 70, 239, .15)); }
  50% { filter: drop-shadow(0 0 12px rgba(217, 70, 239, .45)); }
}
@keyframes stat-gradient-flow { from { background-position: 0% 0; } to { background-position: 200% 0; } }
.grad-bg { background: linear-gradient(135deg, #7c3aed 0%, #a855f7 40%, #d946ef 70%, #f97316 100%); }
.grad-border { border: 1px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, #7c3aed, #d946ef, #f97316) border-box; }

.btn-nova { background: linear-gradient(135deg, #7c3aed, #d946ef 55%, #f97316); color: #fff; transition: transform .15s, box-shadow .15s; box-shadow: 0 8px 20px -8px rgba(217, 70, 239, .55); }
.btn-nova:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(249, 115, 22, .6); }
.btn-nova:disabled { opacity: .55; transform: none; cursor: not-allowed; }

/* ---- Glow effects ---- */
.glow-orb { position: absolute; border-radius: 9999px; filter: blur(70px); pointer-events: none; }
.glow-orb-1 { width: 420px; height: 420px; background: rgba(124, 58, 237, .35); top: -120px; left: -80px; animation: drift 12s ease-in-out infinite alternate; }
.glow-orb-2 { width: 380px; height: 380px; background: rgba(249, 115, 22, .28); top: -60px; right: -60px; animation: drift 14s ease-in-out infinite alternate-reverse; }
.glow-orb-3 { width: 300px; height: 300px; background: rgba(217, 70, 239, .25); bottom: -140px; left: 38%; animation: drift 16s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(30px, 24px) scale(1.12); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.animate-float { animation: floaty 5s ease-in-out infinite; }
.hero-glow { position: relative; overflow: hidden; }
.hero-glow::before { content: ""; position: absolute; inset: -40% -10% auto; height: 560px; background: radial-gradient(ellipse at 30% 20%, rgba(124,58,237,.22), transparent 55%), radial-gradient(ellipse at 75% 10%, rgba(249,115,22,.20), transparent 50%), radial-gradient(ellipse at 55% 80%, rgba(217,70,239,.16), transparent 55%); pointer-events: none; }

/* ---- Scroll reveal ---- */
/* Content is visible by default. JS adds .reveal-hidden just before
 * observing, so if JS fails or the observer never fires, nothing can
 * stay blank. A timeout + scroll fallback in app.js reveals the rest. */
.reveal { transition: opacity .6s ease, transform .6s ease; }
.reveal.reveal-hidden { opacity: 0; transform: translateY(22px); }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal.reveal-hidden { opacity: 1; transform: none; transition: none; } .glow-orb { animation: none; } }

/* ---- Hero underline animation (under "One bright studio.") ---- */
.hero-hl { position: relative; display: inline-block; }
.hero-hl::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -8px; height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff7a18, #ffb347, #ff7a18);
  background-size: 200% 100%;
  transform-origin: left center;
  animation: underline-draw .9s ease-out both, underline-shimmer 3.5s linear 1s infinite;
}
@keyframes underline-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes underline-shimmer { from { background-position: 0% 0; } to { background-position: 200% 0; } }

/* ---- Tools marquee: auto-scrolling strip under the hero ---- */
.marquee { overflow: hidden; border-bottom: 1px solid var(--border, #e9e4f5); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; align-items: center; gap: 2rem; width: max-content; padding: .7rem 0; animation: marquee-scroll 22s linear infinite; }
.marquee-track span { font-weight: 600; font-size: .95rem; color: var(--text, #334155); opacity: .8; white-space: nowrap; }
.marquee-track a { font-weight: 600; font-size: .95rem; color: var(--text, #334155); opacity: .8; white-space: nowrap; }
.marquee-track a:hover { color: #7c3aed; opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.cat-pill.active { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.marquee-track i { width: 7px; height: 7px; background: linear-gradient(135deg, #7c3aed, #f97316); transform: rotate(45deg); border-radius: 2px; flex-shrink: 0; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } .hero-hl::after { animation: none; } .stat-glow { animation: none; } }

/* ---- Mega dropdown ----
 * Hover-gap fix: .mega used to be only as tall as its button, so moving the
 * mouse down left :hover before reaching the panel (12px gap below the
 * button + 12px gap below the header). Now .mega stretches to the full
 * header height and an invisible ::before bridge covers the 12px gap, so
 * the hover path from button to panel is unbroken.
 * Positioning fix: the panel used to centre on the trigger button, so on
 * narrower desktop windows (~1100px) its 880px width spilled past the LEFT
 * edge and the first column was cut off. Now .mega is position: static and
 * the panel centres on the whole header bar (the relative container), so
 * it always fits at any desktop width. */
/* ---- Mobile hamburger menu ---- */
.mobile-link { display: block; padding: .65rem .75rem; border-radius: .75rem; }
.mobile-link:hover { background: #f5f3ff; color: #6d28d9; }
.mobile-link-sub { display: block; padding: .5rem .75rem; border-radius: .6rem; font-size: .85rem; }
.mobile-link-sub:hover { background: #f5f3ff; color: #6d28d9; }
#mobile-menu:not(.hidden) { animation: menuSlide .18s ease-out; }
@keyframes menuSlide { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

.mega { position: static; align-self: stretch; display: flex; align-items: center; }
.mega-panel { display: none; position: absolute; left: 50%; transform: translateX(-50%); top: calc(100% + 12px); width: min(880px, 92vw); z-index: 60; }
.mega-panel::before { content: ''; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
.mega:hover .mega-panel, .mega.open .mega-panel { display: block; }
.mega-panel a { display: block; border-radius: .6rem; padding: .45rem .6rem; }
.mega-panel a:hover { background: var(--surface-soft); }

/* ---- Inline SVG icons (no emoji anywhere in the UI) ---- */
.ic { width: 1em; height: 1em; flex-shrink: 0; }
.theme-btn svg { width: 18px; height: 18px; }
.icon-sun { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ---- Section headings: gradient bar under every section title ---- */
.sec-title::after { content: ''; display: block; width: 48px; height: 4px; border-radius: 999px; background: linear-gradient(90deg, #7c3aed, #d946ef, #f97316); margin-top: 10px; }

/* ---- Dark-mode dropzone: the white/80 fill made white text invisible ---- */
[data-theme="dark"] .dropzone { border-color: #8b7cf6; background-color: #1b1830; }
[data-theme="dark"] .bg-white\/80 { background-color: rgba(27, 24, 48, .9) !important; }

/* ---- Tool cards / dropzone ---- */
.tool-card { transition: transform .15s, box-shadow .15s, border-color .15s; background: var(--surface); }
.tool-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -14px rgba(217, 70, 239, .35); border-color: #c4b5fd; }

.dropzone { border: 2px dashed #c4b5fd; transition: border-color .15s, background .15s; }
.dropzone.drag { border-color: #f97316; background: #fff7ed; }

.nova-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 80px); z-index: 90; background: #1e1b2e; color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 14px; max-width: 90vw; opacity: 0; transition: transform .3s, opacity .3s; box-shadow: 0 16px 40px -12px rgba(0,0,0,.4); }
.nova-toast.show { transform: translate(-50%, 0); opacity: 1; }
.nova-toast.error { background: #b91c1c; }

.prose-nova p { margin: .7em 0; line-height: 1.75; color: var(--muted); }
.prose-nova h2 { font-size: 1.35rem; margin: 1.4em 0 .5em; font-weight: 700; color: var(--text); }
.prose-nova ul { list-style: disc; padding-left: 1.4em; margin: .7em 0; color: var(--muted); }
.prose-nova li { margin: .3em 0; }

.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.chip-ai { background: #fdf4ff; color: #a21caf; border: 1px solid #f0abfc; }
.chip-free { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.chip-popular { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; font-size: 10px; padding: 2px 8px; }

input[type=text], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; font-size: 14px; background: var(--surface); color: var(--text); outline: none;
}
input:focus, select:focus, textarea:focus { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(167, 139, 250, .25); }
input[type=color] { padding: 2px; height: 38px; cursor: pointer; }
input[type=checkbox] { width: auto; accent-color: #7c3aed; }
label.lbl { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--muted); }

.progress-track { height: 8px; background: #ede9fe; border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, #7c3aed, #d946ef, #f97316); width: 0%; transition: width .3s; }

details.faq summary { cursor: pointer; list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq[open ] .faq-chevron { transform: rotate(180deg); }
.faq-chevron { transition: transform .2s; }

.hero-grid-bg { background-image: radial-gradient(circle at 20% 10%, rgba(124,58,237,.14), transparent 45%), radial-gradient(circle at 85% 20%, rgba(249,115,22,.14), transparent 40%), radial-gradient(circle at 50% 90%, rgba(217,70,239,.10), transparent 40%); }

/* ---- Language + theme controls ---- */
.lang-select { width: auto !important; font-size: 13px; font-weight: 600; padding: 6px 8px; border-radius: 10px; }
.theme-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 17px; cursor: pointer; }
.theme-btn:hover { border-color: #c4b5fd; }

/* ---- Dark mode overrides for Tailwind utilities used in the templates ---- */
[data-theme="dark"] body, [data-theme="dark"] { background: var(--bg); color: var(--text); }
[data-theme="dark"] .bg-white { background-color: var(--surface) !important; }
[data-theme="dark"] .bg-slate-50 { background-color: var(--surface-soft) !important; }
[data-theme="dark"] .bg-slate-100 { background-color: #2a2547 !important; }
[data-theme="dark"] .bg-violet-50 { background-color: #241f3d !important; }
[data-theme="dark"] .bg-violet-100 { background-color: #2e2757 !important; }
[data-theme="dark"] .bg-amber-50 { background-color: #33270f !important; }
[data-theme="dark"] .bg-emerald-50 { background-color: #0f2e1e !important; }
[data-theme="dark"] .bg-fuchsia-50 { background-color: #2c1533 !important; }
[data-theme="dark"] .text-slate-900, [data-theme="dark"] .text-slate-800 { color: #f1eefc !important; }
[data-theme="dark"] .text-slate-700 { color: #d8d4ec !important; }
[data-theme="dark"] .text-slate-600 { color: #b9b4d1 !important; }
[data-theme="dark"] .text-slate-500 { color: #a5a1bd !important; }
[data-theme="dark"] .text-slate-400 { color: #8d89ab !important; }
[data-theme="dark"] .text-violet-700 { color: #c4b5fd !important; }
[data-theme="dark"] .text-violet-600 { color: #a78bfa !important; }
[data-theme="dark"] .border-slate-200, [data-theme="dark"] .border-slate-100 { border-color: var(--border) !important; }
[data-theme="dark"] .border-violet-100 { border-color: #3b3266 !important; }
[data-theme="dark"] .border-violet-200 { border-color: #4c4190 !important; }
[data-theme="dark"] .border-amber-200 { border-color: #6b4d16 !important; }
[data-theme="dark"] .border-emerald-200 { border-color: #14532d !important; }
[data-theme="dark"] .border-fuchsia-100 { border-color: #4a2358 !important; }
[data-theme="dark"] .text-amber-800, [data-theme="dark"] .text-amber-900 { color: #fcd34d !important; }
[data-theme="dark"] .text-emerald-800, [data-theme="dark"] .text-emerald-700 { color: #6ee7b7 !important; }
[data-theme="dark"] .text-fuchsia-700 { color: #e879f9 !important; }
[data-theme="dark"] .grad-border { background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(135deg, #7c3aed, #d946ef, #f97316) border-box; }
[data-theme="dark"] header { background: rgba(18, 16, 31, .88) !important; border-color: #2a2547 !important; }
[data-theme="dark"] .dropzone.drag { background: #2c1f10; }
[data-theme="dark"] .hero-grid-bg { background-image: radial-gradient(circle at 20% 10%, rgba(124,58,237,.28), transparent 45%), radial-gradient(circle at 85% 20%, rgba(249,115,22,.22), transparent 40%), radial-gradient(circle at 50% 90%, rgba(217,70,239,.18), transparent 40%); }
[data-theme="dark"] .shadow-violet-100 { box-shadow: 0 20px 40px -18px rgba(0,0,0,.7) !important; }
[data-theme="dark"] .chip-ai { background: #2c1533; color: #e879f9; border-color: #701a75; }
[data-theme="dark"] .chip-free { background: #0f2e1e; color: #6ee7b7; border-color: #14532d; }
[data-theme="dark"] .chip-popular { background: #0f2e1e; color: #6ee7b7; border-color: #14532d; }
[data-theme="dark"] .progress-track { background: #2e2757; }
[data-theme="dark"] .mega-panel a:hover { background: var(--surface-soft); }
