/* ==========================================================================
   Reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --brand-red: #d12027;
  --brand-red-strong: #b81a20;
  --brand-red-bright: #ff3a40;

  --brand-perspective: #1F8A8E;
  --brand-perspective-soft: #2A9DA1;
  --brand-perspective-dim: #186F73;

  /* Semantic accent — defaults to Inertial red. A page can re-skin the
     whole site to a different brand by overriding these three (see
     .theme-perspective) without touching any component rule. */
  --accent: var(--brand-red);
  --accent-strong: var(--brand-red-strong);
  --accent-bright: var(--brand-red-bright);

  --bg: #ffffff;
  --bg-alt: #f6f4ef;
  --text: #111111;
  --text-muted: #5d5d5d;
  --rule: rgba(0, 0, 0, 0.1);

  --on-red: #ffffff;
  --on-red-muted: rgba(255, 255, 255, 0.78);

  --font: "Albert Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container-max: 78rem;
  --container-pad: clamp(1.5rem, 5vw, 2.75rem);
  --section-pad-y: clamp(5rem, 11vw, 9rem);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0c;
    --bg-alt: #161513;
    --text: #f0f0f0;
    --text-muted: #a8a8a8;
    --rule: rgba(255, 255, 255, 0.12);
  }
}

/* TEMP theme toggle — uncomment to restore during dev
   ([data-theme] specificity beats the prefers-color-scheme media query)
:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-alt: #f6f4ef;
  --text: #111111;
  --text-muted: #5d5d5d;
  --rule: rgba(0, 0, 0, 0.1);
}
:root[data-theme="dark"] {
  --bg: #0c0c0c;
  --bg-alt: #161513;
  --text: #f0f0f0;
  --text-muted: #a8a8a8;
  --rule: rgba(255, 255, 255, 0.12);
}
*/

/* Perspective product theme — re-skins the accent family to the app's
   turquoise. Applied via class="theme-perspective" on <body>, so only the
   product page turns teal; the Inertial homepage stays red. The teal reads
   AA on light and AA-large on dark, so no per-scheme override is needed. */
.theme-perspective {
  --accent: var(--brand-perspective);
  --accent-strong: var(--brand-perspective-dim);
  --accent-bright: var(--brand-perspective-soft);
}

/* ==========================================================================
   Base
   ========================================================================== */
body {
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  font-weight: 400;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

@media (min-width: 60rem) {
  body { font-size: 1.125rem; }
}

main { flex: 1; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 220ms var(--ease);
}

strong { font-weight: 700; }

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

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

.brand-body-main {
  font-weight: bold;
  color: var(--brand-red);
}

.brand-body-perspective {
  font-weight: bold;
  color: var(--brand-perspective);
}

/* ==========================================================================
   Utilities
   ========================================================================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.eyebrow {
  font-size: 0.95rem;
  font-weight: 600;
  /* letter-spacing: 0.14em; */
  color: var(--text-muted);
}

/* ==========================================================================
   Brand strip
   ========================================================================== */
.brand-strip {
  height: 4px;
  background: var(--accent);
}

/* ==========================================================================
   Site header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 220ms var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-block: 1rem;
}

@media (min-width: 50rem) {
  .site-header__inner { padding-block: 1.25rem; }
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1;
  color: var(--text);
  border-radius: 4px;
  transition: opacity 200ms var(--ease);
}
.logo:hover { opacity: 0.72; }
.logo:focus-visible {
  outline-offset: 6px;
}

/* Project-page breadcrumb (sits next to logo) */
.site-header__crumb {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1;
}
.site-header__sep {
  color: var(--text-muted);
  opacity: 0.55;
}
.site-header__section {
  color: var(--text);
}
@media (max-width: 24rem) {
  .site-header__crumb { font-size: 0.8125rem; }
}

/* ==========================================================================
   Subnav — sticky section jump nav (perspective.html only)
   ========================================================================== */
.subnav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.subnav__inner {
  display: flex;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-inline: var(--container-pad);
  max-width: var(--container-max);
  margin-inline: auto;
}
.subnav__inner::-webkit-scrollbar { display: none; }
.subnav__link {
  display: inline-block;
  flex-shrink: 0;
  padding: 0.6rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 180ms var(--ease), border-color 180ms var(--ease);
}
.subnav__link:hover { color: var(--text); }
.subnav__link.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding-block: var(--section-pad-y);
  position: relative;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding-top: clamp(4rem, 11vw, 8rem);
  padding-bottom: clamp(6rem, 15vw, 12rem);
  position: relative;
}

.hero__eyebrow {
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.hero__headline {
  font-size: clamp(2.75rem, 8vw, 6.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 14ch;
  color: var(--text);
}

.hero__accent {
  color: var(--accent);
}

.hero__lead {
  font-size: clamp(1.125rem, 1.6vw, 1.4rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 38ch;
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

.hero__platform {
  margin-top: 1.25rem;
  font-size: 1rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* ==========================================================================
   Section title
   ========================================================================== */
.section-title {
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-top: 0.6rem;
  color: var(--text);
}

/* ==========================================================================
   Two-column grid (label / body)
   ========================================================================== */
.grid--label {
  display: grid;
  gap: 2.5rem;
}

/* @media (min-width: 50rem) {
  .grid--label {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 4rem;
  }
}

@media (min-width: 75rem) {
  .grid--label {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
    gap: 6rem;
  }
} */

.grid__body .prose {
  font-size: clamp(1.125rem, 1.4vw, 1.3125rem);
  line-height: 1.6;
  color: var(--text);
}

.grid__body .prose + .prose {
  margin-top: 1.25em;
}

/* Single-column prose section: eyebrow above, body below, max-width constrained */
.prose-block {
  max-width: 52rem;
}

.prose-block .eyebrow {
  margin-bottom: 1.25rem;
}

.prose-block .prose {
  font-size: clamp(1.125rem, 1.4vw, 1.3125rem);
  line-height: 1.6;
  color: var(--text);
}

.prose-block .prose + .prose {
  margin-top: 1.25em;
}

/* ==========================================================================
   Manifesto — full-bleed accent
   ========================================================================== */
.section--manifesto {
  background: var(--accent);
  color: var(--on-red);
  padding-block: clamp(6rem, 14vw, 11rem);
}

.manifesto__text {
  font-size: clamp(1.875rem, 4.2vw, 3.25rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.018em;
  max-width: 22ch;
  color: var(--on-red);
}

/* ==========================================================================
   Capabilities — cards
   ========================================================================== */
.section--capabilities {
  background: var(--bg-alt);
}

.capabilities__head {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  /* max-width: 38rem; */
}

.cards {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 50rem) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
  }
}

.card {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  transition:
    transform 320ms var(--ease),
    box-shadow 320ms var(--ease),
    border-color 320ms var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -22px rgba(0, 0, 0, 0.22);
  border-color: rgba(0, 0, 0, 0.16);
}

@media (prefers-color-scheme: dark) {
  .card:hover {
    box-shadow: 0 18px 36px -20px rgba(0, 0, 0, 0.55);
    border-color: rgba(255, 255, 255, 0.18);
  }
}

.card__title {
  font-size: clamp(1.1875rem, 1.6vw, 1.4375rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.card__body {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-muted);
}

@media (min-width: 60rem) {
  .card__body { font-size: 1.0625rem; }
}

.card__kicker {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  /* letter-spacing: 0.13em; */
  color: var(--accent);
  margin-bottom: 0.7rem;
}

/* Two-up at tablet widths before the three-column desktop grid kicks in */
@media (min-width: 34rem) and (max-width: 49.999rem) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   Product mark — app icon beside the breadcrumb / in the hero
   ========================================================================== */
.product-mark {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  border-radius: 6px;
  display: block;
}
.site-header__mark {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  border-radius: 6px;
  display: block;
  align-self: center;
}
.hero__mark {
  width: clamp(3rem, 6vw, 4rem);
  height: clamp(3rem, 6vw, 4rem);
  border-radius: 12px;
  margin-bottom: 1.75rem;
  box-shadow: 0 12px 30px -16px color-mix(in srgb, var(--accent) 70%, transparent);
}

.hero__logo-text {
  display: block;
  height: clamp(3.5rem, 7vw, 6rem);
  width: auto;
  margin-bottom: 1.75rem;
}

/* ==========================================================================
   Screenshot placeholder band
   ========================================================================== */
.section--gallery {
  background: var(--bg);
}
.shot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
}
.shot {
  margin: 0;
  background: #222225;
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.25),
    0 12px 40px rgba(0, 0, 0, 0.35);
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
}

/* macOS window-frame titlebar */
.shot-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: #2e2e32;
  border-bottom: 1px solid rgba(0, 0, 0, 0.4);
}
.shot-bar span {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.shot-bar span:nth-child(1) { background: #ff5f57; }
.shot-bar span:nth-child(2) { background: #febc2e; }
.shot-bar span:nth-child(3) { background: #28c840; }
@media (max-width: 640px) {
  .shot-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Version compare showcase
   ========================================================================== */
.section--versions { background: var(--bg-alt); }

.section--about { background: var(--bg-alt); }

.versions__lead { margin-top: 1.25rem; }

.versions-grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}

@media (min-width: 60rem) {
  .versions-grid { grid-template-columns: 1fr 1fr; }
}

.version-shot { margin: 0; }

.version-shot__frame {
  background: #222225;
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.25),
    0 12px 40px rgba(0, 0, 0, 0.35);
}

.version-shot__frame img {
  display: block;
  width: 100%;
  height: auto;
}

.version-shot__cap {
  margin-top: 1.125rem;
}

.version-shot__name {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.version-shot__desc {
  display: block;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ==========================================================================
   Lightbox — click a screengrab to view it larger
   ========================================================================== */
.lightbox-link {
  display: block;
  cursor: zoom-in;
  border-radius: inherit;
}
.lightbox-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.lightbox-link img {
  transition: transform 450ms var(--ease);
}
.lightbox-link:hover img {
  transform: scale(1.03);
}

.lightbox {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  width: min(92vw, 1400px);
  max-width: 92vw;
  max-height: 92vh;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.lightbox[open] {
  animation: lightbox-in 220ms var(--ease);
}

.lightbox__figure {
  position: relative;
  margin: 0;
}
.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 84vh;
  width: auto;
  height: auto;
  margin-inline: auto;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}
.lightbox__cap {
  margin: 0.85rem auto 0;
  max-width: 64ch;
  padding-inline: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: break-word;
  color: rgba(255, 255, 255, 0.82);
}
.lightbox__close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 160ms var(--ease), transform 120ms var(--ease);
}
.lightbox__close:hover { background: rgba(0, 0, 0, 0.82); }
.lightbox__close:active { transform: scale(0.92); }

@keyframes lightbox-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.985); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ==========================================================================
   Call to action (status section)
   ========================================================================== */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-top: 0.5rem;
  font-weight: 600;
  color: var(--accent);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: color 220ms var(--ease);
}
.cta:hover { color: var(--accent-strong); }

/* ==========================================================================
   Comparison table
   ========================================================================== */
.compare__lead {
  margin-top: 1.25rem;
}

/* Horizontal scroll on narrow screens rather than crushing the columns */
.compare-scroll {
  margin-top: clamp(2rem, 4vw, 3rem);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  width: 100%;
  min-width: 38rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.compare-table th,
.compare-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--rule);
  text-align: center;
  vertical-align: middle;
}

@media (max-width: 40rem) {
  .compare-table { min-width: 0; font-size: 0.8125rem; }
  .compare-table th, .compare-table td { padding: 0.65rem 0.5rem; }
}

.compare-table thead th {
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: -0.005em;
  color: var(--text-muted);
  border-bottom-width: 2px;
}

.compare-table__feature {
  text-align: left;
  width: 38%;
  font-weight: 600 !important;
  color: var(--text) !important;
}
.compare-table tbody th {
  text-align: left;
  font-weight: 500;
  color: var(--text);
}

/* Highlighted Perspective column */
.compare-table__own,
.compare-table .own {
  background: color-mix(in srgb, var(--accent) 15%, var(--bg));
}
.compare-table thead .compare-table__own {
  color: var(--accent);
  font-weight: 700;
  border-bottom-color: var(--accent);
}
.compare-table tbody tr:last-child .own {
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* Group divider rows
   Distinction comes from size (0.72rem vs 0.9375rem content), colour (muted vs
   full text), and spacing — not uppercase or faint background tints that vanish
   in dark mode. */
.compare-group th {
  text-align: left;
  padding-top: 0.6rem;
  padding-bottom: 0.5rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
  border-top: 2px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--accent) 20%, var(--bg));
}
/* First group sits directly under the thead — no extra top border needed */
/* .compare-group--own th {
  color: var(--accent);
  border-top: none;
  padding-top: 0.95rem;
} */

/* State ticks */
.tick {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
}
.tick--yes  { color: var(--text-muted); }
.tick--part { color: var(--text-muted); }
.tick--no   { color: var(--text-muted); opacity: 0.4; }
.own .tick--yes { color: var(--accent); }

.compare__legend {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
}
.compare__legend .tick { font-size: 0.95rem; }

.compare__prevents {
  margin-top: 1.75rem;
  font-size: 1rem;
  color: var(--text);
}
.compare__prevents strong { color: var(--accent); }

/* Visually-hidden text for screen readers (table cell state labels) */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Projects — Perspective link
   ========================================================================== */
.project-link {
  position: relative;
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  white-space: nowrap;
  transition: color 220ms var(--ease), gap 260ms var(--ease);
}

.project-link span {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-position: 0 calc(100% - 2px);
  background-repeat: no-repeat;
  transition: background-size 320ms var(--ease);
}

.project-link::after {
  content: "→";
  display: inline-block;
  font-weight: 500;
  transition: transform 260ms var(--ease);
}

.project-link:hover {
  color: var(--accent-strong);
  gap: 0.6em;
}
.project-link:hover::after { transform: translateX(2px); }
.project-link:hover span { background-size: 0% 1px; }

@media (prefers-color-scheme: dark) {
  .project-link { color: var(--accent-bright); }
  .project-link:hover { color: #ff5258; }
}

.project-link--perspective { color: var(--brand-perspective); }
.project-link--perspective:hover { color: var(--brand-perspective-dim); }
@media (prefers-color-scheme: dark) {
  .project-link--perspective { color: var(--brand-perspective-soft); }
  .project-link--perspective:hover { color: var(--brand-perspective); }
}

/* ==========================================================================
   Closing
   ========================================================================== */
.section--closing {
  background: var(--accent);
}

.section--closing .eyebrow { color: rgba(255, 255, 255, 0.65); }

.section--closing .prose { color: rgba(255, 255, 255, 0.9); }

.section--closing .notify-form__input {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.section--closing .notify-form__input::placeholder { color: rgba(255, 255, 255, 0.45); }
.section--closing .notify-form__input:focus { border-color: rgba(255, 255, 255, 0.7); }

.section--closing .notify-form__btn {
  background: #fff;
  color: var(--accent);
}

.section--closing .notify-form__status { color: rgba(255, 255, 255, 0.75); }

.section--closing .notify-form__alt { color: rgba(255, 255, 255, 0.65); }
.section--closing .notify-form__alt a { color: #fff; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 2.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem 1.5rem;
}

.site-footer__tag {
  font-style: italic;
}

.site-footer__back {
  font-style: normal;
  transition: color 220ms var(--ease);
}
.site-footer__back:hover {
  color: var(--accent);
}

/* ==========================================================================
   Reveal motion (scroll)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 900ms var(--ease),
    transform 900ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Hero reveal — page-load animation, not scroll-based */
.hero__eyebrow,
.hero__headline,
.hero__lead {
  animation: hero-reveal 1000ms var(--ease) backwards;
}
.hero__eyebrow  { animation-delay: 80ms; }
.hero__headline { animation-delay: 200ms; }
.hero__lead     { animation-delay: 380ms; }

@keyframes hero-reveal {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Interactive foil demo
   ========================================================================== */
.demo-foil__layout {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
}

@media (min-width: 64rem) {
  .demo-foil__layout {
    grid-template-columns: 1fr min(520px, 46%);
    align-items: center;
  }
}

.demo-foil__lead,
.demo-press__copy .prose,
.demo-density__copy .prose {
  margin-top: 1.25rem;
}

.demo-foil__tries {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.demo-foil__tries li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  padding-left: 1.375rem;
  position: relative;
}

.demo-foil__tries li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.foil-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.foil-demo__stage {
  position: relative;
  width: min(520px, 100%);
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  cursor: crosshair;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.12),
    0 20px 52px -18px rgba(0, 0, 0, 0.32);
}

/* Canvas fills the stage; border-radius clipping comes from the parent */
.foil-demo__canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.foil-demo__picker {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.foil-picker__btn {
  appearance: none;
  padding: 0.35rem 0.875rem;
  border: 1.5px solid color-mix(in srgb, var(--c) 45%, transparent);
  border-radius: 100px;
  background: transparent;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    box-shadow 140ms ease,
    transform 100ms ease;
}

.foil-picker__btn:hover:not([aria-pressed="true"]) {
  background: color-mix(in srgb, var(--c) 10%, var(--bg));
  color: var(--text);
  border-color: color-mix(in srgb, var(--c) 65%, transparent);
}

.foil-picker__btn[aria-pressed="true"] {
  background: var(--c);
  border-color: var(--c);
  color: var(--ct, #fff);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--c) 38%, transparent);
}

.sep-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  width: 100%;
  max-width: min(520px, 100%);
}

.sep-controls__label {
  width: 100%;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 0.1rem;
}

.sep-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--bg);
  border: 1.5px solid var(--rule);
  border-radius: 100px;
  padding: 0.35rem 0.75rem 0.35rem 0.5rem;
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    opacity 140ms ease,
    transform 100ms ease;
}

.sep-chip__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--c, transparent);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.sep-chip:hover { background: color-mix(in srgb, var(--text) 4%, var(--bg)); }
.sep-chip:active { transform: scale(0.96); }

/* Off state: dim the chip */
.sep-chip[aria-pressed="false"] {
  color: var(--text-muted);
  border-color: color-mix(in srgb, var(--rule) 60%, transparent);
  opacity: 0.55;
}
.sep-chip[aria-pressed="false"] .sep-chip__dot {
  background: var(--text-muted);
  opacity: 0.3;
}

/* Active CMYK chips: colour-matched border so the ON state is unambiguous */
.sep-chip[aria-pressed="true"][data-sep="c"] { border-color: color-mix(in srgb, #00aeef 55%, transparent); }
.sep-chip[aria-pressed="true"][data-sep="m"] { border-color: color-mix(in srgb, #ec008c 48%, transparent); }
.sep-chip[aria-pressed="true"][data-sep="y"] { border-color: color-mix(in srgb, #b8a800 65%, transparent); }
.sep-chip[aria-pressed="true"][data-sep="k"] { border-color: color-mix(in srgb, var(--text) 38%, transparent); }

/* Printed White — special: dot rendered as a ruled circle, chip uses accent when on */
.sep-chip--white .sep-chip__dot {
  background: var(--bg);
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.22);
}
.sep-chip--white[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg));
  color: var(--accent);
}
.sep-chip--white[aria-pressed="true"] .sep-chip__dot {
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.foil-demo__hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.hint-mobile,
.hint-ios-tap { display: none; }

@media (pointer: coarse) {
  .hint-desktop { display: none; }
  .hint-mobile  { display: inline; }
}

.hint-ios-tap.is-visible {
  display: block;
  margin-top: 0.35rem;
  color: var(--accent);
  font-weight: 500;
}

/* ==========================================================================
   Press movement demo + Density tool demo
   ========================================================================== */
.section--demo-press { background: var(--bg-alt); }

/* Shared stage/canvas/demo layout between all three canvas demos */
.press-demo,
.density-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.press-demo__stage,
.density-demo__stage {
  position: relative;
  width: min(520px, 100%);
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  cursor: crosshair;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.12),
    0 20px 52px -18px rgba(0, 0, 0, 0.32);
}

.press-demo__canvas,
.density-demo__canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Press movement slider */
.misreg-control {
  width: 100%;
  max-width: min(520px, 100%);
}

.misreg-control__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.375rem;
}

.misreg-edge {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.misreg-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 20px;
  background: transparent;
  outline: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
}

.misreg-slider::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right,
    var(--text) 0%,
    var(--text) var(--fill, 0%),
    color-mix(in srgb, var(--text) 14%, transparent) var(--fill, 0%),
    color-mix(in srgb, var(--text) 14%, transparent) 100%
  );
}

.misreg-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -8px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--text);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
  cursor: grab;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 100ms ease;
}

.misreg-slider::-webkit-slider-thumb:hover {
  border-color: var(--accent);
  box-shadow:
    0 0 0 5px color-mix(in srgb, var(--accent) 12%, transparent),
    0 1px 6px rgba(0, 0, 0, 0.18);
}

.misreg-slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.1);
}

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

.misreg-slider::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--text) 14%, transparent);
}

.misreg-slider::-moz-range-progress {
  height: 4px;
  border-radius: 2px;
  background: var(--text);
}

.misreg-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--text);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
  cursor: grab;
}

/* Density readout panel */
.density-readout {
  width: 100%;
  max-width: min(520px, 100%);
  padding: 0.75rem 1rem 0.875rem;
  border: 1.5px solid var(--rule);
  border-radius: 12px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.density-row {
  display: grid;
  grid-template-columns: 1.25rem 1fr 3rem;
  align-items: center;
  gap: 0.625rem;
}

.density-row__name {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.density-row__track {
  height: 4px;
  background: color-mix(in srgb, var(--rule) 80%, transparent);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.density-row__fill {
  position: absolute;
  inset: 0;
  width: var(--pct, 0%);
  border-radius: 2px;
  transition: width 55ms linear;
}

/* Per-channel fill colours */
.density-row[data-ch="c"] .density-row__fill { background: #00aeef; }
.density-row[data-ch="m"] .density-row__fill { background: #ec008c; }
.density-row[data-ch="y"] .density-row__fill { background: #c8b800; }
.density-row[data-ch="k"] .density-row__fill { background: var(--text); }
.density-row[data-ch="w"] .density-row__fill { background: color-mix(in srgb, var(--text) 30%, transparent); }

.density-row__val {
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: right;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.density-tac {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  margin-top: 0.125rem;
  border-top: 1px solid var(--rule);
}

.density-tac__label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.density-tac__val {
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  transition: color 200ms ease;
}

/* High TAC warning */
.density-readout.is-over-limit .density-tac__val { color: #cc2200; }

/* ==========================================================================
   Early-access notify form
   ========================================================================== */
.notify-form { margin-top: 1.5rem; }

.notify-form__row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.notify-form__input {
  flex: 1 1 200px;
  padding: 0.65rem 0.9rem;
  font-size: 0.9375rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  outline: none;
  transition: border-color 180ms var(--ease);
}
.notify-form__input::placeholder { color: var(--text-muted); }
.notify-form__input:focus { border-color: var(--accent); }

.notify-form__btn {
  padding: 0.65rem 1.25rem;
  font-size: 0.9375rem;
  font-family: var(--font);
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 180ms var(--ease);
}
.notify-form__btn:hover:not(:disabled) { opacity: 0.85; }
.notify-form__btn:disabled { opacity: 0.5; cursor: default; }

.notify-form__status {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  min-height: 1.4em;
}

.notify-form__alt {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.notify-form__alt a { color: var(--accent); }

/* ==========================================================================
   Cookie consent banner
   ========================================================================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--bg);
  border-top: 1px solid var(--rule);
  padding: 1rem var(--container-pad);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}

.cookie-banner.is-hidden { display: none; }

.cookie-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  max-width: var(--container-max);
  margin-inline: auto;
}

.cookie-banner__text {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}
.cookie-banner__text a { color: var(--accent); }

.cookie-banner__btn {
  flex-shrink: 0;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font);
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 150ms var(--ease);
}
.cookie-banner__btn:hover { opacity: 0.85; }

/* Footer privacy link */
.site-footer__privacy {
  color: var(--text-muted);
  transition: color 180ms var(--ease);
}
.site-footer__privacy:hover { color: var(--text); }

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@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;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .hero__eyebrow,
  .hero__headline,
  .hero__lead {
    animation: none;
  }
  /* Canvas foil demo: JS checks prefers-reduced-motion and skips animation */
}
