/* PDFCora — marketing site. Plain CSS, no dependencies. Deliberately dark-only. */

:root {
  color-scheme: dark;
  --bg: #07080c;
  --bg-2: #0b0d13;
  --panel: rgb(255 255 255 / 3.5%);
  --panel-2: rgb(255 255 255 / 6%);
  --line: rgb(255 255 255 / 8%);
  --line-2: rgb(255 255 255 / 14%);
  --ink: #f4f3ef;
  --ink-2: #a2a8b4;
  --ink-3: #828997;   /* 5.7:1 on --bg; #6f7581 was 4.3:1, just under WCAG AA */

  --orange: #ff8a4c;
  --pink: #ff4d8d;
  --violet: #a78bfa;
  --grad: linear-gradient(100deg, var(--orange) 0%, var(--pink) 52%, var(--violet) 100%);
  --good: #4ade80;
  --warn: #fbbf24;
  --info: #60a5fa;

  --tok-k: #ff9a6b;
  --tok-f: #86cbfb;
  --tok-s: #a8d8a8;
  --tok-n: #f5c860;
  --tok-t: #dcb8ff;
  --tok-c: #7d8590;

  --r: 16px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; }
a { color: var(--orange); text-underline-offset: 3px; }
code { font-family: var(--mono); font-size: .88em; }
p code, li code, td code, th code {
  background: var(--panel-2); border: 1px solid var(--line); padding: .05em .38em; border-radius: 6px;
}
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.025em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 700; }
h3 { font-size: 1.12rem; letter-spacing: -0.012em; line-height: 1.3; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -3rem; z-index: 100; background: var(--ink); color: var(--bg); padding: .55rem 1rem; border-radius: 8px; }
.skip:focus { top: 1rem; }
.wrap { max-width: 1180px; margin: 0 auto; padding-inline: 1.25rem; }
.muted { color: var(--ink-3); }
.grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
@supports not (background-clip: text) { .grad { color: var(--orange); } }

/* Grid items default to min-width: auto; a long code line would otherwise widen its track. */
.two-col > * { min-width: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; justify-content: center;
  font-weight: 600; font-size: .98rem; text-decoration: none; white-space: nowrap;
  padding: .85rem 1.4rem; border-radius: 12px; border: 1px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease;
}
.btn-primary {
  color: #120a06; background: var(--grad);
  box-shadow: 0 8px 30px -8px rgb(255 77 141 / 55%), inset 0 1px 0 rgb(255 255 255 / 35%);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -10px rgb(255 77 141 / 70%), inset 0 1px 0 rgb(255 255 255 / 35%); }
.btn-glass { color: var(--ink); background: var(--panel-2); border-color: var(--line-2); backdrop-filter: blur(8px); }
.btn-glass:hover { transform: translateY(-2px); border-color: rgb(255 255 255 / 28%); background: rgb(255 255 255 / 9%); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 60; transition: background-color .3s ease, border-color .3s ease; border-bottom: 1px solid transparent; }
.site-header[data-scrolled] { background: rgb(7 8 12 / 72%); backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px); border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.08rem; letter-spacing: -0.015em; }
.brand img { filter: invert(1) hue-rotate(180deg) saturate(1.3); }
.site-nav { display: flex; align-items: center; gap: .2rem; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-size: .93rem; padding: .5rem .75rem; border-radius: 9px; transition: color .2s, background-color .2s; }
.site-nav a:hover { color: var(--ink); background: var(--panel-2); }
.site-nav .nav-cta { margin-left: .5rem; color: var(--ink); border: 1px solid var(--line-2); background: var(--panel-2); }
.site-nav .nav-cta:hover { border-color: rgb(255 255 255 / 28%); }
.nav-toggle { display: none; }
@media (max-width: 880px) {
  .js .nav-toggle { display: grid; place-items: center; width: 44px; height: 44px; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 11px; color: var(--ink); cursor: pointer; }
  .bars, .bars::before, .bars::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; position: relative; }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -6px; } .bars::after { top: 6px; }
  .js .site-nav { display: none; position: absolute; top: 70px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: .75rem 1rem 1.25rem; background: rgb(7 8 12 / 96%); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .js .site-nav[data-open] { display: flex; }
  .site-nav { flex-wrap: wrap; }
  .site-nav a { padding: .8rem .7rem; }
  .site-nav .nav-cta { margin: .5rem 0 0; text-align: center; }
}

/* ---------- Backgrounds ---------- */
.aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.aurora span { position: absolute; border-radius: 50%; opacity: .55; will-change: transform; }
.aurora span:nth-child(1) { width: 60vw; height: 60vw; max-width: 820px; max-height: 820px; left: -12%; top: -38%; background: radial-gradient(circle, rgb(255 77 141 / 45%), transparent 62%); animation: drift1 22s ease-in-out infinite alternate; }
.aurora span:nth-child(2) { width: 55vw; height: 55vw; max-width: 760px; max-height: 760px; right: -14%; top: -20%; background: radial-gradient(circle, rgb(167 139 250 / 42%), transparent 62%); animation: drift2 26s ease-in-out infinite alternate; }
.aurora span:nth-child(3) { width: 45vw; height: 45vw; max-width: 620px; max-height: 620px; left: 30%; top: 25%; background: radial-gradient(circle, rgb(255 138 76 / 28%), transparent 62%); animation: drift3 30s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(8%, 10%) scale(1.08); } }
@keyframes drift2 { to { transform: translate(-10%, 8%) scale(1.12); } }
@keyframes drift3 { to { transform: translate(-6%, -10%) scale(.92); } }
.grid-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 20%, #000 10%, transparent 72%);
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; padding: clamp(3rem, 7vw, 5.5rem) 0 4rem; margin-top: -70px; padding-top: calc(70px + clamp(3rem, 7vw, 5.5rem)); }

.pill { display: inline-flex; align-items: center; gap: .65rem; margin: 0 0 1.6rem; padding: .32rem .9rem .32rem .35rem; font-size: .85rem; color: var(--ink-2); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 999px; backdrop-filter: blur(8px); }
.pill-tag { font: 700 .72rem/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: #120a06; background: var(--grad); padding: .38rem .6rem; border-radius: 999px; }
.hero h1 { font-size: clamp(2.8rem, 6.6vw, 5.1rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1.02; }
.lede { font-size: clamp(1.06rem, 1.7vw, 1.24rem); color: var(--ink-2); margin: 1.5rem 0 2.2rem; max-width: 36rem; }
.cta { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(4.5rem, 10vw, 7.5rem) 0; }
.section-tint { background: linear-gradient(180deg, transparent, rgb(255 255 255 / 1.8%) 20%, rgb(255 255 255 / 1.8%) 80%, transparent); }
.section-head { max-width: 46rem; margin-bottom: 3.25rem; }
.section-head > p:not(.eyebrow) { color: var(--ink-2); font-size: 1.1rem; margin: 1.1rem 0 0; }
.eyebrow { display: inline-block; margin: 0 0 1rem; font: 700 .76rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.checks { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: .75rem; color: var(--ink-2); }
/* Not flex: inline <code> chips would each become a separate flex item. */
.checks li { position: relative; padding-left: 2rem; }
.checks li::before { content: ""; position: absolute; left: 0; top: .18rem; width: 20px; height: 20px; border-radius: 50%; background: no-repeat center/11px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.3 4.8 9 10 3' fill='none' stroke='%23120a06' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"), var(--grad); }

/* Code cards */
.code-card { position: relative; border-radius: var(--r); background: #0a0c11; border: 1px solid var(--line-2); box-shadow: 0 30px 80px -30px rgb(0 0 0 / 80%), 0 0 60px -25px rgb(167 139 250 / 35%); overflow: hidden; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem .6rem .55rem .75rem; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 2.5%); }
.tablist { display: flex; gap: .2rem; }
.tablist [role="tab"] { font: 500 .86rem var(--sans); color: var(--ink-3); background: none; border: 0; padding: .45rem .8rem; border-radius: 8px; cursor: pointer; transition: color .2s, background-color .2s; }
.tablist [role="tab"]:hover { color: var(--ink); }
.tablist [role="tab"][aria-selected="true"] { color: var(--ink); background: rgb(255 255 255 / 9%); box-shadow: inset 0 0 0 1px var(--line-2); }
.copy { font: 500 .8rem var(--sans); color: var(--ink-2); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px; padding: .38rem .75rem; cursor: pointer; }
.copy:hover { color: var(--ink); }
.copy[data-copied] { color: var(--good); border-color: rgb(74 222 128 / 45%); }
.code-card pre { margin: 0; padding: 1.4rem 1.5rem 1.5rem; overflow-x: auto; }
.code-card code { font-size: .95rem; line-height: 1.8; }
.panel-label { display: block; padding: .9rem 1.5rem 0; font: 600 .72rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.js .panel-label { display: none; }
.js [role="tabpanel"][hidden] { display: none; }
html:not(.js) .tablist { display: none; }
.reqs { margin: 0; padding: 0 1.5rem 1.3rem; font: .8rem/1.5 var(--mono); color: var(--ink-3); }
.k { color: var(--tok-k); } .f { color: var(--tok-f); } .s { color: var(--tok-s); } .n { color: var(--tok-n); } .t { color: var(--tok-t); } .c { color: var(--tok-c); font-style: italic; }

.two-col { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 2.5rem; }
@media (max-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr); } }
.table-scroll { overflow-x: auto; border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.table-title { font-size: 1rem; margin: .5rem 0 .9rem; }

.code-card-install pre { padding-bottom: .9rem; }
.code-card-install code { font-size: .92rem; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 3rem 0 3.5rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem 3rem; }
.footer-tag { margin: .6rem 0 .2rem; color: var(--ink-2); }
.site-footer .muted { margin: 0; font: .8rem var(--mono); }
.footer-nav { display: grid; grid-template-columns: repeat(2, auto); gap: .5rem 2rem; align-content: start; }
.footer-nav a { color: var(--ink-2); text-decoration: none; font-size: .92rem; }
.footer-nav a:hover { color: var(--ink); }
.attrib { max-width: 26rem; color: var(--ink-3); font-size: .82rem; }
.attrib p { margin: 0 0 .5rem; }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Reduced motion: show everything in its final state ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ======================================================================
   Sub-pages (demos, developers)
   ====================================================================== */
.page-hero { padding: clamp(6rem, 12vw, 9rem) 0 clamp(2rem, 5vw, 3.5rem); position: relative; }
.page-hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); line-height: 1.05; letter-spacing: -.02em; margin: .4rem 0 1rem; }
.page-hero .lede { max-width: 46rem; }
.page-hero .cta { margin-top: 1.6rem; }

.prose { max-width: 48rem; }
.prose h3 { margin: 2rem 0 .5rem; font-size: 1.12rem; }
.prose p, .prose li { color: var(--ink-2); line-height: 1.65; }
.prose ul, .prose ol { padding-left: 1.1rem; margin: .6rem 0 1rem; }
.prose li { margin: .35rem 0; }
.prose code { color: var(--ink); background: var(--panel-2); padding: .1em .35em; border-radius: .3rem; font-size: .9em; }

.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); margin-top: 1.6rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; padding: 1.15rem 1.25rem; }
.card h3 { margin: 0 0 .45rem; font-size: 1.02rem; }
.card p { margin: 0; color: var(--ink-2); font-size: .92rem; line-height: 1.6; }
.card p + p { margin-top: .6rem; }
.card .tag { display: inline-block; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 99px; padding: .12rem .5rem; margin-bottom: .6rem; }
.card-lead { grid-column: 1 / -1; }

.callout { border: 1px solid var(--line-2); border-left: 3px solid var(--warn); background: var(--panel);
  border-radius: .8rem; padding: 1rem 1.15rem; margin: 1.4rem 0; }
.callout h3 { margin: 0 0 .4rem; font-size: 1rem; }
.callout p { margin: 0; color: var(--ink-2); font-size: .92rem; line-height: 1.6; }
.callout.info { border-left-color: var(--info); }

.matrix { width: 100%; border-collapse: collapse; font-size: .9rem; }
.matrix th, .matrix td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.matrix thead th { color: var(--ink-3); font-weight: 600; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
.matrix tbody th { color: var(--ink); font-weight: 600; }
.matrix td { color: var(--ink-2); }

.page-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0 0; }
.page-nav a { font-size: .85rem; color: var(--ink-2); border: 1px solid var(--line); border-radius: 99px; padding: .3rem .8rem; text-decoration: none; }
.page-nav a:hover { color: var(--ink); border-color: var(--line-2); background: var(--panel); }

/* A lone label on a code card is not a tab: it is styled like one, without the role. */
.panel-label-tab { display: inline-block; padding: .45rem .85rem; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
