/*
 * Lofts Studio global interface layer.
 * Loaded last so one deliberate system wins over legacy page-level styling.
 */

:root {
  --bg: #f4f0e9;
  --bg-soft: #ebe5db;
  --surface: #fbfaf7;
  --ink: #171411;
  --ink-soft: #4f4942;
  --muted: #625a52;
  --muted-2: #625a52;
  --line: #d7cec2;
  --line-soft: #e6ded4;
  --accent: #a9432d;
  --accent-deep: #843322;
  --accent-soft: #ead2c9;
  --lofts-white: #f4f0e9;
  --lofts-paper: #ebe5db;
  --lofts-panel: #e3dbd0;
  --lofts-lime: #c7b8a8;
  --lofts-blue: #a9432d;
  --lofts-sky: #d8c9ba;
  --lofts-coral: #a9432d;
  --r-sm: 2px;
  --r-md: 4px;
  --r-lg: 6px;
  --r-xl: 8px;
  --shadow-soft: 0 18px 50px -42px rgba(23, 20, 17, .38);
  --shadow-card: 0 30px 80px -56px rgba(23, 20, 17, .48);
  --page-gutter: clamp(1.25rem, 3vw, 3rem);
  --section-space: clamp(4.75rem, 8vw, 8.5rem);
}

html[data-theme="dark"] {
  --bg: #11100e;
  --bg-soft: #191714;
  --surface: #1f1c19;
  --ink: #f2ede5;
  --ink-soft: #c8c0b6;
  --muted: #b8afa6;
  --muted-2: #b8afa6;
  --line: #39342f;
  --line-soft: #2b2824;
  --accent: #db7358;
  --accent-deep: #ef8b70;
  --accent-soft: #3a211b;
  --lofts-white: #11100e;
  --lofts-paper: #191714;
  --lofts-panel: #211e1a;
  --lofts-lime: #8f8275;
  --lofts-blue: #db7358;
  --lofts-sky: #5c5046;
  --lofts-coral: #db7358;
}

html,
body {
  background: var(--bg);
  color: var(--ink);
}

body {
  font-size: 16px;
  line-height: 1.58;
  text-rendering: optimizeLegibility;
}

.site-footer .footer-logo-italic {
  color: #f4f0e9 !important;
}

html[data-theme="dark"] .site-footer .footer-label,
html[data-theme="dark"] .home-page .home-footer .footer-label {
  color: #d18769 !important;
}

.home-page .public-proof-summary,
.home-page .public-proof-summary p {
  color: #fffaf4 !important;
}

.home-page .public-proof-summary p {
  opacity: .9;
}

html[data-theme="dark"] .home-page .public-proof-summary,
html[data-theme="dark"] .home-page .public-proof-summary p {
  color: #24120c !important;
}

html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .site-footer .footer-newsletter-form button,
html[data-theme="dark"] .home-page .home-footer .footer-newsletter-form button {
  color: #171411 !important;
}

html[data-theme="dark"] .home-page .site-footer .footer-newsletter-form button,
html[data-theme="dark"] .home-page .btn-primary {
  background: #f08a69 !important;
}

html[data-theme="dark"] .home-page #approach .font-serif,
html[data-theme="dark"] .home-page .contact-grid .italic-serif,
html[data-theme="dark"] .home-page .contact-grid a[href^="mailto:"] {
  color: #f08a69 !important;
}

.home-page .home-compare-section .eyebrow {
  color: #4f4942;
}

.post-prose [style*="background: var(--accent-soft)"][style*="color: var(--accent)"] {
  color: var(--accent-deep) !important;
}

html[data-theme="dark"] .diagnostic-page .audit-resource-links a {
  border-color: var(--line) !important;
  background: var(--surface) !important;
  color: var(--ink) !important;
}

html body * {
  letter-spacing: 0 !important;
}

h1,
h2,
h3,
h4,
.h-display,
.h-1,
.h-2,
.h-3,
.bignum {
  font-family: var(--font-display) !important;
  font-weight: 400 !important;
  text-wrap: balance;
}

.h-display {
  font-size: clamp(3.4rem, 6.4vw, 7rem);
  line-height: .91;
}

.h-1 {
  font-size: clamp(2.65rem, 4.8vw, 5.25rem);
  line-height: .96;
}

.h-2 {
  font-size: clamp(2rem, 3.25vw, 3.45rem);
  line-height: 1;
}

.lead {
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.eyebrow,
.hero-stat-lbl,
.work-card-meta,
.footer-label,
.footer-now-label,
.footer-now-tag {
  font-size: .72rem;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  width: 2rem;
  height: 1px;
  background: currentColor;
}

.italic-serif {
  color: var(--accent);
  font-family: var(--font-editorial) !important;
  font-style: italic;
  font-weight: 400 !important;
}

.container {
  width: 100%;
  max-width: 1480px;
  padding-inline: var(--page-gutter);
}

.nav-bar {
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  box-shadow: none;
}

.nav-inner {
  max-width: 1480px;
  padding-inline: var(--page-gutter);
}

.diagnostic-page {
  padding-top: 76px;
}

.nav-link,
.nav-actions .btn,
.nav-bar > .nav-inner > .btn,
.btn,
.btn-link {
  font-weight: 400 !important;
}

.btn,
.btn-primary,
.btn-audit,
.btn-ghost {
  min-height: 46px;
  border-radius: 3px;
}

.btn-primary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
}

.btn-primary:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.btn-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--surface);
}

/* Flagship page hero ------------------------------------------------------ */

.page-hero {
  position: relative;
  min-height: auto;
  padding: clamp(1.6rem, 2.4vw, 2.75rem) 0 clamp(2.1rem, 3vw, 3.25rem) !important;
  overflow: clip;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: 0 0 clamp(1.35rem, 2vw, 2rem);
  color: var(--muted);
  font-size: .82rem;
}

.page-breadcrumb a {
  color: var(--muted);
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, .72fr);
  gap: clamp(3rem, 6vw, 7rem);
  align-items: center;
}

.page-hero-copy {
  min-width: 0;
}

.page-hero-copy .h-display {
  max-width: 11.75ch;
  margin: 1.2rem 0 0;
  font-size: clamp(4rem, 5.5vw, 6.8rem);
  line-height: .9;
}

.page-hero-copy .lead {
  max-width: 51ch;
  margin: clamp(1.5rem, 2.25vw, 2.1rem) 0 0;
}

.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.8rem;
}

.page-hero-proof {
  position: relative;
  min-width: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.page-hero-browser {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.page-hero-browser-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: .7rem;
  height: 34px;
  padding: 0 .75rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: .68rem;
}

.page-hero-browser-dots {
  display: flex;
  gap: .25rem;
}

.page-hero-browser-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line);
}

.page-hero-browser-dots span:first-child {
  background: var(--accent);
}

.page-hero-browser img {
  display: block;
  width: 100%;
  height: calc(100% - 34px);
  object-fit: cover;
  object-position: top center;
}

.page-hero-proof-caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: .85rem;
  color: var(--muted);
  font-size: .76rem;
}

.page-hero-proof-caption strong {
  color: var(--ink);
  font-weight: 400;
}

.page-hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(1.75rem, 2.5vw, 2.5rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.page-hero-metric {
  min-width: 0;
  padding: 1.25rem clamp(.75rem, 2vw, 1.5rem);
  border-right: 1px solid var(--line);
}

.page-hero-metric:first-child {
  padding-left: 0;
}

.page-hero-metric:last-child {
  border-right: 0;
}

.page-hero-metric strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.5vw, 2.6rem);
  font-weight: 400;
  line-height: 1;
}

.page-hero-metric span {
  display: block;
  margin-top: .45rem;
  color: var(--muted);
  font-size: .68rem;
  text-transform: uppercase;
}

/* Legacy hero normalization ---------------------------------------------- */

body:not(.home-page):not(.portfolio-page):not(.diagnostic-page):not(.booking-page):not(.agency-command-page) section.paper:first-of-type:not(.page-hero) {
  display: block;
  min-height: auto;
  padding: clamp(1.65rem, 2.75vw, 3rem) 0 clamp(2.5rem, 3.6vw, 4rem) !important;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

body:not(.home-page):not(.portfolio-page):not(.diagnostic-page):not(.booking-page):not(.agency-command-page) section.paper:first-of-type:not(.page-hero) > .container::before {
  width: 3.25rem;
  height: 2px;
  margin-bottom: 2rem;
  background: var(--accent);
}

body:not(.home-page):not(.portfolio-page):not(.diagnostic-page):not(.booking-page):not(.agency-command-page) section.paper:first-of-type:not(.page-hero) .container > [data-reveal]:has(> .h-display):has(> .lead) {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .7fr);
  grid-template-rows: auto auto auto;
  gap: 0 clamp(3rem, 7vw, 7.5rem);
  align-items: start;
  max-width: none !important;
}

body:not(.home-page):not(.portfolio-page):not(.diagnostic-page):not(.booking-page):not(.agency-command-page) section.paper:first-of-type:not(.page-hero) .container > [data-reveal]:has(> .h-display):has(> .lead) > .eyebrow {
  grid-column: 1;
  grid-row: 1;
  margin-bottom: 1.25rem;
}

body:not(.home-page):not(.portfolio-page):not(.diagnostic-page):not(.booking-page):not(.agency-command-page) section.paper:first-of-type:not(.page-hero) .container > [data-reveal]:has(> .h-display):has(> .lead) > .h-display {
  grid-column: 1;
  grid-row: 2 / span 2;
  max-width: 13ch !important;
  margin: 0 !important;
  font-size: 4rem !important;
  line-height: .94 !important;
}

body:not(.home-page):not(.portfolio-page):not(.diagnostic-page):not(.booking-page):not(.agency-command-page) section.paper:first-of-type:not(.page-hero) .container > [data-reveal]:has(> .h-display):has(> .lead) > .lead {
  grid-column: 2;
  grid-row: 2;
  max-width: 52ch !important;
  margin: .2rem 0 0 !important;
}

body:not(.home-page):not(.portfolio-page):not(.diagnostic-page):not(.booking-page):not(.agency-command-page) section.paper:first-of-type:not(.page-hero) .container > [data-reveal]:has(> .h-display):has(> .lead) > .answer-box,
body:not(.home-page):not(.portfolio-page):not(.diagnostic-page):not(.booking-page):not(.agency-command-page) section.paper:first-of-type:not(.page-hero) .container > [data-reveal]:has(> .h-display):has(> .lead) > div:last-child:not(.answer-box) {
  grid-column: 2;
  grid-row: 3;
  margin: 1.5rem 0 0 !important;
}

body:not(.home-page):not(.portfolio-page):not(.diagnostic-page):not(.booking-page):not(.agency-command-page) section.paper:first-of-type:not(.page-hero) > .container > .answer-box {
  width: 100%;
  max-width: none !important;
  margin: clamp(1.75rem, 2.5vw, 2.5rem) 0 0 !important;
  padding: clamp(1.15rem, 2vw, 1.75rem) clamp(1.25rem, 2.4vw, 2rem) !important;
}

.answer-box {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: color-mix(in srgb, var(--bg-soft) 78%, transparent);
}

/* Page-family hero alignment --------------------------------------------- */

.portfolio-page .portfolio-archive-hero,
body.portfolio-page section.paper.portfolio-archive-hero:first-of-type {
  min-height: auto;
  padding: clamp(1.75rem, 2.8vw, 3.1rem) 0 clamp(2.35rem, 3.5vw, 3.5rem) !important;
  background: var(--bg);
}

.portfolio-page .portfolio-hero-shell {
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, .65fr);
  gap: 1rem clamp(3rem, 7vw, 7.5rem);
  align-items: end;
}

.portfolio-page .portfolio-hero-shell .h-display,
body.portfolio-page section.paper.portfolio-archive-hero:first-of-type .h-display {
  max-width: 12ch !important;
  font-size: 4rem !important;
  line-height: .9 !important;
}

.portfolio-page .portfolio-hero-lead {
  max-width: 48ch;
  padding: 0 0 .6rem;
  font-size: 1.12rem;
}

.portfolio-page .portfolio-hero-stats {
  width: 100%;
  margin-top: clamp(2.5rem, 4vw, 4rem);
}

.portfolio-page .portfolio-hero-stats .hero-stat {
  min-height: 108px;
  background: transparent !important;
}

.portfolio-page .pf-filter-bar {
  position: sticky;
  top: var(--nav-h, 76px) !important;
  z-index: 55;
  background: var(--bg) !important;
  border: 0 !important;
  border-top: 1px solid var(--line) !important;
  border-bottom: 1px solid var(--line) !important;
  box-shadow: 0 14px 30px -28px color-mix(in srgb, var(--ink) 48%, transparent) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.portfolio-page .nav-bar.scrolled {
  min-height: var(--nav-h, 76px);
  background: var(--bg) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.portfolio-page .pf-filter-shell {
  overflow-x: auto;
  padding-block: .35rem !important;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
}

.portfolio-page .pf-filter-shell::-webkit-scrollbar {
  display: none;
}

.portfolio-page .pf-filter-row {
  display: flex;
  width: max-content;
  min-width: 100%;
  align-items: center;
  gap: .42rem;
  white-space: nowrap;
}

.portfolio-page .pf-filter-label,
.portfolio-page .pf-filter-count {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: .62rem;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.portfolio-page .pf-filter-label {
  margin-right: .28rem;
}

.portfolio-page .pf-filter-count {
  margin-left: auto;
  padding-left: 1rem;
}

.portfolio-page .filter-group {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: .3rem;
  flex-wrap: nowrap !important;
}

.portfolio-page .pf-filter-divider {
  width: 1px;
  height: 18px;
  margin-inline: .35rem;
  flex: 0 0 auto;
  background: var(--line);
}

.portfolio-page .filter-btn {
  min-height: 34px;
  padding: .42rem .7rem;
  border-radius: 4px;
  transition: background-color 200ms ease-out, color 200ms ease-out, border-color 200ms ease-out;
}

html[data-theme="dark"] .portfolio-page .pf-filter-bar {
  background: var(--bg) !important;
}

@media (max-width: 880px) {
  .portfolio-page .nav-bar.scrolled {
    min-height: 64px;
  }
}

.loc-hero,
.region-hero {
  min-height: auto;
  padding: clamp(1.65rem, 2.65vw, 3rem) 0 clamp(2.4rem, 3.8vw, 4rem) !important;
  border-bottom: 1px solid var(--line);
  background: var(--bg) !important;
}

.loc-hero-copy,
.region-hero .loc-hero-copy {
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .7fr);
  gap: 0 clamp(3rem, 7vw, 7.5rem);
  max-width: none;
}

.loc-hero-copy > .h-display,
.region-hero .loc-hero-copy > .h-display {
  max-width: 13ch;
  font-size: 4rem;
  line-height: .94;
}

.loc-hero-copy > .lead,
.region-hero .loc-hero-copy > .lead {
  max-width: 52ch;
}

.diagnostic-page .diagnostic-hero {
  min-height: auto;
  padding: clamp(4.5rem, 6vw, 6rem) 0 clamp(3.75rem, 5vw, 5rem) !important;
  border-bottom: 1px solid var(--line);
  background: var(--bg) !important;
}

.diagnostic-shell {
  grid-template-columns: minmax(0, 1fr) minmax(380px, .72fr);
  gap: clamp(3rem, 6vw, 7rem);
  align-items: center;
}

.diagnostic-copy .h-display,
.diagnostic-page .diagnostic-hero h1 {
  max-width: 11ch;
  font-size: 4rem;
  line-height: .94;
}

.diagnostic-panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.wordpress-malware-tool .diagnostic-hero {
  padding-top: clamp(3rem, 4.8vw, 4.25rem) !important;
}

.wordpress-malware-tool .diagnostic-shell {
  align-items: start;
}

.wordpress-malware-tool .diagnostic-copy .h-display,
.wordpress-malware-tool .diagnostic-hero h1 {
  max-width: 12ch;
}

/* Homepage: keep the proof-led composition, remove faux bold and drift. */

.home-page .hero-title {
  font-weight: 400 !important;
}

.home-page .hero-title-accent {
  color: var(--accent);
}

.home-page .stack-card-inner,
.home-page .stack-card {
  border-radius: 5px;
}

.home-page .stack-badge--br {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

html[data-theme="dark"] .home-page .stack-card-foot .scf-name {
  color: #f7f1e9 !important;
}

/* Motion: calm, stable, and never applied to the first screen. */

html.lofts-motion-ready [data-lofts-reveal] {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: opacity .58s cubic-bezier(.22, .75, .2, 1), transform .7s cubic-bezier(.22, .75, .2, 1);
  transition-delay: var(--lofts-reveal-delay, 0ms);
}

html.lofts-motion-ready [data-lofts-reveal].lofts-in-view {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

html.lofts-motion-ready main > section:first-child [data-lofts-reveal],
html.lofts-motion-ready .page-hero [data-lofts-reveal],
html.lofts-motion-ready .portfolio-archive-hero [data-lofts-reveal],
html.lofts-motion-ready .loc-hero [data-lofts-reveal],
html.lofts-motion-ready .region-hero [data-lofts-reveal],
html.lofts-motion-ready .diagnostic-hero [data-lofts-reveal] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

html.lofts-motion-ready main > section:first-child [data-reveal],
html.lofts-motion-ready .page-hero [data-reveal],
html.lofts-motion-ready .portfolio-archive-hero [data-reveal],
html.lofts-motion-ready .loc-hero [data-reveal],
html.lofts-motion-ready .region-hero [data-reveal],
html.lofts-motion-ready .diagnostic-hero [data-reveal] {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

@media (max-width: 1120px) {
  .page-hero-grid,
  .diagnostic-shell {
    grid-template-columns: minmax(0, 1fr) minmax(320px, .72fr);
    gap: 2.5rem;
  }

  .page-hero-copy .h-display {
    font-size: 3.35rem;
  }

  .page-hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-hero-metric:nth-child(2) {
    border-right: 0;
  }

  .page-hero-metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 820px) {
  .diagnostic-page {
    padding-top: 64px;
  }

  .page-hero-grid,
  .diagnostic-shell,
  .portfolio-page .portfolio-hero-shell,
  .loc-hero-copy,
  .region-hero .loc-hero-copy,
  body:not(.home-page):not(.portfolio-page):not(.diagnostic-page):not(.booking-page):not(.agency-command-page) section.paper:first-of-type:not(.page-hero) .container > [data-reveal]:has(> .h-display):has(> .lead) {
    display: block;
  }

  .page-hero-proof {
    margin-top: 2.75rem;
  }

  body:not(.home-page):not(.portfolio-page):not(.diagnostic-page):not(.booking-page):not(.agency-command-page) section.paper:first-of-type:not(.page-hero) .container > [data-reveal]:has(> .h-display):has(> .lead) > .lead,
  body:not(.home-page):not(.portfolio-page):not(.diagnostic-page):not(.booking-page):not(.agency-command-page) section.paper:first-of-type:not(.page-hero) .container > [data-reveal]:has(> .h-display):has(> .lead) > .answer-box,
  body:not(.home-page):not(.portfolio-page):not(.diagnostic-page):not(.booking-page):not(.agency-command-page) section.paper:first-of-type:not(.page-hero) .container > [data-reveal]:has(> .h-display):has(> .lead) > div:last-child:not(.answer-box),
  .loc-hero-copy > .lead,
  .region-hero .loc-hero-copy > .lead,
  .loc-hero-copy > .loc-actions,
  .region-hero .loc-hero-copy > .loc-actions {
    margin-top: 1.5rem !important;
  }

  .portfolio-page .portfolio-hero-lead {
    margin-top: 1.75rem;
  }
}

@media (max-width: 640px) {
  :root,
  .home-page {
    --page-gutter: 1rem;
  }

  .page-hero,
  body:not(.home-page):not(.portfolio-page):not(.diagnostic-page):not(.booking-page):not(.agency-command-page) section.paper:first-of-type:not(.page-hero),
  .loc-hero,
  .region-hero,
  .diagnostic-page .diagnostic-hero {
    padding: 3.75rem 0 3.25rem !important;
  }

  .page-breadcrumb {
    margin-bottom: 2.2rem;
  }

  .page-hero-copy .h-display,
  body:not(.home-page):not(.portfolio-page):not(.diagnostic-page):not(.booking-page):not(.agency-command-page) section.paper:first-of-type:not(.page-hero) .h-display,
  .portfolio-page .portfolio-hero-shell .h-display,
  body.portfolio-page section.paper.portfolio-archive-hero:first-of-type .h-display,
  .loc-hero-copy > .h-display,
  .region-hero .loc-hero-copy > .h-display,
  .diagnostic-copy .h-display,
  .diagnostic-page .diagnostic-hero h1 {
    max-width: none !important;
    font-size: 2.75rem !important;
    line-height: .92 !important;
  }

  .page-hero-copy .lead,
  .lead {
    font-size: 1.02rem;
    line-height: 1.55;
  }

  .page-hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .page-hero-actions .btn {
    min-width: 0;
    padding-inline: .75rem;
    text-align: center;
  }

  .page-hero-proof {
    margin-top: 2.5rem;
  }

  .page-hero-browser {
    aspect-ratio: 4 / 3;
  }

  .page-hero-proof-caption {
    flex-direction: column;
    gap: .25rem;
  }

  .page-hero-metrics {
    margin-top: 2.75rem;
  }

  .page-hero-metric {
    padding: 1rem .75rem;
  }

  .page-hero-metric:nth-child(odd) {
    padding-left: 0;
  }

  .page-hero-metric strong {
    font-size: 1.65rem;
  }

  .portfolio-page .portfolio-hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .portfolio-page .portfolio-hero-stats .hero-stat {
    min-height: 84px;
    padding: .85rem .6rem;
  }

  .portfolio-page .portfolio-hero-stats .bignum {
    font-size: clamp(1.55rem, 8vw, 2.1rem);
  }
}

/* Homepage hero composition ------------------------------------------------
   The service system is useful at first paint; WebGL progressively replaces
   this lightweight diagram instead of leaving half the hero empty. */
.home-page .hero-paper {
  overflow: clip;
}

.home-page .hero-scroll-scene {
  align-items: center;
  grid-template-columns: minmax(0, .94fr) minmax(460px, 1.06fr);
  gap: clamp(2rem, 4.5vw, 5rem);
  min-height: min(760px, calc(100svh - 76px));
  padding-top: clamp(3.75rem, 6.5vh, 5.75rem) !important;
  padding-bottom: clamp(3.5rem, 6vh, 5.25rem) !important;
}

.home-page .hero-main {
  grid-column: 1;
  grid-row: 1;
  align-self: center;
  max-width: 660px;
}

.home-page .hero-main > .eyebrow {
  width: 100%;
  margin: 0 0 clamp(2rem, 4vh, 3rem);
  white-space: nowrap;
}

.home-page .hero-main > .eyebrow::after {
  content: "";
  flex: 1;
  min-width: 2rem;
  height: 1px;
  margin-left: .5rem;
  background: var(--line);
}

.home-page .hero-system-signal {
  display: none !important;
}

.home-page .hero-title,
.home-service-world-ready .home-page .hero-title {
  width: min(100%, 650px);
  margin: 0 !important;
  font-size: clamp(3.8rem, 5.15vw, 5.35rem) !important;
  line-height: .94 !important;
}

.home-page .hero-title-accent {
  display: block;
  margin-top: .32em;
  font-size: .43em;
  line-height: 1.08;
}

.home-page .hero-lead,
.home-service-world-ready .home-page .hero-lead {
  width: min(100%, 45ch);
  margin-top: clamp(1.75rem, 3vh, 2.35rem) !important;
  color: var(--muted);
  font-size: clamp(1rem, 1.18vw, 1.12rem);
  line-height: 1.58;
}

.home-page .hero-actions,
.home-service-world-ready .home-page .hero-actions {
  margin-top: 1.5rem;
}

.home-page .home-service-world,
.home-service-world-ready .home-page .home-service-world {
  position: relative;
  display: block;
  grid-column: 2;
  grid-row: 1;
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  height: auto;
  min-height: clamp(540px, 44vw, 660px);
  margin: 0;
}

.home-page .hero-sidecar {
  display: none !important;
}

.home-service-world__fallback {
  position: absolute;
  z-index: 0;
  inset: 4rem 1.25rem 5.1rem;
  overflow: hidden;
  opacity: 1;
  pointer-events: none;
  transform: translateZ(0);
  transition: opacity var(--motion-fast) var(--motion-ease-out);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 88%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 88%, transparent);
}

.home-service-world.is-ready .home-service-world__fallback {
  opacity: .08;
}

.home-service-world__fallback::before {
  content: "";
  position: absolute;
  inset: 8% 4%;
  background-image:
    linear-gradient(color-mix(in srgb, var(--ink) 8%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--ink) 8%, transparent) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(circle, #000 26%, transparent 72%);
  mask-image: radial-gradient(circle, #000 26%, transparent 72%);
}

.home-service-world__orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
}

.home-service-world__orbit--one {
  width: 78%;
  height: 47%;
}

.home-service-world__orbit--two {
  width: 48%;
  height: 76%;
  transform: translate(-50%, -50%) rotate(47deg);
  opacity: .55;
}

.home-service-world__core,
.home-service-world__node {
  position: absolute;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 24px 60px -46px color-mix(in srgb, var(--ink) 58%, transparent);
}

.home-service-world__core {
  top: 50%;
  left: 50%;
  width: min(47%, 310px);
  min-width: 238px;
  padding: 1.55rem;
  transform: translate(-50%, -50%) rotate(-2deg);
}

.home-service-world__core span,
.home-service-world__node span {
  display: block;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: .58rem;
  font-weight: 500;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.home-service-world__core strong {
  display: block;
  margin: 1.15rem 0 1.35rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.25vw, 2.2rem);
  font-weight: 400;
  line-height: 1.02;
}

.home-service-world__core i {
  display: block;
  width: 74%;
  height: 3px;
  margin-top: .48rem;
  background: var(--line);
}

.home-service-world__core i:nth-of-type(2) {
  width: 52%;
}

.home-service-world__core i:nth-of-type(3) {
  width: 86%;
  background: var(--accent);
}

.home-service-world__node {
  min-width: 124px;
  padding: .75rem .85rem;
}

.home-service-world__node strong {
  display: block;
  margin-top: .3rem;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: .78rem;
  font-weight: 500;
  line-height: 1.2;
}

.home-service-world__node--commerce { top: 24%; left: 2%; transform: rotate(-4deg); }
.home-service-world__node--product { top: 8%; left: 53%; transform: rotate(2deg); }
.home-service-world__node--platform { right: 1%; bottom: 21%; transform: rotate(3deg); }
.home-service-world__node--growth { bottom: 7%; left: 16%; transform: rotate(-2deg); }

.home-service-world .home-hero-canvas {
  z-index: 1;
}

.home-page .home-service-world__topline {
  top: 2.35rem;
}

.home-service-world__topline,
.home-service-world__controls {
  z-index: 3;
}

html[data-theme="dark"] .home-service-world__core,
html[data-theme="dark"] .home-service-world__node {
  background: color-mix(in srgb, var(--surface) 76%, transparent);
}

@media (max-width: 1120px) {
  .home-page .hero-scroll-scene {
    grid-template-columns: minmax(0, .92fr) minmax(390px, 1.08fr);
    gap: 2rem;
  }

  .home-page .hero-title,
  .home-service-world-ready .home-page .hero-title {
    font-size: clamp(3.55rem, 5.2vw, 4.55rem) !important;
  }

  .home-service-world__node--commerce { left: 0; }
  .home-service-world__node--platform { right: 0; }
}

@media (max-width: 880px) {
  .home-page .hero-scroll-scene {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    min-height: 0;
    padding-top: 3rem !important;
    padding-bottom: 3.5rem !important;
  }

  .home-page .hero-main,
  .home-page .home-service-world,
  .home-service-world-ready .home-page .home-service-world {
    grid-column: 1;
    grid-row: auto;
  }

  .home-page .hero-main {
    max-width: 700px;
  }

  .home-page .hero-main > .eyebrow {
    margin-bottom: 1.8rem;
  }

  .home-page .home-service-world,
  .home-service-world-ready .home-page .home-service-world {
    min-height: clamp(430px, 70vw, 560px);
    margin-top: .5rem;
  }
}

@media (max-width: 640px) {
  .home-page .hero-scroll-scene {
    padding-top: 2.2rem !important;
    padding-bottom: 2.75rem !important;
  }

  .home-page .hero-main > .eyebrow {
    margin-bottom: 1.45rem;
    white-space: normal;
  }

  .home-page .hero-title,
  .home-service-world-ready .home-page .hero-title {
    font-size: clamp(2.7rem, 12.4vw, 3.45rem) !important;
    line-height: .98 !important;
  }

  .home-page .hero-title-accent {
    font-size: .51em;
  }

  .home-page .hero-lead,
  .home-service-world-ready .home-page .hero-lead {
    margin-top: 1.45rem !important;
    font-size: .98rem;
  }

  .home-page .hero-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .7rem;
  }

  .home-page .hero-actions .btn,
  .home-page .hero-actions .btn-link {
    min-width: 0;
    min-height: 46px;
    justify-content: center;
    padding-inline: .8rem;
    font-size: .78rem;
    text-align: center;
  }

  .home-page .home-service-world,
  .home-service-world-ready .home-page .home-service-world {
    min-height: min(105vw, 430px);
  }

  .home-service-world__fallback {
    inset: 3.2rem -.5rem 4.7rem;
  }

  .home-service-world__core {
    min-width: 205px;
    padding: 1.1rem;
  }

  .home-service-world__core strong {
    margin-block: .8rem 1rem;
    font-size: 1.55rem;
  }

  .home-service-world__node {
    min-width: 98px;
    padding: .55rem .62rem;
  }

  .home-service-world__node strong {
    font-size: .66rem;
  }

  .home-service-world__node--product { left: auto; right: 2%; }
  .home-service-world__node--platform { bottom: 24%; }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .home-service-world {
    display: block !important;
  }

  .home-page .home-hero-canvas {
    display: none !important;
  }
}

@media (max-width: 390px) {
  .page-hero-actions {
    grid-template-columns: 1fr;
  }
}

/* Homepage FAQ: balanced editorial split, with questions visible immediately. */
.home-page .home-faq {
  padding-block: 7rem;
}

.home-page .home-faq .home-faq-layout {
  display: grid;
  grid-template-columns: minmax(400px, .9fr) minmax(520px, 1.1fr);
  gap: 6rem;
  align-items: start;
  max-width: 1360px;
}

.home-page .home-faq .home-faq-intro {
  position: sticky;
  top: 8rem;
  margin: 0 !important;
  padding-right: 1rem;
  text-align: left !important;
}

.home-page .home-faq .home-faq-intro .eyebrow {
  display: inline-flex;
  justify-content: flex-start !important;
}

.home-page .home-faq .home-faq-intro .h-1 {
  max-width: 13ch;
  margin: 1.25rem 0 1.5rem;
  font-size: 3.5rem;
  line-height: .98;
}

.home-page .home-faq .home-faq-intro p {
  max-width: 31ch;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
}

.home-page .home-faq .home-faq-list {
  border-top: 1px solid var(--line);
}

.home-page .home-faq .home-faq-list .faq {
  margin: 0;
  padding: 0;
}

.home-page .home-faq .home-faq-list .faq summary {
  min-height: 84px;
  padding: 1.5rem 0;
  gap: 2rem;
  font-size: 1.22rem;
  line-height: 1.35;
}

.home-page .home-faq .home-faq-list .faq-body {
  max-width: 64ch;
  padding: 0 3.5rem 1.65rem 0;
}

@media (max-width: 980px) {
  .home-page .home-faq {
    padding-block: 5.5rem;
  }

  .home-page .home-faq .home-faq-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .home-page .home-faq .home-faq-intro {
    position: static;
    padding-right: 0;
  }

  .home-page .home-faq .home-faq-intro .h-1 {
    max-width: 14ch;
    font-size: 3.4rem;
  }

  .home-page .home-faq .home-faq-intro p {
    max-width: 42ch;
  }
}

@media (max-width: 640px) {
  .home-page .home-faq {
    padding-block: 4.5rem;
  }

  .home-page .home-faq .home-faq-layout {
    gap: 2.25rem;
  }

  .home-page .home-faq .home-faq-intro .h-1 {
    max-width: none;
    margin-block: 1rem 1.15rem;
    font-size: 2.45rem;
    line-height: 1;
  }

  .home-page .home-faq .home-faq-list .faq summary {
    min-height: 68px;
    padding: 1.2rem 0;
    gap: 1rem;
    font-size: 1.05rem;
  }

  .home-page .home-faq .home-faq-list .faq-body {
    padding: 0 2.25rem 1.35rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.lofts-motion-ready [data-lofts-reveal],
  html.lofts-motion-ready [data-lofts-reveal].lofts-in-view {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Tools landing hero ----------------------------------------------------- */

.route-tools .tools-hero,
body.route-tools section.paper.tools-hero:first-of-type {
  min-height: auto;
  padding: clamp(3.5rem, 6.5vw, 6.25rem) 0 clamp(3.25rem, 5.5vw, 5.5rem) !important;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.route-tools .tools-hero > .container::before {
  display: none;
}

.route-tools .tools-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(19rem, .65fr);
  grid-template-areas:
    "label support"
    "title support";
  column-gap: clamp(3rem, 8vw, 8rem);
  row-gap: clamp(1.35rem, 2vw, 2rem);
  align-items: end;
  max-width: none;
}

.route-tools .tools-hero__layout > .eyebrow {
  grid-area: label;
  align-self: start;
  margin: 0;
}

.route-tools .tools-hero__layout > .h-display {
  grid-area: title;
  max-width: 15ch !important;
  margin: 0 !important;
  font-size: clamp(3.5rem, 5.35vw, 5.35rem) !important;
  line-height: .96 !important;
  transform: none !important;
}

.route-tools .tools-hero__support {
  grid-area: support;
  align-self: end;
  padding-bottom: .35rem;
}

.route-tools .tools-hero__support .lead {
  max-width: 48ch;
  margin: 0;
}

.route-tools .tools-hero__support .page-hero-actions {
  margin-top: clamp(1.5rem, 2.5vw, 2.25rem);
}

@media (max-width: 900px) {
  .route-tools .tools-hero,
  body.route-tools section.paper.tools-hero:first-of-type {
    padding: 3.25rem 0 3.5rem !important;
  }

  .route-tools .tools-hero__layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "label"
      "title"
      "support";
    gap: 1.35rem;
  }

  .route-tools .tools-hero__layout > .h-display {
    max-width: 12ch !important;
  }

  .route-tools .tools-hero__support {
    max-width: 42rem;
    padding: .4rem 0 0;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .route-tools .tools-hero,
  body.route-tools section.paper.tools-hero:first-of-type {
    padding-top: 7rem !important;
  }

  .route-tools .tools-hero__layout > .eyebrow {
    display: none;
  }
}

@media (max-width: 640px) {
  .route-tools .tools-hero,
  body.route-tools section.paper.tools-hero:first-of-type {
    padding: 2.6rem 0 3rem !important;
  }

  .route-tools .tools-hero__layout > .h-display {
    font-size: clamp(2.55rem, 12.5vw, 3.15rem) !important;
    line-height: .98 !important;
  }

  .route-tools .tools-hero__support .page-hero-actions {
    align-items: stretch;
  }

  .route-tools .tools-hero__support .btn {
    justify-content: center;
  }
}

/* Tools field guides ----------------------------------------------------- */

.route-tools .tools-field-guides__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.15rem, 2vw, 1.75rem);
  align-items: stretch;
}

.route-tools .tools-field-guide-card {
  min-width: 0;
  min-height: clamp(410px, 31vw, 500px);
  padding: clamp(1.45rem, 2vw, 1.9rem) !important;
}

.route-tools .tools-field-guide-card > div:first-child {
  gap: .75rem;
}

.route-tools .tools-field-guide-card .h-2 {
  max-width: 15ch;
  font-size: clamp(2.05rem, 2.35vw, 2.75rem) !important;
  line-height: 1.02 !important;
  letter-spacing: -.015em !important;
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: manual;
}

.route-tools .tools-field-guide-card p {
  max-width: 34ch;
  font-size: clamp(.98rem, 1vw, 1.05rem);
}

.route-tools .tools-field-guide-card .btn-editorial {
  min-height: 44px;
  align-items: center;
}

@media (max-width: 1080px) {
  .route-tools .tools-field-guides__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .route-tools .tools-field-guide-card {
    min-height: 380px;
  }
}

@media (max-width: 640px) {
  .route-tools .tools-field-guides {
    padding-top: 0 !important;
  }

  .route-tools .tools-field-guides__head {
    margin-bottom: 1.5rem !important;
  }

  .route-tools .tools-field-guides__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .route-tools .tools-field-guide-card {
    min-height: 0;
    padding: 1.25rem !important;
  }

  .route-tools .tools-field-guide-card .h-2 {
    max-width: 13.75ch;
    font-size: clamp(2rem, 10vw, 2.65rem) !important;
  }
}

/* The landing-page collage is injected from one shared data source so the
   hundreds of service, industry, and location pages cannot visually drift. */
.lofts-visual-hero {
  position: relative;
  min-height: auto !important;
  padding: clamp(1.3rem, 2.15vw, 2.5rem) 0 clamp(2.35rem, 3.5vw, 4rem) !important;
  overflow: clip;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--bg-soft) 34%, transparent) 1px, transparent 1px) 50% 0 / min(24vw, 320px) 100%,
    var(--bg) !important;
}

.lofts-visual-hero:not(.page-hero) > .lofts-visual-hero__grid {
  --lofts-hero-main-row: 1;
  display: grid !important;
  grid-template-columns: minmax(0, 1.02fr) minmax(430px, .9fr);
  column-gap: clamp(2rem, 4.5vw, 5.5rem);
  row-gap: clamp(.7rem, 1vw, 1.15rem);
  align-items: start;
}

.lofts-visual-hero:not(.page-hero) > .lofts-visual-hero__grid.lofts-has-breadcrumb {
  --lofts-hero-main-row: 2;
}

.lofts-visual-hero:not(.page-hero) > .lofts-visual-hero__grid::before {
  content: none !important;
  display: none !important;
}

.lofts-visual-hero__breadcrumb {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  margin: 0 !important;
}

.lofts-visual-hero__copy {
  grid-column: 1 !important;
  grid-row: var(--lofts-hero-main-row) !important;
  align-self: start;
  display: block !important;
  min-width: 0;
  max-width: none !important;
}

.lofts-visual-hero__copy > * {
  grid-column: auto !important;
  grid-row: auto !important;
}

.lofts-visual-hero__copy > .eyebrow {
  display: flex;
  margin: 0 0 clamp(.75rem, 1.2vw, 1.05rem) !important;
}

.lofts-visual-hero__copy > .h-display,
.lofts-visual-hero__copy > h1 {
  max-width: 11.5ch !important;
  margin: 0 !important;
  font-size: clamp(3.3rem, 4.55vw, 5.7rem) !important;
  line-height: .91 !important;
}

.lofts-visual-hero__copy > .lead {
  max-width: 49ch !important;
  margin: clamp(1.35rem, 2vw, 1.9rem) 0 0 !important;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.2vw, 1.17rem);
  line-height: 1.58;
}

.lofts-visual-hero__copy > .answer-box,
.lofts-visual-hero__copy > .page-hero-actions,
.lofts-visual-hero__copy > .loc-actions,
.lofts-visual-hero__copy > div:last-child:not(.hero-stats):not(.portfolio-hero-stats) {
  margin-top: clamp(1.35rem, 2vw, 1.9rem) !important;
}

.lofts-visual-hero__after {
  grid-column: 1 / -1 !important;
  width: 100%;
  margin-top: clamp(.25rem, 1vw, 1rem) !important;
}

.page-hero .page-hero-grid.lofts-visual-hero__grid {
  grid-template-columns: minmax(0, 1.02fr) minmax(430px, .9fr);
  column-gap: clamp(2rem, 4.5vw, 5.5rem);
  row-gap: clamp(.7rem, 1vw, 1.15rem);
  align-items: start;
}

.page-hero .lofts-legacy-hero-proof {
  display: none !important;
}

.page-hero .lofts-visual-hero__copy {
  grid-column: 1 !important;
  grid-row: 1 !important;
}

.lofts-hero-stage {
  --stage-x: 0px;
  --stage-y: 0px;
  grid-column: 2;
  grid-row: var(--lofts-hero-main-row, 1);
  align-self: start;
  min-width: 0;
  color: var(--ink);
}

.lofts-hero-stage__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 28px;
  margin-bottom: .45rem;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: .7rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.lofts-hero-stage__head span,
.lofts-hero-stage__head a {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}

.lofts-hero-stage__head i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.lofts-hero-stage__head a {
  color: var(--ink);
  text-decoration: none;
}

.lofts-hero-stage__head b {
  font-size: .92rem;
  font-weight: 400;
  transition: transform .25s ease;
}

.lofts-hero-stage__head a:hover b {
  transform: translate(2px, -2px);
}

.lofts-hero-stage__canvas {
  position: relative;
  min-height: clamp(310px, 29vw, 430px);
  isolation: isolate;
}

.lofts-hero-stage__canvas::before {
  content: "";
  position: absolute;
  inset: 8% 5% 6% 4%;
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--line-soft) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px) 0 0 / 25% 100%,
    color-mix(in srgb, var(--surface) 72%, transparent);
}

.lofts-hero-stage__canvas::after {
  content: "+";
  position: absolute;
  z-index: 7;
  left: 46%;
  top: 55%;
  width: 28px;
  height: 28px;
  transform: translate(calc(-50% + var(--stage-x)), calc(-50% + var(--stage-y)));
  border: 1px solid color-mix(in srgb, var(--ink) 32%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  color: var(--accent);
  font: 400 1rem/25px var(--font-sans);
  text-align: center;
  backdrop-filter: blur(6px);
  transition: transform .35s cubic-bezier(.22, .75, .2, 1);
  pointer-events: none;
}

.lofts-hero-tile {
  position: absolute;
  z-index: 2;
  display: block;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ink) 25%, var(--line));
  border-radius: 6px;
  background: #c8d2c1;
  color: #171411;
  box-shadow: 0 28px 62px -44px rgba(23, 20, 17, .78);
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity .7s ease, transform .8s cubic-bezier(.22, .75, .2, 1), box-shadow .3s ease, border-color .3s ease;
  text-decoration: none;
}

.lofts-hero-stage--ready .lofts-hero-tile {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.lofts-hero-stage--ready .lofts-hero-tile--2 {
  transition-delay: 90ms;
}

.lofts-hero-stage--ready .lofts-hero-tile--3 {
  transition-delay: 180ms;
}

.lofts-hero-tile:hover {
  z-index: 6;
  border-color: var(--accent);
  box-shadow: 0 34px 76px -42px rgba(23, 20, 17, .88);
  transform: translate3d(0, -4px, 0);
}

.lofts-hero-tile--1 {
  left: 0;
  top: 8%;
  width: 68%;
  height: 63%;
  z-index: 3;
  background: #c8d2c1;
}

.lofts-hero-tile--2 {
  right: 0;
  top: 0;
  width: 45%;
  height: 43%;
  z-index: 4;
  background: #d8ae88;
}

.lofts-hero-tile--3 {
  right: 4%;
  bottom: 2%;
  width: 53%;
  height: 41%;
  z-index: 5;
  background: #9eb7c2;
}

.lofts-hero-tile__chrome {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 23px;
  padding: 0 8px;
  border-bottom: 1px solid rgba(23, 20, 17, .16);
  background: color-mix(in srgb, currentColor 5%, transparent);
}

.lofts-hero-tile__chrome i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: .32;
}

.lofts-hero-tile__chrome i:first-child {
  background: var(--accent);
  opacity: 1;
}

.lofts-hero-tile img {
  position: absolute;
  top: 23px;
  left: 0;
  width: 100%;
  height: calc(100% - 65px);
  object-fit: cover;
  object-position: top center;
  filter: none !important;
  transform: none !important;
  image-rendering: auto;
}

.lofts-hero-tile__caption {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 42px;
  padding: .45rem .7rem;
  background: inherit;
}

.lofts-hero-tile__caption strong {
  overflow: hidden;
  color: inherit;
  font-family: var(--font-sans);
  font-size: .77rem;
  font-weight: 500;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lofts-hero-tile__caption small {
  overflow: hidden;
  max-width: 58%;
  color: inherit;
  font-family: var(--font-sans);
  font-size: .57rem;
  line-height: 1.2;
  opacity: .68;
  text-align: right;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.lofts-hero-stage__proof {
  position: absolute;
  z-index: 6;
  left: 2%;
  bottom: 1%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 29%;
  min-height: 22%;
  padding: clamp(.75rem, 1.35vw, 1.15rem);
  border: 1px solid rgba(23, 20, 17, .24);
  border-radius: 6px;
  background: #d9a84e;
  color: #171411;
  box-shadow: 0 22px 48px -38px rgba(23, 20, 17, .7);
}

.lofts-hero-stage__proof strong {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.4vw, 2.5rem);
  font-weight: 400;
  line-height: .94;
}

.lofts-hero-stage__proof span {
  max-width: 16ch;
  font-family: var(--font-sans);
  font-size: .64rem;
  line-height: 1.25;
  text-transform: uppercase;
}

html[data-theme="dark"] .lofts-hero-tile {
  color: #f2ede5;
}

html[data-theme="dark"] .lofts-hero-tile--1 {
  background: #354338;
}

html[data-theme="dark"] .lofts-hero-tile--2 {
  background: #573c30;
}

html[data-theme="dark"] .lofts-hero-tile--3 {
  background: #31434b;
}

html[data-theme="dark"] .lofts-hero-stage__proof {
  border-color: rgba(242, 237, 229, .18);
  background: #8f642a;
  color: #fff9ef;
}

/* The homepage archive behaves like an interactive editorial contact sheet,
   while keeping the source screenshots untouched and pixel-sharp. */
@media (min-width: 981px) {
  .home-page .home-portfolio-stage .pf-grid {
    grid-template-columns: 1.25fr repeat(4, minmax(0, 1fr)) !important;
    gap: .8rem !important;
    align-items: center;
    padding: clamp(1.25rem, 2.2vw, 2.25rem);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--ink) 86%, var(--line));
    border-radius: 8px;
    background: var(--ink);
    box-shadow: var(--shadow-card);
  }

  .home-page .home-portfolio-stage .pf-card,
  .home-page .home-portfolio-stage .pf-card--featured,
  .home-page .home-portfolio-stage .pf-card:nth-child(n),
  .home-page .home-portfolio-stage .pf-card--featured:nth-child(n),
  .home-page .home-portfolio-stage .pf-card--featured:first-child,
  .home-page .home-portfolio-stage .pf-card:nth-child(2) {
    position: relative;
    display: block;
    grid-column: auto !important;
    min-width: 0;
    transform: translateY(var(--work-shift, 0));
  }

  .home-page .home-portfolio-stage .pf-card:nth-child(2),
  .home-page .home-portfolio-stage .pf-card:nth-child(4) {
    --work-shift: 1.25rem;
  }

  .home-page .home-portfolio-stage .pf-card:nth-child(3),
  .home-page .home-portfolio-stage .pf-card:nth-child(5) {
    --work-shift: -1rem;
  }

  .home-page .home-portfolio-stage .pf-card:nth-child(n + 6) {
    display: none !important;
  }

  .home-page .home-portfolio-stage .pf-card-img,
  .home-page .home-portfolio-stage .pf-card--featured .pf-card-img,
  .home-page .home-portfolio-stage .pf-card:nth-child(n) .pf-card-img,
  .home-page .home-portfolio-stage .pf-card--featured:first-child .pf-card-img,
  .home-page .home-portfolio-stage .pf-card:nth-child(2) .pf-card-img {
    aspect-ratio: 3 / 4 !important;
    border-color: rgba(244, 240, 233, .22) !important;
    background: #24211d;
  }

  .home-page .home-portfolio-stage .pf-card-img img,
  .home-page .home-portfolio-stage .pf-card--featured .pf-card-img img,
  .home-page .home-portfolio-stage .pf-card:nth-child(n) .pf-card-img img {
    object-fit: cover;
    object-position: top center;
  }

  .home-page .home-portfolio-stage .pf-card-body,
  .home-page .home-portfolio-stage .pf-card--featured .pf-card-body {
    padding: .9rem .1rem 0;
    color: var(--bg);
  }

  .home-page .home-portfolio-stage .pf-card-tag {
    display: block;
    overflow: hidden;
    color: color-mix(in srgb, var(--bg) 58%, transparent);
    font-size: .58rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-page .home-portfolio-stage .pf-card-name,
  .home-page .home-portfolio-stage .pf-card--featured .pf-card-name,
  .home-page .home-portfolio-stage .pf-card--featured:first-child .pf-card-name,
  .home-page .home-portfolio-stage .pf-card:nth-child(2) .pf-card-name {
    margin-top: .35rem;
    color: var(--bg);
    font-size: clamp(1.1rem, 1.45vw, 1.5rem);
  }

  .home-page .home-portfolio-stage .pf-card-desc,
  .home-page .home-portfolio-stage .pf-card-foot {
    display: none !important;
  }
}

@media (max-width: 980px) {
  .lofts-visual-hero:not(.page-hero) > .lofts-visual-hero__grid,
  .page-hero .page-hero-grid.lofts-visual-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, .8fr);
    column-gap: 2.75rem;
    row-gap: 1rem;
  }

  .lofts-visual-hero__copy > .h-display,
  .lofts-visual-hero__copy > h1 {
    font-size: 3.35rem !important;
  }

  .lofts-hero-stage__canvas {
    min-height: 340px;
  }
}

@media (max-width: 820px) {
  .lofts-visual-hero {
    padding: 1.7rem 0 2.85rem !important;
  }

  .lofts-visual-hero:not(.page-hero) > .lofts-visual-hero__grid,
  .page-hero .page-hero-grid.lofts-visual-hero__grid {
    display: block !important;
  }

  .lofts-visual-hero__breadcrumb {
    margin: 0 0 1.35rem !important;
  }

  .lofts-hero-stage {
    margin-top: clamp(1.55rem, 5.8vw, 2.5rem);
  }

  .lofts-hero-stage__canvas {
    min-height: clamp(310px, 70vw, 430px);
  }

  .lofts-visual-hero__after {
    margin-top: 1.75rem !important;
  }

  .home-page .home-portfolio-stage .pf-grid {
    display: flex !important;
    gap: .8rem !important;
    width: auto;
    margin-inline: calc(var(--page-gutter) * -1);
    padding: 1rem var(--page-gutter) 1.35rem;
    overflow-x: auto;
    border-block: 1px solid color-mix(in srgb, var(--ink) 84%, var(--line));
    background: var(--ink);
    scroll-padding-inline: var(--page-gutter);
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .home-page .home-portfolio-stage .pf-card,
  .home-page .home-portfolio-stage .pf-card--featured,
  .home-page .home-portfolio-stage .pf-card:nth-child(n),
  .home-page .home-portfolio-stage .pf-card--featured:nth-child(n),
  .home-page .home-portfolio-stage .pf-card--featured:first-child,
  .home-page .home-portfolio-stage .pf-card:nth-child(2) {
    display: block !important;
    flex: 0 0 min(76vw, 340px);
    width: min(76vw, 340px);
    min-width: 0;
    scroll-snap-align: start;
  }

  .home-page .home-portfolio-stage .pf-card:nth-child(n + 6) {
    display: none !important;
  }

  .home-page .home-portfolio-stage .pf-card-img,
  .home-page .home-portfolio-stage .pf-card--featured .pf-card-img,
  .home-page .home-portfolio-stage .pf-card:nth-child(n) .pf-card-img,
  .home-page .home-portfolio-stage .pf-card--featured:first-child .pf-card-img,
  .home-page .home-portfolio-stage .pf-card:nth-child(2) .pf-card-img {
    aspect-ratio: 4 / 5 !important;
    border-color: rgba(244, 240, 233, .22) !important;
    background: #24211d;
  }

  .home-page .home-portfolio-stage .pf-card-img img,
  .home-page .home-portfolio-stage .pf-card--featured .pf-card-img img,
  .home-page .home-portfolio-stage .pf-card:nth-child(n) .pf-card-img img {
    object-fit: cover;
    object-position: top center;
  }

  .home-page .home-portfolio-stage .pf-card-body,
  .home-page .home-portfolio-stage .pf-card--featured .pf-card-body {
    padding: .9rem 0 0;
    color: var(--bg);
  }

  .home-page .home-portfolio-stage .pf-card-tag,
  .home-page .home-portfolio-stage .pf-card-name,
  .home-page .home-portfolio-stage .pf-card--featured .pf-card-name {
    color: var(--bg);
  }

  html[data-theme="dark"] .home-page .home-portfolio-stage .pf-card-tag,
  html[data-theme="dark"] .home-page .home-portfolio-stage .pf-card-name,
  html[data-theme="dark"] .home-page .home-portfolio-stage .pf-card--featured .pf-card-name {
    color: #171411 !important;
  }

  .home-page .home-portfolio-stage .pf-card-desc,
  .home-page .home-portfolio-stage .pf-card-foot {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .lofts-visual-hero__copy > .h-display,
  .lofts-visual-hero__copy > h1 {
    max-width: 12ch !important;
    font-size: 2.75rem !important;
    line-height: .92 !important;
  }

  .lofts-hero-stage__head {
    font-size: .64rem;
  }

  .lofts-hero-stage__canvas {
    min-height: clamp(285px, 88vw, 390px);
  }

  .lofts-hero-tile--1 {
    top: 10%;
    width: 72%;
    height: 62%;
  }

  .lofts-hero-tile--2 {
    width: 47%;
    height: 40%;
  }

  .lofts-hero-tile--3 {
    right: 2%;
    width: 56%;
    height: 40%;
  }

  .lofts-hero-stage__proof {
    left: 1%;
    width: 31%;
    min-height: 23%;
    padding: .7rem;
  }

  .lofts-hero-stage__proof span {
    font-size: .55rem;
  }

  .lofts-hero-tile__caption small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lofts-hero-tile,
  .lofts-hero-stage--ready .lofts-hero-tile,
  .lofts-hero-tile:hover,
  .lofts-hero-stage__canvas::after {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Social identity lives in one shared footer component across every public page. */
.lofts-compact-footer {
  padding: clamp(3.25rem, 6vw, 5.5rem) 0 2rem;
}

.lofts-compact-footer__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: clamp(2rem, 4vw, 3.25rem);
}

.lofts-compact-footer__brand {
  display: inline-flex;
  align-items: baseline;
  gap: .65rem;
  color: var(--ink) !important;
}

.lofts-compact-footer__brand em {
  font-family: var(--font-logo);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400;
  line-height: 1;
}

.lofts-compact-footer__brand span {
  font-family: var(--font-sans);
  font-size: .65rem;
  letter-spacing: .24em;
}

.lofts-compact-footer__nav nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .5rem clamp(1rem, 2vw, 1.8rem);
}

.lofts-compact-footer__nav nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: .9rem;
}

.lofts-footer-socials {
  display: grid;
  grid-template-columns: minmax(190px, .62fr) minmax(0, 1.38fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding: clamp(1.5rem, 2.8vw, 2.25rem) 0;
  border-top: 1px solid var(--line);
}

.lofts-footer-socials__intro span {
  display: block;
  margin-bottom: .5rem;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.lofts-footer-socials__intro p {
  max-width: 31ch;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.45vw, 1.3rem);
  line-height: 1.3;
}

.lofts-footer-socials__links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.lofts-social-link {
  position: relative;
  min-width: 0;
  min-height: 64px;
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: .65rem;
  padding: .65rem clamp(.65rem, 1.25vw, 1rem);
  color: var(--ink) !important;
  font-family: var(--font-sans) !important;
  font-size: clamp(.74rem, .88vw, .86rem);
  border-left: 1px solid var(--line);
  transition: background-color .22s ease, color .22s ease;
}

.lofts-social-link:first-child {
  border-left: 0;
}

.lofts-social-link__mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--font-sans);
  font-size: .66rem;
  font-weight: 650;
  line-height: 1;
  text-transform: none;
  transition: border-color .22s ease, background-color .22s ease, color .22s ease;
}

.lofts-social-link b {
  font-size: .82rem;
  font-weight: 400;
  transition: transform .22s ease;
}

.lofts-social-link:hover,
.lofts-social-link:focus-visible {
  background: var(--bg-soft);
}

.lofts-social-link:hover .lofts-social-link__mark,
.lofts-social-link:focus-visible .lofts-social-link__mark {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

.lofts-social-link:hover b,
.lofts-social-link:focus-visible b {
  transform: translate(2px, -2px);
}

.site-footer .lofts-footer-socials,
.footer-rich .lofts-footer-socials {
  border-top-color: rgba(244, 240, 234, .22);
}

.site-footer .lofts-footer-socials__intro span,
.footer-rich .lofts-footer-socials__intro span {
  color: rgba(244, 240, 234, .58);
}

.site-footer .lofts-footer-socials__intro p,
.footer-rich .lofts-footer-socials__intro p,
.site-footer .lofts-social-link,
.footer-rich .lofts-social-link {
  color: rgba(244, 240, 234, .9) !important;
}

.site-footer .lofts-footer-socials__links,
.footer-rich .lofts-footer-socials__links {
  border-block-color: rgba(244, 240, 234, .24);
}

.site-footer .lofts-social-link,
.footer-rich .lofts-social-link {
  border-left-color: rgba(244, 240, 234, .24);
}

.site-footer .lofts-social-link__mark,
.footer-rich .lofts-social-link__mark {
  border-color: rgba(244, 240, 234, .58);
  color: rgba(244, 240, 234, .92);
}

.site-footer .lofts-social-link b,
.footer-rich .lofts-social-link b {
  color: rgba(244, 240, 234, .72);
}

.site-footer .lofts-social-link:hover,
.site-footer .lofts-social-link:focus-visible,
.footer-rich .lofts-social-link:hover,
.footer-rich .lofts-social-link:focus-visible {
  background: rgba(244, 240, 234, .08);
}

.lofts-compact-footer .footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 0;
}

.lofts-compact-footer .footer-bottom .meta {
  margin: 0;
}

/* Keep floating utilities clean and separate across all public breakpoints. */
.a11y-launcher,
.wa-launcher,
.chat-launcher {
  width: 48px !important;
  min-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  font-size: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

@media (min-width: 641px) {
  .chat-launcher {
    right: 1.25rem !important;
    bottom: 1.25rem !important;
    overflow: visible !important;
  }

  .wa-launcher {
    right: 1.25rem !important;
    bottom: 4.75rem !important;
  }

  .a11y-launcher {
    right: 1.25rem !important;
    bottom: 8.25rem !important;
    left: auto !important;
  }

  .a11y-panel {
    right: 1.25rem !important;
    bottom: 1.25rem !important;
    left: auto !important;
    transform-origin: bottom right !important;
  }
}

.a11y-launcher-label,
.wa-launcher span,
.chat-launcher-label {
  display: none !important;
}

.chat-launcher-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--ink);
  box-shadow: none;
  animation: none;
}

@media (max-width: 640px) {
  .wa-launcher,
  .chat-launcher {
    display: none !important;
  }

  .a11y-launcher,
  .chat-launcher {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }

  .a11y-launcher {
    right: auto !important;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px) + .85rem) !important;
    left: .85rem !important;
  }
}

@media (max-width: 900px) {
  .lofts-footer-socials {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .lofts-footer-socials__intro p {
    max-width: 42ch;
  }
}

@media (max-width: 640px) {
  .lofts-compact-footer__nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .lofts-compact-footer__nav nav {
    justify-content: flex-start;
  }

  .lofts-footer-socials__links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lofts-social-link:nth-child(3) {
    border-left: 0;
  }

  .lofts-social-link:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .site-footer .lofts-social-link:nth-child(n + 3),
  .footer-rich .lofts-social-link:nth-child(n + 3) {
    border-top-color: rgba(244, 240, 234, .24);
  }

  .lofts-compact-footer .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 390px) {
  .lofts-footer-socials__links {
    grid-template-columns: 1fr;
  }

  .lofts-social-link,
  .lofts-social-link:nth-child(n) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .site-footer .lofts-social-link,
  .site-footer .lofts-social-link:nth-child(n),
  .footer-rich .lofts-social-link,
  .footer-rich .lofts-social-link:nth-child(n) {
    border-top-color: rgba(244, 240, 234, .24);
  }

  .lofts-social-link:first-child {
    border-top: 0;
  }
}

/* Final homepage fit pass: keep the hero below the fixed nav and prevent
   the desktop navigation from clipping on narrower laptop/tablet widths. */
.home-page .nav-inner {
  width: min(100% - 2rem, 1480px);
  padding-inline: 0 !important;
}

.home-page .hero-paper {
  isolation: isolate;
}

.home-page .hero-scroll-scene {
  padding-top: max(7.5rem, calc(76px + 3.25rem)) !important;
}

.home-page .hero-main > .eyebrow {
  position: relative;
  z-index: 6;
}

.home-page .hero-title {
  position: relative;
  z-index: 5;
}

@media (max-width: 1180px) {
  .home-page .nav-inner {
    width: min(100% - 1rem, 1480px);
  }

  .home-page .nav-link {
    padding-inline: .55rem !important;
    font-size: .82rem !important;
  }

  .home-page .nav-actions .btn-audit {
    display: none !important;
  }
}

@media (max-width: 980px) {
  .home-page .nav-links,
  .home-page .nav-actions {
    display: none !important;
  }

  .home-page .menu-btn {
    display: inline-flex !important;
  }
}

@media (max-width: 640px) {
  .home-page .hero-scroll-scene {
    padding-top: max(5.5rem, calc(64px + 2.25rem)) !important;
  }
}

/* 2026-08 interaction and type calibration
   One quiet motion language across the editorial system. */
:root {
  --motion-fast: 200ms;
  --motion-ease-out: cubic-bezier(.16, 1, .3, 1);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: clip;
}

.btn,
.btn-link,
.nav-link,
.menu-btn,
.mnav-link,
.work-card,
.post-card-link,
.svc-card,
.blog-filter-btn,
.blog-page-btn,
.lofts-social-link,
.a11y-launcher,
.wa-launcher,
.chat-launcher {
  transition-duration: var(--motion-fast) !important;
  transition-timing-function: var(--motion-ease-out) !important;
}

.h-display {
  max-width: 15ch;
  font-size: 4rem !important;
  font-weight: 400 !important;
  line-height: .99 !important;
  letter-spacing: -.025em !important;
  text-wrap: balance;
}

.h-1 {
  font-size: 3.25rem;
  line-height: 1.02;
  text-wrap: balance;
}

.home-page .hero-title {
  width: min(100%, 760px);
  max-width: none;
  font-size: 4.25rem !important;
  line-height: .96 !important;
}

.lofts-visual-hero .h-display,
.lofts-visual-hero h1,
.portfolio-page .paper .h-display,
.page-hero .h-display,
.page-hero-copy .h-display {
  max-width: 13ch;
  font-size: 4rem !important;
  line-height: .99 !important;
}

body:not(.home-page) .lofts-visual-hero__copy > h1 {
  font-size: 4rem !important;
}

#main-content .lofts-visual-hero__copy > h1 {
  font-size: 4rem !important;
}

.lofts-char-clip {
  display: inline-block;
  overflow: hidden;
  padding-bottom: .08em;
  margin-bottom: -.08em;
  vertical-align: bottom;
}

.lofts-word {
  display: inline-block;
  white-space: nowrap;
}

.lofts-char {
  display: inline-block;
  will-change: transform;
}

/* Three.js is an atmospheric layer, never a competing panel. */
.services-hero {
  position: relative;
  isolation: isolate;
  min-height: min(760px, calc(100svh - 72px));
  display: flex;
  align-items: center;
  overflow: clip;
}

.services-hero > .container {
  position: relative;
  z-index: 2;
  width: 100%;
}

.services-hero__copy {
  position: relative;
  z-index: 2;
  width: min(58%, 760px);
}

.lofts-visual-hero__copy.services-hero__copy {
  width: 100%;
}

.services-hero .h-display {
  max-width: 100%;
  font-size: 3.375rem !important;
  overflow-wrap: normal;
}

body:not(.home-page) section.paper.services-hero:first-of-type .services-hero__copy > .h-display {
  max-width: 100%;
  font-size: 3.375rem !important;
  line-height: 1.01 !important;
  overflow-wrap: normal;
}

#main-content .services-hero [data-letter-reveal] {
  max-width: 100%;
  font-size: 2.85rem !important;
  line-height: 1.01 !important;
}

.services-title-line {
  display: block;
  white-space: nowrap;
}

.services-hero-canvas {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: auto;
  left: clamp(-12rem, -9vw, -6rem);
  width: min(48vw, 660px);
  height: min(52vw, 660px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity var(--motion-fast) var(--motion-ease-out);
}

.services-hero-canvas.is-rendered {
  opacity: .15;
}

.services-hero-canvas canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* The fixed header sits at 900; the modal navigation must own the top layer. */
.mnav {
  z-index: 1000;
}

/* Homepage atmosphere: the same restrained low-poly system, mounted behind the hero. */
.hero-scroll-scene {
  position: relative;
  isolation: isolate;
}

.hero-scroll-scene > :not(.home-hero-canvas) {
  position: relative;
  z-index: 1;
}

.home-hero-canvas {
  position: absolute;
  z-index: 0;
  top: -2%;
  left: 52%;
  width: min(52vw, 760px);
  aspect-ratio: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -3%);
  transition: opacity var(--motion-fast) var(--motion-ease-out);
  -webkit-mask-image: radial-gradient(circle, #000 42%, transparent 74%);
  mask-image: radial-gradient(circle, #000 42%, transparent 74%);
}

.home-hero-canvas.is-rendered {
  opacity: .72;
  filter: saturate(.9);
}

.home-hero-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
}

html[data-theme="dark"] .home-hero-canvas.is-rendered {
  opacity: .64;
  filter: brightness(1.08);
}

@media (max-width: 880px) {
  .home-hero-canvas {
    top: 3.75rem;
    left: 94%;
    width: min(112vw, 560px);
    transform: translate(-50%, 0);
  }

  .home-hero-canvas.is-rendered {
    opacity: .4;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-canvas {
    display: none;
  }
}

html[data-theme="dark"] .services-hero-canvas {
  filter: brightness(1.12) contrast(1.04);
  opacity: .22;
}

/* Homepage service world ------------------------------------------------- */
.home-service-world {
  position: relative;
  display: none;
  grid-column: 7 / -1;
  grid-row: 2 / span 3;
  align-self: start;
  justify-self: end;
  width: min(100%, 700px);
  min-width: 0;
  height: clamp(520px, 48vw, 700px);
  margin: -1rem auto 0;
  isolation: isolate;
}

.home-service-world-ready .home-service-world {
  display: block;
}

.home-service-world-ready .home-page .hero-sidecar {
  display: none !important;
}

.hero-system-signal {
  display: none;
}

@media (min-width: 881px) {
  .home-service-world-ready .home-page .hero-main {
    display: flex;
    grid-column: 1 / span 6;
    grid-row: 1 / span 4;
    flex-direction: column;
    align-self: start;
    min-width: 0;
  }

  .home-service-world-ready .home-page .hero-main > .eyebrow {
    width: 100%;
    margin: 0;
  }

  .home-service-world-ready .home-page .hero-system-signal {
    display: grid;
    grid-template-columns: auto minmax(3rem, 1fr) auto;
    align-items: center;
    gap: .8rem;
    width: min(100%, 620px);
    margin-top: clamp(2.35rem, 4.5vh, 3.5rem);
    color: var(--muted);
    font-family: var(--font-sans);
    font-size: .63rem;
    font-weight: 500;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .home-page .hero-system-signal__rail {
    position: relative;
    display: block;
    height: 1px;
    overflow: hidden;
    background: var(--line);
  }

  .home-page .hero-system-signal__rail::before,
  .home-page .hero-system-signal__rail::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  .home-page .hero-system-signal__rail::before {
    right: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: .42;
  }

  .home-page .hero-system-signal__rail::after {
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
    animation: loftsHeroSignal 4.8s cubic-bezier(.22, .75, .2, 1) infinite;
  }

  .home-page .hero-system-signal__meta {
    text-align: right;
  }

  .home-service-world-ready .home-page .hero-title {
    width: min(100%, 650px);
    margin-top: clamp(1.35rem, 2.4vh, 1.9rem) !important;
    font-size: clamp(4.35rem, 5.35vw, 6.05rem);
    line-height: .87;
  }

  .home-service-world-ready .home-page .hero-lead {
    width: min(100%, 47ch);
    margin-top: clamp(2rem, 3.5vh, 2.8rem) !important;
  }

  .home-service-world-ready .home-page .hero-actions {
    margin-top: 1.5rem;
  }

  .home-service-world-ready .home-service-world {
    grid-row: 1 / span 4;
    align-self: stretch;
    height: auto;
    min-height: clamp(570px, 47vw, 690px);
    margin: 0;
  }
}

@keyframes loftsHeroSignal {
  0% { left: 0; transform: translate3d(-4px, -50%, 0); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { left: calc(100% - 5px); transform: translate3d(4px, -50%, 0); opacity: 0; }
}

.home-service-world .home-hero-canvas {
  position: absolute;
  z-index: 0;
  inset: 1.8rem 0 3.6rem;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  opacity: 0;
  pointer-events: none;
  transform: none;
  mask-image:
    linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .56) 6%, #000 15%, #000 85%, rgba(0, 0, 0, .56) 94%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 9%, #000 78%, rgba(0, 0, 0, .58) 90%, transparent 100%);
  mask-composite: intersect;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .56) 6%, #000 15%, #000 85%, rgba(0, 0, 0, .56) 94%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 9%, #000 78%, rgba(0, 0, 0, .58) 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  transition: opacity var(--motion-fast) var(--motion-ease-out);
}

.home-service-world.is-ready .home-hero-canvas {
  opacity: 1;
  filter: none;
}

.home-service-world .home-hero-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.home-service-world__topline {
  position: absolute;
  z-index: 2;
  top: 1.15rem;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: .65rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: .67rem;
  font-weight: 500;
  letter-spacing: .08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.home-service-world__controls {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: .7rem;
  left: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: .85rem;
  padding-top: .75rem;
  border-top: 1px solid var(--line);
}

.home-service-world__toggle {
  position: relative;
  display: inline-grid;
  grid-template-columns: repeat(2, 3px);
  place-content: center;
  gap: 4px;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 9px 24px -18px rgba(26, 22, 18, .55);
  transition: border-color var(--motion-fast) var(--motion-ease-out), background var(--motion-fast) var(--motion-ease-out), transform var(--motion-fast) var(--motion-ease-out);
}

.home-service-world__toggle span {
  width: 3px;
  height: 12px;
  background: currentColor;
}

.home-service-world__toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.home-service-world__toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.home-service-world.is-paused .home-service-world__toggle {
  display: grid;
  grid-template-columns: 0;
  gap: 0;
}

.home-service-world.is-paused .home-service-world__toggle span:first-child {
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentColor;
  background: transparent;
  transform: translateX(1px);
}

.home-service-world.is-paused .home-service-world__toggle span:last-child {
  display: none;
}

.home-service-world__services {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-service-world__services li {
  min-width: 0;
  padding-inline: .48rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .035em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
  transition: color var(--motion-fast) var(--motion-ease-out);
}

.home-service-world__services li.is-active {
  color: var(--accent);
}

html[data-theme="dark"] .home-service-world__toggle {
  box-shadow: 0 9px 24px -18px #000;
}

@media (max-width: 1220px) {
  .home-service-world {
    height: clamp(480px, 48vw, 610px);
  }
}

@media (max-width: 880px) {
  .home-service-world {
    grid-column: 1;
    grid-row: auto;
    width: min(100%, 700px);
    height: clamp(430px, 78vw, 590px);
    margin: 2.25rem auto 0;
  }
}

@media (max-width: 640px) {
  .home-service-world {
    height: min(104vw, 420px);
    margin-top: 1.5rem;
  }

  .home-service-world .home-hero-canvas {
    inset: 2.2rem -1rem 4.6rem;
    mask-image:
      linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .48) 5%, #000 14%, #000 86%, rgba(0, 0, 0, .48) 95%, transparent 100%),
      linear-gradient(to bottom, transparent 0%, #000 10%, #000 80%, rgba(0, 0, 0, .52) 92%, transparent 100%);
    mask-composite: intersect;
    -webkit-mask-image:
      linear-gradient(to right, transparent 0%, rgba(0, 0, 0, .48) 5%, #000 14%, #000 86%, rgba(0, 0, 0, .48) 95%, transparent 100%),
      linear-gradient(to bottom, transparent 0%, #000 10%, #000 80%, rgba(0, 0, 0, .52) 92%, transparent 100%);
    -webkit-mask-composite: source-in;
  }

  .home-service-world__topline {
    align-items: flex-start;
    font-size: .6rem;
  }

  .home-service-world__topline span:last-child {
    max-width: 13ch;
    text-align: right;
  }

  .home-service-world__controls {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: .55rem;
  }

  .home-service-world__toggle {
    width: 40px;
    height: 40px;
  }

  .home-service-world__services {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: .42rem;
  }

  .home-service-world__services li {
    padding-inline: .25rem;
    font-size: .57rem;
  }

  .home-service-world__services li:nth-child(4) {
    grid-column: 1 / 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-service-world {
    display: none !important;
  }
}

/* Compact, stateful blog pagination. */
.route-blog .post-card[hidden] {
  display: none !important;
}

.blog-pagination {
  position: relative;
  gap: .42rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.blog-page-btn {
  min-width: 2.55rem;
  height: 2.55rem;
  border-radius: 4px;
}

.blog-page-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.blog-page-ellipsis {
  min-width: 1.4rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .74rem;
  text-align: center;
}

.blog-page-status {
  margin-top: .65rem;
}

@media (max-width: 980px) {
  .h-display,
  .lofts-visual-hero .h-display,
  .lofts-visual-hero h1,
  .portfolio-page .paper .h-display,
  .page-hero .h-display,
  .page-hero-copy .h-display {
    font-size: 3.35rem !important;
  }

  body:not(.home-page) .lofts-visual-hero__copy > h1 {
    font-size: 3.35rem !important;
  }

  #main-content .lofts-visual-hero__copy > h1 {
    font-size: 3.35rem !important;
  }

  .home-page .hero-title {
    font-size: 3.65rem !important;
  }

  .services-hero {
    min-height: auto;
  }

  .services-hero__copy {
    width: min(72%, 680px);
  }

  .services-hero-canvas {
    right: auto;
    left: -30vw;
    width: 78vw;
    height: 78vw;
    opacity: .22;
  }
}

@media (max-width: 640px) {
  .site-footer .footer-newsletter-form,
  .home-page .home-footer .footer-newsletter-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .75rem;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .site-footer .footer-newsletter-form input,
  .home-page .home-footer .footer-newsletter-form input {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: .65rem 0 .8rem;
    border-bottom: 1px solid #3b3b38;
  }

  .site-footer .footer-newsletter-form button,
  .home-page .home-footer .footer-newsletter-form button {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .site-footer .footer-newsletter-note,
  .home-page .home-footer .footer-newsletter-note {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .h-display,
  .lofts-visual-hero .h-display,
  .lofts-visual-hero h1,
  .portfolio-page .paper .h-display,
  .page-hero .h-display,
  .page-hero-copy .h-display,
  .home-page .hero-title {
    max-width: 100%;
    font-size: 2.75rem !important;
    line-height: 1 !important;
    letter-spacing: -.02em !important;
  }

  .h-1 {
    font-size: 2.25rem;
  }

  body:not(.home-page) .lofts-visual-hero__copy > h1,
  #main-content .lofts-visual-hero__copy > h1,
  #main-content .services-hero [data-letter-reveal] {
    font-size: 2.75rem !important;
  }

  #main-content .services-hero [data-letter-reveal] {
    font-size: 2.25rem !important;
  }

  .services-hero {
    padding-top: 6.5rem !important;
  }

  .services-hero__copy {
    width: 100%;
  }

  .services-hero-canvas {
    top: 54%;
    right: auto;
    left: -58vw;
    width: 112vw;
    height: 112vw;
    opacity: .3;
  }

  .services-hero-canvas.is-rendered {
    opacity: .1;
  }

  .blog-pagination {
    justify-content: flex-start;
  }

  .blog-page-status {
    text-align: left;
  }
}

/* Global studio header ---------------------------------------------------
   The homepage is the canonical navigation. Keep its geometry, typography,
   controls, and responsive collapse identical on every route. */
.nav-bar,
.nav-bar.scrolled {
  height: 76px;
  min-height: 76px;
  border-bottom: 1px solid var(--rhythm-line, var(--line));
  background: color-mix(in srgb, var(--rhythm-canvas, var(--bg)) 94%, transparent);
  box-shadow: none;
}

html[data-theme="dark"] .nav-bar,
html[data-theme="dark"] .nav-bar.scrolled {
  border-bottom-color: var(--rhythm-line, var(--line)) !important;
  background: color-mix(in srgb, var(--rhythm-canvas, var(--bg)) 94%, transparent) !important;
}

.nav-inner,
.home-page .nav-inner {
  width: min(100% - 2rem, 1480px);
  max-width: 1480px;
  height: 76px;
  min-height: 76px;
  margin-inline: auto;
  padding: 14px 0 !important;
  gap: .45rem;
}

.nav-logo,
.home-page .nav-logo {
  font-family: var(--font-logo);
  font-size: 1.32rem;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0;
}

.nav-logo .dot,
.home-page .nav-logo .dot {
  margin-left: .42rem;
  font-family: var(--font-sans);
  font-size: .5rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: .42em;
  text-transform: uppercase;
}

.nav-links,
.nav-actions,
.home-page .nav-links,
.home-page .nav-actions {
  gap: .15rem;
}

.nav-link,
.home-page .nav-link {
  min-height: 44px;
  padding-inline: .72rem;
  font-size: .9rem;
}

.nav-actions .btn,
.home-page .nav-actions .btn {
  min-height: 44px;
  border-radius: 4px;
  box-shadow: none;
}

.nav-actions .btn-audit,
.home-page .nav-actions .btn-audit {
  border-color: var(--rhythm-line, var(--line));
  background: transparent;
}

.nav-actions .btn-primary,
.home-page .nav-actions .btn-primary {
  background: var(--rhythm-ink, var(--ink));
  color: var(--rhythm-canvas, var(--bg));
}

.mega-feature h3 {
  margin: .6rem 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
}

.mega-feature .btn-link {
  margin-top: 1rem;
  font-size: .85rem;
}

@media (min-width: 821px) {
  .portfolio-hero-shell > .h-display,
  .lofts-visual-hero__copy > .h-display,
  .lofts-visual-hero__copy > h1 {
    margin-top: 1rem;
    transform: none !important;
  }
}

@media (max-width: 1180px) {
  .nav-inner,
  .home-page .nav-inner {
    width: min(100% - 1rem, 1480px);
  }

  .nav-link,
  .home-page .nav-link {
    padding-inline: .55rem !important;
    font-size: .82rem !important;
  }

  .nav-actions .btn-audit,
  .home-page .nav-actions .btn-audit {
    display: none !important;
  }
}

@media (max-width: 980px) {
  .nav-links,
  .nav-actions,
  .home-page .nav-links,
  .home-page .nav-actions {
    display: none !important;
  }

  .menu-btn,
  .home-page .menu-btn {
    display: inline-flex !important;
  }
}

@media (max-width: 880px) {
  #mobilePanel,
  .mnav {
    transition: transform 200ms ease-out !important;
  }

  .nav-bar,
  .nav-bar.scrolled,
  .home-page .nav-bar,
  .home-page .nav-bar.scrolled {
    height: 68px;
    min-height: 68px;
  }

  .nav-inner,
  .home-page .nav-inner {
    width: min(100% - 2rem, 1480px);
    height: 68px;
    min-height: 68px;
    padding: 12px 0 !important;
  }

  .diagnostic-page {
    padding-top: 68px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lofts-char,
  .hero-title-line > span,
  [data-parallax-ready] {
    transform: none !important;
  }

  .services-hero-canvas {
    display: none;
  }
}

/* Homepage work rail: a shallow 3D exhibit built from the real case studies. */
.home-page .portfolio-rail-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  margin-top: 1rem;
}

.home-page .portfolio-rail-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  transition: color 200ms ease-out, background-color 200ms ease-out, border-color 200ms ease-out, transform 200ms ease-out;
}

.home-page .portfolio-rail-button:hover,
.home-page .portfolio-rail-button:focus-visible {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-2px);
}

.home-page .portfolio-rail-button:disabled {
  cursor: not-allowed;
  opacity: .45;
  transform: none;
}

.home-page .portfolio-rail-play {
  margin-left: .15rem;
}

.home-page .portfolio-rail-play svg[hidden] {
  display: none;
}

.home-page .portfolio-rail-status {
  display: grid;
  grid-template-columns: auto minmax(36px, 84px) minmax(8ch, auto) auto;
  align-items: center;
  gap: .7rem;
  min-width: min(100%, 330px);
  margin: 0;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: .7rem;
  line-height: 1;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.home-page .portfolio-rail-status i {
  display: block;
  height: 1px;
  background: var(--line);
}

.home-page .portfolio-rail-status strong {
  overflow: hidden;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 821px) {
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] {
    position: relative;
    display: block !important;
    height: clamp(520px, 43vw, 650px);
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 36px 90px -62px rgba(23, 20, 17, .8);
    perspective: 1550px;
    perspective-origin: 50% 42%;
    isolation: isolate;
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
  }

  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail].is-dragging {
    cursor: grabbing;
  }

  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail]::before {
    position: absolute;
    z-index: 0;
    right: 8%;
    bottom: -31%;
    left: 8%;
    height: 58%;
    border: 1px solid var(--line);
    border-radius: 50%;
    content: "";
    opacity: .78;
    transform: rotateX(66deg);
    transform-origin: 50% 0;
    pointer-events: none;
  }

  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail]::after {
    position: absolute;
    z-index: 0;
    top: 7%;
    left: 50%;
    color: var(--muted-2);
    content: "STRATEGY  /  DESIGN  /  ENGINEERING";
    font-family: var(--font-sans);
    font-size: clamp(.65rem, 1vw, .82rem);
    letter-spacing: .18em;
    opacity: .58;
    white-space: nowrap;
    transform: translateX(-50%);
    pointer-events: none;
  }

  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] > .pf-card,
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] > .pf-card--featured,
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] > .pf-card:nth-child(n),
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] > .pf-card--featured:nth-child(n) {
    position: absolute;
    z-index: var(--rail-order, 1);
    top: 46%;
    left: 50%;
    display: block !important;
    width: clamp(220px, 18.5vw, 340px);
    min-width: 0;
    margin: 0;
    opacity: 1 !important;
    transform: translate(-50%, -50%) translate3d(var(--rail-x, 0), var(--rail-y, 0), var(--rail-z, 0)) translateX(var(--portfolio-drag-x, 0px)) rotateY(var(--rail-rotate, 0deg)) rotateZ(var(--rail-tilt, 0deg)) scale(var(--rail-scale, 1)) !important;
    transform-origin: 50% 82%;
    transition: transform 520ms cubic-bezier(.22, 1, .36, 1), opacity 360ms ease-out, filter 200ms ease-out;
    will-change: transform !important;
  }

  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] > .pf-card:nth-child(n + 12) {
    display: none !important;
  }

  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail].is-dragging > .pf-card,
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail].is-dragging > .pf-card--featured {
    transition: none !important;
  }

  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card-img,
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card--featured .pf-card-img,
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card:nth-child(n) .pf-card-img {
    aspect-ratio: 4 / 5 !important;
    overflow: hidden;
    border: 1px solid rgba(23, 20, 17, .18) !important;
    border-radius: 7px;
    background: var(--bg-soft);
    box-shadow: 0 34px 54px -32px rgba(23, 20, 17, .55), inset 0 1px 0 rgba(255, 255, 255, .5);
    opacity: var(--rail-opacity, 1);
    transform: translateZ(0) !important;
    transition: border-color 200ms ease-out, box-shadow 200ms ease-out, opacity 200ms ease-out, transform 200ms ease-out !important;
  }

  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card-img img,
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card--featured .pf-card-img img,
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card:nth-child(n) .pf-card-img img {
    object-fit: cover;
    object-position: top center;
    filter: saturate(.86) contrast(1.02);
    transition: filter 200ms ease-out, transform 200ms ease-out;
  }

  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .is-rail-active .pf-card-img {
    border-color: color-mix(in srgb, var(--accent) 72%, var(--line)) !important;
    box-shadow: 0 42px 70px -32px rgba(23, 20, 17, .72), 0 0 0 1px color-mix(in srgb, var(--accent) 42%, transparent);
    opacity: 1;
  }

  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .is-rail-active .pf-card-img img,
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card:hover .pf-card-img img {
    filter: saturate(1) contrast(1.04);
    transform: scale(1.015);
  }

  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card-body,
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card--featured .pf-card-body {
    min-height: 64px;
    padding: .85rem .15rem 0;
    color: var(--ink);
  }

  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card-tag {
    display: block;
    overflow: hidden;
    margin: 0 0 .3rem;
    color: var(--ink);
    font-size: .56rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card-name,
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card--featured .pf-card-name,
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card:nth-child(n) .pf-card-name {
    margin: 0;
    color: var(--ink);
    font-size: clamp(1.15rem, 1.55vw, 1.55rem);
    line-height: 1;
  }

  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card-desc,
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card-foot {
    display: none !important;
  }

  html[data-theme="dark"] .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] {
    border-color: rgba(244, 240, 233, .18);
    background: #0e0d0b;
  }

  html[data-theme="dark"] .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail]::before {
    border-color: rgba(244, 240, 233, .17);
  }

  html[data-theme="dark"] .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail]::after {
    color: rgba(244, 240, 233, .38);
  }

  html[data-theme="dark"] .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card-img,
  html[data-theme="dark"] .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card--featured .pf-card-img {
    border-color: rgba(244, 240, 233, .28) !important;
    background: #26221e;
    box-shadow: 0 34px 54px -28px rgba(0, 0, 0, .94), inset 0 1px 0 rgba(255, 255, 255, .11);
  }

  html[data-theme="dark"] .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card-body,
  html[data-theme="dark"] .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card-tag,
  html[data-theme="dark"] .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card-name,
  html[data-theme="dark"] .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card--featured .pf-card-name {
    color: #f4f0e9 !important;
  }

  html[data-theme="dark"] .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card-tag {
    opacity: .62;
  }
}

@media (max-width: 820px) {
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] {
    padding: .8rem !important;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface) !important;
    perspective: 1000px;
    touch-action: pan-x pan-y;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] > .pf-card:nth-child(-n + 11),
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] > .pf-card--featured:nth-child(-n + 11) {
    display: block !important;
  }

  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] > .pf-card:nth-child(n + 12) {
    display: none !important;
  }

  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] > .pf-card,
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] > .pf-card--featured,
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] > .pf-card:nth-child(n) {
    opacity: .72;
    transform: perspective(900px) rotateY(-5deg) scale(.96) !important;
    transform-origin: 50% 70%;
    transition: transform 420ms cubic-bezier(.22, 1, .36, 1), opacity 280ms ease-out;
  }

  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] > .is-rail-active {
    opacity: 1;
    transform: perspective(900px) rotateY(0deg) translateY(-4px) scale(1) !important;
  }

  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card-body,
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card--featured .pf-card-body {
    background: var(--surface) !important;
    color: var(--ink) !important;
  }

  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card-tag,
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card-name,
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card--featured .pf-card-name {
    color: var(--ink) !important;
  }

  html[data-theme="dark"] .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] {
    border-color: rgba(244, 240, 233, .18);
    background: #0e0d0b !important;
  }

  html[data-theme="dark"] .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card-body,
  html[data-theme="dark"] .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card--featured .pf-card-body {
    background: #0e0d0b !important;
    color: #f4f0e9 !important;
  }

  html[data-theme="dark"] .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card-tag,
  html[data-theme="dark"] .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card-name,
  html[data-theme="dark"] .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] .pf-card--featured .pf-card-name {
    color: #f4f0e9 !important;
  }

  .home-page .portfolio-rail-controls {
    justify-content: space-between;
    gap: .45rem;
  }

  .home-page .portfolio-rail-status {
    min-width: 0;
    grid-template-columns: auto minmax(24px, 1fr) minmax(7ch, auto) auto;
  }

  .home-page .portfolio-rail-play {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] > .pf-card,
  .home-page .home-portfolio-stage .pf-grid[data-portfolio-rail] > .pf-card--featured,
  .home-page .portfolio-rail-button {
    transition-duration: 0.01ms !important;
  }
}

/* Keep the homepage hero composition authoritative after legacy layers. */
.home-page .hero-scroll-scene {
  box-sizing: border-box;
  align-items: center !important;
  grid-template-columns: minmax(0, .94fr) minmax(460px, 1.06fr) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  gap: clamp(2rem, 4.5vw, 5rem) !important;
  row-gap: 0 !important;
  min-height: min(680px, calc(100svh - 76px)) !important;
  padding-top: clamp(3rem, 5.5vh, 4.75rem) !important;
  padding-bottom: clamp(3rem, 5vh, 4.25rem) !important;
}

.home-page .hero-main,
.home-service-world-ready .home-page .hero-main {
  grid-column: 1 !important;
  grid-row: 1 !important;
  align-self: center !important;
  max-width: 660px;
}

.home-page .hero-system-signal {
  display: none !important;
}

.home-page .hero-title,
.home-service-world-ready .home-page .hero-title {
  width: 100%;
  max-width: 660px;
  margin: 0 !important;
  font-size: clamp(3.7rem, 4.85vw, 5.05rem) !important;
  line-height: .96 !important;
}

.home-page .hero-lead,
.home-service-world-ready .home-page .hero-lead {
  width: min(100%, 45ch);
  margin-top: clamp(1.75rem, 3vh, 2.35rem) !important;
}

.home-page .home-service-world,
.home-service-world-ready .home-page .home-service-world {
  display: block !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: stretch !important;
  justify-self: stretch !important;
  width: 100% !important;
  height: auto !important;
  min-height: clamp(500px, 40vw, 600px) !important;
  margin: 0 !important;
}

.home-page .hero-sidecar {
  display: none !important;
}

.home-service-world .home-hero-canvas {
  z-index: 1;
}

@media (min-width: 881px) {
  .home-page .hero-scroll-scene {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    grid-template-rows: auto auto minmax(0, auto) auto !important;
    column-gap: clamp(1rem, 2vw, 2rem) !important;
    row-gap: 0 !important;
    align-items: start !important;
  }

  .home-page .hero-main,
  .home-service-world-ready .home-page .hero-main {
    display: block !important;
    grid-column: 1 / span 6 !important;
    grid-row: 1 / span 4 !important;
    align-self: start !important;
    max-width: 660px !important;
    padding-top: 0 !important;
  }

  .home-page .hero-main > .eyebrow {
    width: 100% !important;
    align-self: auto !important;
    margin: 0 0 clamp(1.5rem, 3vh, 2.25rem) !important;
  }

  .home-page .hero-title,
  .home-service-world-ready .home-page .hero-title {
    grid-column: 1 / span 6 !important;
    grid-row: 2 !important;
  }

  .home-page .hero-lead,
  .home-service-world-ready .home-page .hero-lead {
    grid-column: 1 / span 5 !important;
    grid-row: 3 !important;
  }

  .home-page .hero-actions {
    grid-column: 1 / span 5 !important;
    grid-row: 4 !important;
  }

  .home-page .home-service-world,
  .home-service-world-ready .home-page .home-service-world {
    grid-column: 7 / -1 !important;
    grid-row: 1 / span 4 !important;
    align-self: start !important;
    min-height: clamp(520px, 40vw, 620px) !important;
  }

  .home-page .home-service-world__topline {
    top: 0 !important;
  }
}

@media (max-width: 1120px) {
  .home-page .hero-scroll-scene {
    grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
    column-gap: clamp(1rem, 2vw, 2rem) !important;
    row-gap: 0 !important;
  }

  .home-page .hero-title,
  .home-service-world-ready .home-page .hero-title {
    font-size: clamp(3.05rem, 4.7vw, 3.85rem) !important;
  }
}

@media (max-width: 880px) {
  .home-page .hero-scroll-scene {
    grid-template-columns: 1fr !important;
    gap: 1.4rem !important;
    min-height: 0 !important;
    padding-top: 3rem !important;
    padding-bottom: 3.5rem !important;
  }

  .home-page .hero-main,
  .home-page .home-service-world,
  .home-service-world-ready .home-page .home-service-world {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  .home-page .home-service-world,
  .home-service-world-ready .home-page .home-service-world {
    min-height: clamp(430px, 70vw, 560px) !important;
    margin-top: .5rem !important;
  }
}

@media (max-width: 640px) {
  .home-page .hero-scroll-scene {
    padding-top: 2.2rem !important;
    padding-bottom: 2.75rem !important;
  }

  .home-page .hero-title,
  .home-service-world-ready .home-page .hero-title {
    font-size: clamp(2.7rem, 12.4vw, 3.45rem) !important;
    line-height: .98 !important;
  }

  .home-page .home-service-world,
  .home-service-world-ready .home-page .home-service-world {
    min-height: min(105vw, 430px) !important;
  }
}
