/* ============================================================================
   Flushot — site styles
   ----------------------------------------------------------------------------
   Visual language: near-black surface, one accent, mono for anything the
   machine says (filenames, shortcuts, versions) and a geometric sans for
   anything a person says. Borders do the work shadows would do elsewhere.
   Dark is the default; the light theme is the same scale inverted.

   Fonts are self-hosted (fonts/), so the page still renders identically
   offline and from file:// — no CDN, no network, no tracking.
   ========================================================================== */

/* Fonts live in fonts.css, inlined as data: URLs — a font loaded from file://
   is blocked by CORS, so a linked file silently falls back to a system face
   when the page is opened by double-click. See scripts/build-fonts.cjs. */
/* ----------------------------------------------------------------- tokens */

:root {
  color-scheme: dark;

  --bg: #09090b;
  --bg-elev: #0c0c0e;
  --bg-card: #111113;

  /* Text ramp. Every step that carries real text is checked against its
     background for WCAG AA (4.5:1) by scripts/verify-site.cjs. The dimmest
     such step is --fg-dim at 5.8:1; --fg-faint is borders and decoration
     only and is never used for copy. */
  --fg: #fafafa;
  --fg-muted: #a1a1aa;
  --fg-dim: #8a8a94;
  --fg-faint: #52525b;

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --tint: rgba(255, 255, 255, 0.025);
  --tint-hover: rgba(255, 255, 255, 0.045);

  /* The hero grid is decoration, not an edge: it gets its own tokens instead of
     borrowing --border, which is tuned to be almost invisible on purpose. Two
     weights — a fine 48 px mesh and a heavier 240 px one every fifth line — so
     the surface reads as a measured drawing rather than as noise. */
  --grid-line: rgba(255, 255, 255, 0.12);
  --grid-major: rgba(255, 255, 255, 0.22);

  --accent: #6b8dff;
  --accent-ink: #09090b;
  --accent-dim: rgba(107, 141, 255, 0.15);
  --ok: #4ade80;
  --warn: #fbbf24;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;

  --shadow-card: 0 20px 48px -16px rgba(0, 0, 0, 0.65);
  --shadow-hero: 0 28px 64px -28px rgba(0, 0, 0, 0.75);

  --max: 1240px;
  --pad: 32px;
}

:root[data-theme='light'] {
  color-scheme: light;

  --bg: #fafafa;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;

  --fg: #09090b;
  --fg-muted: #52525b;
  --fg-dim: #6b6b75;
  --fg-faint: #a1a1aa;

  --border: rgba(0, 0, 0, 0.09);
  --border-strong: rgba(0, 0, 0, 0.16);
  --tint: rgba(0, 0, 0, 0.018);
  --tint-hover: rgba(0, 0, 0, 0.04);

  --grid-line: rgba(0, 0, 0, 0.085);
  --grid-major: rgba(0, 0, 0, 0.17);

  --accent: #3b5bdb;
  --accent-ink: #ffffff;
  --accent-dim: rgba(59, 91, 219, 0.1);
  --ok: #0f7b56;
  --warn: #a16207;

  --shadow-card: 0 20px 48px -24px rgba(0, 0, 0, 0.25);
  --shadow-hero: 0 28px 64px -32px rgba(0, 0, 0, 0.3);
}

/* ------------------------------------------------------------------ reset */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

/* A barely-there grain over everything: stops large flat areas from looking
   like a screenshot of an empty div. */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

img,
svg,
picture {
  display: block;
  max-width: 100%;
}

ul,
ol {
  list-style: none;
}

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

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

/* -------------------------------------------------------------- typography */

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

kbd {
  display: inline-block;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 0.85em;
  font-weight: 500;
  line-height: 1.5;
  color: var(--fg);
  background: var(--tint-hover);
  border: 1px solid var(--border);
  border-bottom-color: var(--border-strong);
  border-radius: 5px;
  white-space: nowrap;
}

a.link {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--fg-faint);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.18s;
}

a.link:hover {
  text-decoration-color: var(--fg);
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

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

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--fg);
  color: var(--bg);
  border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  transition: transform 0.18s, background 0.18s, border-color 0.18s, color 0.18s;
}

.btn--primary {
  background: var(--fg);
  color: var(--bg);
  font-weight: 600;
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.5);
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--ghost {
  color: var(--fg-muted);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  color: var(--fg);
  border-color: var(--border-strong);
  background: var(--tint);
}

.btn--lg {
  padding: 14px 22px;
  font-size: 15px;
  border-radius: 10px;
}

.btn__icon {
  flex-shrink: 0;
}

/* -------------------------------------------------------------------- nav */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.header.is-stuck {
  border-bottom-color: var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px var(--pad);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--fg);
  transition: opacity 0.2s;
}

.brand:hover {
  opacity: 0.85;
}

.brand__mark {
  flex: none;
  width: 22px;
  height: 22px;
  /* An <img>, so the SVG's own rounded corners are the only rounding: without
     `block` the inline baseline adds a few pixels of gap under the mark. */
  display: block;
}

.brand__name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
}

.brand__ver {
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  color: var(--fg-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.nav-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.nav-links {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  padding: 0 10px;
  font-size: 13px;
  letter-spacing: -0.01em;
  color: var(--fg-muted);
  white-space: nowrap;
  transition: color 0.18s;
}

.nav-link:hover {
  color: var(--fg);
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: 4px;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.theme-toggle:hover {
  color: var(--fg);
  border-color: var(--border-strong);
  background: var(--tint);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

.nav-toggle {
  display: none;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--fg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* The header "Скачать" button must stay white on the accent fill; the generic
   .nav-link rule would otherwise win on specificity and leave it invisible. */
.nav-right .nav-cta {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--bg);
}

.nav-right .nav-cta:hover {
  color: var(--bg);
}

/* --------------------------------------------------------------- compare */

.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.compare__card {
  padding: 26px 24px;
  background: linear-gradient(var(--tint), transparent);
}

.compare__card + .compare__card {
  border-left: 1px solid var(--border);
}

.compare__card--after {
  background: linear-gradient(var(--accent-dim), transparent);
}

.compare__title {
  margin-bottom: 18px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

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

code {
  padding: 1px 5px;
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--fg);
  background: var(--tint-hover);
  border: 1px solid var(--border);
  border-radius: 4px;
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 60px;
}

/* An accent halo behind the grid. It is what makes the grid look lit rather
   than printed: the lines cross a surface that has a light source. Breathes
   very slowly — 18 seconds is long enough to be felt, not watched. */
.hero::before {
  content: '';
  position: absolute;
  top: -340px;
  left: 50%;
  width: 1040px;
  height: 760px;
  margin-left: -520px;
  pointer-events: none;
  background: radial-gradient(closest-side, var(--accent-dim), transparent);
  animation: halo 18s ease-in-out infinite alternate;
}

.hero__grid {
  position: absolute;
  /* Room to drift: the parallax in app.js moves this layer by a few pixels, and
     a layer that ends exactly on the hero edge would show the seam. */
  inset: -80px 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
    linear-gradient(var(--grid-line) 1px, transparent 1px);
  background-size: 240px 240px, 240px 240px, 48px 48px, 48px 48px;
  mask-image: radial-gradient(82% 62% at 50% 38%, #000 38%, transparent 100%);
  -webkit-mask-image: radial-gradient(82% 62% at 50% 38%, #000 38%, transparent 100%);
  /* --grid-shift is written by app.js while the hero scrolls. */
  transform: translate3d(0, var(--grid-shift, 0px), 0);
  animation: grid-in 1.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero__inner {
  position: relative;
  text-align: center;
}

.hero__title {
  max-width: 20ch;
  margin: 20px auto 22px;
  font-size: clamp(38px, 5.6vw, 74px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero__title span {
  display: block;
}

.hero__sub {
  max-width: 620px;
  margin: 0 auto 32px;
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--fg-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}

.hero__note {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 52px;
  font-size: 13px;
  color: var(--fg-dim);
}

.hero__note a {
  color: var(--fg-muted);
  text-decoration: underline;
  text-decoration-color: var(--fg-faint);
  text-underline-offset: 3px;
  transition: color 0.18s, text-decoration-color 0.18s;
}

.hero__note a:hover {
  color: var(--fg);
  text-decoration-color: var(--fg);
}

.hero__preview {
  max-width: 1120px;
  margin: 0 auto;
  transform: perspective(2000px) rotateX(2deg);
  transition: transform 0.6s;
}

.hero__preview:hover {
  transform: perspective(2000px) rotateX(0);
}

.hero__frame {
  position: relative;
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hero);
}

.hero__frame img {
  width: 100%;
  height: auto;
}

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

.section {
  position: relative;
  padding: 96px 0;
  border-top: 1px solid var(--border);
}

.section-head {
  max-width: 720px;
  margin-bottom: 56px;
}

.section-head .eyebrow {
  margin-bottom: 14px;
}

.section-title {
  margin-bottom: 18px;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.section-lead {
  max-width: 620px;
  font-size: 18px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--fg-muted);
}

.section-head--center {
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.section-head--center .section-lead {
  margin-right: auto;
  margin-left: auto;
}

/* ------------------------------------------------------------- feature grid
   One bordered block subdivided by hairlines — no gaps, no per-card borders.
   Reads as a single object rather than six. */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.feature {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 24px;
  background: linear-gradient(var(--tint), transparent);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.feature:nth-child(3n) {
  border-right: 0;
}

/* The closing edge is the grid's own border, so the cells in the final row must
   drop theirs or the line doubles. Nine features in three columns make a full
   final row, so all three of its cells lose the border. */
.feature:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.feature:hover {
  background: var(--tint-hover);
}

/* The mark lifts off the cell on hover. Two pixels is enough to read as "this
   cell is awake" without the block appearing to come apart. */
.feature__mark {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s;
}

.feature:hover .feature__mark {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.feature__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--fg);
  background: var(--tint-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.feature__mark svg {
  width: 18px;
  height: 18px;
}

.feature__name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.feature__text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-muted);
}

.feature__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
}

/* -------------------------------------------------------------- save block
   Terminal on the left, the argument for it on the right. */

.save-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 64px;
}

.term {
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.term__head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--tint);
  border-bottom: 1px solid var(--border);
}

.term__dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--border-strong);
}

.term__title {
  flex: 1;
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  text-align: center;
}

.term__body {
  padding: 20px 22px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  color: var(--fg-muted);
}

.term__line {
  white-space: nowrap;
}

.term__prompt {
  margin-right: 8px;
  color: var(--accent);
  user-select: none;
}

.term__file {
  color: var(--fg);
}

.term__dim {
  color: var(--fg-dim);
}

.term__ok {
  color: var(--ok);
}

.term__caret {
  display: inline-block;
  width: 7px;
  height: 14px;
  margin-left: 4px;
  vertical-align: -2px;
  background: var(--fg);
  animation: blink 1.1s steps(2, end) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.pitch {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.pitch__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pitch__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--fg-muted);
}

.pitch__num {
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 7px;
}

.pitch__item strong {
  color: var(--fg);
  font-weight: 600;
}

.pitch__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
}

/* ----------------------------------------------------------------- hotkeys */

.hotkeys {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 32px 40px;
  align-items: start;
}

.hotkey-panel {
  grid-row: 1;
  grid-column: 1;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.hotkey-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
}

.hotkey-row + .hotkey-row {
  border-top: 1px solid var(--border);
}

.hotkey-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hotkey-label {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hotkey-hint {
  font-size: 13px;
  color: var(--fg-muted);
}

.hotkey-keys {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 6px 10px;
  white-space: nowrap;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 9px;
}

.hotkey-plus {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
}

.hotkey-change {
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}

.hotkey-change:hover,
.hotkey-change[data-active] {
  color: var(--accent-ink);
  background: var(--accent);
}

.hotkeys__status {
  grid-row: 2;
  grid-column: 1;
  min-height: 1.5em;
  font-size: 13px;
  color: var(--fg-muted);
}

.hotkeys__status[data-tone='ok'] {
  color: var(--ok);
}

.hotkeys__status[data-tone='warn'] {
  color: var(--warn);
}

.hotkey-notes {
  grid-row: 1 / span 2;
  grid-column: 2;
}

.hotkey-notes h3 {
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.notes {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.notes li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-muted);
}

.notes li svg {
  flex: none;
  margin-top: 4px;
  color: var(--ok);
}

.notes--warn li svg {
  color: var(--warn);
}

.notes strong {
  color: var(--fg);
  font-weight: 600;
}

/* ----------------------------------------------------------------- gallery */

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  margin-bottom: 20px;
  padding: 4px;
  background: var(--tint);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.gallery__tab {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  border-radius: 7px;
  transition: color 0.15s, background 0.15s;
}

.gallery__tab:hover {
  color: var(--fg);
}

.gallery__tab[aria-selected='true'] {
  color: var(--fg);
  background: var(--bg-elev);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.gallery__panel[hidden] {
  display: none;
}

.gallery__panel--split {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.gallery__side h3 {
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

/* The two-monitor picture sits beside its caption rather than above it. */
.monitors {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  margin-top: 16px;
}

.shot {
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.shot img {
  width: 100%;
  height: auto;
}

/* Screens are shown at their real pixel size, never upscaled: a 520 px settings
   window blown up to 1174 px is a blurry screenshot pretending to be a retina
   one. */
.shot--native img {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}

.shot-caption {
  max-width: 660px;
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-muted);
}

/* --------------------------------------------------------------- downloads */

.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.dl-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: linear-gradient(var(--tint), transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.25s, background 0.25s, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.25s;
}

.dl-card:hover {
  border-color: var(--border-strong);
  background: var(--tint-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.dl-card--main {
  background: linear-gradient(var(--accent-dim), transparent);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

.dl-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dl-card__name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.dl-card__badge {
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 999px;
}

.dl-card__text {
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-muted);
}

.dl-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
}

.dl-card .btn {
  width: 100%;
  margin-top: auto;
}

.dl-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-muted);
  background: var(--tint);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
}

.dl-note svg {
  flex: none;
  margin-top: 2px;
  color: var(--warn);
}

.dl-note p {
  max-width: 760px;
}

.dl-note strong {
  color: var(--fg);
  font-weight: 600;
}

/* --------------------------------------------------------------------- faq */

.faq {
  max-width: 760px;
  border-top: 1px solid var(--border);
}

.faq details {
  border-bottom: 1px solid var(--border);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--fg-dim);
  border-bottom: 1.5px solid var(--fg-dim);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s;
}

.faq details[open] summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.faq p {
  max-width: 660px;
  padding: 0 0 20px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--fg-muted);
}

/* ------------------------------------------------------------------ limits */

.limits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.limit {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--fg-muted);
  border-bottom: 1px solid var(--border);
}

.limit:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.limit:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.limit svg {
  flex: none;
  margin-top: 3px;
  color: var(--fg-dim);
}

.limit strong {
  color: var(--fg);
  font-weight: 600;
}

/* --------------------------------------------------------------------- cta */

.cta {
  position: relative;
  overflow: hidden;
  padding: 120px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.cta::before {
  content: '';
  position: absolute;
  inset: auto 0 -50%;
  height: 60%;
  background: radial-gradient(ellipse at center, var(--accent-dim) 0%, transparent 62%);
  opacity: 0.8;
  pointer-events: none;
}

.cta__inner {
  position: relative;
}

.cta__title {
  max-width: 16ch;
  margin: 0 auto;
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.cta__sub {
  max-width: 540px;
  margin: 20px auto 34px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-muted);
}

.cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}

.cta__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
}

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

.footer {
  padding: 40px 0 32px;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--fg-dim);
}

.footer__brand img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 20px;
}

.footer__links a {
  font-size: 13px;
  color: var(--fg-dim);
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--fg);
}

/* -------------------------------------------------------------- animations */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* The hero grid settles rather than appears: a slight scale-out reads as the
   surface coming into focus, which a plain fade does not.

   `scale` is animated as its own property, not inside `transform`, so that the
   parallax in app.js can keep writing `transform` on the same element — an
   animation with `fill-mode: both` would otherwise win over the inline style
   for as long as the page is open. */
@keyframes grid-in {
  from {
    opacity: 0;
    scale: 1.04;
  }

  to {
    opacity: 1;
    scale: 1;
  }
}

@keyframes halo {
  from {
    opacity: 0.5;
    transform: scale(0.94);
  }

  to {
    opacity: 1;
    transform: scale(1.06);
  }
}

[data-rise] {
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: var(--d, 0s);
}

/* Scroll reveal. Both classes are put there by app.js and never written into the
   markup: with the script off — or if it fails to load — the page is a plain
   document with nothing hidden and nothing to animate.

   An animation rather than a transition, because these blocks already use
   transition for their own hover states and a second declaration on the same
   property would silently replace it. */
.reveal {
  opacity: 0;
}

.reveal.is-in {
  animation: reveal-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0s) both;
}

@keyframes reveal-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------- responsive */

@media (max-width: 1080px) {
  .save-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 900px) {
  :root {
    --pad: 24px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature:nth-child(3n) {
    border-right: 1px solid var(--border);
  }

  .feature:nth-child(2n) {
    border-right: 0;
  }

  .feature:nth-last-child(-n + 3) {
    border-bottom: 1px solid var(--border);
  }

  /* Nine cells in two columns leave the last row holding one: only that cell has
     no neighbour below it, so only it drops the bottom border. */
  .feature:nth-last-child(-n + 1) {
    border-bottom: 0;
  }

  .dl-grid {
    grid-template-columns: 1fr;
  }

  .limits {
    grid-template-columns: 1fr;
  }

  .limit:nth-child(odd) {
    border-right: 0;
  }

  .limit:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .limit:last-child {
    border-bottom: 0;
  }

  .hotkeys {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }

  .hotkey-panel,
  .hotkeys__status,
  .hotkey-notes {
    grid-row: auto;
    grid-column: 1;
  }

  .hotkey-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
  }

  .hotkey-keys {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .hotkey-change {
    grid-row: 1;
    grid-column: 2;
  }

  .hero__preview,
  .hero__preview:hover {
    transform: none;
  }

  .monitors,
  .gallery__panel--split {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .monitors {
    max-width: 460px;
  }
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: grid;
  }

  /* The menu drops out of the header, so it anchors to the sticky bar. */
  .nav-right.is-open .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--pad) 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }

  .nav-right.is-open .nav-link {
    padding: 12px 0;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
  }

  .nav-right.is-open .nav-link:last-child {
    border-bottom: 0;
  }

  .compare {
    grid-template-columns: 1fr;
  }

  .compare__card + .compare__card {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .section {
    padding: 64px 0;
  }

  .cta {
    padding: 88px 0;
  }

  .hero {
    padding: 56px 0 40px;
  }

  .hero__title {
    font-size: clamp(34px, 9.5vw, 52px);
  }

  .section-head {
    margin-bottom: 36px;
  }

  .section-lead {
    font-size: 16px;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .footer__links {
    justify-content: flex-start;
    gap: 14px 20px;
  }
}

@media (max-width: 560px) {
  :root {
    --pad: 18px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature {
    border-right: 0 !important;
    border-bottom: 1px solid var(--border);
  }

  /* One column: every cell keeps its separator except the very last one, which
     the grid's own border closes. The two-column rule above removes the border
     from the last two cells, which is wrong here — so it is undone first. */
  .feature:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--border);
  }

  .feature:last-child {
    border-bottom: 0;
  }

  .feature:last-child {
    border-bottom: 0;
  }

  .brand__ver {
    display: none;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn,
  .cta__actions .btn {
    width: 100%;
  }

  .term__body {
    font-size: 12px;
  }

  .hotkey-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .hotkey-change {
    grid-row: auto;
    grid-column: 1;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-rise],
  .term__caret,
  .hero::before,
  .hero__grid {
    animation: none;
  }

  /* app.js already refuses to add these classes here; the rule stays so that a
     stale class from a previous visit cannot hide a block. */
  .reveal {
    opacity: 1;
  }

  .reveal.is-in {
    animation: none;
  }

  .hero__preview,
  .hero__preview:hover {
    transform: none;
    transition: none;
  }

  .btn--primary:hover,
  .dl-card:hover,
  .feature:hover .feature__mark {
    transform: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --fg-muted: #d4d4d8;
    --fg-dim: #b4b4bb;
    --border: rgba(255, 255, 255, 0.2);
    --border-strong: rgba(255, 255, 255, 0.3);
  }

  :root[data-theme='light'] {
    --fg-muted: #27272a;
    --fg-dim: #3f3f46;
    --border: rgba(0, 0, 0, 0.25);
    --border-strong: rgba(0, 0, 0, 0.4);
  }
}
