/* ==========================================================================
   PrintSheriff — minimalist tech theme
   Accessibility rules are load-bearing here: every control keeps a visible
   border, every state carries an icon or label, links stay underlined.
   ========================================================================== */

:root {
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #ffffff;
  --bg-subtle: #f4f4f5;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --border: #d4d4d8;
  --border-strong: #71717a;
  --text: #18181b;
  --text-muted: #52525b;
  --accent: #1c69d4;
  --accent-hover: #14509f;
  --btn-bg: #1c69d4;
  --btn-bg-hover: #14509f;
  --btn-border: #14509f;
  --btn-rapidapi-bg: #0055d4;
  --btn-rapidapi-hover: #0043aa;

  --wrap: 1100px;
  --gap: 1.5rem;
  --rule: 1px;
}

[data-theme="dark"] {
  --bg: #0d0e11;
  --bg-subtle: #14161a;
  --surface: #14161a;
  --surface-solid: #14161a;
  --border: #2c3038;
  --border-strong: #8a8a94;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --accent: #7bb0f5;
  --accent-hover: #a5cbf9;
  --btn-bg: #1c69d4;
  --btn-bg-hover: #2b7ae8;
  --btn-border: #7bb0f5;
  --btn-rapidapi-bg: #1a6fe8;
  --btn-rapidapi-hover: #3b88f6;
}

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

html {
  -webkit-text-size-adjust: 100%;
  /* Keeps anchor targets clear of the sticky header. */
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
}

/* Everything square. Minimalist here means hairlines, not shadows. */
a,
button,
img,
figure,
table,
iframe,
pre {
  border-radius: 0;
}

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

/* --------------------------------------------------------------- a11y base */

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--btn-bg);
  border: var(--rule) solid var(--btn-border);
  color: #ffffff;
  font-weight: 700;
  text-decoration: underline;
}

.skip-link:focus {
  top: 0;
}

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

.is-hidden {
  display: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--surface-solid);
  border-bottom: var(--rule) solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 60px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand:hover,
.brand:focus-visible {
  color: var(--text);
  text-decoration: underline;
}

.brand svg {
  display: block;
  color: var(--accent);
}

.brand-mark {
  display: block;
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
  overflow-x: auto;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* Current page is marked by a rule AND bold weight, never colour alone. */
.site-nav a[aria-current="page"] {
  border-bottom-color: var(--accent);
  color: var(--text);
  font-weight: 700;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background-color: var(--surface);
  border: var(--rule) solid var(--border-strong);
  color: var(--text);
  cursor: pointer;
}

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

.theme-toggle .icon-moon,
[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

/* ------------------------------------------------------------------- type */

h1,
h2,
h3,
h4 {
  margin: 0 0 0.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
}

h3 {
  font-size: 1.2rem;
}

h4 {
  font-size: 1rem;
}

p {
  margin: 0 0 1rem;
  max-width: 68ch;
}

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

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

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

ul {
  max-width: 68ch;
}

li {
  margin-bottom: 0.375rem;
}

.kicker {
  display: block;
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
}

.note {
  max-width: 68ch;
  margin-bottom: 1.5rem;
  padding: 0.875rem 1rem;
  border-left: 3px solid var(--border-strong);
  background-color: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.note p:last-child {
  margin-bottom: 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  border: var(--rule) solid var(--btn-border);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--btn-bg);
  /* Literal white so it survives the dark-mode variable swap. */
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--btn-bg-hover);
  color: #ffffff;
}

.btn-rapidapi {
  background-color: var(--btn-rapidapi-bg);
  border-color: var(--btn-rapidapi-bg);
  color: #ffffff;
  font-weight: 600;
}

.btn-rapidapi:hover {
  background-color: var(--btn-rapidapi-hover);
  border-color: var(--btn-rapidapi-hover);
  color: #ffffff;
}

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

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--text);
}

.btn[aria-disabled="true"],
.btn[aria-disabled="true"]:hover {
  background-color: var(--bg-subtle);
  border-color: var(--border-strong);
  color: var(--text-muted);
  cursor: not-allowed;
}

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

.hero {
  padding: clamp(3rem, 10vw, 6.5rem) 0 clamp(2rem, 5vw, 3.5rem);
  border-bottom: var(--rule) solid var(--border);
}

.hero h1 {
  max-width: 16ch;
}

.hero .lead {
  max-width: 54ch;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ------------------------------------------------------------------ stats */

.stats-section {
  padding: clamp(2rem, 5vw, 3rem) 0;
  background-color: var(--bg-subtle);
  border-bottom: var(--rule) solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  justify-content: center;
  gap: var(--gap);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background-color: var(--surface);
  border: var(--rule) solid var(--border);
}

.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: var(--rule) solid var(--border-strong);
  color: var(--accent);
}

.stat-value {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.stat-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ------------------------------------------------------------- link cards */

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

.card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  background-color: var(--surface);
  border: var(--rule) solid var(--border);
  color: var(--text);
  text-decoration: none;
}

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

.card:hover .card-title,
.card:focus-visible .card-title {
  text-decoration: underline;
}

.card-index {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
}

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

.card-go {
  margin-top: auto;
  padding-top: 1rem;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* ---------------------------------------------------------------- content */

.page {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.page-head {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: var(--rule) solid var(--border);
}

.page-head p:last-child {
  margin-bottom: 0;
}

.section {
  margin-top: 3rem;
}

.section-first {
  margin-top: 0;
}

/* ------------------------------------------------------------------ steps */

.steps {
  max-width: 68ch;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  border-top: var(--rule) solid var(--border);
}

.steps li {
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0.875rem 0;
  border-bottom: var(--rule) solid var(--border);
  counter-increment: step;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  flex: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
}

/* ----------------------------------------------------------------- tables */

.table-scroll {
  overflow-x: auto;
  border: var(--rule) solid var(--border);
}

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

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

thead th {
  background-color: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

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

.code {
  margin: 0 0 1.5rem;
  background-color: var(--bg-subtle);
  border: var(--rule) solid var(--border);
}

.code pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.375rem 0.375rem 0.375rem 1rem;
  border-bottom: var(--rule) solid var(--border);
}

.code-lang {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.copy-btn {
  min-height: 32px;
  padding: 0.25rem 0.75rem;
  background-color: var(--surface);
  border: var(--rule) solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
}

.copy-btn:hover {
  border-color: var(--accent);
}

/* ------------------------------------------------------------------- demo */

.demo-frame-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  min-height: 640px;
  margin-bottom: 1.5rem;
  background-color: var(--bg-subtle);
  border: var(--rule) solid var(--border);
}

#demo-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Sits behind the iframe, so a missed load event can never block interaction. */
.demo-status {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  pointer-events: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  text-align: center;
}

/* ---------------------------------------------------------------- figures */

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

figure {
  margin: 0;
  background-color: var(--surface);
  border: var(--rule) solid var(--border);
}

figure img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: var(--rule) solid var(--border);
}

figcaption {
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

figcaption strong {
  color: var(--text);
}

.figure-wide {
  max-width: 620px;
}

/* Crop pipeline diagram: one source frame, the crop stages derived with object-fit. */
.pipeline {
  max-width: 760px;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1rem 0;
}

.pipeline-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pipeline-steps li {
  margin: 0;
}

/* Fixed art row keeps every caption on the same baseline despite differing box sizes. */
.pipeline-step {
  display: grid;
  grid-template-rows: 126px auto auto;
  justify-items: center;
  align-items: center;
}

.pipeline-art {
  position: relative;
  overflow: hidden;
  background-color: #0f1116;
  border: var(--rule) solid var(--border-strong);
}

.pipeline-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border: 0;
}

.pipeline-art-frame {
  width: 168px;
  height: 126px;
}

/* Square boxes with a centred cover fit reproduce the real centre-square crop. */
.pipeline-art-crop {
  width: 126px;
  height: 126px;
}

.pipeline-art-small {
  width: 74px;
  height: 74px;
}

/* Marks the centred square kept from the 4:3 frame: full height, 1:1 aspect. */
.pipeline-roi {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  aspect-ratio: 1 / 1;
  border: 2px dashed #7bb0f5;
}

.pipeline-art-model {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  color: var(--accent);
}

.pipeline-label {
  font-size: 0.85rem;
  font-weight: 700;
}

.pipeline-dim {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.pipeline-arrow {
  margin-top: 56px;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
}

.pipeline figcaption {
  padding: 1rem 0;
  border-top: 0;
}

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--gap);
}

.shots img {
  display: block;
  width: 100%;
  height: auto;
  border: var(--rule) solid var(--border);
}

.shots-stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.shots-stack .shot-medium {
  max-width: 650px;
}

.shots-phones {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  gap: var(--gap);
}

.shots-phones figure {
  max-width: 320px;
}

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

.site-footer {
  padding: 2rem 0;
  border-top: var(--rule) solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.site-footer p {
  margin: 0;
  max-width: none;
}

/* --------------------------------------------------------------- contact */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}

.contact-panel {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.5rem, 3vw, 2rem);
  border: var(--rule) solid var(--border);
  background-color: var(--surface);
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field-label {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Not colour-only: the word "required" carries the meaning (WCAG 2.1 SC 1.4.1). */
.field-req {
  padding: 0.05rem 0.4rem;
  border: var(--rule) solid var(--border-strong);
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}

.field-control {
  width: 100%;
  min-height: 46px;
  padding: 0.6rem 0.75rem;
  border: var(--rule) solid var(--border-strong);
  background-color: var(--bg);
  color: var(--text);
  font: inherit;
}

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

.field-control:hover {
  border-color: var(--accent);
}

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

textarea.field-control {
  min-height: 10rem;
  resize: vertical;
}

.field-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.field-file {
  padding: 0.5rem 0.6rem;
  cursor: pointer;
}

.field-file::file-selector-button {
  min-height: 34px;
  margin-right: 0.75rem;
  padding: 0.25rem 0.85rem;
  background-color: var(--surface);
  border: var(--rule) solid var(--border-strong);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.field-file::file-selector-button:hover {
  border-color: var(--accent);
}

.file-list {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
}

.file-list li {
  margin-bottom: 0.25rem;
  color: var(--text-muted);
  word-break: break-all;
}

/* The leading glyph already marks the state; weight reinforces it without colour. */
.file-list li.is-invalid {
  color: var(--text);
  font-weight: 700;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding-top: 0.25rem;
  border-top: var(--rule) solid var(--border);
}

.form-status {
  margin: 0;
  max-width: none;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Symbol prefixes keep success/error distinguishable without relying on colour. */
.form-status.is-error {
  color: var(--text);
  font-weight: 600;
}

.form-status.is-success {
  color: var(--text);
  font-weight: 600;
}

.contact-aside {
  padding: clamp(1.5rem, 3vw, 2rem);
  border: var(--rule) solid var(--border);
  background-color: var(--bg-subtle);
}

.aside-title {
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.aside-list {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.aside-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ------------------------------------------------------------- home page */

/* The photo is near-black on the left, so the gradient only has to deepen it
   enough to guarantee contrast for the headline. */
.hero-photo {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(420px, 56vw, 560px);
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  background-color: #07080b;
  background-image: url('../assets/background/3d_print_bg.png');
  background-position: right center;
  background-size: cover;
  background-repeat: no-repeat;
  border-bottom: var(--rule) solid var(--border);
}

.hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(7, 8, 11, 0.96) 0%,
    rgba(7, 8, 11, 0.88) 38%,
    rgba(7, 8, 11, 0.40) 68%,
    rgba(7, 8, 11, 0.10) 100%
  );
}

.hero-photo-inner {
  position: relative;
  z-index: 1;
  max-width: 34rem;
}

.hero-photo .kicker {
  color: #c3c8d4;
}

.hero-photo h1 {
  max-width: 14ch;
  margin-bottom: 1rem;
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 3.25rem);
}

.hero-photo .lead {
  max-width: 42ch;
  margin-bottom: 1.75rem;
  color: #dfe3ea;
}

/* Ghost button sitting directly on the photo. */
.btn-ghost {
  background-color: rgba(7, 8, 11, 0.6);
  border-color: #ffffff;
  color: #ffffff;
}

.btn-ghost:hover {
  background-color: rgba(7, 8, 11, 0.9);
  border-color: #ffffff;
  color: #ffffff;
}

.hero-note {
  margin: 1.25rem 0 0;
  max-width: 46ch;
  color: #dfe3ea;
  font-size: 0.9rem;
}

.hero-note strong {
  color: #ffffff;
}

.stats-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: stretch;
}

.stats-grid-compact .stat {
  gap: 0.25rem;
  padding: 1.1rem 1.25rem;
}

.stats-grid-compact .stat-value {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
}

.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 3rem) 0;
  border-bottom: var(--rule) solid var(--border);
}

.feature-row:first-of-type {
  padding-top: 0;
}

.feature-row-flip .feature-copy {
  order: 2;
}

.feature-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

/* The logo is a JPEG with a white matte, so it keeps a white plate in both themes. */
.feature-brand img {
  display: block;
  width: 36px;
  height: 36px;
  object-fit: contain;
  background-color: #ffffff;
  border: var(--rule) solid var(--border-strong);
}

.feature-brand .kicker {
  margin-bottom: 0;
}

.badge-free {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1rem 0.45rem;
  background-color: var(--bg-subtle);
  border: var(--rule) solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feature-note {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  background-color: var(--bg-subtle);
  border-left: 3px solid var(--border-strong);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.roc-figure {
  max-width: 560px;
  margin: 0 0 1.5rem;
  background-color: var(--surface);
  border: var(--rule) solid var(--border);
}

.roc-figure img {
  display: block;
  width: 100%;
  height: auto;
  background-color: #ffffff;
  border-bottom: var(--rule) solid var(--border);
}

.inline-logo {
  flex: none;
  margin-top: 0.15rem;
}

.feature-copy h2 {
  max-width: 20ch;
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
}

.feature-copy p {
  margin-bottom: 1.25rem;
  font-size: 0.975rem;
}

.feature-media {
  justify-self: center;
  width: 100%;
  max-width: 460px;
}

.video-responsive {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000000;
  border: var(--rule) solid var(--border-strong);
  overflow: hidden;
}

.video-responsive iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* One slide at a time so each screenshot stays legible; JS drives the switching. */
.slideshow-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: var(--surface);
  border: var(--rule) solid var(--border);
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
  background-color: var(--surface);
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  pointer-events: none;
}

.slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.slide img {
  flex: 1;
  min-height: 0;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-bottom: var(--rule) solid var(--border);
}

.slide figcaption {
  flex: none;
  padding: 0.5rem 0.75rem;
  font-size: 0.82rem;
}

.slideshow-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.slide-btn,
.slide-play {
  min-height: 34px;
  padding: 0.25rem 0.75rem;
  background-color: var(--surface);
  border: var(--rule) solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  cursor: pointer;
}

.slide-btn:hover,
.slide-play:hover {
  border-color: var(--accent);
}

/* Selected state is carried by weight and a bottom rule, not colour alone. */
.slide-btn[aria-pressed="true"] {
  border-bottom-width: 3px;
  border-bottom-color: var(--accent);
  font-weight: 700;
}

.slide-play {
  margin-left: auto;
}

.home-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  padding: clamp(2rem, 5vw, 3rem) 0 0;
}

.diff-section {
  padding: clamp(2rem, 5vw, 3rem) 0 0;
}

.diff-section .page-head {
  margin-bottom: 1.75rem;
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  margin-bottom: 1.5rem;
}

.diff-item {
  padding: 1.25rem;
  background-color: var(--surface);
  border: var(--rule) solid var(--border);
}

.diff-item h3 {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.diff-mark {
  flex: none;
  color: var(--accent);
  font-weight: 700;
}

.diff-item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.925rem;
}

.home-links .card {
  padding: 1.1rem 1.25rem;
}

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin: clamp(2rem, 5vw, 3rem) 0 0;
  padding: clamp(1.5rem, 4vw, 2rem);
  background-color: var(--bg-subtle);
  border: var(--rule) solid var(--border-strong);
}

.cta-band h2 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.2rem, 2.6vw, 1.6rem);
}

.cta-band p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

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

@media (max-width: 900px) {
  .home-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .contact-grid,
  .feature-row,
  .feature-row-flip,
  .stats-grid-compact,
  .diff-grid {
    grid-template-columns: 1fr;
  }

  .feature-row-flip .feature-copy {
    order: 0;
  }

  .feature-media {
    max-width: 420px;
  }

  .hero-photo::before {
    background: linear-gradient(
      180deg,
      rgba(7, 8, 11, 0.86) 0%,
      rgba(7, 8, 11, 0.78) 60%,
      rgba(7, 8, 11, 0.92) 100%
    );
  }
}

@media (max-width: 720px) {
  .site-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
    border-top: var(--rule) solid var(--border);
  }

  .theme-toggle {
    margin-left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
