/*
 * ── THE OPEN CUT WEBSITE DESIGN SYSTEM ───────────────────────────────────────────────
 *
 * One stylesheet, one source of truth. It deliberately mirrors the three rules the
 * application's own token file is held to, so the site and the product cannot disagree about
 * what Nova Cut looks like:
 *
 *   1. SURFACES ARE NEUTRAL. Charcoal in dark, white and light grey in light. The screenshots
 *      of the editor are the only saturated things on the page.
 *   2. THE ACCENT IS A SIGNAL, NOT A DECORATION. It marks primary actions, links and focus.
 *      Nothing large is painted in it, and there are no accent-washed hero panels.
 *   3. THE BRAND IS NOT THE ACCENT. --brand-* are the logo's own gradient stops and appear
 *      only on the logo and on one 2px rule at the top of the page.
 *
 * Themes: 'system' (default, follows the OS), 'light', 'dark'. The base :root block IS the dark
 * palette; light overrides only what changes. `data-theme` is written by the inline script in
 * the document head before first paint, so there is no flash of the wrong theme.
 */

/* ── Tokens ─────────────────────────────────────────────────────────────────────────── */

:root {
  color-scheme: dark;

  /*
   * Brand — --brand-blue is the logo's fill, verbatim from the application's assets/NovaCut.svg.
   * The mark is a single flat blue; --brand-deep and --brand-sky are a shade and a tint of it at
   * the same hue (210°) and exist only to give the 2px top rule somewhere to travel. Nothing
   * that is meant to match the icon may use them — match it with --brand-blue.
   *
   * The site's --accent is deliberately NOT this blue: #0A84FF measures 3.65:1 under white text
   * and cannot carry a button label. Same split, for the same reason, as the application's
   * tokens.css.
   */
  --brand-deep: #0059b3;
  --brand-blue: #0a84ff;
  --brand-sky: #70b8ff;
  --brand-gradient: linear-gradient(90deg, var(--brand-deep) 0%, var(--brand-blue) 52%, var(--brand-sky) 100%);

  /* Surfaces */
  --bg: #0f1115;
  --surface: #171a21;
  --surface-raised: #1d212a;
  --border: #2a2f3a;
  --border-strong: #39404e;

  /* Text */
  --text: #f3f4f6;
  --text-muted: #9ca3af;
  --text-faint: #6b7280;

  /* Accent — one input; the rest derive from it per theme. */
  --accent: #2b7bff;
  --accent-hover: #4d92ff;
  --accent-text: #6aa6ff;
  --accent-soft: rgba(43, 123, 255, 0.13);
  --accent-line: rgba(43, 123, 255, 0.34);
  --on-accent: #ffffff;

  --ok: #34d399;
  --warn: #fbbf24;
  --ok-soft: rgba(52, 211, 153, 0.12);
  --warn-soft: rgba(251, 191, 36, 0.12);

  /* Type */
  --font: 'Segoe UI Variable Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'SF Mono', 'JetBrains Mono', Consolas, monospace;

  /* A modular-ish scale that stays readable on a phone via clamp(). */
  --t-display: clamp(2.6rem, 1.4rem + 3.6vw, 4.25rem);
  --t-h1: clamp(2.1rem, 1.35rem + 2.3vw, 3.1rem);
  --t-h2: clamp(1.65rem, 1.25rem + 1.3vw, 2.2rem);
  --t-h3: clamp(1.15rem, 1.03rem + 0.4vw, 1.35rem);
  --t-lede: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem);
  --t-body: 1.0625rem;
  --t-small: 0.9375rem;
  --t-tiny: 0.8125rem;

  /* Spacing — 4px base */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 96px;
  --section: clamp(64px, 8vw, 116px);

  /* Radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-full: 999px;

  /* Elevation — restrained; borders do most of the separating work. */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 32px 64px -24px rgba(0, 0, 0, 0.7);

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur-fast: 110ms;
  --dur: 180ms;

  --wrap: 1140px;
  --wrap-narrow: 760px;
  --header-h: 64px;
}

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

  --bg: #ffffff;
  --surface: #f7f8fa;
  --surface-raised: #ffffff;
  --border: #e5e7eb;
  --border-strong: #d1d5db;

  --text: #111827;
  --text-muted: #5b6472;
  --text-faint: #7b8494;

  --accent: #1257d6;
  --accent-hover: #0f47b0;
  --accent-text: #1257d6;
  --accent-soft: rgba(18, 87, 214, 0.08);
  --accent-line: rgba(18, 87, 214, 0.28);

  --ok: #047857;
  --warn: #92620a;
  --ok-soft: rgba(4, 120, 87, 0.08);
  --warn-soft: rgba(146, 98, 10, 0.09);

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 8px 24px -10px rgba(16, 24, 40, 0.18);
  --shadow-lg: 0 32px 64px -28px rgba(16, 24, 40, 0.28);
}

/* ── Reset ──────────────────────────────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

img {
  height: auto;
}

a {
  color: var(--accent-text);
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 0.18em;
  transition: color var(--dur-fast) var(--ease);
}

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

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 700;
  text-wrap: balance;
}

code,
kbd {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

kbd {
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: var(--r-sm);
  padding: 1px 6px;
  background: var(--surface-raised);
  font-size: 0.85em;
  white-space: nowrap;
}

:where(a, button, summary, input, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

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

/* ── Layout primitives ──────────────────────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

.wrap--narrow {
  max-width: var(--wrap-narrow);
}

/*
 * Reading width, for pages that are a single column of text: the FAQ and the changelog.
 * It is a modifier of .wrap rather than an inline max-width on the content block, because the
 * page HEADER and the content below it must share one left edge — constraining only the
 * content centres it inside the wider wrap and leaves the heading hanging out to its left.
 */
.wrap--article {
  max-width: 920px;
}

.section {
  padding-block: var(--section);
}

.section--tight {
  padding-block: clamp(48px, 5vw, 72px);
}

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

.section--surface {
  background: var(--surface);
}

.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-md);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--dur) var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
  color: var(--on-accent);
}

/* ── Type helpers ───────────────────────────────────────────────────────────────────── */

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-tiny);
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: var(--s4);
}

.eyebrow--muted {
  color: var(--text-faint);
}

.lede {
  font-size: var(--t-lede);
  color: var(--text-muted);
  line-height: 1.6;
  text-wrap: pretty;
}

.section-head {
  max-width: 62ch;
  margin-bottom: var(--s7);
}

.section-head h2 {
  font-size: var(--t-h2);
}

.section-head .lede {
  margin-top: var(--s4);
}

.muted {
  color: var(--text-muted);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ── Buttons ────────────────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: var(--t-small);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
}

.btn--secondary {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn--secondary:hover {
  background: var(--surface-raised);
  border-color: var(--text-faint);
  color: var(--text);
}

.btn--lg {
  padding: 16px 28px;
  font-size: 1rem;
  border-radius: var(--r-md);
}

.btn--block {
  width: 100%;
}

/*
 * A download that has no URL yet. Not a link, not clickable, and it says why.
 *
 * The label keeps --text-muted rather than dropping to --text-faint: a disabled control still
 * has to be READ, and this one is carrying the name of the thing you came to the page for. The
 * absence of the accent fill is what communicates "not available", not illegibility.
 */
.btn[aria-disabled='true'],
.btn:disabled {
  background: var(--surface-raised);
  border-color: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
  pointer-events: none;
}

.btn__icon {
  width: 17px;
  height: 17px;
  flex: none;
}

/*
 * An icon SVG fills the box its wrapper defines.
 *
 * The icons ship with width="24" height="24" attributes so that an unstyled one is 24px rather
 * than the 300x150 a bare viewBox gives a replaced element. The cost is that a wrapper which
 * sizes only ITSELF leaves the SVG at 17x24: `max-width: 100%` in the reset clamps the width and
 * nothing clamps the height, so the glyph is squashed sideways and overflows downwards. That is
 * what made the arrow on "See everything Nova Cut does" look mis-spaced.
 *
 * Wrappers that set an explicit size on a plain `svg` selector (.hero__meta, .freelist, .notice,
 * .theme, .dl-card__os) were never affected — only these two, which size a span around it.
 */
.btn__icon svg,
.faq__chevron svg {
  display: block;
  width: 100%;
  height: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
}

/* ── Badges ─────────────────────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface-raised);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
}

.badge--accent {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent-text);
}

.badge--ok {
  border-color: color-mix(in srgb, var(--ok) 40%, transparent);
  background: var(--ok-soft);
  color: var(--ok);
}

.badge--warn {
  border-color: color-mix(in srgb, var(--warn) 40%, transparent);
  background: var(--warn-soft);
  color: var(--warn);
}

/* ── Cards ──────────────────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s5);
}

.card--raised {
  background: var(--surface-raised);
  box-shadow: var(--shadow-sm);
}

.grid {
  display: grid;
  gap: var(--s4);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ── Header ─────────────────────────────────────────────────────────────────────────── */

.brandline {
  height: 2px;
  background: var(--brand-gradient);
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.header[data-scrolled='true'] {
  border-bottom-color: var(--border);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: var(--s5);
  width: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  flex: none;
}

.logo:hover {
  color: var(--text);
}

.logo svg {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  flex: none;
}

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

.nav a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding-inline: 12px;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-size: var(--t-small);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.nav a:hover {
  color: var(--text);
  background: var(--surface);
}

.nav a[aria-current='page'] {
  color: var(--text);
  font-weight: 600;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex: none;
}

.header .btn {
  padding: 9px 16px;
  font-size: var(--t-small);
}

/* Theme control — three states, matching the application's own System / Light / Dark. */
.theme {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface);
}

.theme button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 26px;
  border: 0;
  border-radius: var(--r-full);
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.theme button:hover {
  color: var(--text);
}

.theme button[aria-pressed='true'] {
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.theme svg {
  width: 14px;
  height: 14px;
}

/* Nova switcher — a small "Nova ▾" trigger next to the logo, opening a menu of sibling
   products. See src/components.mjs `novaSwitcher()` for the markup and data/nova.js for the
   product list. */
.switcher {
  position: relative;
  flex: none;
}

.switcher__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding-inline: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font);
  font-size: var(--t-tiny);
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease);
}

.switcher__trigger:hover,
.switcher__trigger[aria-expanded='true'] {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-raised);
}

.switcher__mark {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  overflow: hidden;
  flex: none;
}

.switcher__mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.switcher__trigger > svg {
  width: 12px;
  height: 12px;
  flex: none;
  transition: transform var(--dur-fast) var(--ease);
}

.switcher__trigger[aria-expanded='true'] > svg {
  transform: rotate(180deg);
}

/*
 * Animated via [data-open] rather than the native [hidden] — display:none can't transition, and
 * this needs to fade and settle into place rather than snap. [hidden] is still what the markup
 * ships with (see novaSwitcher() in components.mjs), so with JavaScript disabled the menu stays
 * display:none forever; site.js's one job on init is switching it over to this data-open-driven
 * state before it ever toggles the trigger.
 */
.switcher__menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 60;
  width: max(268px, 100%);
  padding: var(--s2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface-raised);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top left;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
    visibility 0s linear var(--dur);
}

.switcher__menu[hidden] {
  display: none;
}

.switcher__menu[data-open='true'] {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

/* Items arrive in a quick stagger behind the panel, same rhythm as the mobile nav below. */
.switcher__menu[data-open='true'] .switcher__item {
  animation: oc-nav-item 200ms var(--ease) backwards;
}

.switcher__menu[data-open='true'] .switcher__item:nth-child(2) { animation-delay: 30ms; }
.switcher__menu[data-open='true'] .switcher__item:nth-child(3) { animation-delay: 55ms; }
.switcher__menu[data-open='true'] .switcher__item:nth-child(4) { animation-delay: 80ms; }
.switcher__menu[data-open='true'] .switcher__item:nth-child(5) { animation-delay: 105ms; }

.switcher__eyebrow {
  margin: 2px var(--s2) 6px;
  color: var(--text-faint);
  font-size: var(--t-tiny);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.switcher__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px var(--s2);
  border-radius: var(--r-md);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}

a.switcher__item:hover {
  background: var(--surface);
}

.switcher__item--current {
  cursor: default;
  background: var(--accent-soft);
}

.switcher__item--soon {
  cursor: default;
  color: var(--text-faint);
}

.switcher__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text-muted);
  flex: none;
}

.switcher__item--current .switcher__icon {
  color: var(--accent-text);
}

.switcher__icon svg {
  width: 16px;
  height: 16px;
}

.switcher__text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.switcher__label {
  font-size: var(--t-small);
  font-weight: 600;
}

.switcher__tagline {
  color: var(--text-faint);
  font-size: var(--t-tiny);
}

.switcher__item--current .switcher__tagline {
  color: var(--accent-text);
}

.switcher__badge {
  flex: none;
  margin-inline-start: auto;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--text-faint);
  font-size: var(--t-tiny);
  font-weight: 600;
}

@media (max-width: 420px) {
  .switcher__trigger-label {
    display: none;
  }
}

/* The dropdown's own footer row — same rhythm as the last stagger delay above it. */
.switcher__viewall {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: var(--s1);
  padding: 8px var(--s2);
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--r-md) var(--r-md);
  background: none;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: var(--t-tiny);
  font-weight: 600;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}

.switcher__menu[data-open='true'] .switcher__viewall {
  animation: oc-nav-item 200ms var(--ease) backwards;
  animation-delay: 130ms;
}

.switcher__viewall:hover {
  color: var(--text);
  background: var(--surface);
}

.switcher__viewall svg {
  width: 13px;
  height: 13px;
  transition: transform var(--dur-fast) var(--ease);
}

.switcher__viewall:hover svg {
  transform: translateX(2px);
}

/*
 * ── All products ───────────────────────────────────────────────────────────────────
 *
 * The switcher's own product list again, full-screen and card-sized, opened by
 * `.switcher__viewall`. Same glass treatment as `.header` (color-mix + backdrop-filter over
 * this theme's --bg) rather than Online Earth's raw rgba — this site already has a translucent-
 * surface language of its own, and the point is to feel like a bigger room in the same house,
 * not a different building. Toggled via [data-open] for the same reason the switcher menu and
 * mobile nav are: display:none can't transition, so JavaScript takes the panel off [hidden]
 * before anything can fade — see site.js.
 */
.nova-all {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: clamp(28px, 8vh, 96px) var(--s5) var(--s7);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(28px);
  -webkit-backdrop-filter: saturate(160%) blur(28px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility 0s linear var(--dur);
}

.nova-all[hidden] {
  display: none;
}

.nova-all[data-open='true'] {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--dur) var(--ease);
}

body.nova-all-locked {
  overflow: hidden;
}

.nova-all__close {
  position: fixed;
  top: clamp(16px, 4vh, 32px);
  right: clamp(16px, 4vw, 40px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}

.nova-all__close:hover {
  background: var(--surface-raised);
  transform: scale(1.05);
}

.nova-all__close svg {
  width: 16px;
  height: 16px;
}

.nova-all__inner {
  width: 100%;
  max-width: 880px;
  text-align: center;
  transform: translateY(-10px);
  opacity: 0;
  transition: transform var(--dur) var(--ease) 40ms, opacity var(--dur) ease 40ms;
}

.nova-all[data-open='true'] .nova-all__inner {
  transform: none;
  opacity: 1;
}

.nova-all__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 var(--s3);
  color: var(--text-faint);
  font-size: var(--t-tiny);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nova-all__eyebrow svg {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  overflow: hidden;
}

.nova-all__title {
  margin: 0 0 var(--s2);
  font-size: var(--t-h2);
  letter-spacing: -0.02em;
}

.nova-all__subtitle {
  max-width: 46ch;
  margin: 0 auto var(--s6);
  color: var(--text-muted);
}

.nova-all__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--s4);
  text-align: left;
}

.nova-all__card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: var(--s5) var(--s4);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px) scale(0.97);
}

.nova-all[data-open='true'] .nova-all__card {
  animation: oc-card-pop 380ms var(--ease) both;
}

.nova-all[data-open='true'] .nova-all__card:nth-child(2) { animation-delay: 40ms; }
.nova-all[data-open='true'] .nova-all__card:nth-child(3) { animation-delay: 80ms; }
.nova-all[data-open='true'] .nova-all__card:nth-child(4) { animation-delay: 120ms; }
.nova-all[data-open='true'] .nova-all__card:nth-child(5) { animation-delay: 160ms; }

@keyframes oc-card-pop {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

a.nova-all__card {
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease),
    background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

a.nova-all__card:hover {
  background: var(--surface-raised);
  border-color: var(--accent-line);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.nova-all__card--current {
  cursor: default;
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.nova-all__card--soon {
  cursor: default;
  color: var(--text-faint);
}

.nova-all__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--s3);
  border-radius: var(--r-md);
  background: var(--surface-raised);
  color: var(--text-muted);
}

.nova-all__card--current .nova-all__icon {
  color: var(--accent-text);
  background: var(--bg);
}

.nova-all__icon svg {
  width: 20px;
  height: 20px;
}

.nova-all__label {
  font-size: var(--t-small);
  font-weight: 700;
}

.nova-all__tagline {
  color: var(--text-faint);
  font-size: var(--t-tiny);
}

.nova-all__card--current .nova-all__tagline {
  color: var(--accent-text);
}

.nova-all__badge {
  position: absolute;
  top: var(--s3);
  right: var(--s3);
  padding: 2px 9px;
  border-radius: var(--r-full);
  background: var(--surface-raised);
  color: var(--text-faint);
  font-size: var(--t-tiny);
  font-weight: 600;
}

@media (max-width: 560px) {
  .nova-all__grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--s3);
  }
}

/* Mobile navigation. The checkbox-free version: a button toggling a class, progressively
   enhanced — with JavaScript off the nav links remain reachable in the footer. */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 34px;
  margin-inline-start: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle svg {
  width: 17px;
  height: 17px;
}

.nav-toggle .icon-close,
.nav-toggle[aria-expanded='true'] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded='true'] .icon-close {
  display: block;
}

@media (max-width: 1100px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: var(--s3) clamp(20px, 5vw, 40px) var(--s5);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
  }

  .nav[data-open='true'] {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .nav a {
    height: 46px;
    padding-inline: 4px;
    font-size: 1rem;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
  }

  .nav a:hover {
    background: transparent;
  }

  .header__actions .btn {
    display: none;
  }
}

/* ── Hero ───────────────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-block: clamp(56px, 9vw, 104px) 0;
  overflow: hidden;
}

/* One soft brand wash, high and off to the side, at low opacity. This is the only place on
   the site where brand colour touches a large area, and it never sits behind body text. */
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 620px;
  background: radial-gradient(680px 340px at 72% 12%, color-mix(in srgb, var(--brand-blue) 18%, transparent), transparent 66%);
  pointer-events: none;
}

:root[data-theme='light'] .hero::before {
  background: radial-gradient(680px 340px at 72% 12%, color-mix(in srgb, var(--brand-blue) 9%, transparent), transparent 66%);
}

.hero__inner {
  position: relative;
  max-width: 800px;
}

.hero h1 {
  font-size: var(--t-display);
  letter-spacing: -0.035em;
  margin-bottom: var(--s5);
}

.hero .lede {
  max-width: 60ch;
  font-size: clamp(1.1rem, 1rem + 0.55vw, 1.35rem);
}

.hero .btn-row {
  margin-top: var(--s7);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s4);
  margin-top: var(--s5);
  font-size: var(--t-tiny);
  color: var(--text-faint);
  font-family: var(--font-mono);
}

.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero__meta svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--text-faint);
}

/* The application shot. A window-chrome frame so it reads as software, not as a stock photo. */
.shot {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.shot__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding-inline: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-raised);
}

.shot__bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}

.shot__bar span {
  margin-inline-start: auto;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text-faint);
}

.shot img {
  width: 100%;
  display: block;
}

.shot figcaption {
  padding: var(--s3) var(--s4);
  border-top: 1px solid var(--border);
  background: var(--surface-raised);
  font-size: var(--t-tiny);
  color: var(--text-faint);
}

.hero__shot {
  position: relative;
  margin-top: var(--s8);
}

/* ── Promise section ────────────────────────────────────────────────────────────────── */

.promise {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

@media (max-width: 900px) {
  .promise {
    grid-template-columns: 1fr;
  }
}

.promise h2 {
  font-size: var(--t-h2);
}

.promise__claim {
  margin-top: var(--s5);
  padding: var(--s5);
  border: 1px solid var(--accent-line);
  border-radius: var(--r-lg);
  background: var(--accent-soft);
}

.promise__claim strong {
  display: block;
  font-size: var(--t-h3);
  letter-spacing: -0.02em;
  color: var(--text);
}

.promise__claim p {
  margin-top: var(--s2);
  color: var(--text-muted);
  font-size: var(--t-small);
}

.freelist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: var(--s2) var(--s4);
  margin-top: var(--s5);
}

.freelist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-block: 7px;
  font-size: var(--t-small);
  color: var(--text);
}

.freelist svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--ok);
}

.aside-note {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: var(--s5);
}

.aside-note h3 {
  font-size: var(--t-h3);
  margin-bottom: var(--s3);
}

.aside-note p + p {
  margin-top: var(--s3);
}

.aside-note p {
  color: var(--text-muted);
  font-size: var(--t-small);
}

/* ── Feature blocks ─────────────────────────────────────────────────────────────────── */

.feature-block + .feature-block {
  margin-top: var(--section);
  padding-top: var(--section);
  border-top: 1px solid var(--border);
}

.feature-block__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s5);
  margin-bottom: var(--s7);
}

.feature-block__head h2 {
  font-size: var(--t-h2);
}

.feature-block__head .lede {
  margin-top: var(--s3);
  max-width: 58ch;
}

.stats {
  display: flex;
  gap: var(--s6);
  flex: none;
}

.stats div {
  text-align: right;
}

.stats b {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.1;
}

.stats span {
  font-size: var(--t-tiny);
  color: var(--text-faint);
}

@media (max-width: 700px) {
  .stats {
    gap: var(--s5);
  }

  .stats div {
    text-align: left;
  }
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: var(--s4);
}

.feature {
  padding: var(--s5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.feature:hover {
  border-color: var(--border-strong);
  background: var(--surface-raised);
}

.feature__title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-bottom: var(--s3);
}

.feature h3 {
  font-size: 1.0625rem;
  letter-spacing: -0.015em;
}

.feature p {
  color: var(--text-muted);
  font-size: var(--t-small);
  text-wrap: pretty;
}

.feature-block__shot {
  margin-bottom: var(--s7);
}

/* ── Download ───────────────────────────────────────────────────────────────────────── */

.dl-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: var(--s5);
  align-items: start;
}

@media (max-width: 900px) {
  .dl-grid {
    grid-template-columns: 1fr;
  }
}

.dl-card {
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
  overflow: hidden;
}

.dl-card--primary {
  border-color: var(--accent-line);
}

.dl-card__head {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s5);
  border-bottom: 1px solid var(--border);
}

.dl-card__os {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface-raised);
  color: var(--text-muted);
  flex: none;
}

.dl-card__os svg {
  width: 21px;
  height: 21px;
}

.dl-card__head h2,
.dl-card__head h3 {
  font-size: var(--t-h3);
}

.dl-card__head p {
  font-size: var(--t-tiny);
  color: var(--text-faint);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.dl-card__body {
  padding: var(--s5);
}

.dl-build + .dl-build {
  margin-top: var(--s5);
  padding-top: var(--s5);
  border-top: 1px solid var(--border);
}

.dl-build__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  flex-wrap: wrap;
  margin-bottom: var(--s3);
}

.dl-build__top h3 {
  font-size: 1.0625rem;
}

.dl-build p {
  font-size: var(--t-small);
  color: var(--text-muted);
  margin-bottom: var(--s4);
}

.spec {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: var(--s2) var(--s5);
  font-size: var(--t-small);
}

.spec dt {
  color: var(--text-faint);
}

.spec dd {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--t-tiny);
  overflow-wrap: anywhere;
}

.spec--prose dd {
  font-family: var(--font);
  font-size: var(--t-small);
  color: var(--text-muted);
}

.notice {
  display: flex;
  gap: var(--s4);
  padding: var(--s4) var(--s5);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.notice--warn {
  border-color: color-mix(in srgb, var(--warn) 32%, transparent);
  background: var(--warn-soft);
}

.notice--accent {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.notice svg {
  width: 19px;
  height: 19px;
  flex: none;
  margin-top: 3px;
  color: var(--text-muted);
}

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

.notice--accent svg {
  color: var(--accent-text);
}

.notice__title {
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
  font-weight: 700;
  margin-bottom: 5px;
}

.notice p {
  font-size: var(--t-small);
  color: var(--text-muted);
  text-wrap: pretty;
}

.notice p + p {
  margin-top: var(--s2);
}

.platform-row {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding-block: var(--s4);
}

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

.platform-row div {
  flex: 1;
}

.platform-row h3 {
  font-size: 1rem;
  margin-bottom: 3px;
}

.platform-row p {
  font-size: var(--t-small);
  color: var(--text-muted);
}

/* ── Changelog ──────────────────────────────────────────────────────────────────────── */

.release + .release {
  margin-top: var(--s8);
  padding-top: var(--s8);
  border-top: 1px solid var(--border);
}

.release__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--s3) var(--s4);
  margin-bottom: var(--s4);
}

.release__head h2 {
  font-size: var(--t-h2);
  font-family: var(--font-mono);
  letter-spacing: -0.03em;
}

.release__name {
  font-size: var(--t-lede);
  color: var(--text-muted);
}

.release__summary {
  max-width: 70ch;
  color: var(--text-muted);
  margin-bottom: var(--s6);
  text-wrap: pretty;
}

.change-group + .change-group {
  margin-top: var(--s6);
}

.change-group h3 {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-size: var(--t-tiny);
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--s4);
}

.change-group h3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.change-group--new h3 {
  color: var(--accent-text);
}

.change-group--known h3 {
  color: var(--warn);
}

.change-list li {
  position: relative;
  padding-left: 26px;
  padding-block: 7px;
  color: var(--text-muted);
  font-size: var(--t-small);
  text-wrap: pretty;
}

.change-list li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 15px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border-strong);
}

.change-group--new .change-list li::before {
  background: var(--accent);
}

.change-group--known .change-list li::before {
  background: var(--warn);
}

/* ── FAQ ────────────────────────────────────────────────────────────────────────────── */

.faq-group + .faq-group {
  margin-top: var(--s8);
}

.faq-group > h2 {
  font-size: var(--t-h3);
  padding-bottom: var(--s4);
  margin-bottom: var(--s2);
  border-bottom: 1px solid var(--border);
}

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

.faq summary {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding-block: var(--s5);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  cursor: pointer;
  list-style: none;
  transition: color var(--dur-fast) var(--ease);
}

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

.faq summary:hover {
  color: var(--accent-text);
}

.faq summary span {
  flex: 1;
}

.faq__chevron {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--text-faint);
  transition: transform var(--dur) var(--ease);
}

.faq[open] .faq__chevron {
  transform: rotate(180deg);
}

.faq__body {
  padding-bottom: var(--s5);
  max-width: 72ch;
}

.faq__body p {
  color: var(--text-muted);
  font-size: var(--t-small);
  text-wrap: pretty;
}

.faq__body p + p {
  margin-top: var(--s4);
}

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

.faq__body code {
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
}

.faq[open] .faq__body {
  animation: reveal var(--dur) var(--ease);
}

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

/* ── Prose (About, Privacy, Terms) ──────────────────────────────────────────────────── */

.prose {
  max-width: 68ch;
}

.prose h2 {
  font-size: var(--t-h3);
  margin-top: var(--s8);
  margin-bottom: var(--s4);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--text-muted);
  text-wrap: pretty;
}

.prose p + p {
  margin-top: var(--s4);
}

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

.prose ul {
  margin-top: var(--s4);
  display: grid;
  gap: var(--s2);
}

.prose ul li {
  position: relative;
  padding-left: 22px;
}

.prose ul li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--border-strong);
}

.prose blockquote {
  margin-top: var(--s5);
  padding: var(--s5);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: var(--t-lede);
  letter-spacing: -0.015em;
  color: var(--text);
}

/* ── CTA ────────────────────────────────────────────────────────────────────────────── */

.cta {
  text-align: center;
  padding-block: var(--section);
  border-top: 1px solid var(--border);
}

.cta h2 {
  font-size: var(--t-h1);
  margin-bottom: var(--s4);
}

.cta .lede {
  max-width: 52ch;
  margin-inline: auto;
}

.cta .btn-row {
  justify-content: center;
  margin-top: var(--s6);
}

/* ── Footer ─────────────────────────────────────────────────────────────────────────── */

.footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding-block: var(--s8) var(--s6);
}

.footer__top {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
  gap: var(--s7) var(--s5);
}

@media (max-width: 760px) {
  .footer__top {
    grid-template-columns: 1fr 1fr;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

.footer__brand .logo {
  margin-bottom: var(--s4);
}

.footer__brand p {
  font-size: var(--t-small);
  color: var(--text-muted);
  max-width: 34ch;
}

.footer h2 {
  font-size: var(--t-tiny);
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: var(--s4);
}

.footer li + li {
  margin-top: 10px;
}

.footer li a {
  color: var(--text-muted);
  font-size: var(--t-small);
  text-decoration: none;
}

.footer li a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  margin-top: var(--s8);
  padding-top: var(--s5);
  border-top: 1px solid var(--border);
  font-size: var(--t-tiny);
  color: var(--text-faint);
}

.footer__bottom p {
  font-size: inherit;
}

/* ── Page transitions ───────────────────────────────────────────────────────────────── */

/*
 * Navigating between pages should feel like moving through one product, not like eight separate
 * documents. Two mechanisms, in preference order, and only ever one of them runs:
 *
 * 1. THE VIEW TRANSITIONS API, where the browser supports it. The browser itself cross-fades the
 *    old page into the new one across a real navigation. No JavaScript, no SPA router, and the
 *    site stays eight static HTML files.
 *
 * 2. AN ENTER ANIMATION, everywhere else — the content rises and fades in on load, which reads
 *    as a transition without needing to know anything about the page being left.
 *
 * The @supports guard is what stops both running at once and double-animating.
 */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: oc-fade-out 90ms var(--ease) both;
}

::view-transition-new(root) {
  animation: oc-page-in 260ms var(--ease) both;
}

@supports not (view-transition-name: none) {
  .js main {
    animation: oc-page-in 300ms var(--ease) both;
  }
}

@keyframes oc-page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes oc-fade-out {
  to {
    opacity: 0;
  }
}

/* The header is continuous across a navigation, so it must not be part of the transition. */
.header,
.brandline {
  view-transition-name: none;
}

/* ── Navigation ─────────────────────────────────────────────────────────────────────── */

/*
 * The current page gets a rule that grows from the centre rather than a colour change, so the
 * indicator moves with you as you click through rather than blinking between states.
 */
.nav a {
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--dur) var(--ease);
}

.nav a:hover::after {
  transform: scaleX(0.55);
}

.nav a[aria-current='page']::after {
  transform: scaleX(1);
}

/* Mobile: the panel slides down, then its links arrive in sequence just behind it. */
@media (max-width: 860px) {
  .nav a::after {
    display: none;
  }

  .nav[data-open='true'] a {
    animation: oc-nav-item 260ms var(--ease) backwards;
  }

  .nav[data-open='true'] a:nth-child(1) { animation-delay: 40ms; }
  .nav[data-open='true'] a:nth-child(2) { animation-delay: 75ms; }
  .nav[data-open='true'] a:nth-child(3) { animation-delay: 110ms; }
  .nav[data-open='true'] a:nth-child(4) { animation-delay: 145ms; }
  .nav[data-open='true'] a:nth-child(5) { animation-delay: 180ms; }
}

@keyframes oc-nav-item {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}

/* ── Scroll reveal ──────────────────────────────────────────────────────────────────── */

/*
 * Opt-in and JS-driven: the class is only added by site.js after it confirms IntersectionObserver
 * support, so with JavaScript disabled or unsupported nothing is ever left invisible. That is the
 * whole reason the hidden state lives under [data-reveal] rather than on the element by default.
 */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 460ms var(--ease), transform 460ms var(--ease);
  will-change: opacity, transform;
}

.js [data-reveal='shown'] {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/*
 * Staggered reveal, opt-in via data-stagger (see `reveal()` in components.mjs).
 *
 * The CONTAINER stops hiding itself and hands the animation to its children, so a grid of cards
 * arrives as a sequence rather than as one slab. Deliberately not applied to everything: a
 * figure's chrome bar, image and caption are parts of one object and must arrive together.
 *
 * The step is 45ms and the list is capped at eight. A stagger long enough to notice waiting for
 * is a stagger that has become a loading screen — eight cards finish 315ms after the first.
 */
.js [data-reveal][data-stagger] {
  opacity: 1;
  transform: none;
}

.js [data-reveal][data-stagger] > * {
  opacity: 0;
}

/*
 * `both`, not `backwards`. The children's resting opacity is 0 (above), so a fill that only
 * covers the delay hands them straight back to invisible the moment the animation ends.
 */
.js [data-reveal='shown'][data-stagger] > * {
  animation: oc-rise 440ms var(--ease) both;
}

.js [data-reveal='shown'][data-stagger] > *:nth-child(1) { animation-delay: 0ms; }
.js [data-reveal='shown'][data-stagger] > *:nth-child(2) { animation-delay: 45ms; }
.js [data-reveal='shown'][data-stagger] > *:nth-child(3) { animation-delay: 90ms; }
.js [data-reveal='shown'][data-stagger] > *:nth-child(4) { animation-delay: 135ms; }
.js [data-reveal='shown'][data-stagger] > *:nth-child(5) { animation-delay: 180ms; }
.js [data-reveal='shown'][data-stagger] > *:nth-child(6) { animation-delay: 225ms; }
.js [data-reveal='shown'][data-stagger] > *:nth-child(7) { animation-delay: 270ms; }
.js [data-reveal='shown'][data-stagger] > *:nth-child(n + 8) { animation-delay: 315ms; }

@keyframes oc-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

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

/*
 * Scroll-linked lift on the application screenshots.
 *
 * Driven by the scroll position itself rather than by a one-shot trigger, so the figure settles
 * as it travels up the viewport instead of playing a fixed animation on arrival. Pure CSS — no
 * scroll listener, nothing on the main thread — and where `animation-timeline` is unsupported
 * the @supports guard means the figure is simply always in its resting state.
 *
 * `entry 0% cover 30%` keeps the whole movement in the lower third of the viewport, so it is
 * finished by the time the screenshot is somewhere a reader would actually be looking at it.
 */
@supports (animation-timeline: view()) {
  .js .shot {
    animation: oc-shot-settle linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
  }
}

@keyframes oc-shot-settle {
  from {
    opacity: 0.55;
    transform: translateY(28px) scale(0.985);
  }

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

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    /* Without this the staggered items hold their `backwards` fill — invisible — for the whole
       delay and then snap in. A neutralised animation must have a neutralised delay too. */
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js [data-reveal],
  .js [data-reveal][data-stagger] > * {
    opacity: 1;
    transform: none;
  }

  /* Scroll-linked and cross-document transitions are movement the reader asked not to see. */
  .js .shot {
    animation: none !important;
    opacity: 1;
    transform: none;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important;
  }
}

/* ── Print ──────────────────────────────────────────────────────────────────────────── */

@media print {
  .header,
  .footer,
  .cta,
  .theme,
  .nav-toggle {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}

/* Nova i18n: the language selector lives in the header actions; on the narrowest screens the
   product switcher gives way to it (the footer still lists every product). */
.nova-lang-slot { display: inline-flex; align-items: center; }
@media (max-width: 480px) {
  .header .switcher { display: none; }
  .nav-toggle { flex: none; }
}

/* ── Switcher groups ───────────────────────────────────────────────────────────────── */
.switcher__menu {
  max-height: calc(100vh - 96px);
  overflow-y: auto;
}
.switcher__eyebrow--group {
  margin-top: var(--s3);
}
.switcher__eyebrow--group:first-of-type {
  margin-top: 2px;
}
.nova-all__group {
  margin: var(--s6) 0 var(--s3);
  text-align: left;
  color: var(--text-faint);
  font-size: var(--t-tiny);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nova-all__group:first-of-type {
  margin-top: 0;
}

/* ── More motion ───────────────────────────────────────────────────────────────────── */

/* A thin progress rule under the header that fills as the page scrolls. Pure CSS where the
   browser supports scroll-driven animation; site.js sets --scroll for the rest. */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: 2px;
  transform-origin: 0 50%;
  transform: scaleX(var(--scroll, 0));
  background: linear-gradient(90deg, var(--brand-sky), var(--accent));
  pointer-events: none;
}
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    transform: scaleX(0);
    animation: oc-progress linear both;
    animation-timeline: scroll(root block);
  }
}
@keyframes oc-progress {
  to {
    transform: scaleX(1);
  }
}

/* Section headings draw a short accent rule once they scroll into view. */
.js .section-head h2 {
  position: relative;
}
.js .section-head h2::after {
  content: '';
  display: block;
  width: 44px;
  height: 3px;
  margin-top: var(--s3);
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 640ms var(--ease) 180ms;
}
.js [data-reveal='shown'] .section-head h2::after,
.js .section-head[data-reveal='shown'] h2::after,
.js .section-head h2[data-reveal='shown']::after {
  transform: scaleX(1);
}
.section-head[style*='text-align:center'] h2::after,
.section-head--center h2::after {
  margin-inline: auto;
  transform-origin: 50% 50%;
}

/* Cards and buttons answer the pointer. */
.card,
.feature,
.dl-card,
.dl-build {
  transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms var(--ease);
}
.card:hover,
.feature:hover,
.dl-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.5);
}
.btn {
  transition: transform 160ms var(--ease), background-color 160ms var(--ease), border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: none;
}

/* The hero eases in on load instead of appearing. */
.js .hero__inner > * {
  animation: oc-rise 560ms var(--ease) both;
}
.js .hero__inner > *:nth-child(1) { animation-delay: 40ms; }
.js .hero__inner > *:nth-child(2) { animation-delay: 110ms; }
.js .hero__inner > *:nth-child(3) { animation-delay: 180ms; }
.js .hero__inner > *:nth-child(4) { animation-delay: 250ms; }
.js .hero__inner > *:nth-child(5) { animation-delay: 320ms; }

/* The hero screenshot drifts slightly against the scroll. site.js drives --parallax. */
.hero__shot {
  transform: translateY(calc(var(--parallax, 0) * -1px));
  will-change: transform;
}

/* The logo tilts a touch on hover. */
.logo svg {
  transition: transform 260ms var(--ease);
}
.logo:hover svg {
  transform: rotate(-6deg) scale(1.06);
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress,
  .js .hero__inner > *,
  .hero__shot,
  .logo:hover svg,
  .card:hover,
  .feature:hover,
  .dl-card:hover,
  .btn:hover {
    animation: none !important;
    transform: none !important;
  }
  .js .section-head h2::after {
    transform: scaleX(1);
    transition: none;
  }
}
