/* Peelr — clean SaaS UI: white, navy, pink accent */
:root {
  --navy: #0f172a;
  --navy-2: #1e293b;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --pink: #ec4899;
  --pink-2: #f43f5e;
  --pink-soft: #fdf2f8;
  --green: #16a34a;
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .25);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: #fff; line-height: 1.5; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
.container { width: min(1180px, 100% - 40px); margin-inline: auto; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.brand img { width: 34px; height: 34px; }
.nav-links { display: flex; gap: 22px; margin-left: 12px; }
.nav-links a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--ink); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; background: none; border: 0; padding: 8px; }
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 11px 20px; font-weight: 600; font-size: 15px; border: 1px solid transparent; text-decoration: none; transition: transform .08s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--navy-2); box-shadow: var(--shadow); }
.btn-outline { background: #fff; color: var(--ink); border-color: #cbd5e1; }
.btn-outline:hover:not(:disabled) { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--soft); }
.btn-pink { background: linear-gradient(135deg, var(--pink), var(--pink-2)); color: #fff; }
.btn-pink:hover:not(:disabled) { box-shadow: 0 10px 24px -10px rgba(236,72,153,.7); }
.btn-lg { padding: 15px 30px; font-size: 17px; border-radius: 12px; }
.btn-sm { padding: 7px 14px; font-size: 14px; }
.badge-pro { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 2px 7px; border-radius: 6px; background: linear-gradient(135deg, var(--pink), var(--pink-2)); color: #fff; vertical-align: middle; }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.spinner.dark { border-color: rgba(15,23,42,.15); border-top-color: var(--navy); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- hero ---------- */
.hero { padding: 56px 0 72px; }
.hero h1 { font-size: clamp(34px, 6vw, 68px); line-height: 1.04; letter-spacing: -.035em; margin: 0 0 18px; text-align: center; font-weight: 800; }
.grad { background: linear-gradient(90deg, #fb7185, var(--pink) 45%, #db2777); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { text-align: center; color: #334155; font-size: clamp(16px, 2vw, 20px); margin: 0 auto 40px; max-width: 760px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: stretch; }

.dropzone { border: 2px dashed #cbd5e1; border-radius: 18px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 48px 20px; text-align: center; min-height: 340px; transition: border-color .15s, background .15s; position: relative; }
.dropzone.drag { border-color: var(--pink); background: var(--pink-soft); }
.dropzone .icon { width: 56px; height: 56px; }
.dropzone p { margin: 0; color: #334155; }
.dropzone .or { color: var(--muted); font-size: 14px; }
.dropzone .paste-hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.formats { color: var(--muted); font-size: 14px; margin: 12px 2px 26px; }
.samples-title { font-size: 16px; margin: 0 0 10px; color: #334155; }
.samples { display: flex; gap: 10px; flex-wrap: wrap; }
.sample { width: 96px; height: 70px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); padding: 0; position: relative; background: var(--soft); }
.sample img { width: 100%; height: 100%; object-fit: cover; }
.sample::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 28px; font-weight: 300; background: rgba(15,23,42,.18); transition: background .15s; }
.sample:hover::after { background: rgba(15,23,42,.38); }

/* before/after slider */
.compare { position: relative; border-radius: 18px; overflow: hidden; aspect-ratio: 4 / 3; user-select: none; touch-action: pan-y; background: #fff; box-shadow: var(--shadow); }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare .after-wrap { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); }
.checker { background-color: #fff; background-image: linear-gradient(45deg, #e5e7eb 25%, transparent 25%), linear-gradient(-45deg, #e5e7eb 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e5e7eb 75%), linear-gradient(-45deg, transparent 75%, #e5e7eb 75%); background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0; }
.compare .handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; background: #fff; transform: translateX(-50%); box-shadow: 0 0 0 1px rgba(15,23,42,.08); }
.compare .handle::after { content: "⟷"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 18px; box-shadow: var(--shadow); color: var(--navy); }
.compare input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare .tag { position: absolute; top: 14px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: rgba(15,23,42,.72); color: #fff; }
.compare .tag.l { left: 14px; } .compare .tag.r { right: 14px; }

/* ---------- editor ---------- */
.editor { padding: 34px 0 60px; }
.editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.editor-head h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.usage-pill { font-size: 14px; color: #334155; background: var(--soft); border: 1px solid var(--line); padding: 6px 12px; border-radius: 99px; }
.stage { border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: grid; place-items: center; min-height: 360px; position: relative; overflow: hidden; }
.stage .canvas-wrap { position: relative; max-width: 100%; border-radius: 8px; overflow: hidden; }
.stage img.result { max-height: 520px; width: auto; max-width: 100%; position: relative; }
.stage .processing { display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--muted); padding: 40px; text-align: center; }
.stage .processing img { max-height: 260px; border-radius: 10px; filter: blur(2px) saturate(.6); opacity: .65; }
.view-toggle { position: absolute; top: 14px; left: 14px; display: flex; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 3px; z-index: 2; }
.view-toggle button { border: 0; background: transparent; padding: 5px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.view-toggle button.on { background: var(--navy); color: #fff; }
.toolbar { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin: 22px 0 8px; }
.toolbar .label { font-weight: 600; font-size: 15px; }
.swatches { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); padding: 0; position: relative; }
.swatch.on { outline: 3px solid var(--pink); outline-offset: 2px; }
.swatch input[type="color"] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.swatch.custom { background: conic-gradient(#f43f5e, #f59e0b, #84cc16, #06b6d4, #6366f1, #ec4899, #f43f5e); }
.actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.res-note { text-align: center; color: var(--muted); font-size: 14px; margin-top: 10px; }

.upload-another { margin-top: 48px; padding-top: 36px; border-top: 1px solid var(--line); text-align: center; }
.upload-another h3 { font-size: 26px; margin: 0 0 18px; letter-spacing: -.02em; }
.upload-another .dropzone { min-height: 220px; max-width: 680px; margin: 0 auto; }

/* batch */
.batch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.batch-item { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.batch-item .thumb { aspect-ratio: 4/3; display: grid; place-items: center; }
.batch-item .thumb img { max-height: 100%; object-fit: contain; }
.batch-item .meta { padding: 10px 12px; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.batch-item .meta .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); font-weight: 500; }
.batch-item .err { color: #b91c1c; }

/* ---------- sections ---------- */
section.block { padding: 72px 0; }
section.block.alt { background: var(--soft); border-block: 1px solid var(--line); }
.section-title { text-align: center; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.03em; margin: 0 0 10px; }
.section-sub { text-align: center; color: var(--muted); margin: 0 auto 40px; max-width: 620px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature .n { width: 36px; height: 36px; border-radius: 10px; background: var(--pink-soft); color: var(--pink); display: grid; place-items: center; font-weight: 800; margin-bottom: 14px; }
.feature h3 { margin: 0 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- plans (modal + section) ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan { position: relative; text-align: left; background: #fff; border: 1px solid #cbd5e1; border-radius: 14px; padding: 22px 20px 18px; display: flex; flex-direction: column; gap: 6px; transition: border-color .15s, box-shadow .15s, transform .1s; min-height: 150px; }
.plan:hover { border-color: var(--pink); box-shadow: var(--shadow); }
.plan.popular { border: 2px solid var(--pink); }
.plan .ribbon { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, #a855f7, var(--pink)); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 6px; letter-spacing: .03em; white-space: nowrap; }
.plan .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan .name { font-weight: 700; font-size: 17px; }
.plan .save { font-size: 12px; font-weight: 700; color: #15803d; background: #dcfce7; border-radius: 99px; padding: 2px 9px; }
.plan .price { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.plan .price small { font-size: 14px; font-weight: 500; color: var(--muted); }
.plan .billed { font-size: 13px; color: #475569; min-height: 20px; }
.plan .go { margin-top: auto; align-self: flex-end; color: var(--pink); font-size: 20px; line-height: 1; }
.benefits { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 18px 0 4px; padding: 0; list-style: none; font-size: 14px; color: #334155; }
.benefits li::before { content: "✓"; color: var(--pink); font-weight: 800; margin-right: 6px; }
.plans-skeleton { height: 150px; border-radius: 14px; background: linear-gradient(90deg, #f1f5f9, #e2e8f0, #f1f5f9); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(15,23,42,.6); overflow-y: auto; }
.modal-card { position: relative; background: #fff; border-radius: 18px; width: min(920px, 100%); padding: 30px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); max-height: calc(100dvh - 32px); overflow-y: auto; }
.modal-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border: 0; background: transparent; border-radius: 10px; font-size: 24px; line-height: 1; color: var(--ink); }
.modal-close:hover { background: var(--soft); }
.upgrade-panel { background: linear-gradient(135deg, #fff1f2, #fdf2f8 40%, #f5f3ff); border-radius: 16px; padding: 26px 22px 20px; }
.upgrade-panel h2 { text-align: center; font-size: 22px; margin: 0 0 22px; letter-spacing: -.02em; font-weight: 700; }
.limit-note { text-align: center; color: #9d174d; font-weight: 600; margin: -10px 0 18px; font-size: 15px; }
.divider { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.free-option { text-align: center; }
.free-option h3 { margin: 0 0 6px; font-size: 19px; }
.free-option p { margin: 0 0 14px; color: #475569; font-size: 15px; }
.modal-foot { text-align: center; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--pink); font-weight: 600; }
.checkout-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.checkout-head h2 { margin: 0; font-size: 20px; }
#checkout-mount { min-height: 420px; }
.success { text-align: center; padding: 30px 10px; }
.success .tick { width: 64px; height: 64px; border-radius: 50%; background: #dcfce7; color: var(--green); display: grid; place-items: center; font-size: 34px; margin: 0 auto 16px; }
.success h2 { margin: 0 0 8px; }
.success p { color: var(--muted); margin: 0 0 22px; }

/* ---------- toast / consent ---------- */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(520px, calc(100% - 24px)); }
.toast { background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); font-size: 15px; display: flex; gap: 10px; align-items: flex-start; animation: up .2s ease-out; }
.toast.error { background: #7f1d1d; }
.toast.ok { background: #14532d; }
@keyframes up { from { transform: translateY(10px); opacity: 0; } }
.consent { position: fixed; left: 16px; bottom: 16px; z-index: 150; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); font-size: 14px; color: #334155; }
.consent p { margin: 0 0 12px; }
.consent .row { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------- footer ---------- */
.site-footer { background: #0b1324; color: #e2e8f0; padding: 56px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.site-footer h4 { margin: 0 0 14px; font-size: 16px; color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a { color: #cbd5e1; text-decoration: none; font-size: 15px; }
.site-footer a:hover { color: #fff; }
.site-footer .brand { color: #fff; }
.site-footer .tagline { color: #94a3b8; font-size: 14px; margin-top: 12px; max-width: 280px; }
.footer-bottom { border-top: 1px solid #1e293b; margin-top: 40px; padding-top: 20px; color: #94a3b8; font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- dashboard / content pages ---------- */
.page { padding: 44px 0 60px; }
.page h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.03em; margin: 0 0 8px; }
.page .sub { color: var(--muted); margin: 0 0 30px; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: #fff; }
.card h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 12px; }
.card .big { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.card .muted { color: var(--muted); font-size: 14px; }
.card .btns { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.meter { height: 10px; background: #f1f5f9; border-radius: 99px; overflow: hidden; margin: 12px 0 6px; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--pink), var(--pink-2)); border-radius: 99px; }
.status { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: #f1f5f9; color: #334155; text-transform: capitalize; }
.status.active, .status.trialing { background: #dcfce7; color: #166534; }
.status.past_due, .status.unpaid { background: #fef3c7; color: #92400e; }
.status.canceled { background: #fee2e2; color: #991b1b; }
.jobs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 14px; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 32px; font-size: 22px; }
.prose p, .prose li { color: #334155; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; flex-direction: column; padding: 14px 20px 18px; border-bottom: 1px solid var(--line); margin: 0; }
  .nav-links.open { display: flex; }
  .menu-btn { display: block; }
  .plans { grid-template-columns: 1fr; gap: 18px; }
  .modal-card { padding: 22px 16px; }
  .upgrade-panel { padding: 22px 14px 16px; }
  .hero { padding-top: 32px; }
  .dropzone { min-height: 260px; }
  .nav-right .btn-ghost { display: none; }
}
