/* ==========================================================================
   Site components. Colours come only from tokens — never hardcode.
   Map: reveals · nav · buttons · hero · screenshots · comparison wipe ·
        steps · feature tiles · bezel demo · flow · pricing · faq ·
        final CTA · footer · secondary pages · narrow screens
   ========================================================================== */

/* --- Scroll reveals (JS-gated: without JS nothing is ever hidden) ------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 760ms var(--ease) var(--d, 0ms),
              transform 760ms var(--ease) var(--d, 0ms);
}
html.js .reveal.in-view {
  opacity: 1;
  transform: none;
}
/* Variants — direction and depth, so sections don't all arrive the same way */
html.js .reveal--scale { transform: translateY(30px) scale(0.965); }
html.js .reveal--left { transform: translate3d(-36px, 12px, 0); }
html.js .reveal--right { transform: translate3d(36px, 12px, 0); }
html.js .reveal--rise { transform: translateY(56px); }
html.js .reveal--scale.in-view,
html.js .reveal--left.in-view,
html.js .reveal--right.in-view,
html.js .reveal--rise.in-view { transform: none; }

/* Scroll-linked drift. JS writes --pz; the wrapper owns the reveal so the
   two transforms never fight. */
html.js [data-parallax] {
  transform: translate3d(0, var(--pz, 0px), 0);
  will-change: transform;
}

/* --- Navigation --------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-weight: 650;
  letter-spacing: -0.01em;
}
.brand-mark { width: 34px; height: auto; }
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: clamp(var(--s-4), 2.4vw, var(--s-8));
  font-size: var(--fs-small);
}
.nav-links a { color: var(--text-secondary); transition: color var(--dur-fast) var(--ease); }
.nav-links a:hover { color: var(--text); }
.nav-end {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 18px; height: 18px; stroke: var(--text); }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 11px 22px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: var(--fs-small);
  line-height: 1.2;
  border: 1px solid transparent;
  transition: background var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
  text-align: center;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { background: var(--accent-press); }
.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent-border); background: var(--accent-dim); }
.btn-lg { padding: 15px 30px; font-size: var(--fs-body); }
.btn-soon {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text-secondary);
  cursor: default;
}
.btn-icon { width: 18px; height: 18px; flex: none; fill: currentColor; }
.link-quiet {
  color: var(--text-secondary);
  font-size: var(--fs-small);
  font-weight: 600;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.link-quiet:hover { color: var(--accent); border-color: var(--accent-border); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-4);
}

/* One download button for both platforms; the download page splits by OS,
   Windows first. */

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  padding-top: clamp(56px, 8vw, 110px);
  padding-bottom: clamp(40px, 5vw, 72px);
  text-align: center;
  overflow: hidden;
}
/* Ambient wash behind the hero — depth, not neon */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -30%;
  left: 50%;
  width: min(1100px, 130%);
  aspect-ratio: 1.6;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side, var(--glow-accent), transparent 72%),
    radial-gradient(closest-side, var(--glow-deep), transparent 78%);
  pointer-events: none;
}
.hero .eyebrow { justify-content: center; }
.hero h1 {
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  margin-top: var(--s-4);
  max-width: 16ch;
  margin-inline: auto;
}
.hero h1 .accent { color: var(--accent); }
.hero-lead {
  margin-top: var(--s-5);
  margin-inline: auto;
  max-width: 52ch;
  color: var(--text-secondary);
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
}
.hero-resource {
  margin-top: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--accent);
  letter-spacing: 0.01em;
}
.hero .cta-row { justify-content: center; margin-top: var(--s-8); }
.trust-row {
  margin-top: var(--s-5);
  color: var(--text-tertiary);
  font-size: var(--fs-small);
}
.hero-visual {
  position: relative;
  margin-top: clamp(40px, 5vw, 64px);
}
/* Soft stage under the monitor render so it sits in space */
.hero-visual::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6%;
  width: 76%;
  height: 22%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.65), transparent 75%);
  filter: blur(6px);
  z-index: -1;
  pointer-events: none;
}

/* Micro-label above interactive visuals */
.stage-label {
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: var(--s-4);
}

/* --- Screenshots & figures ---------------------------------------------- */
.shot {
  border: 1px solid var(--border);
  border-radius: var(--r-shot);
  box-shadow: var(--shadow-shot);
  background: var(--surface);
}
.shot--bare {
  border: none;
  background: none;
  box-shadow: none;
}
figure { margin: 0; }
.figcap {
  margin-top: var(--s-3);
  font-size: var(--fs-micro);
  color: var(--text-tertiary);
  line-height: 1.5;
}
.figcap--center { text-align: center; max-width: 70ch; margin-inline: auto; }

/* --- Comparison wipe ---------------------------------------------------- */
.compare {
  position: relative;
  border-radius: var(--r-shot);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  touch-action: none;
}
.compare img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
}
.compare-top {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--reveal, 46%)) 0 0);
}
.compare-tag {
  position: absolute;
  top: var(--s-3);
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  pointer-events: none;
}
/* Bezel seam markers — guide yellow, sparingly */
.seam-mark {
  position: absolute;
  top: 6%;
  bottom: 6%;
  width: 2px;
  background: var(--guide);
  opacity: 0.5;
  pointer-events: none;
}
.compare-tag--before { left: var(--s-3); }
.compare-tag--after { right: var(--s-3); color: var(--accent); border-color: var(--accent-border); }
.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--reveal, 46%);
  width: 40px;
  transform: translateX(-50%);
  cursor: ew-resize;
  display: flex;
  align-items: center;
  justify-content: center;
}
.compare-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: var(--accent);
}
.compare-grip {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-pop);
}
.compare-grip svg { width: 16px; height: 16px; fill: currentColor; }
.compare-hint {
  margin-top: var(--s-3);
  text-align: center;
  font-size: var(--fs-micro);
  color: var(--text-tertiary);
}

/* --- How it works: steps ------------------------------------------------ */
.steps { display: grid; gap: clamp(var(--s-10), 5vw, var(--s-16)); }
.step-row {
  display: grid;
  grid-template-columns: minmax(260px, 5fr) 7fr;
  gap: clamp(var(--s-6), 4vw, var(--s-16));
  align-items: center;
}
.step-row--flip .step-copy { order: 2; }
.step-row--flip .step-visual { order: 1; }
.step-num {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--accent);
  letter-spacing: var(--ls-wide);
}
.step-copy h3 { margin-top: var(--s-2); font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.6rem); }
.step-copy p { margin-top: var(--s-3); color: var(--text-secondary); }

/* --- Feature tiles ------------------------------------------------------ */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
}
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.tile h3 { font-size: var(--fs-h3); }
.tile p { color: var(--text-secondary); font-size: var(--fs-small); }
.tile-glyph {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.tile-glyph svg { width: 20px; height: 20px; stroke: var(--accent); fill: none; stroke-width: 1.6; }
.tile-panel {
  margin-top: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  width: min(100%, 216px);
}

/* Full-width flagship tile: measure for exact fit */
.tile--wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: clamp(var(--s-6), 4vw, var(--s-12));
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.tile--wide .tile-copy { flex: 1 1 320px; display: flex; flex-direction: column; gap: var(--s-3); }
.tile--wide .tile-diagram { flex: 1 1 380px; min-width: 0; }
.tile--wide .tile-diagram svg { width: 100%; height: auto; }
.tile--wide p { font-size: var(--fs-body); }

.layout-footnote {
  margin-top: var(--s-6);
  font-size: var(--fs-small);
  color: var(--text-tertiary);
  text-align: center;
}
.layout-footnote strong { color: var(--text-secondary); font-weight: 600; }

/* --- Bezel demo --------------------------------------------------------- */
.bezel-demo {
  margin-top: var(--s-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(var(--s-5), 3vw, var(--s-8));
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(240px, 4fr);
  gap: clamp(var(--s-5), 3vw, var(--s-10));
  align-items: center;
}
.bezel-stage { min-width: 0; }
.bezel-stage svg { width: 100%; height: auto; }
.bezel-controls h3 { font-size: var(--fs-h3); }
.bezel-controls > p { margin-top: var(--s-2); color: var(--text-secondary); font-size: var(--fs-small); }
.bezel-readout {
  margin-top: var(--s-5);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  font-family: var(--font-mono);
}
.bezel-readout output { font-size: 1.5rem; font-weight: 600; }
.bezel-status {
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--warn);
}
.is-aligned .bezel-status { color: var(--good); }
.bezel-demo input[type="range"] {
  width: 100%;
  margin-top: var(--s-4);
  accent-color: var(--accent);
}
.is-aligned .bezel-demo-line { stroke: var(--good); }
.bezel-caption { grid-column: 1 / -1; }

/* --- No-background-process flow ----------------------------------------- */
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  margin-top: var(--s-8);
}
.flow-node {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-4) var(--s-5);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--text-secondary);
}
.flow-node--end {
  border-color: var(--good);
  color: var(--good);
  background: var(--good-dim);
}
.flow-arrow { color: var(--text-tertiary); flex: none; }
.flow-arrow svg { width: 18px; height: 18px; stroke: currentColor; }
.rotation-note {
  margin-top: var(--s-8);
  margin-inline: auto;
  max-width: 62ch;
  text-align: center;
  color: var(--text-tertiary);
  font-size: var(--fs-small);
}
.rotation-note strong { color: var(--text-secondary); font-weight: 600; }

/* --- Pricing ------------------------------------------------------------ */
.plans-wrap { max-width: 880px; margin-inline: auto; }
.plans-table {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  font-size: var(--fs-small);
}
.plans-table th, .plans-table td {
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.plans-table th:nth-child(n+2), .plans-table td:nth-child(n+2) {
  text-align: center;
  width: 18%;
}
.plans-table thead th {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
  color: var(--text-secondary);
  background: var(--surface-2);
}
.plans-table thead th:last-child { color: var(--accent); }
.plans-table tbody tr:last-child th, .plans-table tbody tr:last-child td { border-bottom: none; }
.plans-table tbody th { font-weight: 500; color: var(--text-secondary); }
.plans-table .yes { color: var(--good); font-weight: 600; }
.plans-table .no { color: var(--text-tertiary); }
.plans-table .price-cell { font-weight: 650; color: var(--text); }
.price-was {
  color: var(--text-tertiary);
  font-weight: 500;
  text-decoration: line-through;
  margin-left: var(--s-1);
}
.price-note {
  display: block;
  font-size: var(--fs-micro);
  font-weight: 500;
  color: var(--text-tertiary);
}
.plans-cta {
  margin-top: var(--s-8);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--s-4);
}
.plans-closing {
  margin-top: var(--s-5);
  text-align: center;
  color: var(--text-tertiary);
  font-size: var(--fs-small);
}
.plus-strip {
  margin-top: var(--s-10);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
}
.plus-strip figure {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  align-items: flex-start;
}
.plus-strip img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  object-position: center bottom;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--s-3);
}

/* --- FAQ ---------------------------------------------------------------- */
.faq-list { max-width: 760px; margin-inline: auto; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: var(--s-5) var(--s-10) var(--s-5) 0;
  font-weight: 600;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: var(--s-2);
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 400;
  transition: transform var(--dur) var(--ease);
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p {
  padding-bottom: var(--s-5);
  color: var(--text-secondary);
  max-width: 65ch;
}

/* --- Final CTA ---------------------------------------------------------- */
.cta-final { text-align: center; }
.cta-final .cta-row { justify-content: center; margin-top: var(--s-8); }

/* --- Footer ------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--s-10);
  background: var(--bg-alt);
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  margin-bottom: var(--s-5);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
  font-size: var(--fs-small);
  color: var(--text-secondary);
}
.footer-links a:hover { color: var(--text); }
.fine-print { color: var(--text-tertiary); font-size: var(--fs-micro); }

/* --- Secondary pages ---------------------------------------------------- */
.page-hero { padding-top: clamp(40px, 6vw, 72px); }
.page-hero h1 { font-size: clamp(2rem, 1.4rem + 2.5vw, 3.2rem); letter-spacing: var(--ls-tight); margin-top: var(--s-3); }
.page-hero > p { margin-top: var(--s-4); color: var(--text-secondary); max-width: 60ch; }
.page-body { padding-block: var(--s-10) var(--s-24); }

.draft-banner {
  margin-top: var(--s-5);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--warn);
  border-radius: var(--r-sm);
  background: var(--guide-dim);
  color: var(--warn);
  font-size: var(--fs-small);
  max-width: 70ch;
}

.legal-body { max-width: 70ch; }
.legal-body h2 { font-size: 1.25rem; margin-top: var(--s-8); }
.legal-body p, .legal-body li { color: var(--text-secondary); margin-top: var(--s-3); }
.legal-body ul li { list-style: disc; margin-left: 1.2em; }
.legal-body ol li { list-style: decimal; margin-left: 1.2em; }

.platform-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: clamp(var(--s-5), 3vw, var(--s-8));
  margin-top: var(--s-6);
}
.platform-block h2 {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.platform-block h2 svg { width: 22px; height: 22px; fill: var(--text-secondary); flex: none; }
.platform-block .btn { margin-top: var(--s-5); }

.meta-table { width: 100%; margin-top: var(--s-5); font-size: var(--fs-small); }
.meta-table th, .meta-table td {
  text-align: left;
  padding: var(--s-3) var(--s-3) var(--s-3) 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.meta-table th {
  color: var(--text-tertiary);
  font-weight: 500;
  white-space: nowrap;
  width: 34%;
}
.meta-table td { color: var(--text-secondary); }
.tbd { color: var(--text-tertiary); font-style: italic; }

.notice {
  margin-top: var(--s-5);
  padding: var(--s-4);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  font-size: var(--fs-small);
  color: var(--text-secondary);
}
.notice strong { color: var(--text); }

/* --- Narrow screens ----------------------------------------------------- */
@media (max-width: 900px) {
  .tile-grid { grid-template-columns: 1fr 1fr; }
  .tile--wide { flex-direction: column; align-items: stretch; }
  .step-row { grid-template-columns: 1fr; }
  .step-row--flip .step-copy { order: 1; }
  .step-row--flip .step-visual { order: 2; }
  .bezel-demo { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: var(--s-4) var(--side-pad) var(--s-6);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    gap: var(--s-5);
  }
  .nav-links.is-open { display: flex; }
  .nav-end .btn { display: none; }
  .tile-grid { grid-template-columns: 1fr; }
  .plus-strip { grid-template-columns: 1fr; }
  .cta-row .btn { flex: 1 1 100%; }
  .cta-row .cta-row-rest { flex-basis: auto; margin-inline: auto; }
}

@media (max-width: 440px) {
  .plans-table th, .plans-table td { padding: var(--s-2) var(--s-2); }
  .plans-table th:nth-child(n+2), .plans-table td:nth-child(n+2) { width: 21%; }
  .compare-tag { font-size: 0.62rem; }
}
