:root {
  --bg: #ffffff; --bg-alt: #f4f6fa; --fg: #141b2d; --muted: #5a6478; --line: #dde2ec;
  --accent: #3d6fd6; --accent-fg: #ffffff;
  --rules: #3d6fd6; --names: #1f9d6b; --llm: #b4581f;
  --max: 64rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141b2d; --bg-alt: #1b2540; --fg: #eef1f7; --muted: #9aa4b8; --line: #2c3757;
    --accent: #5b8cf0; --accent-fg: #0f1420;
    --rules: #5b8cf0; --names: #3ccf95; --llm: #f0965b;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}
a { color: var(--accent); }
img { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* header */
.top {
  position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
:root { --header: 56px; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: var(--header); }
.top .logo img { display: block; height: 26px; width: auto; }
.top nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: .95rem; }
.top nav a { color: var(--fg); text-decoration: none; }
.top nav a:hover, .top nav a[aria-current] { color: var(--accent); }

/* sections */
section { padding: 64px 0; }
section.alt { background: var(--bg-alt); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 650; letter-spacing: -.01em; max-width: 22ch; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 650; }
h3 { font-size: 1.1rem; font-weight: 650; }
p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.tag {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}

.btn {
  display: inline-block; padding: .7em 1.2em; border-radius: 6px; font-weight: 600; text-decoration: none;
  background: var(--accent); color: var(--accent-fg); border: 1px solid var(--accent);
}
.btn.ghost { background: transparent; color: var(--accent); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.5rem; }

.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.card { border: 1px solid var(--line); border-radius: 8px; padding: 20px; background: var(--bg); }
.card p:last-child { margin-bottom: 0; }


/* layers */
.layer { border-left: 4px solid var(--c); }
.layer h3 { color: var(--c); }
.layer.rules { --c: var(--rules); } .layer.names { --c: var(--names); } .layer.llm { --c: var(--llm); }


/* numbers */
.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 2rem 32px; padding: 24px 0;
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: 10px;
}
.stat { padding: 0 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font-size: 2.2rem; font-weight: 700; line-height: 1.1; color: var(--accent); }
.stat span { color: var(--muted); font-size: .95rem; }
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 1.5rem 0; row-gap: 24px; }
  .stat:nth-child(3) { border-left: 0; }
}

/* pricing */
.prices { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.price .amount { font-size: 1.6rem; font-weight: 700; margin: .2em 0; }
.price ul { padding-left: 1.1em; margin: .8em 0 0; }
.price li { margin-bottom: .3em; }
.price .soon { margin: 1em 0 0; font-size: .85rem; font-weight: 600; color: var(--accent); }
.price.featured { border-color: var(--accent); border-width: 2px; }

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; }

/* footer */
footer { border-top: 1px solid var(--line); padding: 40px 0; font-size: .9rem; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: flex-start; }
footer img { display: block; height: 26px; width: auto; margin-bottom: 12px; }
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin-bottom: 4px; }

/* screenshots */
figure.shot { margin: 0; }
figure.shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 8px 30px rgba(20, 27, 45, .12); background: #fff; }
figure.shot figcaption { color: var(--muted); font-size: .9rem; margin-top: 10px; }

/* hero: text left, screenshot right */
.hero { padding: 56px 0 64px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero-grid > * { min-width: 0; }
.hero h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
.hero .lead { font-size: 1.1rem; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

/* click to enlarge */
.zoomable { cursor: zoom-in; }
.lightbox {
  width: min(1440px, 94vw); max-height: 94vh; padding: 0; border: 0; border-radius: 8px;
  background: #0f1420; overflow: hidden;
}
.lightbox::backdrop { background: rgba(5, 8, 20, .78); }
.lightbox-body img { display: block; width: 100%; height: auto; max-height: 94vh; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 8px; right: 10px; z-index: 1; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: rgba(15, 20, 32, .72); color: #fff; font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.lightbox-close:hover, .lightbox-close:focus-visible { background: var(--accent); color: var(--accent-fg); }


/* demo video and the three stills under it */
figure.video { margin: 28px 0 0; }
.video-frame { position: relative; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  box-shadow: 0 8px 30px rgba(20, 27, 45, .12); background: #000; }
.video-frame video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.video-expand { position: absolute; right: 14px; top: 14px; padding: 8px 14px; border: 0; border-radius: 6px;
  background: rgba(20, 27, 45, .85); color: #fff; font: 600 .95rem system-ui, sans-serif; cursor: pointer; }
.video-expand:hover, .video-expand:focus-visible { background: var(--accent); color: var(--accent-fg); }
figure.video figcaption { color: var(--muted); font-size: .9rem; margin-top: 10px; }
ol.thumbs { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 28px;
  grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: t; }
ol.thumbs li { counter-increment: t; }
ol.thumbs figure.shot img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
ol.thumbs h3 { margin: 14px 0 4px; }
ol.thumbs h3::before { content: counter(t) "  "; color: var(--accent); }
ol.thumbs p { color: var(--muted); font-size: .95rem; margin: 0; }
.lightbox-body video { display: block; width: 100%; height: auto; max-height: 94vh; }
@media (max-width: 760px) { ol.thumbs { grid-template-columns: minmax(0, 1fr); } }

/* phones: the menu gets its own row under the logo, one line, scrolling sideways if it must */
@media (max-width: 640px) {
  .top .wrap { height: auto; flex-wrap: wrap; padding-top: 12px; padding-bottom: 8px; gap: 8px; }
  .top nav .wide { display: none; }
  .top nav a[href="/icepdf-support.html"] { text-transform: capitalize; }
  .top nav a[href$="#results"] { display: none; }
  .top nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 12px; justify-content: space-between; font-size: .9rem; white-space: nowrap;
    scrollbar-width: none; padding-bottom: 2px; }
  .top nav::-webkit-scrollbar { display: none; }
}

.tm { font-size: .55em; vertical-align: super; line-height: 0; margin-left: .05em; }
footer p { margin: 0 0 .4em; }
footer .legal { width: 100%; margin: 28px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: .85rem; }

/* one vertical rhythm for every section: heading -> intro 19px (h2 margin), intro -> content 28px,
   content -> small print 20px, 64px above and below every section's content */
.wrap > .lead { margin-bottom: 0; }
.wrap > :is(.grid, .prices, .stats, figure.video, .thumbs, .actions, figure.shot) { margin-top: 28px; margin-bottom: 0; }
.wrap > h2 + :is(.grid, .prices, .stats, figure.video, .thumbs) { margin-top: 28px; }
.wrap > .note { margin: 20px 0 0; }
.wrap > p + p { margin-top: 1em; }
main section .wrap > :last-child { margin-bottom: 0; }
.stats { margin-left: 32px; margin-right: 32px; }
@media (max-width: 760px) { .stats { margin-left: 0; margin-right: 0; } }
/* one line length for every paragraph that sits directly in a section (intro, body, small print) */
.wrap > p { max-width: 46rem; }

/* icepdf support hero: the viewer screenshot with the icepdf cube on its corner, as on the icepdf site */
.hero-visual { position: relative; }
.hero-cube { position: absolute; right: -36px; bottom: -40px; z-index: 1; width: 120px; height: auto;
  filter: drop-shadow(0 10px 18px rgba(20, 18, 90, .35)); }
.for-dark { display: none !important; }
@media (prefers-color-scheme: dark) { .for-light { display: none !important; } .for-dark { display: block !important; } }
@media (max-width: 860px) { .hero-cube { right: -6px; bottom: -30px; width: 88px; } }

/* jumps from the menu land below the sticky header, not under it */
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: calc(var(--header) + 1px); }
@media (max-width: 640px) { section[id] { scroll-margin-top: 80px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
footer .wrap > .legal { max-width: none; }
