@font-face {
  font-family: "Roboto";
  src: url("fonts/roboto-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Roboto Condensed";
  src: url("fonts/roboto-condensed-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --black: #0b0b0d;
  --ink: #16171d;
  --text: #2a2b30;
  --muted: #5d5f66;
  --line: #d9d9d6;
  --paper: #ffffff;
  --tile: #f3f1ee;
  --orange: #f26a1c;
  --orange-deep: #d9560e;
  --box: 62rem;
  --bar: 3.5rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--bar); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1.0625rem/1.55 "Roboto", system-ui, sans-serif;
  letter-spacing: .01em;
}
::selection { background: var(--orange); color: var(--ink); }
h1, h2, h3, p, figure { margin: 0; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: .18em; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
code { font: .9em ui-monospace, Consolas, monospace; }

.box { width: 100%; max-width: var(--box); margin-inline: auto; padding-inline: 1.25rem; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 30; padding: .5rem 1rem; background: var(--orange); color: var(--ink); }
.skip:focus { top: .5rem; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 20; background: var(--black); color: #f3f1ee; }
.top-in { display: flex; align-items: center; justify-content: space-between; min-height: var(--bar); gap: 1rem; }
.brand img { height: 2.5rem; width: auto; }
#nav { display: flex; align-items: center; gap: 1.75rem; }
#nav a {
  font-size: .8125rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  padding-block: .5rem; opacity: .85;
}
#nav a:hover { opacity: 1; color: var(--orange); }
#nav .pill {
  padding: .5rem 1.125rem; border: 1.5px solid #f3f1ee; border-radius: 99px; opacity: 1;
  transition: background-color .15s, color .15s, border-color .15s;
}
#nav .pill:hover { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.menu { display: none; }
@media (max-width: 44rem) {
  .menu {
    display: block; font: 500 .8125rem "Roboto", sans-serif; letter-spacing: .06em; text-transform: uppercase;
    color: inherit; background: none; border: 1.5px solid #f3f1ee; border-radius: 99px; padding: .55rem 1rem; cursor: pointer;
  }
  #nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--black); padding: .25rem 1.25rem 1rem; }
  #nav.open { display: flex; }
  #nav a { padding-block: .85rem; border-top: 1px solid #2a2b30; }
  #nav .pill { margin-top: .75rem; border: 1.5px solid #f3f1ee; text-align: center; }
}

/* Opening screen */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100svh - var(--bar));
  display: grid; place-items: center;
  background: var(--black); color: #f3f1ee;
  text-align: center;
}
#mesh { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-in { position: relative; padding: 2rem 1.25rem; display: grid; justify-items: center; gap: 1.5rem; }
.hero h1 { font: inherit; display: grid; justify-items: center; gap: 1.25rem; }
.hero h1 img { width: min(36rem, 86vw); }
.hero h1 span { font: 400 clamp(1.25rem, 2.4vw, 1.75rem)/1.25 "Roboto Condensed", sans-serif; letter-spacing: .015em; text-wrap: balance; text-shadow: 0 1px 12px var(--black); }
.hero-small { font-size: .875rem; color: #c9c9c6; text-shadow: 0 1px 8px var(--black); }

/* Sale banner under the top bar (QUADPEN_DEAL in site.config.js): a dark band
   whose lower edge runs at an angle over the opening screen, with the
   discount on a slanted orange tag. */
.deal {
  --slant: 2.25rem;
  position: relative; z-index: 10;
  margin-bottom: calc(-1 * var(--slant)); padding-bottom: var(--slant);
  background: var(--orange);
  color: #f3f1ee;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--slant)), 0 100%);
}
/* The dark band sits on the orange one, 4px higher: an orange line runs along
   the angled edge. */
.deal::before {
  content: ""; position: absolute; inset: 0;
  background-color: var(--ink);
  background-image: repeating-linear-gradient(-55deg, rgba(255, 255, 255, .045) 0 10px, transparent 10px 24px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--slant) - 4px), 0 calc(100% - 4px));
}
.deal[hidden] { display: none; }
.deal-in {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .5rem 1.35rem; padding: 1rem 1.25rem .6rem;
  color: inherit; text-decoration: none; text-align: center;
  font: 600 1.0625rem/1.25 "Roboto Condensed", sans-serif; letter-spacing: .06em; text-transform: uppercase;
}
.deal-title { font-weight: 800; font-size: 1.25rem; letter-spacing: .16em; }
.deal-off {
  display: inline-block; padding: .4rem 1.25rem;
  background: var(--orange); color: var(--ink);
  transform: skewX(-14deg);
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .5);
}
.deal-off > span { display: inline-block; transform: skewX(14deg); font: 800 1.75rem/1 "Roboto Condensed", sans-serif; letter-spacing: .03em; }
.deal-text { text-transform: none; letter-spacing: .02em; font-weight: 500; text-wrap: balance; }
.deal-ends, .deal code { white-space: nowrap; }
.deal code {
  font: 700 .95em/1 ui-monospace, Consolas, monospace; letter-spacing: .04em;
  color: var(--orange); padding: .2rem .5rem; border: 1px dashed rgba(242, 106, 28, .7); border-radius: 2px;
}
.deal-cta { font-weight: 700; text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 2px; text-decoration-color: var(--orange); }
.deal-in:hover .deal-cta, .deal-in:focus-visible .deal-cta { color: var(--orange); }
@media (max-width: 40rem) {
  .deal { --slant: 1.25rem; }
  .deal-in { gap: .4rem .8rem; padding: .8rem 1rem .5rem; font-size: .875rem; }
  .deal-title { font-size: 1rem; }
  .deal-off > span { font-size: 1.3rem; }
}

.btn {
  display: inline-block; padding: .7rem 2.25rem;
  background: var(--orange); color: var(--ink);
  font-weight: 500; letter-spacing: .03em; text-decoration: none;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
  transition: background-color .15s;
}
.btn:hover { background: var(--orange-deep); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }

/* White sections */
.sec { padding-block: 4.5rem 2rem; }
.sec + .sec { padding-top: 3.5rem; }
h2 {
  font: 700 clamp(1.875rem, 3vw, 2.5rem)/1.15 "Roboto Condensed", sans-serif;
  color: var(--ink); text-align: center;
  margin-bottom: 2.5rem;
}
h3 { font: 700 1.375rem/1.2 "Roboto Condensed", sans-serif; color: var(--ink); }
.sec p + p { margin-top: 1rem; }
.center { text-align: center; }
.credit { font-size: .8125rem; color: var(--muted); }
.sec .credit { margin-top: .75rem; }
.sec .credit + p { margin-top: 2rem; }

.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 2rem; background: #1c1d20; }
.trio figure { position: relative; }
.trio figcaption {
  position: absolute; left: 0; right: 0; top: .75rem; padding-inline: .5rem;
  text-align: center; color: #f3f1ee; font-size: .875rem; font-weight: 500;
}
@media (max-width: 36rem) {
  .trio { grid-template-columns: 1fr; }
  .trio img { width: 100%; max-height: 22rem; object-fit: cover; }
}

.wide { margin-top: 2rem; }
.wide img { width: 100%; }
figcaption { font-size: .8125rem; color: var(--muted); margin-top: .5rem; }

/* Line of text across a dark band */
.band { background: var(--ink); color: #f3f1ee; padding-block: 4.5rem; margin-top: 3rem; }
.band p { font: 400 clamp(1.375rem, 2.6vw, 2rem)/1.3 "Roboto Condensed", sans-serif; text-align: center; text-wrap: balance; }

/* Feature rows: picture and text swap sides */
.row {
  display: grid; gap: 1.25rem 2.5rem;
  padding-block: 2.5rem 1rem;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.row:first-of-type { padding-top: 0; }
.row .pic { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--tile); padding: 1rem; }
.row .pic.screen { aspect-ratio: auto; height: auto; padding: 0; background: #1c1d20; border-radius: 6px; box-shadow: 0 10px 30px rgb(22 23 29 / .18); }
.row h3 + p { margin-top: .75rem; }
.row details { grid-column: 1 / -1; }
@media (min-width: 44rem) {
  .row { grid-template-columns: 2fr 1fr; }
  .row.flip { grid-template-columns: 1fr 2fr; }
  .row.flip .pic { order: 2; }
  .row.flip > div { order: 1; }
  .row details { order: 3; }
}
.row summary {
  cursor: pointer; text-align: center; font-weight: 500; padding-block: .75rem;
  list-style: none; color: var(--ink);
}
.row summary::-webkit-details-marker, .faq summary::-webkit-details-marker { display: none; }
.row summary::after, .faq summary::after {
  content: ""; display: inline-block; width: .5em; height: .5em; margin-left: .55em;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-.15em) rotate(45deg);
  transition: transform .15s;
}
details[open] > summary::after { transform: translateY(.1em) rotate(-135deg); }
.row summary:hover, .faq summary:hover { color: #b8450a; }
.row details ul { list-style: none; max-width: 34rem; margin: 0 auto; padding: 0 0 1.25rem; display: grid; gap: .4rem; }
.row details li { position: relative; padding-left: 1.1rem; }
.row details li::before { content: ""; position: absolute; left: 0; top: .55em; width: .45rem; height: .45rem; background: var(--orange); }
#features .credit { margin-top: 1.25rem; text-align: center; }

/* FAQ */
.faq { max-width: 46rem; margin-inline: auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding-block: 1rem; font-weight: 500; color: var(--ink); list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq details p { padding-bottom: 1.25rem; margin: 0; }

/* Documentation chapters on the main page */
.chapter-list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: .75rem; }
@media (min-width: 40rem) { .chapter-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 60rem) { .chapter-list { grid-template-columns: 1fr 1fr 1fr; } }
.chapter-list a {
  display: block; height: 100%; padding: 1rem 1.125rem;
  text-decoration: none; border: 1px solid var(--line); border-radius: 3px;
  transition: border-color .15s;
}
.chapter-list a:hover { border-color: var(--ink); }
.chapter-list b { display: block; font: 700 1.125rem/1.25 "Roboto Condensed", sans-serif; color: var(--ink); margin-bottom: .25rem; }
.chapter-list span { display: block; font-size: .875rem; line-height: 1.4; color: var(--muted); }
.sec .doc-open { margin-top: 2rem; }

/* Download cards */
.cards { display: grid; gap: 1.5rem; justify-content: center; grid-template-columns: minmax(0, 22rem); }
@media (min-width: 44rem) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card {
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  padding: 2rem 1.5rem; text-align: center; color: var(--ink);
  background: var(--paper);
  box-shadow: 0 2px 14px rgba(22, 23, 29, .14);
  border-radius: 3px;
}
.card h3 { font-weight: 400; margin-top: .5rem; }
.card .btn { padding-inline: 1.25rem; white-space: nowrap; margin-top: auto; }
.ver { font-size: .875rem; color: var(--muted); margin-bottom: 1rem; }
.sec .ver { margin-top: 0; }
#download .center, #buy .center { margin-top: 1.5rem; }
#download .dl-lead { margin-top: 0; margin-bottom: 2rem; }
.cards.one { grid-template-columns: minmax(0, 22rem); }
@media (min-width: 44rem) { .cards.two { grid-template-columns: repeat(2, minmax(0, 22rem)); } }
button.btn { border: 0; font: inherit; font-weight: 500; cursor: pointer; }
button.btn:disabled { opacity: .6; cursor: progress; }
.price { font: 700 2.5rem/1 "Roboto Condensed", sans-serif; color: var(--ink); }
.sec .price { margin-top: .25rem; }
.card .ver { margin-bottom: .25rem; }
.distros { list-style: none; margin: 0; padding: 0; font-size: .875rem; line-height: 1.55; }
.small-note { font-size: .8125rem; color: var(--muted); margin: 0 0 .75rem; max-width: 18rem; }
.btn.btn-off { background: var(--muted); cursor: default; opacity: .75; pointer-events: none; }
.card-list { list-style: none; margin: 0 0 1.25rem; padding: 0; font-size: .9375rem; line-height: 1.6; }
.buy-note { font-size: .875rem; color: var(--muted); max-width: 40rem; margin-inline: auto; }

/* Thank-you page: the license key */
.key-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: .75rem; }
code.key, .doc code.key {
  font: 500 1.25rem/1.3 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .05em;
  padding: .55rem .8rem; background: var(--paper); color: var(--ink);
  border: 1px solid rgba(22, 23, 29, .18); border-radius: 3px; overflow-wrap: anywhere;
}
.key-copy { padding: .55rem 1.25rem; }
@media (max-width: 30rem) { code.key, .doc code.key { font-size: 1rem; } }
.key-note { margin-top: .35rem; font-size: .9375rem; color: var(--muted); }
.soon { padding-block: .7rem; font-weight: 500; color: var(--muted); }
.sec .soon { margin-top: 0; }
.status { font-weight: 500; color: var(--ink); }
.status:empty { display: none; }
.links a { display: inline-block; padding-block: .25rem; }

/* Footer */
.foot { margin-top: 4.5rem; padding-block: 3.5rem; background: var(--ink); color: #f3f1ee; text-align: center; }
.foot img { width: 13rem; margin: 0 auto 1.5rem; }
.foot a { display: inline-block; padding-block: .25rem; }
.foot-small { margin-top: .5rem; font-size: .875rem; color: #c9c9c6; }
[data-hide-empty][hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
