/* ============================================================
   Resonans — mega menu, inner pages (service / about / stories /
   contact) and site motion. Composes ONLY --rz-* tokens.
   Motion follows the DS lock: --rz-ease, 140/240/480ms,
   entrance-only reveals, no bounces, no loops.
   ============================================================ */

/* ---- Mega menu (Siege-style: industries + Start/Grow/Scale) ---- */
.nav-mega { position: static; }
.nav-mega__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-size: var(--rz-text-sm);
  font-weight: var(--rz-w-medium);
  color: var(--rz-text);
  opacity: 0.85;
  cursor: pointer;
  transition: color var(--rz-dur-fast) var(--rz-ease),
    opacity var(--rz-dur-fast) var(--rz-ease),
    transform var(--rz-dur-press) var(--rz-ease);
}
.nav-mega.is-open .nav-mega__trigger { color: var(--rz-accent); opacity: 1; }
.nav-mega__trigger:active { transform: scale(var(--rz-press-scale)); }
/* Purpose: state indication — the chevron mirrors the panel's open state.
   It rides the same 180ms as the panel so the two read as one gesture. */
.nav-mega__chevron { transition: transform var(--rz-dur-menu) var(--rz-ease); }
.nav-mega.is-open .nav-mega__chevron { transform: rotate(180deg); }
/* Purpose: spatial consistency — the panel grows down out of the header edge it
   is anchored to, so `transform-origin: top` rather than centre. The menu is
   opened tens of times a session: --rz-dur-menu on the way in, and the exit is
   quicker still, because a menu you have finished with should get out of the way. */
.nav-mega__panel {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  transform-origin: top center;
  background: var(--rz-bg);
  border-bottom: 1px solid var(--rz-border);
  box-shadow: var(--rz-shadow-lg);
  opacity: 0;
  transform: translateY(-8px) scaleY(0.98);
  visibility: hidden;
  transition: opacity var(--rz-dur-fast) var(--rz-ease),
    transform var(--rz-dur-fast) var(--rz-ease),
    visibility 0s linear var(--rz-dur-fast);
}
.nav-mega.is-open .nav-mega__panel {
  opacity: 1;
  transform: translateY(0) scaleY(1);
  visibility: visible;
  transition: opacity var(--rz-dur-menu) var(--rz-ease), transform var(--rz-dur-menu) var(--rz-ease);
}
.nav-mega__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr);
  gap: var(--rz-space-8);
  padding-top: var(--rz-space-7);
  padding-bottom: var(--rz-space-7);
}
@media (max-width: 900px) { .nav-mega__inner { grid-template-columns: 1fr; } }
.nav-mega__heading { display: block; margin-bottom: var(--rz-space-4); color: var(--rz-text-muted); }
[dir="rtl"] .nav-mega__heading { letter-spacing: 0; }
.nav-mega__industries {
  background: var(--rz-surface);
  border-radius: var(--rz-radius-md);
  padding: var(--rz-space-5);
}
.nav-mega__industry-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--rz-space-2) var(--rz-space-4);
}
.nav-mega__industry-grid a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.4rem;
  border-radius: var(--rz-radius-sm);
  font-size: var(--rz-text-sm);
  font-weight: var(--rz-w-semibold);
  color: var(--rz-text);
  text-decoration: none;
  transition: background-color var(--rz-dur-fast) var(--rz-ease), color var(--rz-dur-fast) var(--rz-ease);
}
.nav-mega__industry-grid a:hover { background: var(--rz-bg); color: var(--rz-accent); }
.nav-mega__industry-grid svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav-mega__groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--rz-space-6);
}
.nav-mega__group ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--rz-space-2); }
.nav-mega__group a {
  font-size: var(--rz-text-sm);
  font-weight: var(--rz-w-semibold);
  color: var(--rz-text);
  text-decoration: none;
  transition: color var(--rz-dur-fast) var(--rz-ease);
}
.nav-mega__group a:hover { color: var(--rz-accent); }

/* ---- Shared page hero (service / about / stories / contact) ---- */
.page-hero {
  position: relative;
  background: var(--rz-black);
  color: var(--rz-white);
  overflow: hidden;
}
.page-hero__glow { position: absolute; inset: 0; background: var(--rz-glow-radial); opacity: 0.85; }
.page-hero__half-circle {
  position: absolute;
  background: var(--rz-neutral-900);
  inset-inline-end: -120px;
  top: -80px;
  width: 240px;
  height: 480px;
  border-radius: 480px 0 0 480px;
}
[dir="rtl"] .page-hero__half-circle { border-radius: 0 480px 480px 0; }
.page-hero__inner { position: relative; padding-top: var(--rz-space-9); padding-bottom: var(--rz-space-9); }
.page-hero__title {
  margin-top: var(--rz-space-4);
  font-size: var(--rz-h1);           /* 48px — legacy interior page title */
  font-weight: var(--rz-w-bold);
  line-height: var(--rz-h1-lh);
  letter-spacing: var(--rz-h1-track);
  max-width: 22ch;
}
[dir="rtl"] .page-hero__title { letter-spacing: 0; }
.page-hero__sub { margin-top: var(--rz-space-4); max-width: 52ch; font-size: var(--rz-text-lg); color: var(--rz-text-muted); }

.section-title {
  font-size: var(--rz-h2);           /* 32px — legacy h2 */
  font-weight: var(--rz-w-bold);
  letter-spacing: var(--rz-h2-track);
}
[dir="rtl"] .section-title { letter-spacing: 0; }

/* ---- Service pages ---- */
.service-overview { padding-top: var(--rz-space-9); padding-bottom: var(--rz-space-6); }
.service-overview p { max-width: 62ch; font-size: var(--rz-text-lg); color: var(--rz-text-muted); }
.deliverables { background: var(--rz-surface); margin-top: var(--rz-space-6); }
.deliverables__inner { padding-top: var(--rz-space-9); padding-bottom: var(--rz-space-9); }
.deliverables__grid {
  margin-top: var(--rz-space-7);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: var(--rz-space-5);
}
.deliverable {
  background: var(--rz-bg);
  border: 1px solid var(--rz-border);
  border-radius: var(--rz-radius-md);
  padding: var(--rz-space-6);
}
.deliverable__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--rz-radius-md);
  background: var(--rz-surface);
  color: var(--rz-red);
  flex-shrink: 0;
}
.deliverable__icon svg { width: 24px; height: 24px; }
.deliverable h3 { margin-top: var(--rz-space-4); font-size: var(--rz-text-base); font-weight: var(--rz-w-bold); }
.deliverable p { margin-top: var(--rz-space-2); font-size: var(--rz-text-sm); color: var(--rz-text-muted); }

.related { padding-top: var(--rz-space-9); padding-bottom: var(--rz-space-9); }
.related__grid {
  margin-top: var(--rz-space-6);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: var(--rz-space-5);
}
.related-card {
  position: relative;
  display: block;
  border: 1px solid var(--rz-border);
  border-radius: var(--rz-radius-md);
  padding: var(--rz-space-6);
  color: var(--rz-text);
  text-decoration: none;
  transition: transform var(--rz-dur) var(--rz-ease), border-color var(--rz-dur) var(--rz-ease);
}
.related-card:hover { border-color: var(--rz-border-strong); color: var(--rz-text); }
.related-card__icon { display: inline-flex; color: var(--rz-red); }
.related-card__icon svg { width: 26px; height: 26px; }
.related-card__title { display: block; margin-top: var(--rz-space-3); font-weight: var(--rz-w-bold); }
.related-card__desc { display: block; margin-top: var(--rz-space-1); font-size: var(--rz-text-sm); color: var(--rz-text-muted); }

/* Service items on home are links now */
.service-group__item { display: block; color: inherit; text-decoration: none; }
.service-group__item:hover .service-group__item-title { color: var(--rz-accent); }
.service-group__item-title { transition: color var(--rz-dur-fast) var(--rz-ease); }

/* ---- Proprietary framework (ResonanceMap) — dark hero band ---- */
.methodology {
  position: relative;
  margin-top: var(--rz-space-6);
  background: var(--rz-black);
  color: var(--rz-white);
  overflow: hidden;
}
.methodology__glow { position: absolute; inset: 0; background: var(--rz-glow-radial); opacity: 0.7; }
.methodology__half-circle {
  position: absolute;
  background: var(--rz-neutral-900);
  inset-inline-start: -140px;
  bottom: -160px;
  width: 260px;
  height: 520px;
  border-radius: 0 520px 520px 0;
}
[dir="rtl"] .methodology__half-circle { border-radius: 520px 0 0 520px; }
.methodology__inner { position: relative; padding-top: var(--rz-space-10); padding-bottom: var(--rz-space-10); }
.methodology__name {
  margin-top: var(--rz-space-4);
  font-size: var(--rz-text-4xl);
  font-weight: var(--rz-w-extrabold);
  letter-spacing: var(--rz-tracking-tight);
  color: var(--rz-white);
}
[dir="rtl"] .methodology__name { letter-spacing: 0; }
.methodology__headline {
  margin-top: var(--rz-space-3);
  max-width: 26ch;
  font-size: var(--rz-h2);
  font-weight: var(--rz-w-bold);
  line-height: var(--rz-h2-lh);
  letter-spacing: var(--rz-h2-track);
  color: var(--rz-white);
}
[dir="rtl"] .methodology__headline { letter-spacing: 0; line-height: 1.35; }
.methodology__lede {
  margin-top: var(--rz-space-4);
  max-width: 58ch;
  font-size: var(--rz-text-lg);
  color: var(--rz-text-muted);
}

/* Step cards — restrained: red lives in the number badge + icon only */
.methodology__steps {
  margin-top: var(--rz-space-9);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--rz-space-5);
}
.methodology__step {
  display: flex;
  flex-direction: column;
  background: var(--rz-neutral-950);
  border: 1px solid var(--rz-neutral-800);
  border-radius: var(--rz-radius-md);
  padding: var(--rz-space-6);
  transition: transform var(--rz-dur) var(--rz-ease), border-color var(--rz-dur) var(--rz-ease);
}
.methodology__step:hover { border-color: var(--rz-neutral-700); }
.methodology__step-head { display: flex; align-items: center; justify-content: space-between; gap: var(--rz-space-3); }
.methodology__step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--rz-radius-sm);
  background: var(--rz-red);
  color: var(--rz-white);
  font-size: var(--rz-text-sm);
  font-weight: var(--rz-w-bold);
  flex-shrink: 0;
}
.methodology__step-icon { display: inline-flex; color: var(--rz-red-bright); }
.methodology__step-icon svg { width: 24px; height: 24px; }
.methodology__step-title { margin-top: var(--rz-space-5); font-size: var(--rz-text-lg); font-weight: var(--rz-w-bold); color: var(--rz-white); }
.methodology__step-desc { margin-top: var(--rz-space-2); font-size: var(--rz-text-sm); color: var(--rz-text-muted); }
.methodology__tags { margin-top: var(--rz-space-5); display: flex; flex-wrap: wrap; gap: var(--rz-space-2); }
.methodology__tag {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: var(--rz-radius-pill);
  border: 1px solid var(--rz-neutral-800);
  background: var(--rz-neutral-900);
  font-size: var(--rz-text-sm);
  color: var(--rz-text-muted);
}

/* Outcome — the payoff card at the foot of the framework */
.methodology__outcome {
  margin-top: var(--rz-space-8);
  display: flex;
  align-items: center;
  gap: var(--rz-space-6);
  background: var(--rz-neutral-950);
  border: 1px solid var(--rz-neutral-800);
  border-radius: var(--rz-radius-md);
  padding: var(--rz-space-7);
}
.methodology__outcome-mark {
  display: inline-block;
  width: 64px;
  height: 64px;
  background: var(--rz-white);
  border-radius: var(--rz-radius-md);
  overflow: hidden;
  line-height: 0;
  flex-shrink: 0;
}
.methodology__outcome-mark svg { width: 64px; height: 64px; }
.methodology__outcome-label { display: block; color: var(--rz-red-bright); }
[dir="rtl"] .methodology__outcome-label { letter-spacing: 0; }
.methodology__outcome-title {
  margin-top: var(--rz-space-2);
  font-size: var(--rz-text-2xl);
  font-weight: var(--rz-w-bold);
  letter-spacing: var(--rz-tracking-tight);
  color: var(--rz-white);
}
[dir="rtl"] .methodology__outcome-title { letter-spacing: 0; }
.methodology__outcome-desc { margin-top: var(--rz-space-3); max-width: 68ch; font-size: var(--rz-text-base); color: var(--rz-text-muted); }
@media (max-width: 620px) {
  .methodology__outcome { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   Selected work — sample-project gallery on a service page
   (web design). Each card is a browser-framed screenshot with
   the brand's signature red hue-wash on hover; the placeholder
   card is a red-glow-on-black motif panel.
   ============================================================ */
.samples { padding-top: var(--rz-space-10); padding-bottom: var(--rz-space-9); }
.samples__title {
  margin-top: var(--rz-space-4);
  font-size: var(--rz-text-2xl);
  font-weight: var(--rz-w-medium);
  letter-spacing: var(--rz-tracking-tight);
  max-width: 24ch;
}
[dir="rtl"] .samples__title { letter-spacing: 0; }
.samples__lede { margin-top: var(--rz-space-3); max-width: 56ch; font-size: var(--rz-text-lg); color: var(--rz-text-muted); }
.samples__grid {
  margin-top: var(--rz-space-8);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: var(--rz-space-6);
}
/* The card no longer clips its own overflow — the rounded top corners are carried
   by the browser bar instead, which leaves room for the hover-lift shadow layer
   (see the motion block at the foot of this file) to render outside the card. */
.sample-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--rz-bg);
  color: var(--rz-text);
  border: 1px solid var(--rz-border);
  border-radius: var(--rz-radius-md);
  text-decoration: none;
  transition: transform var(--rz-dur) var(--rz-ease),
    border-color var(--rz-dur) var(--rz-ease);
}
.sample-card:hover {
  border-color: var(--rz-border-strong);
  color: var(--rz-text);
}

/* Screenshot media. Deliberately NO drawn browser chrome — the shot is real
   work, and a fake frame around it makes it read as a mockup. The card's own
   rounded top edge is the only framing it gets. */
.sample-card__media { display: block; }
.sample-card__shot {
  position: relative;
  display: block;
  aspect-ratio: 1440 / 900;
  overflow: hidden;
  border-radius: var(--rz-radius-md) var(--rz-radius-md) 0 0;
  background: var(--rz-neutral-950);
}
.sample-card__shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform var(--rz-dur) var(--rz-ease);
}
/* Signature red hue-wash — subtle, appears on hover */
.sample-card__wash {
  position: absolute;
  inset: 0;
  background: var(--rz-red);
  mix-blend-mode: hue;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--rz-dur) var(--rz-ease);
}

/* Branded placeholder panel (no screenshot) — red glow on black */
.sample-card__brand {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--rz-space-2);
  background-color: var(--rz-black);
  overflow: hidden;
}
/* Card-scale glow: red bleeds from the top corner, black stays dominant
   (the section-scale --rz-glow-radial is sized for full-width bands). */
.sample-card__brand-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(85% 72% at 82% -8%, var(--rz-red-glow) 0%, transparent 58%);
}
/* Mirror the glow in RTL so it stays with the flipped half-circle motif */
[dir="rtl"] .sample-card__brand-glow {
  background: radial-gradient(85% 72% at 18% -8%, var(--rz-red-glow) 0%, transparent 58%);
}
.sample-card__brand-half {
  position: absolute;
  top: -40px;
  inset-inline-end: -60px;
  width: 130px;
  height: 260px;
  background: var(--rz-neutral-900);
  border-radius: 260px 0 0 260px;
}
[dir="rtl"] .sample-card__brand-half { border-radius: 0 260px 260px 0; }
.sample-card__brand-mark {
  position: relative;
  font-family: var(--rz-font-sans);
  font-size: var(--rz-text-5xl);
  font-weight: var(--rz-w-extrabold);
  letter-spacing: var(--rz-tracking-tight);
  color: var(--rz-white);
  line-height: 1;
}
.sample-card__brand-domain {
  position: relative;
  font-size: var(--rz-text-sm);
  font-weight: var(--rz-w-medium);
  color: var(--rz-red-bright);
  direction: ltr;
}

/* Body */
.sample-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--rz-space-2);
  padding: var(--rz-space-6);
  border-top: 1px solid var(--rz-border);
}
.sample-card__kind {
  font-size: var(--rz-text-micro);
  font-weight: var(--rz-w-semibold);
  letter-spacing: var(--rz-tracking-label);
  text-transform: uppercase;
  color: var(--rz-red);
}
[dir="rtl"] .sample-card__kind { letter-spacing: 0; }
.sample-card__name { font-size: var(--rz-text-xl); font-weight: var(--rz-w-bold); }
/* The live domain, promoted out of the old fake URL pill into real typography.
   `isolate` stops the bidi algorithm dragging Persian punctuation into it. */
.sample-card__domain {
  font-size: var(--rz-text-sm);
  color: var(--rz-text-muted);
  direction: ltr;
  unicode-bidi: isolate;
}
[dir="rtl"] .sample-card__domain { text-align: right; }
.sample-card__desc { font-size: var(--rz-text-sm); line-height: var(--rz-leading-normal); color: var(--rz-text-muted); }
[dir="rtl"] .sample-card__desc { line-height: 1.8; }
.sample-card__cta {
  margin-top: var(--rz-space-3);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--rz-text-sm);
  font-weight: var(--rz-w-semibold);
  color: var(--rz-accent);
}
.sample-card__cta svg { width: 16px; height: 16px; transition: transform var(--rz-dur) var(--rz-ease); }

/* ============================================================
   Customer stories — portfolio grid (layout modeled on
   siegemedia.com/work) + the case-study detail page.
   ============================================================ */

/* ---- Work: filter toolbar ---- */
.work { padding-top: var(--rz-space-8); padding-bottom: var(--rz-space-9); }
.work-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--rz-space-5);
  padding-bottom: var(--rz-space-6);
  margin-bottom: var(--rz-space-7);
  border-bottom: 1px solid var(--rz-border);
}
.work-filters { display: flex; flex-wrap: wrap; gap: var(--rz-space-6); }
.work-filters__group { display: flex; flex-direction: column; gap: var(--rz-space-3); }
.work-filters__label { color: var(--rz-text-muted); }
[dir="rtl"] .work-filters__label { letter-spacing: 0; }
.work-filters__chips { display: flex; flex-wrap: wrap; gap: var(--rz-space-2); }
.work-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  font-family: inherit;
  font-size: var(--rz-text-sm);
  font-weight: var(--rz-w-medium);
  color: var(--rz-text-muted);
  background: var(--rz-bg);
  border: 1px solid var(--rz-border);
  border-radius: var(--rz-radius-pill);
  cursor: pointer;
  transition: transform var(--rz-dur-press) var(--rz-ease),
    background-color var(--rz-dur-fast) var(--rz-ease),
    color var(--rz-dur-fast) var(--rz-ease),
    border-color var(--rz-dur-fast) var(--rz-ease);
}
.work-chip:hover { color: var(--rz-text); border-color: var(--rz-border-strong); }
.work-chip:active { transform: scale(var(--rz-press-scale)); }
.work-chip.is-active {
  color: var(--rz-on-accent);
  background: var(--rz-accent);
  border-color: var(--rz-accent);
}
.work-toolbar__meta { display: flex; align-items: center; gap: var(--rz-space-4); }
.work-count { font-size: var(--rz-text-sm); font-weight: var(--rz-w-medium); color: var(--rz-text-muted); white-space: nowrap; }
/* A `display` on the class outranks the UA's `[hidden] { display: none }`, so the
   Reset button and the empty-state line have to opt back out explicitly — without
   this, Reset shows on first paint with no filter active. */
.work-reset[hidden],
.work-empty[hidden] { display: none; }
.work-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  font-family: inherit;
  font-size: var(--rz-text-sm);
  font-weight: var(--rz-w-medium);
  color: var(--rz-text-muted);
  background: none;
  border: 1px solid var(--rz-border);
  border-radius: var(--rz-radius-pill);
  cursor: pointer;
  transition: color var(--rz-dur-fast) var(--rz-ease),
    border-color var(--rz-dur-fast) var(--rz-ease),
    transform var(--rz-dur-press) var(--rz-ease);
}
.work-reset:hover { color: var(--rz-accent); border-color: var(--rz-accent); }
.work-reset:active { transform: scale(var(--rz-press-scale)); }
.work-reset svg { width: 14px; height: 14px; }

/* ---- Work: grid + cards ---- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: var(--rz-space-5);
}
.work-card {
  display: flex;
  border: 1px solid var(--rz-border);
  border-radius: var(--rz-radius-md);
  padding: var(--rz-space-7);
  background: var(--rz-bg);
  color: var(--rz-text);
  text-decoration: none;
  transition: transform var(--rz-dur) var(--rz-ease),
    opacity var(--rz-dur) var(--rz-ease),
    border-color var(--rz-dur) var(--rz-ease);
}
.work-card[hidden] { display: none; }
.work-card--link { cursor: pointer; }
.work-card--link:hover { border-color: var(--rz-border-strong); color: var(--rz-text); }
.work-card--link:active { transform: scale(var(--rz-press-scale-lg)); }
.work-card__main { display: flex; flex-direction: column; gap: var(--rz-space-4); width: 100%; }
.work-card__client { font-size: var(--rz-text-sm); font-weight: var(--rz-w-bold); color: var(--rz-red); }
.work-card__metric { display: flex; flex-direction: column; gap: var(--rz-space-1); }
.work-card__metric-value {
  font-size: var(--rz-text-4xl);
  font-weight: var(--rz-w-bold);
  line-height: 1;
  letter-spacing: var(--rz-tracking-tight);
  font-variant-numeric: tabular-nums;
}
[dir="rtl"] .work-card__metric-value { letter-spacing: 0; }
.work-card__metric-value--accent { color: var(--rz-red); }
.work-card__metric-label { font-size: var(--rz-text-sm); color: var(--rz-text-muted); }
.work-card__title { font-size: var(--rz-text-xl); font-weight: var(--rz-w-bold); line-height: 1.3; }
[dir="rtl"] .work-card__title { line-height: 1.5; }
.work-card__foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--rz-space-3); padding-top: var(--rz-space-2); }
.work-card__industry { color: var(--rz-text-muted); }
[dir="rtl"] .work-card__industry { letter-spacing: 0; }
.work-card__chips { display: flex; flex-wrap: wrap; gap: var(--rz-space-2); }
.work-card__chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  font-size: var(--rz-text-sm);
  color: var(--rz-text-muted);
  background: var(--rz-surface);
  border-radius: var(--rz-radius-pill);
}
.work-card__read {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: var(--rz-space-2);
  font-size: var(--rz-text-sm);
  font-weight: var(--rz-w-semibold);
  color: var(--rz-accent);
}
.work-card__read svg { width: 16px; height: 16px; transition: transform var(--rz-dur) var(--rz-ease); }
[dir="rtl"] .work-card__read svg { transform: scaleX(-1); }

/* Featured card — full-width dark band with a loud metric */
.work-card--featured {
  grid-column: 1 / -1;
  position: relative;
  background: var(--rz-neutral-950);
  background-image: var(--rz-glow-radial);
  border-color: var(--rz-neutral-800);
  padding: var(--rz-space-8);
}
.work-card--featured:hover { border-color: var(--rz-neutral-700); }
.work-card__badge {
  position: absolute;
  inset-block-start: var(--rz-space-6);
  inset-inline-end: var(--rz-space-6);
  color: var(--rz-red-bright);
}
[dir="rtl"] .work-card__badge { letter-spacing: 0; }
.work-card--featured .work-card__main { max-width: 62ch; gap: var(--rz-space-5); }
.work-card--featured .work-card__metric-value { font-size: var(--rz-text-5xl); color: var(--rz-red-bright); }
.work-card--featured .work-card__title { font-size: var(--rz-text-2xl); font-weight: var(--rz-w-extrabold); letter-spacing: var(--rz-tracking-tight); }
[dir="rtl"] .work-card--featured .work-card__title { letter-spacing: 0; }
.work-card--featured .work-card__chip { background: var(--rz-neutral-900); color: var(--rz-text-muted); }
.work-card--featured .work-card__read { color: var(--rz-red-bright); }

.work-empty {
  padding: var(--rz-space-9) 0;
  text-align: center;
  color: var(--rz-text-muted);
  font-size: var(--rz-text-lg);
}

/* ============================================================
   Case-study detail page
   ============================================================ */
.case-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: var(--rz-space-5);
  font-size: var(--rz-text-sm);
  font-weight: var(--rz-w-medium);
  color: var(--rz-text-muted);
  text-decoration: none;
  transition: color var(--rz-dur-fast) var(--rz-ease);
}
.case-hero__back:hover { color: var(--rz-white); }
.case-hero__back svg { width: 16px; height: 16px; }
[dir="rtl"] .case-hero__back svg { transform: scaleX(-1); }
.case-meta {
  margin: var(--rz-space-7) 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--rz-space-7);
}
.case-meta__item { display: flex; flex-direction: column; gap: var(--rz-space-2); }
.case-meta__item dt {
  font-size: var(--rz-text-micro);
  font-weight: var(--rz-w-semibold);
  letter-spacing: var(--rz-tracking-label);
  text-transform: uppercase;
  color: var(--rz-text-muted);
}
[dir="rtl"] .case-meta__item dt { letter-spacing: 0; }
.case-meta__item dd { margin: 0; font-size: var(--rz-text-base); font-weight: var(--rz-w-medium); color: var(--rz-white); }
.case-meta__item--skills dd { display: flex; flex-wrap: wrap; gap: var(--rz-space-2); }
.case-meta__skill {
  display: inline-flex;
  padding: 0.25rem 0.7rem;
  font-size: var(--rz-text-sm);
  font-weight: var(--rz-w-medium);
  color: var(--rz-text-muted);
  border: 1px solid var(--rz-neutral-700);
  border-radius: var(--rz-radius-pill);
}

.case-lede { padding-top: var(--rz-space-9); padding-bottom: var(--rz-space-6); }
.case-lede p { max-width: 66ch; font-size: var(--rz-text-xl); font-weight: var(--rz-w-medium); line-height: 1.5; color: var(--rz-text); }
[dir="rtl"] .case-lede p { line-height: 1.8; }

/* Shared section head */
.case-head { margin-bottom: var(--rz-space-7); }
.case-head__sub,
.case-head__note { margin-top: var(--rz-space-3); max-width: 60ch; font-size: var(--rz-text-lg); color: var(--rz-text-muted); }
.rz-dark .case-head__sub { color: var(--rz-text-muted); }

/* Results */
.case-results { background: var(--rz-surface); }
.case-results__inner { padding-top: var(--rz-space-9); padding-bottom: var(--rz-space-9); }
.case-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: var(--rz-space-7);
}
.case-stat { display: flex; flex-direction: column; gap: var(--rz-space-2); }
.case-stat__value { font-size: var(--rz-text-5xl); font-variant-numeric: tabular-nums; }
.case-stat__from { font-size: var(--rz-text-sm); font-weight: var(--rz-w-medium); color: var(--rz-text-muted); }
.case-stat__label { font-size: var(--rz-text-base); font-weight: var(--rz-w-medium); color: var(--rz-text-muted); }

/* Competitor landscape table */
.case-landscape { padding-top: var(--rz-space-9); padding-bottom: var(--rz-space-8); }
.case-table-wrap { overflow-x: auto; border: 1px solid var(--rz-border); border-radius: var(--rz-radius-md); }
.case-table { width: 100%; border-collapse: collapse; font-size: var(--rz-text-base); }
.case-table th,
.case-table td { padding: var(--rz-space-4) var(--rz-space-6); text-align: center; border-bottom: 1px solid var(--rz-border); white-space: nowrap; }
.case-table thead th {
  font-size: var(--rz-text-label);
  font-weight: var(--rz-w-semibold);
  letter-spacing: var(--rz-tracking-label);
  text-transform: uppercase;
  color: var(--rz-text-muted);
  background: var(--rz-surface);
}
[dir="rtl"] .case-table thead th { letter-spacing: 0; }
.case-table th:first-child,
.case-table td:first-child { text-align: start; }
.case-table tbody tr:last-child td { border-bottom: 0; }
.case-table__domain { font-weight: var(--rz-w-medium); }
.case-table__after { font-weight: var(--rz-w-bold); }
.case-table__row--you {
  background: color-mix(in srgb, var(--rz-red) 6%, transparent);
}
/* The 6% red row tint plus a bold red domain already says "this row is you".
   A thick coloured side-stripe on top of that is the 2018-SaaS card tell. */
.case-table__row--you .case-table__domain { color: var(--rz-red); font-weight: var(--rz-w-bold); }
.case-table__row--you .case-table__after { color: var(--rz-red); }
.case-note { margin-top: var(--rz-space-4); font-size: var(--rz-text-sm); color: var(--rz-text-muted); }

/* Keyword growth (dark) */
.case-keywords { position: relative; background: var(--rz-black); color: var(--rz-white); overflow: hidden; }
.case-keywords__glow { position: absolute; inset: 0; background: var(--rz-glow-radial); opacity: 0.6; }
.case-keywords__inner { position: relative; padding-top: var(--rz-space-10); padding-bottom: var(--rz-space-10); }
.case-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: var(--rz-space-5);
}
.case-tier {
  display: flex;
  flex-direction: column;
  gap: var(--rz-space-3);
  background: var(--rz-neutral-950);
  border: 1px solid var(--rz-neutral-800);
  border-radius: var(--rz-radius-md);
  padding: var(--rz-space-6);
  transition: transform var(--rz-dur) var(--rz-ease), border-color var(--rz-dur) var(--rz-ease);
}
.case-tier:hover { border-color: var(--rz-neutral-700); }
.case-tier__label { color: var(--rz-red-bright); }
[dir="rtl"] .case-tier__label { letter-spacing: 0; }
.case-tier__value { font-size: var(--rz-text-4xl); font-weight: var(--rz-w-bold); line-height: 1; color: var(--rz-white); }
/* Proportional bar — --share is this tier's percentage of the widest tier,
   computed in content.py from the tier's own value. */
.case-tier__bar {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: var(--rz-radius-pill);
  background: var(--rz-neutral-800);
  overflow: hidden;
}
.case-tier__bar-fill {
  display: block;
  width: var(--share, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--rz-red-bright);
}
.case-tier__delta { display: flex; align-items: center; justify-content: space-between; gap: var(--rz-space-3); font-size: var(--rz-text-sm); }
.case-tier__new { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--rz-red-bright); font-weight: var(--rz-w-semibold); }
.case-tier__new svg { width: 15px; height: 15px; }
.case-tier__lost { color: var(--rz-text-muted); }
.case-verdict {
  margin-top: var(--rz-space-8);
  display: flex;
  align-items: center;
  gap: var(--rz-space-5);
  flex-wrap: wrap;
}
.case-verdict__up { display: inline-flex; align-items: center; gap: 0.5rem; font-size: var(--rz-text-2xl); font-weight: var(--rz-w-bold); color: var(--rz-red-bright); }
.case-verdict__up svg { width: 24px; height: 24px; }
.case-verdict__sep { width: 1px; height: 28px; background: var(--rz-neutral-800); }
.case-verdict__down { font-size: var(--rz-text-lg); color: var(--rz-text-muted); }

/* Sites migrated */
.case-sites { padding-top: var(--rz-space-9); padding-bottom: var(--rz-space-8); }
.case-sites__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  gap: var(--rz-space-4);
}
.case-site {
  display: flex;
  align-items: center;
  gap: var(--rz-space-3);
  border: 1px solid var(--rz-border);
  border-radius: var(--rz-radius-md);
  padding: var(--rz-space-5);
  background: var(--rz-bg);
  position: relative;
  transition: transform var(--rz-dur) var(--rz-ease), border-color var(--rz-dur) var(--rz-ease);
}
.case-site:hover { border-color: var(--rz-border-strong); }
.case-site__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--rz-radius-sm);
  background: var(--rz-surface);
  color: var(--rz-red);
  flex-shrink: 0;
}
.case-site__icon svg { width: 20px; height: 20px; }
.case-site__domain { font-size: var(--rz-text-base); font-weight: var(--rz-w-bold); direction: ltr; }
.case-site--more { justify-content: center; border-style: dashed; }
.case-site--more .case-site__domain { font-weight: var(--rz-w-medium); color: var(--rz-text-muted); direction: inherit; }

/* Strategic approach */
.case-approach { padding-top: var(--rz-space-9); padding-bottom: var(--rz-space-9); }
.case-step__tags { margin-top: var(--rz-space-4); display: flex; flex-wrap: wrap; gap: var(--rz-space-2); }
.case-step__tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  font-size: var(--rz-text-sm);
  color: var(--rz-text-muted);
  background: var(--rz-surface);
  border-radius: var(--rz-radius-pill);
}
.case-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--rz-space-5);
}
.case-step {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rz-border);
  border-radius: var(--rz-radius-md);
  padding: var(--rz-space-6);
  position: relative;
  transition: transform var(--rz-dur) var(--rz-ease), border-color var(--rz-dur) var(--rz-ease);
}
.case-step:hover { border-color: var(--rz-border-strong); }
.case-step__head { display: flex; align-items: center; justify-content: space-between; gap: var(--rz-space-3); }
.case-step__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--rz-radius-md);
  background: var(--rz-surface);
  color: var(--rz-red);
}
.case-step__icon svg { width: 24px; height: 24px; }
/* The step number is content, not a watermark — --rz-neutral-300 put it at
   1.4:1 on white, effectively invisible. --rz-neutral-500 clears AA. */
.case-step__num { font-size: var(--rz-text-2xl); font-weight: var(--rz-w-bold); color: var(--rz-neutral-500); }
.case-step__title { margin-top: var(--rz-space-5); font-size: var(--rz-text-lg); font-weight: var(--rz-w-bold); }
.case-step__desc { margin-top: var(--rz-space-2); font-size: var(--rz-text-sm); color: var(--rz-text-muted); }
[dir="rtl"] .case-step__desc { line-height: 1.8; }

/* Evidence gallery */
.case-evidence { background: var(--rz-surface); }
.case-evidence > .rz-container { padding-top: var(--rz-space-9); padding-bottom: var(--rz-space-9); }
.case-shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: var(--rz-space-6);
}
.case-shot {
  margin: 0;
  background: var(--rz-bg);
  border: 1px solid var(--rz-border);
  border-radius: var(--rz-radius-md);
  padding: var(--rz-space-4);
}
.case-shot img { display: block; width: 100%; height: auto; border-radius: var(--rz-radius-sm); }
.case-shot__caption { margin-top: var(--rz-space-3); font-size: var(--rz-text-sm); color: var(--rz-text-muted); }
.case-shot--pending {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--rz-space-3);
  min-height: 220px;
  text-align: center;
  border-style: dashed;
  border-color: var(--rz-border-strong);
}
.case-shot--pending::before {
  content: "";
  width: 40px;
  height: 40px;
  border-radius: var(--rz-radius-sm);
  background: var(--rz-surface);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='3' width='18' height='18' rx='2'/><circle cx='9' cy='9' r='2'/><path d='m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21'/></svg>") center / 24px no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='3' width='18' height='18' rx='2'/><circle cx='9' cy='9' r='2'/><path d='m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21'/></svg>") center / 24px no-repeat;
  /* A masked placeholder glyph, not text — --rz-text-subtle is the right weight
     here precisely because it should recede. */
  background-color: var(--rz-text-subtle);
}
.case-shot--pending .case-shot__caption { margin-top: 0; max-width: 40ch; }

/* Closing */
.case-closing { padding-top: var(--rz-space-9); padding-bottom: var(--rz-space-10); }
/* Marked with the brand's own half-circle rather than a coloured side-stripe —
   the stripe is a named anti-pattern and the motif is the device this system
   already owns for "this is the point". */
.case-closing p {
  position: relative;
  max-width: 60ch;
  font-size: var(--rz-text-2xl);
  font-weight: var(--rz-w-medium);
  line-height: 1.3;
  letter-spacing: var(--rz-tracking-tight);
  padding-inline-start: var(--rz-space-6);
}
.case-closing p::before {
  content: "";
  position: absolute;
  inset-block-start: 0.45em;
  inset-inline-start: 0;
  width: 10px;
  height: 20px;
  background: var(--rz-red);
  border-radius: 20px 0 0 20px;
}
[dir="ltr"] .case-closing p::before { border-radius: 0 20px 20px 0; }
[dir="rtl"] .case-closing p { letter-spacing: 0; line-height: 1.6; }

@media (max-width: 620px) {
  .work-card--featured { padding: var(--rz-space-7); }
  .case-meta { gap: var(--rz-space-5); }
}

/* ---- Contact ---- */
.contact { padding-top: var(--rz-space-9); padding-bottom: var(--rz-space-10); }
.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: var(--rz-space-9);
  align-items: start;
}
@media (max-width: 860px) { .contact__grid { grid-template-columns: 1fr; } }
.contact__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--rz-space-5); }
@media (max-width: 560px) { .contact__row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: var(--rz-space-2); margin-bottom: var(--rz-space-5); }
.field label { font-size: var(--rz-text-label); font-weight: var(--rz-w-semibold); }
.field input,
.field textarea {
  width: 100%;
  padding: 0.85rem 1.1rem;
  font-family: inherit;
  font-size: var(--rz-text-base);
  color: var(--rz-text);
  background: var(--rz-bg);
  border: 1px solid var(--rz-border);
  border-radius: var(--rz-radius-sm);
  outline: none;
  /* Focus feedback is a response to a direct action — it lands fast (--rz-dur-fast)
     rather than at the 240ms "aesthetic" duration used for hover and reveals. */
  transition: border-color var(--rz-dur-fast) var(--rz-ease), box-shadow var(--rz-dur-fast) var(--rz-ease);
}
.field textarea { resize: vertical; line-height: var(--rz-leading-normal); }
.field input:focus,
.field textarea:focus { border-color: var(--rz-accent); box-shadow: 0 0 0 3px var(--rz-focus-ring); }
.field .is-invalid { border-color: var(--rz-red); }
.contact__success {
  display: flex;
  gap: var(--rz-space-4);
  align-items: center;
  background: var(--rz-surface);
  border-radius: var(--rz-radius-md);
  padding: var(--rz-space-7);
}
.contact__success-mark { width: 48px; height: 48px; border-radius: var(--rz-radius-sm); overflow: hidden; background: var(--rz-white); flex-shrink: 0; }
.contact__success h2 { font-size: var(--rz-text-xl); font-weight: var(--rz-w-bold); }
.contact__success p { margin-top: 0.3rem; color: var(--rz-text-muted); }
.contact__info { display: flex; flex-direction: column; gap: var(--rz-space-5); }
.contact__info-item { display: flex; gap: var(--rz-space-3); align-items: center; }
.contact__info-label { display: block; font-size: var(--rz-text-micro); }
[dir="rtl"] .contact__info-label { letter-spacing: 0; }
.contact__info-value { font-weight: var(--rz-w-medium); }
.contact__offices { display: flex; flex-direction: column; gap: var(--rz-space-4); }
.contact__offices-list {
  display: flex;
  flex-direction: column;
  gap: var(--rz-space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Addresses run to two lines, so the pin sits at the top rather than centred */
.contact__office { display: flex; gap: var(--rz-space-3); align-items: flex-start; }
.contact__office-city { display: block; font-weight: var(--rz-w-semibold); }
.contact__office-address {
  margin-top: var(--rz-space-1);
  font-style: normal;
  font-size: var(--rz-text-sm);
  line-height: 1.6;
  color: var(--rz-text-muted);
}

/* ---- About page ---- */
/* Hero statement is a full sentence, so it sits a step below the display size */
.page-hero__title--statement {
  font-size: var(--rz-text-3xl);
  font-weight: var(--rz-w-medium);
  line-height: 1.12;
  max-width: 30ch;
}
[dir="rtl"] .page-hero__title--statement { line-height: 1.4; }

.about-story { padding-top: var(--rz-space-9); padding-bottom: var(--rz-space-6); }
.about-story__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr);
  gap: var(--rz-space-8);
  align-items: start;
}
@media (max-width: 860px) {
  .about-story__grid { grid-template-columns: 1fr; gap: var(--rz-space-5); }
}
.about-story__title {
  margin-top: var(--rz-space-4);
  font-size: var(--rz-text-2xl);
  font-weight: var(--rz-w-medium);
  letter-spacing: var(--rz-tracking-tight);
}
[dir="rtl"] .about-story__title { letter-spacing: 0; }
.about-story__meta {
  margin-top: var(--rz-space-6);
  display: flex;
  align-items: center;
  gap: var(--rz-space-2);
  color: var(--rz-text-muted);
  font-size: var(--rz-text-sm);
}
.about-story__meta svg { width: 18px; height: 18px; color: var(--rz-red); flex-shrink: 0; }
.about-story__body p { max-width: 60ch; font-size: var(--rz-text-lg); color: var(--rz-text-muted); }
.about-story__body p + p { margin-top: var(--rz-space-4); }

/* Stats band */
.about-stats { border-top: 1px solid var(--rz-border); background: var(--rz-surface); }
.about-stats__inner { padding-top: var(--rz-space-9); padding-bottom: var(--rz-space-9); }
.stats--flush { padding-top: var(--rz-space-6); padding-bottom: 0; }

/* ---- Leadership / team cards ---- */
.team__inner { padding-top: var(--rz-space-10); padding-bottom: var(--rz-space-10); }
.team__title {
  margin-top: var(--rz-space-4);
  font-size: var(--rz-text-2xl);
  font-weight: var(--rz-w-medium);
  letter-spacing: var(--rz-tracking-tight);
  max-width: 24ch;
}
[dir="rtl"] .team__title { letter-spacing: 0; }
.team__lede { margin-top: var(--rz-space-3); max-width: 56ch; font-size: var(--rz-text-lg); color: var(--rz-text-muted); }
.team-grid {
  margin-top: var(--rz-space-8);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--rz-space-6);
}
/* Like .sample-card: the media child carries the rounded top corners, so the card
   itself doesn't need overflow:hidden and can render its hover shadow layer. */
.team-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--rz-bg);
  color: var(--rz-text);
  border: 1px solid var(--rz-border);
  border-radius: var(--rz-radius-md);
  transition: transform var(--rz-dur) var(--rz-ease);
}
.team-card__media {
  position: relative;
  height: 380px;
  overflow: hidden;
  border-radius: var(--rz-radius-md) var(--rz-radius-md) 0 0;
  background-color: var(--rz-neutral-950);
  background-image: var(--rz-glow-radial);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
/* Signature half-circle motif, tucked into the top corner behind the portrait */
.team-card__half-circle {
  position: absolute;
  top: -60px;
  inset-inline-end: -70px;
  width: 150px;
  height: 300px;
  background: var(--rz-neutral-800);
  border-radius: 300px 0 0 300px;
}
[dir="rtl"] .team-card__half-circle { border-radius: 0 300px 300px 0; }
/* Faded monogram fallback — visible if the portrait file is missing */
.team-card__monogram {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9rem;
  font-weight: var(--rz-w-extrabold);
  letter-spacing: var(--rz-tracking-tight);
  color: var(--rz-watermark);
  pointer-events: none;
}
.team-card__photo {
  position: relative;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(var(--rz-shadow-portrait));
}
.team-card__body { padding: var(--rz-space-6); border-top: 1px solid var(--rz-border); }
.team-card__role { display: block; color: var(--rz-red-bright); }
[dir="rtl"] .team-card__role { letter-spacing: 0; }
.team-card__name { margin-top: var(--rz-space-2); font-size: var(--rz-text-xl); font-weight: var(--rz-w-bold); }
.team-card__bio {
  margin-top: var(--rz-space-3);
  font-size: var(--rz-text-sm);
  line-height: var(--rz-leading-normal);
  color: var(--rz-text-muted);
}
.team-card__link {
  margin-top: var(--rz-space-5);
  display: inline-flex;
  align-items: center;
  gap: var(--rz-space-2);
  font-size: var(--rz-text-sm);
  font-weight: var(--rz-w-semibold);
  color: var(--rz-text);
  text-decoration: none;
  transition: color var(--rz-dur) var(--rz-ease);
}
.team-card__link:hover { color: var(--rz-red-bright); }
.team-card__link svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ============================================================
   MOTION
   House rules (applied throughout this file):
   · Only `transform` and `opacity` are animated — never `box-shadow`,
     `background`, `width`/`height` or other layout/paint properties.
   · Hover motion is gated behind a real pointer; on touch, `:hover`
     sticks after a tap and leaves cards stranded mid-lift.
   · Everything obeys `prefers-reduced-motion`.
   · Above-the-fold hero copy is NEVER reveal-gated — it must paint on
     first frame (LCP), so the heroes carry no [data-reveal].
   ============================================================ */

/* ---- Hover lift: shadow layer ----
   The lift shadow rides on a pseudo-element whose opacity we animate, so the
   hover costs one composited layer instead of a full repaint every frame.
   `border-radius: inherit` keeps it flush with each card's corners. */
.service-group::after,
.related-card::after,
.sample-card::after,
.work-card--link::after,
.result-card::after,
.case-site::after,
.case-step::after,
.team-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--rz-shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--rz-dur) var(--rz-ease);
}

/* ---- Hover motion (pointer devices only) ---- */
@media (hover: hover) and (pointer: fine) {
  .service-group:hover::after,
  .related-card:hover::after,
  .sample-card:hover::after,
  .work-card--link:hover::after,
  .result-card:hover::after,
  .case-site:hover::after,
  .case-step:hover::after,
  .team-card:hover::after { opacity: 1; }

  .service-group:hover,
  .related-card:hover,
  .sample-card:hover,
  .work-card--link:hover,
  .result-card:hover,
  .team-card:hover { transform: translateY(-4px); }

  .methodology__step:hover,
  .case-tier:hover,
  .case-site:hover,
  .case-step:hover { transform: translateY(-3px); }

  /* Sample card: the shot pushes in slightly and the brand wash blooms. */
  .sample-card:hover .sample-card__shot img { transform: scale(1.03); }
  .sample-card:hover .sample-card__wash { opacity: 0.22; }
  .sample-card:hover .sample-card__cta svg { transform: translate(3px, -3px); }
  [dir="rtl"] .sample-card:hover .sample-card__cta svg { transform: translate(-3px, -3px); }

  /* Arrows lean toward the direction of travel (mirrored under RTL). */
  .work-card--link:hover .work-card__read svg { transform: translateX(4px); }
  [dir="rtl"] .work-card--link:hover .work-card__read svg { transform: scaleX(-1) translateX(4px); }
  .result-card:hover .result-card__read svg { transform: translateX(4px); }
  [dir="rtl"] .result-card:hover .result-card__read svg { transform: scaleX(-1) translateX(4px); }
}

/* ---- Work filter: cards fade out before they leave the grid ----
   motion.js drives .is-out, then sets [hidden] once the exit has played, so
   the grid never snaps items away mid-view. Specificity has to clear
   `html.js [data-reveal].is-in`, which these cards also carry. */
html.js .work-grid .work-card.is-out {
  opacity: 0;
  transform: scale(0.97);
  pointer-events: none;
}

/* ---- Entrance reveals (one-shot, staggered ~80ms) ----
   Hidden initial state is gated on html.js so content is never
   invisible without JavaScript. */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--rz-dur-slow) var(--rz-ease) var(--reveal-delay, 0ms),
    transform var(--rz-dur-slow) var(--rz-ease) var(--reveal-delay, 0ms);
}
html.js [data-reveal].is-in { opacity: 1; transform: translateY(0); }

/* ---- Reduced motion: no travel, no scale, no rotation — content still shows ---- */
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .nav-mega__panel,
  .nav-mega__chevron,
  .sample-card__shot img { transition: none; }
  .nav-mega.is-open .nav-mega__chevron { transform: none; }
  html.js .work-grid .work-card.is-out { transform: none; }
  .rz-btn:active,
  .work-chip:active,
  .work-card--link:active { transform: none; }
}
@media (prefers-reduced-motion: reduce) and (hover: hover) and (pointer: fine) {
  .service-group:hover,
  .related-card:hover,
  .sample-card:hover,
  .work-card--link:hover,
  .team-card:hover,
  .methodology__step:hover,
  .case-tier:hover,
  .case-site:hover,
  .case-step:hover { transform: none; }
  .sample-card:hover .sample-card__shot img,
  .sample-card:hover .sample-card__cta svg,
  .work-card--link:hover .work-card__read svg { transform: none; }
  [dir="rtl"] .sample-card:hover .sample-card__cta svg { transform: none; }
  [dir="rtl"] .work-card--link:hover .work-card__read svg { transform: scaleX(-1); }
}

/* ---- Mobile heading step-down ----
   The DS ships the owner-approved ramp on the ELEMENTS (tokens/base.css:
   h1 → --rz-h2, h2 → --rz-h3 below 760px), but every heading here re-declares
   its size on a CLASS, which outranks the element rule — so interior titles
   stayed at 48px inside a 280px box. Repeat the step explicitly. */
@media (max-width: 760px) {
  .page-hero__title {
    font-size: var(--rz-h2);
    line-height: var(--rz-h2-lh);
    letter-spacing: var(--rz-h2-track);
  }
  .section-title,
  .methodology__headline {
    font-size: var(--rz-h3);
    line-height: var(--rz-h3-lh);
    letter-spacing: var(--rz-h3-track);
  }
  [dir="rtl"] .page-hero__title,
  [dir="rtl"] .section-title,
  [dir="rtl"] .methodology__headline { letter-spacing: 0; }
}
