/* =============================================================
   R-Labs — main.css  (footer wordmark: RegalisLabs)
   A focused, readable stylesheet for a single dense homepage.

   Table of contents
   -----------------
   1.  Design tokens (colours, type, spacing, motion)
   2.  Base & resets
   3.  Utilities (container, reveal, eyebrow, skip link)
   4.  Buttons
   5.  Header & navigation
   6.  Hero + signal field
   7.  Trust strip
   8.  Section shell
   9.  Capabilities
   10. Proof without exposure (dossiers)
   11. Process
   12. Signals (field notes)
   13. Final CTA
   14. Footer
   15. Post / prose placeholder
   16. Reduced motion + motion intensity toggles
   17. Responsive tuning (mobile-first adjustments)
   ============================================================= */

/* -------------------------------------------------------------
   1. Design tokens
   ------------------------------------------------------------- */
:root {
  /* Surfaces */
  --r-surface: #131313;
  --r-surface-lowest: #0e0e0e;
  --r-surface-low: #1c1b1b;
  --r-surface: #131313;
  --r-surface-container: #201f1f;
  --r-surface-high: #2a2a2a;
  --r-surface-highest: #353534;
  --r-surface-bright: #3a3939;

  /* Text */
  --r-ivory: #f1efe9; /* warm paper-white */
  --r-ivory-dim: #e5e2e1;
  --r-muted: #c4c5d9;
  --r-muted-low: #8e90a2;
  --r-outline: #8e90a2;
  --r-outline-variant: #434656;

  /* Accent — electric cobalt (overridable via head.hbs) */
  --r-accent: #2e5bff;
  --r-accent-soft: #b8c3ff;

  /* Type */
  --r-font-head: "Newsreader", Georgia, "Times New Roman", serif;
  --r-font-body:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  --r-font-mono:
    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Fluid scale */
  --r-step-0: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem); /* body */
  --r-step-1: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem); /* lede */
  --r-step-2: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem); /* small headings */
  --r-step-3: clamp(1.6rem, 1.3rem + 1.4vw, 2.25rem); /* section titles */
  --r-step-4: clamp(2rem, 1.5rem + 2.4vw, 3.25rem); /* big section titles */
  --r-step-5: clamp(2.5rem, 1.6rem + 4.2vw, 4.75rem); /* hero */

  /* Spacing */
  --r-gutter: clamp(1.25rem, 1rem + 2vw, 3rem);
  --r-gap-sm: 0.75rem;
  --r-gap-md: 1.25rem;
  --r-gap-lg: 2rem;
  --r-gap-xl: clamp(3rem, 2rem + 3vw, 5rem);
  --r-gap-2xl: clamp(5rem, 3rem + 5vw, 8rem);

  /* Layout */
  --r-max: 1240px;

  /* Motion — tuned long and linear; premium, not perky */
  --r-ease: cubic-bezier(0.2, 0.6, 0.2, 1);
  --r-ease-out: cubic-bezier(0.16, 0.84, 0.24, 1);
  --r-dur-1: 320ms;
  --r-dur-2: 520ms;
  --r-dur-3: 820ms;

  /* Accent rgba (for soft states that need alpha). Note: keep in sync
     with --r-accent if you override it via settings — the JS copies it over. */
  --r-accent-rgb: 46, 91, 255;
  --r-ivory-rgb: 241, 239, 233;
}

/* A darker, quieter palette alt — reserved (not currently used). */
/* :root[data-theme="quieter"] { --r-accent: #3f4f9a; } */

/* -------------------------------------------------------------
   2. Base & resets
   ------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--r-surface);
  color: var(--r-ivory);
  font-family: var(--r-font-body);
  font-size: var(--r-step-0);
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.005em;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--r-font-head);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--r-ivory);
}

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

a {
  color: inherit;
  text-decoration: none;
}
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--r-accent);
  outline-offset: 3px;
}

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

/* -------------------------------------------------------------
   3. Utilities
   ------------------------------------------------------------- */
.r-container {
  width: 100%;
  max-width: var(--r-max);
  margin-inline: auto;
  padding-inline: var(--r-gutter);
}

.r-skip {
  position: absolute;
  top: -40px;
  left: 8px;
  padding: 0.5rem 0.75rem;
  background: var(--r-ivory);
  color: var(--r-surface-lowest);
  font-family: var(--r-font-body);
  font-size: 0.8rem;
  font-weight: 500;
  transition: top var(--r-dur-1) var(--r-ease);
  z-index: 200;
}
.r-skip:focus {
  top: 8px;
}

.r-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--r-font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--r-muted-low);
  margin: 0;
}
.r-eyebrow__dot {
  width: 6px;
  height: 6px;
  background: var(--r-accent);
  display: inline-block;
}

/* Scroll-triggered reveal — extremely mild: fade + 12px translate.
   JS adds .is-inview when element enters viewport. */
.r-reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity var(--r-dur-3) var(--r-ease-out),
    transform var(--r-dur-3) var(--r-ease-out);
  will-change: opacity, transform;
}
.r-reveal.is-inview {
  opacity: 1;
  transform: translateY(0);
}
html.no-js .r-reveal {
  opacity: 1;
  transform: none;
}

/* A tiny pulse used beside "open to engagements". */
.r-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 0.4em;
  background: var(--r-accent);
  box-shadow: 0 0 0 0 rgba(var(--r-accent-rgb), 0.55);
  animation: r-pulse 2.6s var(--r-ease) infinite;
  vertical-align: middle;
}
@keyframes r-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(var(--r-accent-rgb), 0.45);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(var(--r-accent-rgb), 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(var(--r-accent-rgb), 0);
  }
}

/* Redacted text bar — used in the Proof section. */
.r-redact {
  position: relative;
  display: inline-block;
  padding: 0 0.35em;
  color: transparent;
  background: var(--r-ivory);
  mix-blend-mode: normal;
  transition: background var(--r-dur-2) var(--r-ease);
}
.r-redact::selection {
  background: var(--r-ivory);
  color: var(--r-ivory);
}
.r-redact--tight {
  padding: 0 0.25em;
}

/* -------------------------------------------------------------
   4. Buttons
   ------------------------------------------------------------- */
.r-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.4rem;
  font-family: var(--r-font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  border: 0;
  cursor: pointer;
  position: relative;
  transition:
    background var(--r-dur-1) var(--r-ease),
    color var(--r-dur-1) var(--r-ease),
    transform var(--r-dur-1) var(--r-ease);
  will-change: transform;
}
.r-btn__arrow {
  width: 14px;
  height: 14px;
  transition: transform var(--r-dur-1) var(--r-ease);
}
.r-btn:hover .r-btn__arrow {
  transform: translateX(3px);
}

/* Primary — electric cobalt. A subtle edge sheen on hover via
   a radial gradient that never reads as "glow". */
.r-btn--primary {
  background: var(--r-accent);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.r-btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    120% 80% at 0% 0%,
    rgba(255, 255, 255, 0.18),
    transparent 55%
  );
  opacity: 0;
  transition: opacity var(--r-dur-2) var(--r-ease);
  z-index: -1;
}
.r-btn--primary:hover::after {
  opacity: 1;
}
.r-btn--primary:hover {
  background: color-mix(in srgb, var(--r-accent) 94%, #fff 6%);
}

/* Ghost — outline at 20% opacity per design system. */
.r-btn--ghost {
  background: transparent;
  color: var(--r-ivory);
  box-shadow: inset 0 0 0 1px rgba(var(--r-ivory-rgb), 0.18);
}
.r-btn--ghost:hover {
  background: var(--r-surface-bright);
  box-shadow: inset 0 0 0 1px rgba(var(--r-ivory-rgb), 0.3);
}

/* Tertiary — text with a 2px accent underscore that widens on hover. */
.r-btn--tertiary {
  padding-inline: 0;
  background: transparent;
  color: var(--r-ivory);
  position: relative;
}
.r-btn--tertiary::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 2.25rem;
  background: var(--r-accent);
  transition: width var(--r-dur-2) var(--r-ease);
}
.r-btn--tertiary:hover::before {
  width: 100%;
}

.r-btn--lg {
  padding: 1.15rem 1.75rem;
  font-size: 0.875rem;
}

/* -------------------------------------------------------------
   5. Header & navigation
   ------------------------------------------------------------- */
.r-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 14, 14, 0.78);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
  transition: background var(--r-dur-2) var(--r-ease);
}
.r-header.is-scrolled {
  background: rgba(14, 14, 14, 0.94);
}

.r-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--r-gap-lg);
  padding: 1.25rem var(--r-gutter);
  max-width: var(--r-max);
  margin-inline: auto;
}

.r-wordmark {
  font-family: var(--r-font-head);
  font-weight: 400;
  font-size: 1.0625rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--r-ivory);
}

.r-nav {
  justify-self: center;
}
.r-nav__list {
  display: flex;
  gap: 2.25rem;
}
.r-nav__link {
  font-family: var(--r-font-body);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--r-muted-low);
  position: relative;
  padding: 0.3em 0;
  transition: color var(--r-dur-1) var(--r-ease);
}
.r-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: var(--r-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--r-dur-2) var(--r-ease);
}
.r-nav__link:hover {
  color: var(--r-ivory);
}
.r-nav__link:hover::after {
  transform: scaleX(1);
}

.r-header__cta {
  padding: 0.75rem 1.1rem;
  font-size: 0.6875rem;
}

@media (max-width: 820px) {
  .r-nav {
    display: none;
  }
  .r-header__inner {
    grid-template-columns: 1fr auto;
  }
}

/* -------------------------------------------------------------
   6. Hero + signal field
   ------------------------------------------------------------- */
.r-hero {
  position: relative;
  padding: clamp(4rem, 2rem + 8vw, 9rem) 0 clamp(4rem, 2rem + 4vw, 7rem);
  overflow: hidden;
}
.r-hero::before {
  /* Soft recessed vignette so the hero reads as its own plate. */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      80% 60% at 20% 30%,
      rgba(var(--r-accent-rgb), 0.08),
      transparent 55%
    ),
    linear-gradient(180deg, var(--r-surface) 0%, var(--r-surface-low) 100%);
  pointer-events: none;
}

.r-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--r-gap-xl);
  align-items: center;
}
@media (min-width: 960px) {
  .r-hero__grid {
    grid-template-columns: 7fr 5fr;
    gap: clamp(2rem, 1rem + 4vw, 5rem);
  }
}

.r-hero__eyebrow {
  margin-bottom: 1.5rem;
}

.r-hero__headline {
  font-family: var(--r-font-head);
  font-weight: 300;
  font-size: var(--r-step-5);
  line-height: 1.04;
  letter-spacing: -0.018em;
  margin-bottom: 1.5rem;
  max-width: 18ch;
}
.r-hero__headline::first-line {
  font-style: normal;
}
/* A soft reveal mask — per line. JS adds masking when available. */
.r-hero__headline em {
  font-style: italic;
  color: var(--r-ivory-dim);
}

.r-hero__sub {
  font-size: var(--r-step-1);
  color: var(--r-muted);
  line-height: 1.55;
  max-width: 56ch;
  margin-bottom: 2.25rem;
  font-weight: 300;
}

.r-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--r-gap-md) 2rem;
  align-items: center;
}

.r-hero__meta {
  margin-top: clamp(2.5rem, 2rem + 1.5vw, 3.75rem);
  display: grid;
  gap: 0.5rem 2rem;
  grid-template-columns: 1fr;
  max-width: 520px;
}
@media (min-width: 600px) {
  .r-hero__meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.r-hero__meta-row {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  border-top: 1px solid rgba(var(--r-ivory-rgb), 0.06);
  padding-top: 0.8rem;
}
.r-hero__meta-row dt {
  font-family: var(--r-font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--r-muted-low);
  flex: 0 0 auto;
  min-width: 6.5rem;
}
.r-hero__meta-row dd {
  margin: 0;
  font-size: 0.85rem;
  color: var(--r-ivory-dim);
}

/* Signal field (right column) */
.r-hero__visual {
  position: relative;
  aspect-ratio: 5 / 6;
  min-height: 420px;
  max-height: 640px;
  opacity: 0.95;
}
@media (max-width: 959px) {
  /* On mobile, the signal field sits behind the hero copy at low opacity. */
  .r-hero__visual {
    position: absolute;
    inset: auto 0 -2rem 0;
    height: 60%;
    min-height: 0;
    opacity: 0.35;
    z-index: 0;
    pointer-events: none;
  }
  .r-hero__content {
    position: relative;
    z-index: 1;
  }
}

.r-signal {
  position: absolute;
  inset: 0;
}
.r-signal__svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Frame breathes very slowly. */
.r-signal__frame {
  animation: r-breath 9s ease-in-out infinite;
  transform-origin: center;
}
.r-signal__frame--inner {
  animation-duration: 11s;
  animation-delay: -3s;
}
@keyframes r-breath {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.12;
  }
}

/* Sweeps drift horizontally and breathe in opacity. */
.r-signal__sweep {
  transform-origin: center;
  animation: r-sweep 14s linear infinite;
  opacity: 0.85;
}
.r-signal__sweep--1 {
  animation-duration: 17s;
}
.r-signal__sweep--2 {
  animation-duration: 22s;
  animation-direction: reverse;
}
.r-signal__sweep--3 {
  animation-duration: 26s;
}
@keyframes r-sweep {
  0% {
    transform: translateX(-6%);
    opacity: 0.2;
  }
  50% {
    transform: translateX(6%);
    opacity: 0.9;
  }
  100% {
    transform: translateX(-6%);
    opacity: 0.2;
  }
}

.r-signal__thread {
  animation: r-thread 11s ease-in-out infinite;
  opacity: 0.7;
}
@keyframes r-thread {
  0%,
  100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.7;
  }
}

.r-signal__mark {
  opacity: 0.2;
  animation: r-mark 6s ease-in-out infinite;
}
.r-signal__mark:nth-child(1) {
  animation-delay: 0s;
}
.r-signal__mark:nth-child(2) {
  animation-delay: 1.2s;
}
.r-signal__mark:nth-child(3) {
  animation-delay: 2.4s;
}
.r-signal__mark:nth-child(4) {
  animation-delay: 3.6s;
}
@keyframes r-mark {
  0%,
  100% {
    opacity: 0.15;
  }
  50% {
    opacity: 0.9;
  }
}

/* -------------------------------------------------------------
   7. Trust strip
   ------------------------------------------------------------- */
.r-trust {
  background: var(--r-surface-lowest);
  padding: 1.5rem 0;
}
.r-trust__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--r-gap-md) var(--r-gap-lg);
  align-items: center;
}
.r-trust__item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--r-font-body);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--r-muted);
}
.r-trust__glyph {
  width: 18px;
  height: 18px;
  color: var(--r-accent);
  flex: 0 0 auto;
}

/* -------------------------------------------------------------
   8. Section shell
   ------------------------------------------------------------- */
.r-section {
  padding-block: var(--r-gap-2xl);
  position: relative;
}
.r-section__title {
  font-family: var(--r-font-head);
  font-size: var(--r-step-4);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -0.012em;
  max-width: 22ch;
  margin: 0.9rem 0 1.25rem;
}
.r-section__title em {
  font-style: italic;
  color: var(--r-ivory-dim);
}
.r-section__lede {
  font-size: var(--r-step-1);
  color: var(--r-muted);
  font-weight: 300;
  line-height: 1.6;
  max-width: 58ch;
}

/* -------------------------------------------------------------
   9. Capabilities
   ------------------------------------------------------------- */
.r-caps__head {
  max-width: 56ch;
  margin-bottom: var(--r-gap-xl);
}
.r-caps__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: rgba(var(--r-ivory-rgb), 0.04);
  /* 1px gap reads as a seam rather than a border; the cards paint over it. */
}
@media (min-width: 720px) {
  .r-caps__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1060px) {
  /* Six capability cards land in a clean 3×2 bento at desktop width. */
  .r-caps__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.r-cap {
  position: relative;
  background: var(--r-surface-low);
  padding: clamp(1.75rem, 1rem + 1.5vw, 2.5rem);
  transition: background var(--r-dur-2) var(--r-ease);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.r-cap:hover {
  background: var(--r-surface-high);
}

.r-cap__num {
  font-family: var(--r-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.24em;
  color: var(--r-muted-low);
}
.r-cap__title {
  font-family: var(--r-font-head);
  font-size: var(--r-step-3);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.r-cap__rule {
  display: block;
  width: 2rem;
  height: 1px;
  background: var(--r-accent);
  transition:
    width var(--r-dur-2) var(--r-ease),
    opacity var(--r-dur-2) var(--r-ease);
  opacity: 0.7;
}
.r-cap:hover .r-cap__rule {
  width: 5rem;
  opacity: 1;
}

.r-cap__body {
  color: var(--r-muted);
  font-size: 0.95rem;
  line-height: 1.62;
  max-width: 44ch;
}

/* .r-cap--wide retired in v1.1 — the 3×2 bento for six cards doesn't use it.
   Retained as a harmless no-op in case older partials still reference it. */
.r-cap--wide {
  /* intentionally empty */
}

/* -------------------------------------------------------------
   10. Proof without exposure
   ------------------------------------------------------------- */
.r-proof {
  background: var(--r-surface-lowest);
}
.r-proof__head {
  max-width: 60ch;
  margin-bottom: var(--r-gap-xl);
}
.r-proof__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--r-gap-lg);
}
@media (min-width: 900px) {
  .r-proof__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--r-gap-xl);
  }
}

.r-dossier {
  background: var(--r-surface);
  padding: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
  position: relative;
  transition:
    background var(--r-dur-2) var(--r-ease),
    transform var(--r-dur-2) var(--r-ease);
}
.r-dossier:hover {
  background: var(--r-surface-container);
}

.r-dossier__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  font-family: var(--r-font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--r-muted-low);
}
.r-dossier__id {
  color: var(--r-accent);
}
.r-dossier__status {
  margin-left: auto;
}
.r-dossier__meta::after {
  /* A single thin accent line under the meta strip. One of the few lines
     allowed in the system because it acts as a tab divider, not a border. */
  content: "";
  position: absolute;
  left: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
  right: clamp(1.5rem, 1rem + 1.5vw, 2.25rem);
  height: 1px;
  background: rgba(var(--r-ivory-rgb), 0.08);
  top: calc(1.8rem + 1em);
}

.r-dossier__title {
  font-family: var(--r-font-head);
  font-size: var(--r-step-3);
  line-height: 1.2;
  font-weight: 400;
  max-width: 32ch;
  margin-bottom: 1.5rem;
}

.r-dossier__rows {
  display: grid;
  gap: 0.85rem;
}
.r-dossier__row {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  align-items: baseline;
}
.r-dossier__row dt {
  font-family: var(--r-font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--r-muted-low);
}
.r-dossier__row dd {
  margin: 0;
  color: var(--r-ivory-dim);
  font-size: 0.95rem;
  line-height: 1.55;
}
@media (max-width: 540px) {
  .r-dossier__row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}

/* -------------------------------------------------------------
   11. Process
   ------------------------------------------------------------- */
.r-process {
  position: relative;
}
.r-process__head {
  max-width: 58ch;
  margin-bottom: var(--r-gap-xl);
}
.r-process__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--r-gap-lg);
  counter-reset: phase;
  position: relative;
}
@media (min-width: 820px) {
  .r-process__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--r-gap-lg);
  }
}

.r-process__step {
  position: relative;
  padding: 1.75rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
/* A small accent square marker above each step. */
.r-process__step::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--r-accent);
  position: absolute;
  top: 0;
  left: 0;
}

.r-process__coord {
  font-family: var(--r-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--r-muted-low);
}
.r-process__title {
  font-family: var(--r-font-head);
  font-size: var(--r-step-3);
  font-weight: 400;
  line-height: 1.1;
}
.r-process__body {
  color: var(--r-muted);
  font-size: 0.95rem;
  line-height: 1.62;
  max-width: 32ch;
}

/* Connector rail across the phase row. Drawn as a thin full-bleed line
   that terminates at the container edges — visible only on wide screens. */
.r-process__rail {
  position: absolute;
  left: var(--r-gutter);
  right: var(--r-gutter);
  top: calc(var(--r-gap-2xl) + 5px);
  height: 1px;
  display: none;
  overflow: hidden;
  pointer-events: none;
}
.r-process__rail-line {
  display: block;
  width: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--r-accent-rgb), 0.6),
    transparent
  );
  transition: width 1.6s var(--r-ease);
}
.r-process.is-inview .r-process__rail-line {
  width: 100%;
}
@media (min-width: 820px) {
  .r-process__rail {
    display: block;
  }
}

/* -------------------------------------------------------------
   12. Signals (Field notes)
   ------------------------------------------------------------- */
.r-signals__head {
  max-width: 54ch;
  margin-bottom: var(--r-gap-xl);
}
.r-signals__list {
  display: grid;
  gap: var(--r-gap-lg);
}
@media (min-width: 820px) {
  .r-signals__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--r-gap-xl);
  }
}

.r-signal-item {
  position: relative;
  padding: 1.75rem 0 0;
  border-top: 1px solid rgba(var(--r-ivory-rgb), 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.r-signal-item__idx {
  font-family: var(--r-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--r-accent);
}
.r-signal-item__body {
  margin: 0;
  font-family: var(--r-font-head);
  font-size: clamp(1.05rem, 0.9rem + 0.4vw, 1.3rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.38;
  color: var(--r-ivory);
  max-width: 38ch;
}
.r-signal-item__tag {
  margin-top: auto;
  font-family: var(--r-font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--r-muted-low);
}

/* -------------------------------------------------------------
   13. Final CTA
   ------------------------------------------------------------- */
.r-cta {
  background: var(--r-surface-lowest);
  position: relative;
  overflow: hidden;
}
.r-cta__inner {
  position: relative;
  max-width: 820px;
  text-align: center;
  padding-block: clamp(3rem, 2rem + 4vw, 6rem);
}
.r-cta__eyebrow {
  justify-content: center;
}
.r-cta__headline {
  font-family: var(--r-font-head);
  font-size: var(--r-step-4);
  line-height: 1.08;
  font-weight: 400;
  margin: 1rem auto 1.25rem;
  max-width: 20ch;
}
.r-cta__body {
  color: var(--r-muted);
  font-size: var(--r-step-1);
  line-height: 1.55;
  margin: 0 auto 2.25rem;
  max-width: 48ch;
}
.r-cta__actions {
  display: flex;
  justify-content: center;
}
.r-cta__fine {
  font-family: var(--r-font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--r-muted-low);
  margin-top: 2rem;
}

/* -------------------------------------------------------------
   7b. R-Labs Difference (homepage, between trust strip and capabilities)
   -------------------------------------------------------------
   Three value-prop columns, larger typographic rhythm than trust strip.
   Surface nudges one step lighter than the neighbouring sections so it
   reads as a distinct value-prop row without requiring a hard divider.
   ------------------------------------------------------------- */
.r-diff {
  background: var(--r-surface);
}
.r-diff__head {
  max-width: 54ch;
  margin-bottom: var(--r-gap-xl);
}
.r-diff__grid {
  display: grid;
  gap: var(--r-gap-lg);
}
@media (min-width: 820px) {
  .r-diff__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--r-gap-xl);
  }
}
.r-diff__item {
  position: relative;
  padding: 1.75rem 0 0;
  border-top: 1px solid rgba(var(--r-ivory-rgb), 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.r-diff__coord {
  font-family: var(--r-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--r-accent);
}
.r-diff__title {
  font-family: var(--r-font-head);
  font-size: clamp(1.3rem, 1.1rem + 0.5vw, 1.55rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 24ch;
}
.r-diff__body {
  color: var(--r-muted);
  font-size: 0.95rem;
  line-height: 1.62;
  max-width: 42ch;
}

/* -------------------------------------------------------------
   13b. Contact form (lives inside the Final CTA section)
   -------------------------------------------------------------
   Design notes:
   - Underline-only inputs per the design system's "no-line" rule — the
     bottom border *is* the visible surface of the field.
   - Fields are left-aligned in a centred form, max-width ~40rem, to keep
     the editorial rhythm of the CTA block.
   - Submit button reuses .r-btn--primary.
   - Honeypot is visually hidden but still focusable only via a dummy path
     that bots follow and humans don't.
   ------------------------------------------------------------- */
.r-form {
  position: relative;
  width: 100%;
  max-width: 40rem;
  margin: 2rem auto 0;
  text-align: left;
  display: grid;
  gap: 1.5rem;
}
.r-form__row {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .r-form__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }
}

.r-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.r-form__label {
  font-family: var(--r-font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--r-muted-low);
}

.r-form__input {
  font-family: var(--r-font-body);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--r-ivory);
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(var(--r-ivory-rgb), 0.18);
  padding: 0.55rem 0;
  width: 100%;
  appearance: none;
  transition: border-color var(--r-dur-1) var(--r-ease);
}
.r-form__input::placeholder {
  color: var(--r-muted-low);
}
.r-form__input:focus {
  outline: none;
  border-bottom-color: var(--r-accent);
  /* A 2px underline "signal line" on focus without layout shift. */
  box-shadow: 0 1px 0 0 var(--r-accent);
}
.r-form__input:-webkit-autofill {
  -webkit-text-fill-color: var(--r-ivory);
  -webkit-box-shadow: 0 0 0 1000px var(--r-surface) inset;
  caret-color: var(--r-ivory);
}
.r-form__input--area {
  resize: vertical;
  min-height: 6.5em;
  line-height: 1.55;
}

/* Honeypot — visually hidden but not display:none (screen readers ignore
   aria-hidden parents, bots still see the field and fill it). */
.r-form__hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.r-form__actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 0.5rem;
}
@media (min-width: 640px) {
  .r-form__actions {
    justify-content: center;
  }
}

/* Loading state on the submit button. */
.r-form__submit[aria-busy="true"] .r-form__submit-label {
  opacity: 0.5;
}
.r-form__submit[aria-busy="true"] .r-btn__arrow {
  display: none;
}
.r-form__submit-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: r-spin 0.7s linear infinite;
  margin-left: 0.4rem;
}
.r-form__submit[aria-busy="true"] .r-form__submit-spinner {
  display: inline-block;
}
@keyframes r-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Status line under the form. Hidden until populated. */
.r-form__status {
  min-height: 1.5em;
  font-family: var(--r-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--r-muted);
  text-align: center;
  margin: 0.25rem 0 0;
}
.r-form__status[data-state="ok"] {
  color: var(--r-accent-soft);
}
.r-form__status[data-state="error"] {
  color: #ffb4ab;
}

/* Success: the form swaps to a success card (handled by JS). */
.r-form--sent .r-form__row,
.r-form--sent .r-form__field,
.r-form--sent .r-form__actions {
  display: none;
}
.r-form--sent .r-form__status {
  font-family: var(--r-font-head);
  font-style: italic;
  font-size: 1.2rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--r-ivory);
}

/* Decorative frame marks at the four corners of the CTA block. */
.r-cta__frame {
  position: absolute;
  inset: clamp(1.5rem, 1rem + 1vw, 2.5rem);
  pointer-events: none;
}
.r-cta__mark {
  position: absolute;
  width: 14px;
  height: 14px;
}
.r-cta__mark::before,
.r-cta__mark::after {
  content: "";
  position: absolute;
  background: var(--r-accent);
  opacity: 0.9;
}
.r-cta__mark::before {
  width: 100%;
  height: 1px;
  top: 0;
  left: 0;
}
.r-cta__mark::after {
  width: 1px;
  height: 100%;
  top: 0;
  left: 0;
}
.r-cta__mark--tl {
  top: 0;
  left: 0;
}
.r-cta__mark--tr {
  top: 0;
  right: 0;
  transform: scaleX(-1);
}
.r-cta__mark--bl {
  bottom: 0;
  left: 0;
  transform: scaleY(-1);
}
.r-cta__mark--br {
  bottom: 0;
  right: 0;
  transform: scale(-1, -1);
}

/* Horizontal faint lines above and below the content */
.r-cta__hline {
  position: absolute;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(var(--r-ivory-rgb), 0.12),
    transparent
  );
}
.r-cta__hline--top {
  top: 0;
}
.r-cta__hline--bot {
  bottom: 0;
}

/* -------------------------------------------------------------
   14. Footer
   ------------------------------------------------------------- */
.r-footer {
  background: #0a0a0a;
  padding-block: clamp(3rem, 2rem + 3vw, 5rem);
  color: var(--r-muted);
}
.r-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--r-gap-lg);
}
@media (min-width: 820px) {
  .r-footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--r-gap-xl);
  }
}

.r-footer__wordmark {
  font-family: var(--r-font-head);
  font-size: 1rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--r-ivory);
  margin-bottom: 0.6rem;
}
.r-footer__tag {
  max-width: 42ch;
  color: var(--r-muted-low);
  font-size: 0.85rem;
}
.r-footer__contact {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.r-footer__label {
  font-family: var(--r-font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--r-muted-low);
}
.r-footer__email {
  color: var(--r-ivory);
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(var(--r-ivory-rgb), 0.18);
  display: inline-block;
  padding-bottom: 2px;
  transition: border-color var(--r-dur-1) var(--r-ease);
}
.r-footer__email:hover {
  border-color: var(--r-accent);
}

.r-footer__list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.r-footer__link {
  font-family: var(--r-font-body);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--r-muted-low);
  transition: color var(--r-dur-1) var(--r-ease);
}
.r-footer__link:hover {
  color: var(--r-ivory);
}

.r-footer__meta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  justify-content: flex-end;
}
.r-footer__legal,
.r-footer__rev {
  font-family: var(--r-font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--r-muted-low);
}

/* -------------------------------------------------------------
   15. Post / prose placeholder
   ------------------------------------------------------------- */
.r-post {
  padding-block: clamp(3rem, 2rem + 4vw, 6rem);
  max-width: 72ch;
}
.r-post__header {
  margin-bottom: 2rem;
}
.r-post__title {
  font-family: var(--r-font-head);
  font-size: var(--r-step-4);
  font-weight: 400;
  line-height: 1.1;
  margin: 0.75rem 0 0.5rem;
}
.r-post__meta {
  font-family: var(--r-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--r-muted-low);
}
.r-prose p {
  margin: 0 0 1.1em;
  color: var(--r-ivory-dim);
}
.r-prose h2,
.r-prose h3 {
  margin: 2rem 0 1rem;
  font-family: var(--r-font-head);
  font-weight: 400;
}

.r-404__actions {
  margin-top: 2rem;
}

/* -------------------------------------------------------------
   15b. Page templates — About / Services / Method / Contact
   -------------------------------------------------------------
   Shared shell used by all the long-form page templates. The page
   header carries the .r-page__title (large serif) and .r-page__lede.
   Section blocks cap at ~65ch for readable prose rhythm.
   ------------------------------------------------------------- */
.r-page {
  padding-block: clamp(3rem, 2rem + 3vw, 5rem) clamp(4rem, 3rem + 4vw, 7rem);
  max-width: 960px;
}
.r-page__header {
  max-width: 760px;
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem);
}
.r-page__title {
  font-family: var(--r-font-head);
  font-size: var(--r-step-4);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin: 1rem 0;
  max-width: 22ch;
}
.r-page__title em {
  font-style: italic;
  color: var(--r-ivory-dim);
}
.r-page__lede {
  font-size: var(--r-step-1);
  color: var(--r-muted);
  line-height: 1.55;
  font-weight: 300;
  max-width: 60ch;
}
.r-page__section {
  max-width: 65ch;
  margin-bottom: clamp(2.5rem, 2rem + 1.5vw, 3.5rem);
}
.r-page__section p {
  color: var(--r-ivory-dim);
  line-height: 1.65;
  margin: 0 0 1em;
}
.r-page__section p:last-child {
  margin-bottom: 0;
}
.r-page__h2 {
  font-family: var(--r-font-head);
  font-size: clamp(1.5rem, 1.25rem + 0.8vw, 1.85rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.005em;
  margin: 0 0 1.25rem;
}
.r-page__h2 em {
  font-style: italic;
  color: var(--r-ivory-dim);
}
.r-page__list {
  list-style: none;
  padding: 0;
  max-width: 62ch;
}
.r-page__list li {
  color: var(--r-ivory-dim);
  line-height: 1.6;
  padding-left: 1.25rem;
  position: relative;
  margin-bottom: 0.6rem;
}
.r-page__list li::before {
  content: "";
  width: 6px;
  height: 1px;
  background: var(--r-accent);
  position: absolute;
  left: 0;
  top: 0.75em;
}
.r-page__list--negative li {
  padding-left: 1.4rem;
}
.r-page__list--negative li::before {
  width: 10px;
  background: var(--r-muted-low);
  opacity: 0.8;
}
.r-page__cta {
  margin-top: clamp(3rem, 2rem + 2vw, 4.5rem);
  padding-top: clamp(2rem, 1.5rem + 1vw, 3rem);
  border-top: 1px solid rgba(var(--r-ivory-rgb), 0.08);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}
.r-page__cta-fine {
  font-family: var(--r-font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--r-muted-low);
  margin: 0;
}
.r-link {
  color: var(--r-ivory);
  border-bottom: 1px solid var(--r-accent);
  padding-bottom: 1px;
  transition: color var(--r-dur-1) var(--r-ease);
}
.r-link:hover {
  color: var(--r-accent-soft);
}

/* -------------------------------------------------------------
   15c. About page — principles grid
   ------------------------------------------------------------- */
.r-principles {
  display: grid;
  gap: 1.75rem;
  margin-top: 1rem;
}
@media (min-width: 720px) {
  .r-principles {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}
.r-principle {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.r-principle__idx {
  font-family: var(--r-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  color: var(--r-accent);
  margin: 0;
}
.r-principle__title {
  font-family: var(--r-font-head);
  font-size: 1.15rem;
  font-weight: 400;
  margin: 0;
  color: var(--r-ivory);
}
.r-principle__body {
  color: var(--r-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* -------------------------------------------------------------
   15d. Services page — capability blocks + stack strip
   ------------------------------------------------------------- */
.r-cap-block {
  display: grid;
  gap: 2rem;
  padding: clamp(2.5rem, 2rem + 1.5vw, 3.5rem) 0;
  border-top: 1px solid rgba(var(--r-ivory-rgb), 0.08);
}
@media (min-width: 820px) {
  .r-cap-block {
    grid-template-columns: 220px 1fr;
    gap: 3rem;
  }
}
.r-cap-block--alt {
  background: var(--r-surface-low);
  padding-inline: clamp(1.5rem, 1rem + 1vw, 2rem);
  margin-inline: calc(-1 * clamp(1.5rem, 1rem + 1vw, 2rem));
}
.r-cap-block__meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.r-cap-block__num {
  font-family: var(--r-font-head);
  font-size: clamp(2rem, 1.6rem + 1.4vw, 2.8rem);
  font-weight: 300;
  line-height: 1;
  color: var(--r-accent);
  margin: 0;
}
.r-cap-block__tag {
  font-family: var(--r-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--r-muted-low);
  margin: 0;
  max-width: 24ch;
}
.r-cap-block__body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.r-cap-block__title {
  font-family: var(--r-font-head);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
}
.r-cap-block__lead {
  color: var(--r-ivory-dim);
  font-size: 1rem;
  line-height: 1.55;
  margin: 0;
  max-width: 58ch;
}
.r-cap-block__dl {
  display: grid;
  gap: 0.6rem 1.5rem;
  margin: 0.5rem 0 0;
  grid-template-columns: 1fr;
}
@media (min-width: 560px) {
  .r-cap-block__dl {
    grid-template-columns: 10rem 1fr;
    align-items: baseline;
  }
}
.r-cap-block__dl dt {
  font-family: var(--r-font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--r-muted-low);
}
.r-cap-block__dl dd {
  color: var(--r-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 0.5rem;
  max-width: 52ch;
}

.r-stack {
  margin: clamp(4rem, 3rem + 2vw, 6rem) 0 0;
  padding-top: clamp(2.5rem, 2rem + 1vw, 3.5rem);
  border-top: 1px solid rgba(var(--r-ivory-rgb), 0.08);
}
.r-stack__head {
  max-width: 60ch;
  margin-bottom: 2rem;
}
.r-stack__lede {
  color: var(--r-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.r-stack__grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.25rem 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .r-stack__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.r-stack__grid li {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 1rem;
  align-items: baseline;
}
.r-stack__label {
  font-family: var(--r-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--r-muted-low);
}
.r-stack__items {
  color: var(--r-ivory-dim);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* -------------------------------------------------------------
   15e. How-we-work page — phase blocks + illustrative timeline
   ------------------------------------------------------------- */
.r-phase {
  padding: clamp(2.5rem, 2rem + 1.5vw, 3.5rem) 0;
  border-top: 1px solid rgba(var(--r-ivory-rgb), 0.08);
}
.r-phase--alt {
  background: var(--r-surface-low);
  padding-inline: clamp(1.5rem, 1rem + 1vw, 2rem);
  margin-inline: calc(-1 * clamp(1.5rem, 1rem + 1vw, 2rem));
}
.r-phase__head {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}
.r-phase__coord {
  font-family: var(--r-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  color: var(--r-accent);
  margin: 0;
}
.r-phase__title {
  font-family: var(--r-font-head);
  font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.4rem);
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
}
.r-phase__body {
  max-width: 66ch;
}
.r-phase__lead {
  color: var(--r-ivory);
  font-size: 1.1rem;
  line-height: 1.5;
  margin: 0 0 1em;
  font-family: var(--r-font-head);
  font-style: italic;
  font-weight: 400;
}
.r-phase__body > p {
  color: var(--r-ivory-dim);
  line-height: 1.62;
  margin: 0 0 1em;
}
.r-phase__dl {
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.5rem 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .r-phase__dl {
    grid-template-columns: 12rem 1fr;
    align-items: baseline;
  }
}
.r-phase__dl dt {
  font-family: var(--r-font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--r-muted-low);
}
.r-phase__dl dd {
  color: var(--r-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 0.6rem;
}

.r-engagement {
  margin: clamp(4rem, 3rem + 2vw, 6rem) 0 0;
  padding-top: clamp(2.5rem, 2rem + 1vw, 3.5rem);
  border-top: 1px solid rgba(var(--r-ivory-rgb), 0.08);
}
.r-engagement__head {
  max-width: 60ch;
  margin-bottom: 2rem;
}
.r-engagement__lede {
  font-family: var(--r-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--r-muted-low);
  margin-top: 0.75rem;
}
.r-engagement__timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}
.r-engagement__timeline li {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 1rem 1.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(var(--r-ivory-rgb), 0.05);
}
.r-engagement__timeline li:first-child {
  border-top: none;
}
@media (max-width: 560px) {
  .r-engagement__timeline li {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
.r-engagement__week {
  font-family: var(--r-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--r-accent);
  margin: 0;
}
.r-engagement__entry {
  color: var(--r-ivory-dim);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}

/* -------------------------------------------------------------
   15f. Case files listing + detail
   ------------------------------------------------------------- */
.r-case-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1px;
  background: rgba(var(--r-ivory-rgb), 0.04);
}
@media (min-width: 820px) {
  .r-case-list {
    grid-template-columns: repeat(2, 1fr);
  }
}
.r-case-list__item {
  background: var(--r-surface);
}

.r-case-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.75rem, 1.25rem + 1vw, 2.25rem);
  height: 100%;
  text-decoration: none;
  color: inherit;
  transition: background var(--r-dur-2) var(--r-ease);
}
.r-case-card:hover {
  background: var(--r-surface-container);
}
.r-case-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-family: var(--r-font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--r-muted-low);
}
.r-case-card__id {
  color: var(--r-accent);
}
.r-case-card__status {
  margin-left: auto;
}
.r-case-card__title {
  font-family: var(--r-font-head);
  font-size: clamp(1.3rem, 1.1rem + 0.5vw, 1.55rem);
  font-weight: 400;
  line-height: 1.2;
  max-width: 32ch;
  margin: 0;
  color: var(--r-ivory);
}
.r-case-card__tagline {
  color: var(--r-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
  max-width: 46ch;
}
.r-case-card__tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.r-case-card__tag {
  font-family: var(--r-font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--r-muted);
  padding: 0.3rem 0.55rem;
  background: rgba(var(--r-ivory-rgb), 0.04);
}
.r-case-card__read {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 0;
  font-family: var(--r-font-body);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--r-accent);
}
.r-case-card__read svg {
  width: 14px;
  height: 14px;
  transition: transform var(--r-dur-1) var(--r-ease);
}
.r-case-card:hover .r-case-card__read svg {
  transform: translateX(3px);
}

.r-case-note {
  margin-top: 3rem;
  max-width: 65ch;
}

/* Case file detail */
.r-case-detail__header {
  max-width: 760px;
  margin-bottom: 2.5rem;
}
.r-case-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-family: var(--r-font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--r-muted-low);
  margin: 0 0 1.25rem;
}
.r-case-detail__id {
  color: var(--r-accent);
}
.r-case-detail__tagline {
  font-family: var(--r-font-head);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--r-ivory-dim);
  max-width: 56ch;
  margin: 0.75rem 0 0;
}
.r-case-detail__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  margin: 2rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(var(--r-ivory-rgb), 0.08);
}
.r-case-detail__facts > div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.r-case-detail__facts dt {
  font-family: var(--r-font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--r-muted-low);
}
.r-case-detail__facts dd {
  color: var(--r-ivory-dim);
  font-size: 0.9rem;
  margin: 0;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.r-case-detail__block {
  padding: 1.75rem 0;
  border-top: 1px solid rgba(var(--r-ivory-rgb), 0.06);
  max-width: 68ch;
}
.r-case-detail__label {
  font-family: var(--r-font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--r-muted-low);
  margin: 0 0 0.5rem;
}
.r-case-detail__body {
  color: var(--r-ivory-dim);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0;
}
.r-case-detail__body + .r-case-detail__body {
  margin-top: 0.9rem;
}
.r-case-detail__reflection {
  margin: 2.5rem 0 0;
  padding: 1.75rem 0 0;
  border-top: 1px solid rgba(var(--r-ivory-rgb), 0.08);
  max-width: 68ch;
}
.r-case-detail__blockquote {
  font-family: var(--r-font-head);
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--r-ivory);
  margin: 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--r-accent);
}
.r-case-detail__nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(var(--r-ivory-rgb), 0.08);
  flex-wrap: wrap;
}
.r-case-detail__nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--r-font-body);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--r-muted);
  transition: color var(--r-dur-1) var(--r-ease);
}
.r-case-detail__nav-link:hover {
  color: var(--r-ivory);
}
.r-case-detail__nav-link svg {
  width: 14px;
  height: 14px;
}
.r-case-detail__nav-link--primary {
  color: var(--r-accent);
}

/* -------------------------------------------------------------
   15g. Contact page — intake steps + FAQ
   ------------------------------------------------------------- */
.r-steps {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  max-width: 68ch;
}
.r-steps li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0.75rem 1.25rem;
  padding: 1rem 0;
  border-top: 1px solid rgba(var(--r-ivory-rgb), 0.05);
}
.r-steps li:first-child {
  border-top: none;
  padding-top: 0;
}
@media (max-width: 560px) {
  .r-steps li {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}
.r-steps__num {
  font-family: var(--r-font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--r-accent);
  margin: 0;
}
.r-steps__body {
  color: var(--r-ivory-dim);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}
.r-steps__body strong {
  color: var(--r-ivory);
  font-weight: 500;
}

.r-faq {
  max-width: 68ch;
  margin-top: 3rem;
}
.r-faq__list {
  display: grid;
  gap: 1.5rem;
}
.r-faq__item {
  padding: 1.25rem 0;
  border-top: 1px solid rgba(var(--r-ivory-rgb), 0.08);
}
.r-faq__q {
  font-family: var(--r-font-head);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--r-ivory);
  margin: 0 0 0.5rem;
}
.r-faq__a {
  color: var(--r-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* -------------------------------------------------------------
   16. Reduced motion + motion intensity
   ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .r-reveal {
    opacity: 1;
    transform: none;
  }
}

/* Quieter: no ambient animation, reveals still fire once on enter. */
html[data-motion="quiet"] .r-signal__sweep,
html[data-motion="quiet"] .r-signal__frame,
html[data-motion="quiet"] .r-signal__thread,
html[data-motion="quiet"] .r-signal__mark,
html[data-motion="quiet"] .r-pulse {
  animation: none;
}

/* Off: treat as reduced-motion globally. */
html[data-motion="off"] *,
html[data-motion="off"] *::before,
html[data-motion="off"] *::after {
  animation: none !important;
  transition: none !important;
}
html[data-motion="off"] .r-reveal {
  opacity: 1;
  transform: none;
}

/* -------------------------------------------------------------
   17. Responsive tuning
   ------------------------------------------------------------- */
@media (max-width: 560px) {
  .r-hero__meta-row dt {
    min-width: 5rem;
  }
  .r-hero__ctas {
    gap: 1rem;
  }
  .r-hero__ctas .r-btn {
    width: 100%;
    justify-content: center;
  }
  .r-hero__ctas .r-btn--tertiary {
    width: auto;
    justify-content: flex-start;
    padding-inline: 0;
  }
}
