/* ==========================================================================
   Nimus Creatives — site layout.
   Load order: tokens.css → components.css (design system) → this file.

   This file only composes design-system components into pages. Every
   colour, size, space, radius and shadow comes from a token in tokens.css.
   If you want to re-theme the site, change tokens — not this file.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Responsive type: the design system specifies desktop sizes. On phones
   the display and heading tokens step down so lines don't overflow.
   -------------------------------------------------------------------------- */
@media (max-width: 720px) {
  :root {
    --display-xl-size: 48px; --display-xl-line: 54px;
    --display-size: 40px;    --display-line: 46px;
    --heading-1-size: 36px;  --heading-1-line: 42px;
    --heading-2-size: 28px;  --heading-2-line: 36px;
    --body-lg-size: 19px;    --body-lg-line: 30px;
    --body-size: 17px;       --body-line: 28px;
    --stat-size: 48px;       --stat-line: 52px;
  }
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 104px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  font-size: var(--body-size); line-height: var(--body-line);
  background: var(--paper); color: var(--ink);
  overflow-x: hidden;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: var(--link); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid transparent; box-shadow: var(--focus-ring); border-radius: var(--radius-sm);
}
main:focus { outline: none; }
::selection { background: var(--blue-soft); color: var(--ink); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--space-4); top: -100px; z-index: 200; padding: var(--space-2) var(--space-4); border-radius: var(--radius-full); background: var(--action); color: var(--on-accent); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: var(--space-4); }

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--space-6)); margin-inline: auto; padding-inline: var(--space-6); }
.container-wide { max-width: calc(var(--container) + 2 * var(--space-6)); margin-inline: auto; }
@media (max-width: 600px) { .container { padding-inline: var(--space-4); } }

.section { padding-block: var(--space-24); }
@media (max-width: 720px) { .section { padding-block: var(--space-16); } }
.section-tight { padding-block: var(--space-12); }

/* Bands: alternate paper / surface-alt / night. Never two night bands in a row. */
.band-paper { background: var(--paper); }
.band-alt   { background: var(--surface-alt); }
.band-night { background: var(--night); color: var(--on-night); }
.band-line  { border-block: 1px solid var(--line); }

/* SectionHeader inside page layouts: drop the component's own padding */
.nm-sh { padding: 0; }
.container > .nm-sh { margin-bottom: var(--space-8); }
.nm-sh h2 { font-size: var(--heading-1-size); line-height: var(--heading-1-line); }
.band-night .nm-sh { background: transparent; }

.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-12); align-items: center; }
.split-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split-top { align-items: start; }
@media (max-width: 860px) { .split, .split-even { grid-template-columns: 1fr; gap: var(--space-8); } }

.stack { display: grid; gap: var(--space-4); justify-items: start; align-content: start; }
.stack-lg { gap: var(--space-6); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.section-cta { margin-top: var(--space-8); display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.section-cta p { color: var(--ink-muted); }
.band-night .section-cta p { color: var(--on-night-muted); }

/* --------------------------------------------------------------------------
   Text styles
   -------------------------------------------------------------------------- */
.lead { font-size: var(--body-lg-size); line-height: var(--body-lg-line); color: var(--ink-muted); max-width: var(--measure); }
.muted { color: var(--ink-muted); }
.band-night .lead, .band-night .muted { color: var(--on-night-muted); }
.t-display-xl, .t-display, .t-heading-1 { text-wrap: balance; }
.small { font-size: var(--small-size); line-height: var(--small-line); }
.label { font-size: var(--label-size); line-height: var(--label-line); font-weight: var(--label-weight); letter-spacing: var(--label-tracking); color: var(--ink-muted); }
.band-night .label { color: var(--on-night-muted); }
.text-link { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--link); font-weight: 600; font-size: var(--button-size); text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Scroll progress bar
   -------------------------------------------------------------------------- */
.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 100; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; background: var(--blue); transform-origin: 0 50%; transform: scaleX(0); }

/* --------------------------------------------------------------------------
   Header (NavBar) + mobile menu
   -------------------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid transparent; transition: border-color .15s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .nm-nav { height: 80px; }
.nav-actions { display: flex; align-items: center; gap: var(--space-2); }
/* Logo: blue wordmark in light mode, white wordmark in dark mode */
.site-header .nm-brand { display: inline-flex; align-items: center; }
.brand-logo { display: block; height: 40px; width: auto; }
.brand-logo-dark { display: none; }
:root[data-theme="dark"] .brand-logo-light { display: none; }
:root[data-theme="dark"] .brand-logo-dark { display: block; }

/* Theme toggle: shows a moon in light mode, a sun in dark mode */
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: inline-block; }
@media (max-width: 440px) {
  .nav-actions { gap: var(--space-1); }
  .nav-actions .nm-ibtn { width: 40px; height: 40px; }
  .nav-actions .nm-btn-sm { height: 40px; padding: 0 var(--space-4); }
  .nav-actions .nm-btn-sm .nm-btn-arrow { display: none; }
  .site-header .brand-logo { height: 34px; }
}
.menu-toggle { display: none; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: inline-block; }

/* Seven links + CTA need more room than the system's 720px breakpoint gives. */
@media (max-width: 1000px) {
  .site-header .nm-nav-links { display: none; }
  .menu-toggle { display: inline-grid; }
}
@media (max-width: 600px) {
  .site-header .nm-nav { padding: 0 var(--space-4); height: 68px; }
}

.mobile-menu { border-top: 1px solid var(--line); background: var(--paper); padding: var(--space-4) var(--space-4) var(--space-6); display: grid; gap: var(--space-6); max-height: calc(100vh - 68px); overflow-y: auto; }
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: grid; }
.mobile-menu nav a { padding: var(--space-3) 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: var(--body-lg-size); line-height: var(--body-lg-line); }
.mobile-menu nav a[aria-current="page"] { color: var(--link); font-weight: 500; }
@media (min-width: 1001px) { .mobile-menu { display: none !important; } }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { padding-block: var(--space-16) var(--space-24); }
@media (max-width: 720px) { .hero { padding-block: var(--space-12) var(--space-16); } }
.hero-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--space-12); align-items: end; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; gap: var(--space-8); } }
.hero-copy { display: grid; gap: var(--space-6); justify-items: start; }
.hero-copy h1 { max-width: 16ch; }
/* Home: the headline spans the whole container, then copy (left) and proof (right) */
/* Home hero: services strip under the grid, ruled off with a 1px line */
.hero-services { display: flex; align-items: flex-start; gap: var(--space-4) var(--space-8); margin-top: var(--space-16); padding-top: var(--space-8); border-top: 1px solid var(--line); }
.hero-services .label { flex: none; line-height: 40px; }   /* centred on the first row of 40px pills */
/* Copy column wide enough for a two-line headline; proof cards take a fixed rail */
@media (min-width: 861px) {
  .page-home .hero-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .page-home .hero-copy h1 { max-width: 18ch; }
}
/* Wide screens: the headline may run into the column gap so it breaks into two balanced lines */
@media (min-width: 1200px) { .page-home .hero-copy h1 { margin-right: calc(-1 * var(--space-12)); } }
@media (max-width: 860px) { .hero-services { flex-direction: column; align-items: flex-start; margin-top: var(--space-12); } }
.page-hero { padding-block: var(--space-16); }
.page-hero-roomy { padding-block: var(--space-24); }
@media (max-width: 720px) { .page-hero-roomy { padding-block: var(--space-16); } }
.page-hero .hero-copy h1 { max-width: 20ch; }

/* Proof badge (Stat pattern, compact) */
.proof { display: grid; gap: var(--space-2); padding: var(--space-6); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.proof-value { font-size: var(--stat-size); line-height: var(--stat-line); font-weight: var(--stat-weight); letter-spacing: var(--stat-tracking); font-variant-numeric: tabular-nums; }
.proof-label { color: var(--ink-muted); }
.proof .nm-stat-top { margin-bottom: var(--space-2); }

.hero-aside { display: grid; gap: var(--space-4); }

/* Anchor pills (jump links on the services page, blog filters) */
.pill-nav { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pill-nav a { display: inline-flex; align-items: center; gap: var(--space-2); height: 40px; padding: 0 var(--space-4); border-radius: var(--radius-full); border: 1px solid var(--line); background: var(--surface); color: var(--ink-muted); font-size: var(--small-size); text-decoration: none; transition: border-color .15s, color .15s; }
.pill-nav a:hover { border-color: var(--line-strong); color: var(--ink); }
.pill-nav a[aria-current="page"], .pill-nav a[aria-current="true"] { background: var(--blue-soft); border-color: var(--blue-soft); color: var(--link); font-weight: 500; }

/* --------------------------------------------------------------------------
   Trust strip (client names / logos)
   -------------------------------------------------------------------------- */
.trust { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4) var(--space-12); margin-bottom: var(--space-8); }
.trust .label { flex: none; }
.client-name { font-size: var(--heading-3-size); line-height: var(--heading-3-line); font-weight: 300; letter-spacing: -.01em; color: var(--ink-muted); white-space: nowrap; }

/* Logos are masks filled with a token, so they follow the theme. Wide
   logos are capped in width so they don't outweigh the square ones. */
.client-logo {
  --logo-h: 64px;
  display: block; width: min(136px, calc(var(--logo-h) * var(--ratio, 1))); aspect-ratio: var(--ratio, 1);
  background: var(--ink-muted); transition: background-color .2s;
  -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat;
}
.client-logo:hover { background: var(--ink); }
.band-night .client-logo { background: var(--on-night-muted); }
.band-night .client-logo:hover { background: var(--on-night); }
@media (max-width: 720px) { .client-logo { --logo-h: 40px; } }

/* Logo marquee: rows moving in alternating directions inside the container,
   edges faded out. */
.marquee {
  display: grid; gap: var(--space-8); overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; width: max-content; }
.marquee-list { display: flex; align-items: center; gap: var(--space-24); padding: 0 var(--space-24) 0 0; margin: 0; list-style: none; }
.marquee-list li { flex: none; display: grid; place-items: center; min-height: 64px; }
@media (max-width: 720px) {
  .marquee { gap: var(--space-6); }
  .marquee-list { gap: var(--space-16); padding-right: var(--space-16); }
  .marquee-list li { min-height: 40px; }
}
@keyframes marquee { to { transform: translateX(calc(-100% / var(--copies, 2))); } }
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: marquee var(--marquee-duration, 40s) linear infinite; }
  .marquee-row[data-direction="right"] .marquee-track { animation-direction: reverse; }
  .marquee:hover .marquee-track { animation-play-state: paused; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { width: auto; }
  .marquee-list { flex-wrap: wrap; justify-content: center; gap: var(--space-6) var(--space-12); padding: 0; }
  .marquee-list[aria-hidden] { display: none; }
}

/* --------------------------------------------------------------------------
   Cards built from tokens (for content the system has no component for)
   -------------------------------------------------------------------------- */
.card { display: grid; gap: var(--space-4); align-content: start; padding: var(--space-6); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); min-width: 0; }
.card h3 { font-size: var(--heading-3-size); line-height: var(--heading-3-line); font-weight: var(--heading-3-weight); letter-spacing: var(--heading-3-tracking); }
.card p { color: var(--ink-muted); }
.card-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--line); color: var(--blue); }
.card-num { font-size: var(--label-size); font-weight: 500; letter-spacing: var(--label-tracking); color: var(--ink-muted); font-variant-numeric: tabular-nums; }

/* Lists with icons */
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.check-list li { display: flex; gap: var(--space-3); align-items: flex-start; }
.check-list.card { padding: var(--space-6) var(--space-8); gap: var(--space-4); }
@media (max-width: 600px) { .check-list.card { padding: var(--space-6); } }
.check-list .nm-ico { margin-top: 4px; color: var(--success); flex: none; }
.check-list.is-blue .nm-ico { color: var(--blue); }
.x-list .nm-ico { color: var(--ink-muted); }
.band-night .check-list .nm-ico { color: var(--blue); }
.band-night .x-list .nm-ico { color: var(--on-night-muted); }

/* Compare (Problem section) */
.compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
@media (max-width: 720px) { .compare { grid-template-columns: 1fr; } }
.compare .card.is-ours { border-color: var(--action); }

/* ServiceCard as a link */
.scard-link { text-decoration: none; transition: border-color .15s; }
.scard-link:hover { border-color: var(--on-night-muted); }
.scard-link:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
.scard-more { display: inline-flex; align-items: center; gap: var(--space-2); margin-top: auto; padding-top: var(--space-2); font-size: var(--small-size); font-weight: 600; color: var(--on-night); }

/* Promise */
.promise { display: grid; gap: var(--space-8); }
.promise-quote { margin: 0; position: relative; max-width: 24ch; font-size: var(--display-size); line-height: var(--display-line); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); text-wrap: balance; }
.promise-mark { display: block; height: 32px; font-size: 72px; line-height: 64px; font-weight: 300; color: var(--red); }
.promise-by { font-size: var(--small-size); color: var(--ink-muted); }
/* Promise roadmap: one continuous ruled track, a node per milestone, the goal in red */
.promise-path { justify-self: stretch; list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.promise-step { position: relative; display: grid; gap: var(--space-3); align-content: start; padding: var(--space-8) var(--space-8) 0 0; border-top: 1px solid var(--line-strong); }
.promise-step::before { content: ""; position: absolute; top: -6px; left: 0; width: 11px; height: 11px; box-sizing: border-box; border-radius: var(--radius-full); border: 1px solid var(--line-strong); background: var(--surface-alt); }
.promise-step.is-goal { border-top-color: transparent; }
.promise-step.is-goal::before { background: var(--red); border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.promise-month { display: flex; align-items: baseline; gap: var(--space-2); font-size: var(--stat-size); line-height: var(--stat-line); font-weight: 300; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--blue); }
.promise-month small { font-size: var(--label-size); line-height: var(--label-line); font-weight: var(--label-weight); letter-spacing: var(--label-tracking); color: var(--ink-muted); }
.is-goal .promise-month { color: var(--red-text); }
.promise-step h3 { font-size: var(--heading-3-size); line-height: var(--heading-3-line); font-weight: var(--heading-3-weight); letter-spacing: var(--heading-3-tracking); }
.promise-step p { max-width: 34ch; color: var(--ink-muted); }
@media (max-width: 720px) {
  .promise-path { grid-template-columns: 1fr; padding-left: 6px; }
  .promise-step { padding: 0 0 var(--space-8) var(--space-8); border-top: 0; border-left: 1px solid var(--line-strong); }
  .promise-step.is-goal { border-image: linear-gradient(var(--line-strong) 26px, transparent 26px) 1; padding-bottom: 0; }
  .promise-step::before { top: 26px; left: -6px; }
}

/* Media + placeholders */
.media { display: block; width: 100%; height: auto; object-fit: cover; border-radius: var(--radius-lg); background: var(--surface-alt); }
.media.media-focus-right { object-position: 80% center; }
.media-placeholder { display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface-alt); color: var(--ink-muted); padding: var(--space-4); }
.media-placeholder span { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--small-size); text-align: center; word-break: break-all; }
.band-alt .media-placeholder { background: var(--surface); }
.nm-pcard-media .media, .post-card .media { border-radius: var(--radius-sm); height: 100%; }
.nm-pcard-media .media-placeholder { border: 0; }

/* --------------------------------------------------------------------------
   Case studies (ProjectCard + story)
   -------------------------------------------------------------------------- */
.case-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
@media (max-width: 960px) { .case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Design system: ProjectCards become a horizontal scroller on phones */
@media (max-width: 600px) {
  .case-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 85%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--space-4); margin-inline: calc(-1 * var(--space-4)); padding-inline: var(--space-4); scroll-padding-inline: var(--space-4); }
  .case-grid > * { scroll-snap-align: start; }
}
/* Cards share row tracks (subgrid) so images, headings and story rows line up
   across a row even when titles or copy wrap differently.
   Rows: head, media, 3 x (dt, dd), plus metric when any card has one. */
.case-card { align-content: start; }
@supports (grid-template-rows: subgrid) {
  .case-card { grid-row: span 8; grid-template-rows: subgrid; row-gap: var(--space-3); }
  .case-grid:has(.case-metric) .case-card { grid-row: span 9; }
  .case-story { grid-row: span 6; grid-template-rows: subgrid; }
}
.case-story { display: grid; gap: var(--space-3); padding: var(--space-2) var(--space-2) var(--space-3); }
.case-story dd { align-self: start; }
.case-story dt { font-size: var(--label-size); line-height: var(--label-line); font-weight: 700; letter-spacing: var(--label-tracking); color: var(--ink); }
.case-story dd { margin: 0 0 var(--space-2); font-size: var(--small-size); line-height: var(--small-line); color: var(--ink-muted); }
.case-metric { margin: 0 var(--space-2) var(--space-3); display: flex; align-items: baseline; gap: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.case-metric strong { font-size: var(--heading-1-size); line-height: var(--heading-1-line); font-weight: 300; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.case-metric span { font-size: var(--small-size); color: var(--ink-muted); }

/* Work page: wide cards (media left, story right) */
.work-list { display: grid; gap: var(--space-6); }
.work-card { padding: var(--space-2); border-radius: calc(var(--radius-lg) + var(--space-2)); background: var(--surface-alt); border: 1px solid var(--line); }
.band-alt .work-card { background: var(--paper); }
.work-card-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-12); align-items: center; padding: var(--space-4); border-radius: var(--radius-lg); background: var(--surface); transition: box-shadow .2s; }
.work-card:hover .work-card-inner { box-shadow: var(--shadow-lg); }
.work-card-media { display: block; border-radius: var(--radius-md); overflow: hidden; }
.work-card-media .media { border-radius: var(--radius-md); height: 100%; transition: transform .4s ease-out; }
.work-card:hover .work-card-media .media { transform: scale(1.03); }
.work-card-body { display: grid; gap: var(--space-4); justify-items: start; padding-block: var(--space-4); padding-right: var(--space-4); }
.work-card-title { font-size: var(--heading-2-size); line-height: var(--heading-2-line); font-weight: var(--heading-2-weight); letter-spacing: var(--heading-2-tracking); }
.work-card-title a { color: inherit; text-decoration: none; }
.work-card-title a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.work-card-intro { display: grid; gap: var(--space-3); max-width: var(--measure); color: var(--ink-muted); font-size: var(--small-size); line-height: var(--small-line); }
.work-card-body .nm-btn { margin-top: var(--space-4); }
@media (max-width: 860px) {
  .work-card-inner { grid-template-columns: 1fr; gap: var(--space-4); padding: var(--space-3); }
  .work-card-media .media { aspect-ratio: 4 / 3 !important; }
  .work-card-body { padding: 0 var(--space-2) var(--space-3); }
}
@media (prefers-reduced-motion: reduce) { .work-card-inner, .work-card-media .media { transition: none; } .work-card:hover .work-card-media .media { transform: none; } }

/* Case study page */
.case-hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: var(--space-12); align-items: center; }
.case-hero-copy { display: grid; gap: var(--space-4); justify-items: start; }
.case-hero-copy h1 { margin-top: var(--space-2); }
.back-link .flip-x { transform: scaleX(-1); }
.case-services { display: grid; gap: var(--space-3); margin-top: var(--space-4); padding-top: var(--space-6); border-top: 1px solid var(--line); width: 100%; }
.case-hero-media { padding: var(--space-2); border-radius: calc(var(--radius-lg) + var(--space-2)); background: var(--surface-alt); border: 1px solid var(--line); }
.case-hero-media .media { border-radius: var(--radius-lg); }
@media (max-width: 860px) { .case-hero { grid-template-columns: 1fr; gap: var(--space-8); } }
.case-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
@media (max-width: 860px) { .case-steps { grid-template-columns: 1fr; } }
.case-step { display: grid; gap: var(--space-3); align-content: start; padding: var(--space-6); border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); }
.case-step .t-label { color: var(--ink); font-weight: 700; }
.case-step p { color: var(--ink-muted); }
.case-metric-lg { margin: var(--space-8) 0 0; }
.case-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.case-gallery figure { margin: 0; }
.case-gallery figure:first-child { grid-column: 1 / -1; }
@media (max-width: 600px) { .case-gallery { grid-template-columns: 1fr; gap: var(--space-4); } }

/* Site preview: a tall full-page screenshot that scrolls inside a laptop bezel */
.site-preview { margin: 0; display: grid; gap: var(--space-4); justify-items: center; }
.site-preview-frame { position: relative; width: 100%; padding: 14px; border-radius: 24px; background: #111014; box-shadow: var(--shadow-lg); }
.site-preview-frame::before { content: ''; position: absolute; top: 0; left: 50%; z-index: 1; width: 80px; height: 14px; margin-left: -40px; border-radius: 0 0 10px 10px; background: #111014; }
.site-preview-screen {
  aspect-ratio: 16 / 10; max-height: 78vh; overflow-y: auto; overscroll-behavior: contain;
  border-radius: 10px; background: #fff; scrollbar-width: thin; scrollbar-color: #11101466 transparent;
}
.site-preview-screen img { display: block; width: 100%; height: auto; }
.site-preview-screen:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.site-preview-hint { display: inline-flex; align-items: center; gap: var(--space-2); font-size: .875rem; color: var(--ink-muted); }
.site-preview-hint .rot-90 { transform: rotate(90deg); }
@media (max-width: 600px) {
  .site-preview-frame { padding: 8px; border-radius: 16px; }
  .site-preview-frame::before { width: 56px; height: 8px; margin-left: -28px; }
  .site-preview-screen { aspect-ratio: 4 / 5; border-radius: 8px; }
}

/* --------------------------------------------------------------------------
   Services page
   -------------------------------------------------------------------------- */
.service-detail { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-12); align-items: start; }
@media (max-width: 860px) { .service-detail { grid-template-columns: 1fr; gap: var(--space-8); } }
.service-detail .stack h2 { font-size: var(--heading-1-size); line-height: var(--heading-1-line); font-weight: 300; letter-spacing: var(--heading-1-tracking); }
.service-detail .body-copy { display: grid; gap: var(--space-4); max-width: var(--measure); color: var(--ink-muted); }
.service-for { padding: var(--space-4); border-left: 2px solid var(--blue); background: var(--blue-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink); max-width: var(--measure); }
.service-for b { font-weight: 600; }
.band-night .service-detail .body-copy { color: var(--on-night-muted); }
.band-night .card { background: var(--night-raised); border-color: var(--night-line); color: var(--on-night); }
.band-night .card p { color: var(--on-night-muted); }
.band-night .service-for { background: var(--night-raised); color: var(--on-night); }
.badge-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* --------------------------------------------------------------------------
   Process steps
   -------------------------------------------------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.step { display: grid; grid-template-columns: 120px minmax(0, 5fr) minmax(0, 4fr); gap: var(--space-6); padding-block: var(--space-8); border-bottom: 1px solid var(--line); }
@media (max-width: 860px) { .step { grid-template-columns: 1fr; gap: var(--space-3); } }
.step-num { font-size: var(--stat-size); line-height: var(--stat-line); font-weight: 300; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--blue); }
.step h3 { font-size: var(--heading-2-size); line-height: var(--heading-2-line); font-weight: 300; letter-spacing: var(--heading-2-tracking); margin-bottom: var(--space-3); }
.step p { color: var(--ink-muted); }
.step-get { display: grid; gap: var(--space-3); align-content: start; }
.mini-steps { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-3); list-style: none; margin: 0; padding: 0; counter-reset: step; }
@media (max-width: 960px) { .mini-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .mini-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mini-steps li { display: grid; gap: var(--space-2); padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); font-size: var(--small-size); line-height: 24px; }
.mini-steps li span { font-size: var(--label-size); color: var(--ink-muted); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Comparison table (systems page)
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.compare-table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: var(--small-size); line-height: var(--small-line); }
.compare-table th, .compare-table td { padding: var(--space-4) var(--space-6); text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare-table thead th { font-size: var(--label-size); font-weight: 500; letter-spacing: var(--label-tracking); color: var(--ink-muted); background: var(--surface-alt); }
.compare-table tbody th { font-weight: 500; }
.compare-table td { color: var(--ink-muted); }
.compare-table td.is-ours { color: var(--ink); }
.compare-table tr:last-child th, .compare-table tr:last-child td { border-bottom: 0; }
.compare-table .nm-ico { vertical-align: -3px; margin-right: var(--space-2); }
.compare-table td.is-ours .nm-ico { color: var(--success); }

/* --------------------------------------------------------------------------
   Pricing
   -------------------------------------------------------------------------- */
/* Dark rounded panel on a light band. The two plain tiers sit straight on the
   panel; the featured tier is an inset light card. */
.pricing-panel { background: var(--night); color: var(--on-night); border-radius: var(--radius-lg); padding: var(--space-6); }
.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); align-items: stretch; }
@media (max-width: 960px) { .pricing-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; } }
.pricing-panel .nm-price { grid-template-rows: auto auto auto auto 1fr auto; gap: var(--space-6); padding: var(--space-8) var(--space-6); border: 0; border-radius: var(--radius-lg); background: transparent; }
.pricing-panel .nm-price-featured { background: var(--on-night); color: var(--night); }
@media (max-width: 600px) { .pricing-panel { padding: var(--space-3); } .pricing-panel .nm-price { padding: var(--space-6) var(--space-4); } }

/* Tier name: a filled tag with crosshair corners (CornerFrame marks) */
.price-tag { position: relative; display: inline-block; margin: 8px; padding: var(--space-3) var(--space-6); background: var(--night-raised); border: 1px solid var(--night-line); font-size: var(--small-size); line-height: var(--small-line); font-weight: 500; }
.price-tag .nm-cross { color: var(--on-night-muted); }
.nm-price-featured .price-tag { background: var(--blue-soft); border-color: #0807081f; color: var(--night); }
.nm-price-featured .price-tag .nm-cross { color: var(--ink-fixed-muted); }

/* Price: small "From KES" on the baseline, big bold number, period line under */
.pricing-panel .nm-price-amount { flex-wrap: wrap; column-gap: var(--space-2); row-gap: var(--space-1); font-weight: 700; }
.pricing-panel .nm-price-amount small { font-size: var(--small-size); font-weight: 400; letter-spacing: 0; }
.nm-price-amount .price-num { font-size: var(--display-size); line-height: var(--display-line); letter-spacing: var(--display-tracking); }
.nm-price-amount .price-period { flex-basis: 100%; font-size: var(--small-size); line-height: var(--small-line); letter-spacing: 0; font-weight: 400; color: var(--on-night-muted); }
.nm-price-featured .nm-price-amount .price-period { color: var(--ink-fixed-muted); }
.pricing-panel .nm-price > p:not(.nm-price-amount) { color: var(--on-night); }
.pricing-panel .nm-price-featured > p:not(.nm-price-amount) { color: var(--night); }

/* "What's Included" as a light heading, then a roomy list with round checks */
.pricing-panel .nm-price-label { margin: var(--space-6) 0 0; padding: 0; border: 0; font-size: var(--heading-3-size); line-height: var(--heading-3-line); font-weight: 300; letter-spacing: var(--heading-3-tracking); color: var(--on-night-muted); }
.pricing-panel .nm-price-featured .nm-price-label { color: var(--ink-fixed-muted); }
.pricing-panel .nm-price ul { gap: var(--space-4); }
.pricing-panel .nm-price li { align-items: center; }
.price-check { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: var(--radius-full); background: var(--on-night-muted); color: var(--night); }
.nm-price li .price-check .nm-ico { margin: 0; color: inherit; }
.nm-price-featured .price-check { background: var(--action); color: var(--on-accent); }
.nm-price .price-cta { padding-top: var(--space-4); align-self: end; }
.price-note { margin: var(--space-6) var(--space-6) var(--space-2); font-size: var(--small-size); color: var(--on-night-muted); }

/* --------------------------------------------------------------------------
   FAQ panel
   -------------------------------------------------------------------------- */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--space-12); align-items: start; }
@media (max-width: 860px) { .faq-wrap { grid-template-columns: 1fr; gap: var(--space-8); } }
.faq-list .nm-faq:last-child { border-bottom: 0; }
.nm-frame { margin: 9px; } /* keeps the corner crosshairs uncropped */

/* --------------------------------------------------------------------------
   Testimonials
   -------------------------------------------------------------------------- */
.quote-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
@media (max-width: 860px) { .quote-grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   CTA band (before footer)
   -------------------------------------------------------------------------- */
.cta-band-inner { display: grid; gap: var(--space-6); justify-items: start; max-width: 760px; }
.cta-band-inner h2 { max-width: 20ch; }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.prose-cols { display: grid; gap: var(--space-4); max-width: var(--measure); color: var(--ink-muted); font-size: var(--body-lg-size); line-height: var(--body-lg-line); }
.prose-cols strong { color: var(--ink); font-weight: 500; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-left: 1px solid var(--line-strong); }
.timeline li { position: relative; padding: 0 0 var(--space-8) var(--space-8); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 6px; width: 9px; height: 9px; border-radius: var(--radius-full); background: var(--blue); }
.timeline li:last-child::before { background: var(--red); }
.timeline h3 { font-size: var(--heading-3-size); line-height: var(--heading-3-line); font-weight: 400; margin: var(--space-1) 0 var(--space-2); }
.timeline p { color: var(--ink-muted); max-width: var(--measure); }
.portrait-stack { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-4); align-items: end; }

/* Cutout portrait: transparent PNG in a plain CornerFrame, resting on its bottom edge */
.portrait-frame { padding: var(--space-8) var(--space-8) 0; }
.media.media-cutout { background: transparent; border-radius: 0; object-fit: contain; object-position: center bottom; }

/* --------------------------------------------------------------------------
   Blog
   -------------------------------------------------------------------------- */
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-12); align-items: start; }
@media (max-width: 960px) { .blog-layout { grid-template-columns: 1fr; } }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
@media (max-width: 600px) { .post-grid { grid-template-columns: 1fr; } }
.post-card { display: grid; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); text-decoration: none; transition: box-shadow .2s; align-content: start; }
.post-card:hover { box-shadow: var(--shadow-sm); }
.post-card .post-media { aspect-ratio: 16 / 10; border-radius: var(--radius-sm); overflow: hidden; }
.post-card .post-media > * { height: 100%; border-radius: var(--radius-sm); }
.post-card-body { display: grid; gap: var(--space-2); padding: var(--space-2) var(--space-2) var(--space-3); }
.post-card h2, .post-card h3 { font-size: var(--heading-3-size); line-height: var(--heading-3-line); font-weight: 400; letter-spacing: var(--heading-3-tracking); }
.post-card p { color: var(--ink-muted); font-size: var(--body-size); line-height: var(--body-line); }
.post-meta { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; font-size: var(--small-size); color: var(--ink-muted); }
.sidebar { display: grid; gap: var(--space-6); position: sticky; top: 96px; }
@media (max-width: 960px) { .sidebar { position: static; } }
.sidebar-cta { display: grid; gap: var(--space-4); justify-items: start; padding: var(--space-6); border-radius: var(--radius-md); background: var(--night); color: var(--on-night); }
.sidebar-cta h2 { font-size: var(--heading-2-size); line-height: var(--heading-2-line); font-weight: 300; }
.sidebar-cta p { color: var(--on-night-muted); }
.empty-state { padding: var(--space-12); text-align: center; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }

/* Article */
.article-head { display: grid; gap: var(--space-6); justify-items: start; max-width: 820px; }
.article-cover { margin-top: var(--space-8); }
.prose { max-width: var(--measure); font-size: var(--body-lg-size); line-height: var(--body-lg-line); color: var(--ink); }
.prose > * + * { margin-top: var(--space-4); }
.prose h2 { margin-top: var(--space-12); font-size: var(--heading-2-size); line-height: var(--heading-2-line); font-weight: 400; letter-spacing: var(--heading-2-tracking); }
.prose h3 { margin-top: var(--space-8); font-size: var(--heading-3-size); line-height: var(--heading-3-line); font-weight: 500; }
.prose ul, .prose ol { padding-left: var(--space-6); }
.prose li + li { margin-top: var(--space-2); }
.prose li::marker { color: var(--blue); }
.prose strong { font-weight: 600; }
.prose blockquote { margin: var(--space-8) 0; padding-left: var(--space-6); border-left: 2px solid var(--red); font-size: var(--heading-3-size); line-height: var(--heading-3-line); font-weight: 300; }
.prose a { color: var(--link); text-underline-offset: 3px; }
.blog-layout > * { min-width: 0; } /* lets wide tables scroll inside the column instead of widening the page */
.prose table { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); font-size: var(--small-size); line-height: var(--small-line); }
.prose th, .prose td { min-width: 140px; padding: var(--space-3) var(--space-4); text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose thead th { font-weight: 500; color: var(--ink-muted); background: var(--surface-alt); }
.prose tbody th { font-weight: 500; }
.prose tr:last-child th, .prose tr:last-child td { border-bottom: 0; }
.answer-box { max-width: var(--measure); padding: var(--space-4) var(--space-6); border-left: 2px solid var(--blue); background: var(--surface); font-size: var(--body-lg-size); line-height: var(--body-lg-line); color: var(--ink); }
.article-end { margin-top: var(--space-12); padding-top: var(--space-8); border-top: 1px solid var(--line); display: grid; gap: var(--space-4); justify-items: start; max-width: var(--measure); }
.share-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-12); align-items: start; }
@media (max-width: 960px) { .contact-grid { grid-template-columns: 1fr; } }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4) var(--space-6); }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.form-head { display: grid; gap: var(--space-3); margin-bottom: var(--space-8); }
.form-head h2 { font-size: var(--heading-2-size); line-height: var(--heading-2-line); font-weight: 400; }
.form-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-4); margin-top: var(--space-6); }
.form-foot p { font-size: var(--small-size); color: var(--ink-muted); max-width: 36ch; }
.form-alert { display: flex; gap: var(--space-3); align-items: flex-start; margin-bottom: var(--space-6); padding: var(--space-4); border-radius: var(--radius-sm); background: var(--red-soft); color: var(--red-text); font-size: var(--small-size); line-height: var(--small-line); }
.form-alert .nm-ico { flex: none; margin-top: 3px; }
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.contact-side { display: grid; gap: var(--space-6); }
.contact-methods { list-style: none; margin: 0; padding: 0; display: grid; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.contact-methods li + li { border-top: 1px solid var(--line); }
.contact-methods a, .contact-methods .row { display: flex; gap: var(--space-4); align-items: center; padding: var(--space-4) var(--space-6); color: var(--ink); text-decoration: none; }
.contact-methods a:hover { background: var(--surface-alt); }
.contact-methods .card-icon { flex: none; }
.contact-methods b { display: block; font-weight: 500; }
.contact-methods small { display: block; color: var(--ink-muted); font-size: var(--small-size); }
.booking-embed { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: var(--surface); }
.booking-embed iframe { display: block; width: 100%; height: 680px; border: 0; }
.booking-placeholder { display: grid; gap: var(--space-4); justify-items: start; padding: var(--space-6); }
.reassure { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4) var(--space-6); border-radius: var(--radius-md); background: var(--blue-soft); color: var(--ink); }
.reassure .nm-ico { color: var(--link); margin-top: 3px; flex: none; }

/* --------------------------------------------------------------------------
   Footer (Footer component, extended with the contact banner + newsletter)
   -------------------------------------------------------------------------- */
.nm-footer { padding-inline: 0; }
/* .nm-footer a (components.css) out-specifies the night button's label colour */
.nm-footer a.nm-btn-night, .nm-footer a.nm-btn-night:hover { color: var(--night); }
.footer-inner { display: grid; gap: var(--space-12); }
/* Two balanced rows: CTA (pitch left, contact card right), then link columns with the newsletter closing the row */
.nm-footer-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-12); }
.footer-cta { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-12); align-items: end; }
.footer-cta h2 { max-width: 16ch; }
.footer-cta-copy { color: var(--on-night-muted); max-width: 40ch; margin: 0; }
.footer-contact { list-style: none; margin: 0; padding: var(--space-8); display: grid; gap: var(--space-4); font-size: var(--small-size); background: var(--night-raised); border: 1px solid var(--night-line); border-radius: var(--radius-md); }
.footer-contact a, .footer-contact-plain { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--on-night); }
.footer-contact .nm-ico { color: var(--blue); }
.nm-footer-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 4fr) minmax(0, 5fr); gap: var(--space-12); padding-top: var(--space-12); border-top: 1px solid var(--night-line); }
.footer-newsletter { max-width: 360px; width: 100%; justify-self: end; }
@media (max-width: 860px) {
  .footer-cta { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .footer-contact { padding: var(--space-6); }
  .nm-footer-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-newsletter { grid-column: 1 / -1; justify-self: start; }
}
.footer-newsletter p { color: var(--on-night-muted); }
.newsletter-form { display: grid; gap: var(--space-2); margin-top: var(--space-2); }
.newsletter-msg { color: var(--on-night) !important; }
.nm-footer .nm-frame { margin-top: 0; }
/* "Nimus Creatives" is longer than the system's "Nimus Agency" sample: scale so it fits at every width */
.nm-footer .nm-wordmark { font-size: clamp(36px, 11vw, 140px); }
@media (max-width: 600px) { .nm-footer .nm-frame { padding: var(--space-6) var(--space-3); } }
@media (max-width: 600px) { .nm-footer-cols { grid-template-columns: minmax(0, 1fr); gap: var(--space-8); } }

/* --------------------------------------------------------------------------
   Floating WhatsApp (FloatingCta) — positioned per the component README
   -------------------------------------------------------------------------- */
.float-cta { position: fixed; z-index: 40; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s; }
.float-cta.is-visible { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 480px) { .float-cta .nm-float-text { display: none; } .float-cta { gap: var(--space-2); } }

/* --------------------------------------------------------------------------
   Popup (floats, so it gets shadow-lg)
   -------------------------------------------------------------------------- */
.popup { width: min(480px, calc(100vw - 32px)); padding: var(--space-8); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.popup[open] { display: grid; gap: var(--space-4); justify-items: start; }
.popup::backdrop { background: color-mix(in srgb, var(--night) 55%, transparent); }
.popup p { color: var(--ink-muted); }
.popup .btn-row { margin-top: var(--space-2); }
.popup-close { position: absolute; top: var(--space-4); right: var(--space-4); }
@media (max-width: 480px) { .popup { padding: var(--space-6); } }

/* --------------------------------------------------------------------------
   Simple pages (thank you, 404)
   -------------------------------------------------------------------------- */
.center-page { min-height: 60vh; display: grid; align-items: center; }
.next-steps { counter-reset: n; list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.next-steps li { display: flex; gap: var(--space-3); align-items: baseline; color: var(--ink-muted); }
.next-steps li::before { counter-increment: n; content: counter(n); display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: var(--radius-full); background: var(--blue-soft); color: var(--link); font-size: var(--label-size); font-weight: 600; }

/* --------------------------------------------------------------------------
   Scroll reveal. Only runs when JS is on and the visitor hasn't asked for
   reduced motion. Short, small and once — it should never slow reading.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity .5s ease-out, transform .5s ease-out; }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header, .float-cta, .scard-link, .post-card { transition: none; }
}

/* Small avatar (article byline) */
.avatar-sm { width: 40px; height: 40px; font-size: var(--label-size); }

/* Avatar with Victor's photo instead of initials */
.nm-avatar.has-photo { overflow: hidden; padding: 0; background: var(--surface-alt); }
.nm-avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }

/* --------------------------------------------------------------------------
   Victor on TikTok (includes/partials/tiktok.php). Covers are buttons;
   main.js swaps in TikTok's player on tap.
   -------------------------------------------------------------------------- */
.tiktok-stats { margin-bottom: var(--space-12); }
.tiktok-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); }
@media (max-width: 960px) { .tiktok-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .tiktok-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 70%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--space-4); margin-inline: calc(-1 * var(--space-4)); padding-inline: var(--space-4); scroll-padding-inline: var(--space-4); }
  .tiktok-grid > * { scroll-snap-align: start; }
}
.tiktok-card { display: grid; gap: var(--space-3); align-content: start; justify-items: start; min-width: 0; }
.tiktok-play { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-alt); cursor: pointer; aspect-ratio: 3 / 4; }
.tiktok-play:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.tiktok-play .media { width: 100%; height: 100%; object-fit: cover; display: block; border: 0; transition: transform .4s ease-out; }
.tiktok-play:hover .media { transform: scale(1.03); }
.tiktok-play-btn { position: absolute; top: var(--space-3); left: var(--space-3); width: 48px; height: 48px; display: grid; place-items: center; border-radius: var(--radius-full); background: var(--action); color: var(--on-accent); box-shadow: var(--shadow-lg); transition: transform .2s ease-out, background .2s ease-out; }
.tiktok-play-btn .nm-ico { fill: currentColor; stroke: none; margin-left: 3px; }
.tiktok-play:hover .tiktok-play-btn { transform: scale(1.08); background: var(--action-hover); }
.tiktok-player { width: 100%; aspect-ratio: 9 / 16; border: 0; border-radius: var(--radius-md); background: #000; display: block; }
.tiktok-title { margin: 0; font-size: var(--body-size); line-height: 26px; font-weight: 500; }
.band-night .tiktok-play { background: var(--night-raised); }
.band-night .nm-stat { background: var(--night-raised); border-color: var(--night-line); }
.band-night .nm-stat-top, .band-night .nm-stat-note { color: var(--on-night-muted); }
.band-night .nm-stat-note { border-color: var(--night-line); }
.band-night .nm-tag { background: var(--night-raised); color: var(--on-night-muted); }
@media (prefers-reduced-motion: reduce) { .tiktok-play .media, .tiktok-play-btn { transition: none; } }
@media (max-width: 600px) {
  .tiktok-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin-bottom: var(--space-8); }
  .tiktok-stats .nm-stat { padding: var(--space-3); gap: var(--space-1); }
  .tiktok-stats .nm-stat-top .nm-ico, .tiktok-stats .nm-stat-note { display: none; }
  .tiktok-stats .nm-stat-top { font-size: 12px; line-height: 16px; }
  .tiktok-stats .nm-stat-value { font-size: 28px; line-height: 34px; text-align: left; }
}

/* --------------------------------------------------------------------------
   Crosshair patterns (the CornerFrame signature, used more widely)
   -------------------------------------------------------------------------- */
/* Text highlight: an outlined selection box (no fill) with crosshair corners,
   set with hl('... [[Words]] ...') in PHP. Page headlines only, one per page. */
.hl {
  position: relative; display: inline-block; padding: 0 .12em;
  border: 1px solid color-mix(in srgb, var(--blue) 55%, transparent);
  line-height: 1.12;
}
.hl .nm-cross { width: 12px; height: 12px; color: var(--blue); }
.hl .nm-cross::before { left: 5.5px; height: 12px; }
.hl .nm-cross::after { top: 5.5px; width: 12px; }
.hl .nm-cross.tl { top: -6.5px; left: -6.5px; } .hl .nm-cross.tr { top: -6.5px; right: -6.5px; }
.hl .nm-cross.bl { bottom: -6.5px; left: -6.5px; } .hl .nm-cross.br { bottom: -6.5px; right: -6.5px; }
.band-night .hl, .nm-sh-night .hl { border-color: var(--blue); }

/* Plus grid: crosshairs on a space-12 pitch, faded in from one side.
   On every page hero (right side) and every night band (left side). */
.hero, .band-night { position: relative; isolation: isolate; }
.hero::before, .band-night::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: var(--line-strong); opacity: .45;
  --plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M24 18v12M18 24h12' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E");
  -webkit-mask: var(--plus) 0 0 / 48px 48px, linear-gradient(270deg, #000, transparent 55%);
  -webkit-mask-composite: source-in;
  mask: var(--plus) 0 0 / 48px 48px, linear-gradient(270deg, #000, transparent 55%);
  mask-composite: intersect;
}
.band-night::before {
  background: var(--night-line); opacity: .6;
  -webkit-mask: var(--plus) 0 0 / 48px 48px, linear-gradient(90deg, #000, transparent 40%);
  -webkit-mask-composite: source-in;
  mask: var(--plus) 0 0 / 48px 48px, linear-gradient(90deg, #000, transparent 40%);
  mask-composite: intersect;
}

/* Corner crosshairs on key panels, drawn with one pseudo-element so no extra markup */
.proof, .compare .card.is-ours, .case-step, .service-for, .reassure, .sidebar-cta {
  position: relative;
}
.proof::after, .compare .card.is-ours::after, .case-step::after, .service-for::after, .reassure::after, .sidebar-cta::after {
  content: ""; position: absolute; inset: -8px; pointer-events: none; background: var(--line-strong);
  --plus16: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M8 0v16M0 8h16' stroke='%23000' stroke-width='1'/%3E%3C/svg%3E");
  -webkit-mask: var(--plus16) left top / 16px 16px no-repeat, var(--plus16) right top / 16px 16px no-repeat, var(--plus16) left bottom / 16px 16px no-repeat, var(--plus16) right bottom / 16px 16px no-repeat;
  mask: var(--plus16) left top / 16px 16px no-repeat, var(--plus16) right top / 16px 16px no-repeat, var(--plus16) left bottom / 16px 16px no-repeat, var(--plus16) right bottom / 16px 16px no-repeat;
}
.compare .card.is-ours::after, .service-for::after, .reassure::after { background: var(--blue); }
.band-night .service-for::after, .sidebar-cta::after { background: var(--on-night-muted); }
.sidebar-cta { margin: 8px; }

/* Project CTA (case study pages): pitch on the left, short enquiry form on the right */
.project-cta { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-16); align-items: start; padding: var(--space-16) var(--space-12); }
.project-cta-copy { display: grid; gap: var(--space-6); justify-items: start; }
.project-cta-lead { max-width: 46ch; color: var(--ink); }
.project-cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6) var(--space-6); margin-top: var(--space-4); }
.project-cta-proof { display: flex; align-items: center; gap: var(--space-4); }
.project-cta-proof-text { display: grid; gap: var(--space-1); }
.project-cta-proof b { font-size: 1.125rem; line-height: 1.2; font-weight: 500; letter-spacing: -.01em; color: var(--ink); }
.project-cta-proof small { font-size: .75rem; line-height: 1.3; color: var(--ink-muted); }
.project-cta-logos { display: flex; }
.project-cta-logos span {
  position: relative; width: 48px; height: 48px; margin-left: -10px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--line); box-sizing: border-box; overflow: hidden;
}
.project-cta-logos span:first-child { margin-left: 0; }
.project-cta-logos span::after {
  content: ''; position: absolute; inset: 10px; background: var(--ink);
  -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat;
}
.project-cta-form { display: grid; gap: var(--space-6); }
@media (max-width: 960px) {
  .project-cta { grid-template-columns: 1fr; gap: var(--space-12); padding: var(--space-12) var(--space-8); }
}
@media (max-width: 600px) {
  .project-cta { padding: var(--space-8) var(--space-4); }
}

/* ==========================================================================
   SEO pillar blocks: home service cards, entity profile, service pages
   ========================================================================== */
/* Anchors from the hero pills land below the sticky header */
.pillar-card, #about-nimus { scroll-margin-top: 104px; }
.nm-scard.pillar-card p strong { font-weight: 500; color: var(--on-night); }
.pillar-points { gap: var(--space-2); font-size: var(--small-size); line-height: var(--small-line); color: var(--on-night-muted); }
.pillar-card .scard-more { text-decoration: none; }
.pillar-card .scard-more:hover { text-decoration: underline; }
.pillar-card .scard-more:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); border-radius: var(--radius-sm); }

.about-nimus-profile { margin-bottom: var(--space-8); }
.about-nimus-profile strong { color: var(--ink); font-weight: 600; }
.entity-facts { margin: 0; }

/* Deliverables & investment guide: the /pricing card design (tag, big figure,
   checklist, button) on a white panel, using light-theme tokens so it follows
   dark mode too. */
.invest-panel { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); }
.invest-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); align-items: stretch; }
@media (max-width: 1080px) { .invest-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .invest-grid { grid-template-columns: 1fr; } .invest-panel { padding: var(--space-3); } }
.invest-card { grid-template-rows: auto auto auto auto 1fr auto; gap: var(--space-6); padding: var(--space-8) var(--space-6); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); color: var(--ink); }
@media (max-width: 680px) { .invest-card { padding: var(--space-6) var(--space-4); } }
.invest-card-title { margin: 0; font: inherit; }
.invest-card .price-tag { background: var(--surface-alt); border-color: var(--line); color: var(--ink); }
.invest-card .price-tag .nm-cross { color: var(--ink-muted); }
.invest-card .nm-price-amount { flex-wrap: wrap; column-gap: var(--space-2); row-gap: var(--space-1); font-weight: 700; color: var(--ink); }
.invest-card .nm-price-amount small { font-size: var(--small-size); font-weight: 400; letter-spacing: 0; color: var(--ink-muted); }
.invest-card .nm-price-amount .price-period { color: var(--ink-muted); }
.invest-card .price-num-text { font-size: var(--heading-2-size); line-height: var(--heading-2-line); }
.invest-card > p:not(.nm-price-amount) { color: var(--ink); }
.invest-label { color: var(--ink-muted); }
.invest-card .nm-price-label { margin: var(--space-6) 0 0; padding: 0; border: 0; font-size: var(--heading-3-size); line-height: var(--heading-3-line); font-weight: 300; letter-spacing: var(--heading-3-tracking); color: var(--ink-muted); }
.invest-card ul { gap: var(--space-4); }
.invest-card li { align-items: flex-start; }
.invest-card .price-check { margin-top: 3px; background: var(--ink); color: var(--surface); }
.invest-panel .price-note { margin: var(--space-6) var(--space-2) var(--space-2); color: var(--ink-muted); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: var(--small-size); color: var(--ink-muted); }
.crumbs a { color: var(--ink-muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); }
.service-summary { max-width: var(--measure); font-size: var(--body-lg-size); line-height: var(--body-lg-line); }
.service-summary strong { font-weight: 500; }
.page-service .hero-copy h1 { max-width: 24ch; }
/* WebP wrapper from image(): invisible to layout, so the <img> sizes exactly as before */
picture { display: contents; }
