/* ReqForge website.
   Dark by default, because the app is; light theme follows the OS unless the
   toggle in the header says otherwise. Colours are the app's own. */

:root {
  --accent: #4aa8e8;
  --accent-deep: #0e639c;
  --green: #4ec9b0;
  --orange: #ce9178;
  --red: #f48771;

  --bg: #0d1117;
  --bg-2: #141a22;
  --bg-3: #1b232d;
  --border: #26303c;
  --text: #dbe3ec;
  --text-dim: #93a2b4;
  --shadow: 0 24px 60px rgb(0 0 0 / 45%);

  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, Monaco, monospace;
  --page: 1120px;
  --radius: 10px;
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-2: #f4f7fa;
  --bg-3: #e9eef4;
  --border: #d5dde6;
  --text: #16202b;
  --text-dim: #55677c;
  --accent: #0e639c;
  --accent-deep: #0b4d7a;
  --shadow: 0 20px 44px rgb(15 30 50 / 14%);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #ffffff;
    --bg-2: #f4f7fa;
    --bg-3: #e9eef4;
    --border: #d5dde6;
    --text: #16202b;
    --text-dim: #55677c;
    --accent: #0e639c;
    --accent-deep: #0b4d7a;
    --shadow: 0 20px 44px rgb(15 30 50 / 14%);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
}
h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}
h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--text);
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

kbd {
  font-family: var(--mono);
  font-size: 0.8em;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 0.1em 0.4em;
  white-space: nowrap;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* `height: auto` is load-bearing: the screenshots carry width/height
   attributes so the page does not jump while they load, and without this the
   browser honours that height literally and stretches them. */
img {
  max-width: 100%;
  height: auto;
}

.wrap {
  width: min(100% - 2.5rem, var(--page));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  background: var(--bg-2);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 62px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 650;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand svg {
  width: 26px;
  height: 26px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  margin-left: auto;
  font-size: 0.94rem;
}

.site-nav a {
  color: var(--text-dim);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

/* On a narrow screen the header keeps what a visitor came for — the docs, the
   source, the theme — and drops the in-page jump links, which are a scroll
   away anyway. */
@media (max-width: 700px) {
  .site-header .wrap {
    gap: 0.75rem;
  }
  .site-nav {
    gap: 0.9rem;
    font-size: 0.9rem;
  }
  .nav-optional {
    display: none;
  }
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-dim);
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.42rem 0.6rem;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
}

/* ------------------------------------------------------------------ hero */

.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 2rem;
  text-align: center;
  background:
    radial-gradient(900px 420px at 50% -12%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%);
}

.hero h1 {
  max-width: 18ch;
  margin-inline: auto;
}

.hero .lede {
  max-width: 62ch;
  margin: 0 auto 2rem;
  font-size: clamp(1.05rem, 2.1vw, 1.24rem);
  color: var(--text-dim);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  margin-bottom: 1.4rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 0.66rem 1.25rem;
  font-weight: 550;
  text-decoration: none;
  color: var(--text);
  background: var(--bg-2);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  border-color: transparent;
  color: #ffffff;
}

.btn-primary:hover {
  color: #ffffff;
}

.hero-note {
  margin-top: 1.1rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.hero-shot {
  margin-top: 3rem;
}

/* ------------------------------------------------------------ screenshots */

figure.shot {
  margin: 0;
}

.shot img {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--bg-2);
  cursor: zoom-in;
}

.shot figcaption {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-dim);
  text-align: center;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
}

/* Full-size view of a screenshot. */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: 2rem;
  background: rgb(3 7 12 / 88%);
}

.lightbox[open] {
  display: grid;
}

.lightbox img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.lightbox button {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  background: transparent;
  border: 1px solid #ffffff44;
  border-radius: 6px;
  color: #ffffff;
  font: inherit;
  cursor: pointer;
  padding: 0.3rem 0.7rem;
}

/* --------------------------------------------------------------- sections */

section {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.section-head {
  max-width: 62ch;
  margin-bottom: 2.5rem;
}

.section-head p {
  color: var(--text-dim);
  font-size: 1.05rem;
  margin: 0;
}

.strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 2rem;
  justify-content: center;
  border-block: 1px solid var(--border);
  padding: 1.1rem 0;
  color: var(--text-dim);
  font-size: 0.93rem;
}

.strip span::before {
  content: "✓";
  color: var(--green);
  margin-right: 0.45rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 1.1rem;
}

.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
}

.card h3 {
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.95rem;
}

.card-icon {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
  display: block;
}

/* A feature explained beside the screenshot that shows it. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 3.25rem) 0;
}

.split.reverse > :first-child {
  order: 2;
}

.split ul {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text-dim);
}

.split li + li {
  margin-top: 0.4rem;
}

@media (max-width: 860px) {
  .split,
  .split.reverse {
    grid-template-columns: 1fr;
  }
  .split.reverse > :first-child {
    order: 0;
  }
}

/* ------------------------------------------------------------------ code */

pre {
  margin: 0 0 1.2rem;
  padding: 1rem 1.1rem;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.6;
  tab-size: 2;
}

pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}

.code-block {
  position: relative;
}

.code-block .copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  opacity: 0;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-dim);
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  transition: opacity 0.15s ease;
}

.code-block:hover .copy,
.code-block .copy:focus-visible {
  opacity: 1;
}

.terminal {
  background: #0b1017;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  color: #d7e2ee;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid #1d2733;
  font-size: 0.78rem;
  color: #7f8ea0;
  font-family: var(--mono);
}

.terminal-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #333d4a;
  display: inline-block;
}

.terminal pre {
  margin: 0;
  background: none;
  border: 0;
  border-radius: 0;
  color: inherit;
}

.terminal .ok {
  color: #6cd7bd;
}
.terminal .dim {
  color: #7f8ea0;
}
.terminal .cmd {
  color: #7cc2f5;
}

/* ----------------------------------------------------------------- table */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 1.4rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.92rem;
}

th,
td {
  text-align: left;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  background: var(--bg-2);
  font-weight: 600;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td code {
  white-space: nowrap;
}

/* ------------------------------------------------------------------ note */

.note {
  border-left: 3px solid var(--accent);
  background: var(--bg-2);
  border-radius: 0 8px 8px 0;
  padding: 0.9rem 1.1rem;
  margin: 0 0 1.4rem;
  color: var(--text-dim);
}

.note strong {
  color: var(--text);
}

.note.warn {
  border-left-color: var(--orange);
}

/* --------------------------------------------------------------- callout */

.callout {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 1.6rem;
  text-align: center;
}

.callout h2 {
  margin-bottom: 0.4rem;
}

.callout p {
  color: var(--text-dim);
  max-width: 60ch;
  margin-inline: auto;
}

/* ------------------------------------------------------------------ docs */

.docs-layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
  padding-top: 2.5rem;
}

.docs-nav {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  font-size: 0.9rem;
  padding-bottom: 2rem;
}

.docs-nav strong {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 1.4rem 0 0.5rem;
}

.docs-nav strong:first-child {
  margin-top: 0;
}

.docs-nav a {
  display: block;
  padding: 0.22rem 0.6rem;
  margin-left: -0.6rem;
  border-radius: 5px;
  color: var(--text-dim);
  text-decoration: none;
}

.docs-nav a:hover {
  background: var(--bg-2);
  color: var(--text);
}

.docs-nav a.active {
  color: var(--accent);
  background: var(--bg-2);
}

.docs-body {
  max-width: 76ch;
  padding-bottom: 4rem;
}

.docs-body h2 {
  margin-top: 3rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}

.docs-body h2:first-of-type {
  margin-top: 1rem;
  border-top: 0;
}

.docs-body h3 {
  margin-top: 2rem;
}

.docs-body ol,
.docs-body ul {
  padding-left: 1.3rem;
  margin: 0 0 1.2rem;
}

.docs-body li + li {
  margin-top: 0.35rem;
}

.docs-body figure.shot {
  margin: 1.8rem 0 2rem;
}

.tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: -1px;
}

.tabs button {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-bottom-color: transparent;
  border-radius: 8px 8px 0 0;
  color: var(--text-dim);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  padding: 0.35rem 0.9rem;
}

.tabs button[aria-selected="true"] {
  background: var(--bg-2);
  color: var(--text);
  border-color: var(--border);
}

.tab-panel[hidden] {
  display: none;
}

.tab-panel pre {
  border-top-left-radius: 0;
}

@media (max-width: 900px) {
  /* minmax(0, …) rather than 1fr: a grid track sizes to its content by
     default, so one wide table would push the whole page sideways instead of
     scrolling inside its own wrapper. */
  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
  .docs-nav {
    position: static;
    max-height: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    background: var(--bg-2);
  }
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
}

.site-footer a {
  color: var(--text-dim);
}

.site-footer a:hover {
  color: var(--text);
}

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

/* ---------- commercial pages ---------- */

/* Legal prose: narrower than the marketing grid, because a paragraph of terms
   read across a 1100px line is a paragraph nobody reads. */
.legal {
  max-width: 46rem;
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.legal h1 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  margin-bottom: 0.4rem;
}

.legal h2 {
  margin-top: 2.4rem;
  font-size: 1.3rem;
}

.legal h3 {
  margin-top: 1.8rem;
  font-size: 1.05rem;
}

.legal p,
.legal li {
  line-height: 1.65;
}

.legal ul,
.legal ol {
  padding-left: 1.2rem;
}

.legal li + li {
  margin-top: 0.5rem;
}

.legal-meta {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-top: 0;
}

.legal .note {
  margin: 1.6rem 0 2rem;
}

/* One plan, one card. A pricing table with a single column would be a table
   pretending to offer a choice. */
.plan-card {
  max-width: 34rem;
  margin: 0 auto;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-2);
}

.plan-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.plan-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.plan-price {
  margin: 0;
  color: var(--text-dim);
}

.plan-price strong {
  font-size: 1.9rem;
  color: var(--text);
}

.plan-list {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0;
}

.plan-list li {
  position: relative;
  padding-left: 1.6rem;
  line-height: 1.55;
}

.plan-list li + li {
  margin-top: 0.7rem;
}

.plan-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.plan-note {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.faq {
  max-width: 46rem;
}

.faq h3 {
  margin-top: 2rem;
  font-size: 1.05rem;
}

.faq h3:first-child {
  margin-top: 0;
}

.faq p {
  line-height: 1.65;
  color: var(--text-dim);
}
