/* buy.quillborne.app — dark "ink & parchment" theme. */
:root {
  --bg: #14120f;
  --bg-raised: #1d1a16;
  --ink: #ece5d8;
  --ink-muted: #a89f8e;
  --accent: #d4a437;
  --accent-ink: #1a1505;
  --line: #2e2922;
  --error: #e06c5a;
  --ok: #7fb069;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 "Segoe UI", system-ui, -apple-system, sans-serif;
}
h1, h2, h3 { font-family: Georgia, "Iowan Old Style", "Times New Roman", serif; line-height: 1.15; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px clamp(20px, 6vw, 72px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 18px; }
.brand img { border-radius: 6px; }
.nav nav { display: flex; align-items: center; gap: 18px; }
.nav-download {
  padding: 8px 16px; border: 1px solid var(--accent); border-radius: 8px;
  color: var(--accent); font-weight: 600;
}
.nav-download:hover { background: var(--accent); color: var(--accent-ink); }

main { padding: 0 clamp(20px, 6vw, 72px); }
main.narrow { max-width: 640px; margin: 48px auto 80px; padding: 0 20px; }

.hero { padding: clamp(40px, 8vh, 96px) 0 40px; text-align: center; }
.hero-copy { max-width: 820px; margin: 0 auto; }
.hero h1 { font-size: clamp(34px, 5vw, 56px); margin: 0 0 16px; }
.hero .sub { color: var(--ink-muted); font-size: 18px; max-width: 58ch; margin: 0 auto; }
.hero .cta-card { margin-left: auto; margin-right: auto; text-align: left; }

.cta-card {
  margin-top: 28px; padding: 24px 28px; max-width: 460px;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 14px;
}
.cta-card h3 { margin: 0 0 6px; font-size: 22px; }
.price { margin: 0 0 14px; color: var(--ink-muted); }
.price strong { color: var(--ink); font-size: 30px; }
.price.coming-soon { color: var(--accent); font-size: 20px; }
.cta-card form { display: flex; flex-direction: column; gap: 10px; }
.cta-card label { font-size: 13px; color: var(--ink-muted); }
.cta-card input {
  padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font-size: 16px;
}
.cta-card button, .button-link {
  display: inline-block; padding: 12px 22px; border: 0; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 16px;
  cursor: pointer; text-align: center;
}
.cta-card button:hover, .button-link:hover { filter: brightness(1.08); text-decoration: none; }
.cta-card button.cta-secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.cta-card button.cta-secondary:hover { background: rgba(212,164,55,0.10); filter: none; }
.fine { font-size: 13px; color: var(--ink-muted); margin-bottom: 0; }
.alt-platform { font-size: 14px; margin-top: 14px; }

.trial-form { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.trial-or { text-align: center; color: var(--ink-muted); font-size: 13px; margin: 0 0 8px; text-transform: uppercase; letter-spacing: 1px; }
.trial-form label { font-size: 13px; color: var(--ink-muted); }
.trial-row { display: flex; gap: 8px; margin: 6px 0; }
.trial-row input { flex: 1; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 15px; }
.trial-row button { padding: 10px 16px; border: 1px solid var(--accent); border-radius: 8px; background: transparent; color: var(--accent); font-weight: 700; cursor: pointer; white-space: nowrap; }
.trial-row button:hover { background: var(--accent); color: var(--accent-ink); }
.notice { padding: 10px 14px; border-radius: 8px; background: #243024; color: var(--ok); font-size: 14px; }
.notice.error { background: #332019; color: var(--error); }

/* Framed editor screenshot. */
.window-frame { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg-raised); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.window-frame img { display: block; width: 100%; height: auto; }

/* Scrolling screenshot slideshow with click-to-zoom lightbox. */
.showcase { padding: 8px 0 24px; }
.slideshow { position: relative; max-width: 1100px; margin: 0 auto; }
.slides-viewport { overflow: hidden; }
.slides-track { display: flex; transition: transform 0.5s ease; }
.slide { flex: 0 0 100%; display: block; padding: 0; margin: 0; border: 0; background: none; cursor: zoom-in; }
.slide img { display: block; width: 100%; height: auto; }
.slide-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(20,18,15,0.72); color: var(--ink); font-size: 26px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.slide-nav:hover { background: var(--bg-raised); color: var(--accent); }
.slide-nav.prev { left: -22px; }
.slide-nav.next { right: -22px; }
.slide-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.slide-dot { width: 9px; height: 9px; padding: 0; border-radius: 50%; border: 0; background: var(--line); cursor: pointer; }
.slide-dot.active { background: var(--accent); }
@media (max-width: 1180px) { .slide-nav.prev { left: 8px; } .slide-nav.next { right: 8px; } }

.lightbox {
  position: fixed; inset: 0; z-index: 1000; padding: 4vmin;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8,7,5,0.88); backdrop-filter: blur(2px);
}
.lightbox[hidden] { display: none; }
.lightbox-img { max-width: 96vw; max-height: 92vh; width: auto; height: auto; border-radius: 8px; box-shadow: 0 24px 80px rgba(0,0,0,.6); }
.lightbox-close {
  position: absolute; top: 18px; right: 24px; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(20,18,15,0.82); color: var(--ink);
  font-size: 28px; line-height: 1; cursor: pointer;
}
.lightbox-close:hover { color: var(--accent); }

.features { padding: 48px 0 24px; }
.features h2, .pricing h2 { font-size: clamp(26px, 3.4vw, 36px); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.feature { background: var(--bg-raised); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.feature h4 { margin: 0 0 8px; font-size: 16px; color: var(--accent); }
.feature p { margin: 0; color: var(--ink-muted); font-size: 14.5px; }

/* Value/cost comparison — "one subscription replaces your whole toolkit". */
.value { padding: 48px 0 8px; text-align: center; }
.value h2 { font-size: clamp(26px, 3.4vw, 36px); }
.value .sub { color: var(--ink-muted); max-width: 62ch; margin: 8px auto 28px; }
.compare-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare {
  width: 100%; max-width: 1000px; margin: 0 auto; border-collapse: collapse;
  table-layout: fixed;
  text-align: left; font-size: 15px; background: var(--bg-raised);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
/* Fixed layout + equal quarters so every column (incl. the "In Quillborne" qb column) is the
   same width; without this the qb column's nowrap content stretched it far wider than the rest. */
.compare thead th { width: 25%; }
.compare th, .compare td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; word-wrap: break-word; overflow-wrap: break-word; }
.compare thead th { color: var(--ink); font-weight: 600; background: rgba(212,164,55,0.06); font-family: Georgia, serif; }
.compare tbody tr:hover { background: rgba(255,255,255,0.02); }
.compare td { color: var(--ink-muted); }
.compare td:first-child { color: var(--ink); }
.compare .num { white-space: nowrap; color: var(--ink); font-variant-numeric: tabular-nums; }
.compare .per { display: block; font-size: 12px; color: var(--ink-muted); font-weight: 400; }
.compare .qb { color: var(--ok); font-weight: 600; white-space: nowrap; padding-right: 24px; }
.compare .qb .note { display: block; font-size: 12px; color: var(--ink-muted); font-weight: 400; }
.compare .num .note { display: block; font-size: 12px; color: var(--ink-muted); font-weight: 400; }
.compare tfoot td { border-bottom: 0; border-top: 2px solid var(--line); background: rgba(212,164,55,0.05); font-weight: 600; color: var(--ink); }
.compare .qb.total { color: var(--accent); font-size: 22px; font-family: Georgia, serif; }
.compare .qb.total .per { color: var(--ink-muted); font-size: 12px; }
.value-fine { max-width: 64ch; margin: 20px auto 0; text-align: center; }

.pricing { text-align: center; padding: 56px 0 80px; }
.pricing .sub { color: var(--ink-muted); }

.license-box {
  display: flex; align-items: center; gap: 14px; margin: 22px 0;
  padding: 18px 20px; background: var(--bg-raised); border: 1px solid var(--accent); border-radius: 12px;
}
.license-box code { font-size: 19px; letter-spacing: 1.5px; word-break: break-all; color: var(--accent); }
.license-box.compact { border-color: var(--line); }
.license-box.compact code { font-size: 15px; }
.license-box.mine { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.recover-cta { margin-top: 20px; }
.license-box button {
  padding: 8px 16px; border: 1px solid var(--accent); border-radius: 8px;
  background: transparent; color: var(--accent); cursor: pointer; flex-shrink: 0;
}
.status { margin-left: auto; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-muted); }
.status.active { color: var(--ok); }
.status.expired, .status.canceled { color: var(--error); }

.steps { color: var(--ink-muted); }
.steps li { margin-bottom: 8px; }
.recover-form { margin: 20px 0; display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.recover-form label { font-size: 14px; color: var(--ink-muted); }
.recover-form input { padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-raised); color: var(--ink); font-size: 16px; }
.recover-form button { padding: 12px 22px; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 700; cursor: pointer; }
.recover-form button:hover { filter: brightness(1.08); }

/* Changelog — rolling release history at /changelog. */
.changelog .changelog-entry { margin: 28px 0; }
.changelog .changelog-entry h2 {
  font-size: 20px; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
  display: flex; align-items: baseline; gap: 12px;
}
.changelog .changelog-date { font-size: 13px; font-weight: 400; color: var(--ink-muted); margin-left: auto; }
.changelog .changelog-entry ul { color: var(--ink-muted); margin: 0; padding-left: 20px; }
.changelog .changelog-entry li { margin-bottom: 6px; }

/* Custom Stripe Checkout (Payment Element) — single column, centered, themed to the buy site. */
.checkout-narrow { max-width: 480px; padding-top: 28px; padding-bottom: 56px; }
.checkout-summary { margin-bottom: 20px; }
.checkout-summary h1 { margin: 0 0 4px; font-size: 24px; }
.checkout-summary .price { color: var(--ink-muted); margin: 0; }
#express-checkout-element:not(:empty) { margin-bottom: 18px; }
#payment-element { margin-bottom: 18px; min-height: 80px; }
#qb-pay { width: 100%; padding: 13px 22px; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 16px; cursor: pointer; }
#qb-pay:hover:not(:disabled) { filter: brightness(1.08); }
#qb-pay:disabled { opacity: 0.6; cursor: default; }
#qb-pay-error { margin-top: 14px; }

.spinner { width: 28px; height: 28px; margin: 28px 0; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 22px clamp(20px, 6vw, 72px); color: var(--ink-muted); font-size: 13.5px; }
