/* ==========================================================================
   Content enhancements: imagery, screenshot frames, media layouts
   Header/footer styles live in site.css; this file only styles <main> content.
   ========================================================================== */

:root {
  --img-radius: 10px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --sage-deep: var(--accent-text);
  --screen-ink: #171816;
  --screen-bg: #fbfaf7;
  --screen-line: rgba(23, 24, 22, 0.09);
}

/* ---------- Section rhythm (tighter than site.css defaults) ---------- */
.section {
  padding: clamp(3rem, 5.5vw, 5.25rem) 0;
}
.section-heading {
  margin-bottom: clamp(2rem, 3vw, 2.75rem);
}
.page-hero {
  padding: clamp(3.25rem, 6vw, 5.5rem) 0;
}
.page-hero--media {
  padding-bottom: 0;
}

/* ---------- Generic media ---------- */
.media {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--color-sand);
  border-radius: var(--img-radius);
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 1.4s cubic-bezier(0.33, 0, 0.2, 1);
  will-change: transform;
}
.media--wide {
  aspect-ratio: 21 / 9;
}
.media--land {
  aspect-ratio: 3 / 2;
}
.media--4x3 {
  aspect-ratio: 4 / 3;
}
.media--tall {
  aspect-ratio: 4 / 5;
}
.media--square {
  aspect-ratio: 1;
}
.media figcaption,
.media-caption {
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-graphite);
  margin-top: 0.8rem;
}
.media .media-tag {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: var(--glass);
  backdrop-filter: blur(8px);
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}
a:hover .media img,
.media:hover img {
  transform: scale(1.08);
  transition: transform 7s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* ---------- Home hero with photograph ---------- */
.hero--visual {
  padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero--visual .hero-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}
.hero--visual h1 {
  font-size: clamp(2.5rem, 4.1vw, 4.1rem);
  line-height: 1.04;
  max-width: none;
}
.hero-visual {
  position: relative;
  margin-right: calc(var(--page-gutter) * -1);
}
.hero-visual .media {
  aspect-ratio: 1 / 1.05;
}
.hero-visual .media img {
  object-position: 40% 50%;
}
.hero-visual::before {
  content: '';
  position: absolute;
  inset: -1.25rem auto auto -1.25rem;
  width: 38%;
  height: 46%;
  border-top: 1px solid var(--line-strong);
  border-left: 1px solid var(--line-strong);
  pointer-events: none;
}
.hero-chip {
  position: absolute;
  left: clamp(-3.5rem, -4.5vw, -1rem);
  bottom: 2rem;
  width: min(330px, 80%);
  background: var(--chip-bg);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.35),
    0 2px 6px rgba(0, 0, 0, 0.12);
  font-size: 0.74rem;
  color: var(--text);
  overflow: hidden;
}
.hero-chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(124, 196, 127, 0.2);
  position: relative;
}
/* The pulse is a separate ring that only scales and fades (GPU-friendly). */
.hero-chip .dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(124, 196, 127, 0.18);
  animation: pulse 2.6s ease-in-out infinite;
}
.dash-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--line);
  background: var(--chip-bar);
}
.dash-dots {
  display: flex;
  gap: 4px;
}
.dash-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-stone);
}
.dash-title {
  font-weight: 600;
  flex: 1;
  letter-spacing: 0.01em;
}
.dash-live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-text);
}
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line);
}
.dash-kpis > div {
  padding: 0.7rem 0.8rem 0.65rem;
  display: grid;
  gap: 0.1rem;
}
.dash-kpis > div + div {
  border-left: 1px solid var(--line);
}
.dash-kpis span {
  color: var(--color-graphite);
  font-size: 0.66rem;
}
.dash-kpis strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.dash-kpis em {
  font-style: normal;
  font-size: 0.62rem;
  color: var(--color-graphite);
  white-space: nowrap;
}
.dash-kpis em.up {
  color: var(--ok);
}
.dash-kpis em.warn {
  color: var(--warn);
}
.dash-chart {
  padding: 0.65rem 0.8rem 0.7rem;
  border-bottom: 1px solid var(--line);
}
.dash-chart-head {
  display: flex;
  justify-content: space-between;
  color: var(--color-graphite);
  font-size: 0.64rem;
  margin-bottom: 0.5rem;
}
.dash-chart-head span:first-child {
  color: var(--text);
  font-weight: 600;
}
.dash-bars {
  height: 52px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  background: repeating-linear-gradient(to top, transparent 0 12px, var(--line) 12px 13px);
}
.dash-bars i {
  flex: 1;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  opacity: 0.35;
}
.dash-bars i.now {
  background: var(--accent-grad);
  opacity: 1;
}
.dash-feed {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
}
.dash-feed li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.32rem 0.8rem;
}
.dash-feed b {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
}
.dash-feed b.ok {
  background: var(--ok);
}
.dash-feed b.warn {
  background: var(--warn);
}
.dash-feed span {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-feed time {
  color: var(--color-graphite);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
}
@keyframes pulse {
  50% {
    transform: scale(2.2);
    opacity: 0.25;
  }
}

/* ---------- Capability strip with icons ---------- */
.icon-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: var(--border);
  border-bottom: var(--border);
}
.icon-strip > div {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 0.9rem;
  padding: 1.7rem 1.4rem 1.7rem 0;
}
.icon-strip > div + div {
  padding-left: 1.4rem;
  border-left: var(--border);
}
.icon-strip svg {
  width: 26px;
  height: 26px;
  stroke: var(--accent);
  stroke-width: 1.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-strip strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.icon-strip span {
  display: block;
  font-size: 0.84rem;
  color: var(--color-graphite);
  line-height: 1.5;
}

/* ---------- Split media / content ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.split--reverse > :first-child {
  order: 2;
}
.split .sticky-media {
  position: sticky;
  top: 7rem;
}
.split .media + .media-caption {
  display: block;
}
.media-stack {
  position: relative;
  padding-bottom: 18%;
}
.media-stack .media:last-child {
  position: absolute;
  width: 52%;
  right: -6%;
  bottom: 0;
  border: 8px solid var(--bg);
  box-shadow: var(--shadow-soft);
}

/* ---------- Dark photographic band ---------- */
.band--image {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto;
  gap: 2.5rem;
  align-items: end;
}
.band--image > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0.75;
  filter: grayscale(0.3);
}
.band--image::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(11, 10, 8, 0.96) 0%, rgba(11, 10, 8, 0.8) 45%, rgba(11, 10, 8, 0.4) 100%);
}
.band--image h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 3.4vw, 3.3rem);
}
.band--photo-cta h2 {
  margin-bottom: 1.1rem;
  font-size: clamp(2.15rem, 4vw, 4rem);
}
.band--image .band-copy {
  border-left: 1px solid rgba(201, 165, 90, 0.4);
  padding-left: 2rem;
  color: rgba(242, 236, 223, 0.85);
}
.band--image .text-link {
  color: #d9b970;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 1px solid rgba(201, 165, 90, 0.5);
  padding-bottom: 0.25rem;
}
.band--image .text-link:hover {
  color: #f2ecdf;
  border-color: #f2ecdf;
}
.band--photo-cta {
  background: var(--color-midnight);
  display: block;
}
.band--photo-cta > img {
  opacity: 0.7;
  filter: grayscale(0.25);
}
.band--photo-cta::before {
  background: linear-gradient(95deg, rgba(11, 10, 8, 0.95) 0%, rgba(11, 10, 8, 0.8) 42%, rgba(11, 10, 8, 0.3) 100%);
}

/* ---------- Cards with imagery ---------- */
.card--media {
  padding: 0;
}
.card--media .media {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 0;
}
.card--media .card-body {
  padding: clamp(1.25rem, 2.4vw, 1.9rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  width: 100%;
}
.card--media .card-body .meta {
  margin-bottom: 1rem;
}
a.card--media {
  text-decoration: none;
  color: inherit;
}
a.card--media:hover {
  color: inherit;
}
a.card--media:hover .card-link {
  border-color: var(--accent);
  color: var(--accent-text);
}
.card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  margin-bottom: 1.4rem;
}
.card-icon svg {
  width: 19px;
  height: 19px;
  stroke: var(--accent);
  stroke-width: 1.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Page hero with banner photograph ---------- */
.page-hero--media {
  padding-bottom: 0;
}
.page-hero--media .hero-banner {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  aspect-ratio: 21 / 8;
}
.page-hero--media .hero-banner img {
  object-position: center 55%;
}
.page-hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
}
.page-hero-split .media {
  aspect-ratio: 4 / 3;
}

/* ---------- Screenshot frames (application previews) ----------
   To add a real screenshot: replace the contents of .screen-body with
   <img src="/assets/images/screens/your-file.webp" alt="Description">       */
.showcase {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}
.showcase-item {
  margin: 0;
  display: flex;
  flex-direction: column;
}
.showcase-item.span-8 {
  grid-column: span 8;
}
.showcase-item.span-7 {
  grid-column: span 7;
}
.showcase-item.span-6 {
  grid-column: span 6;
}
.showcase-item.span-5 {
  grid-column: span 5;
}
.showcase-item.span-4 {
  grid-column: span 4;
}
.showcase-stage {
  flex: 1;
  background: radial-gradient(120% 90% at 50% 0%, var(--accent-glow), transparent 60%), var(--surface-2);
  border: 1px solid var(--line);
  padding: clamp(1.2rem, 3vw, 2.4rem);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.showcase-stage--dark {
  background: var(--color-midnight);
}
.showcase-stage--photo > img.stage-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}
.showcase-stage--photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 18, 16, 0.1), rgba(15, 18, 16, 0.45));
}
.showcase-stage > .screen {
  position: relative;
  z-index: 1;
}
.showcase-item figcaption {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 1rem;
  padding: 1.1rem 0 0;
}
.showcase-item figcaption .meta {
  grid-column: 1 / -1;
}
.showcase-item figcaption strong {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.showcase-item figcaption span:last-child {
  color: var(--color-graphite);
  font-size: 0.88rem;
  grid-column: 1 / -1;
}

.screen {
  width: 100%;
  background: var(--screen-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 30px 70px rgba(15, 18, 16, 0.18),
    0 8px 18px rgba(15, 18, 16, 0.08);
  border: 1px solid rgba(23, 24, 22, 0.1);
  transition: transform 0.6s var(--ease-out);
}
.showcase-item:hover .screen {
  transform: translateY(-4px);
}
.screen-bar {
  height: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  background: #f0eee8;
  border-bottom: 1px solid var(--screen-line);
}
.screen-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d6d4cc;
}
.screen-bar b {
  flex: 0 1 46%;
  height: 14px;
  margin-inline: auto;
  border-radius: 4px;
  background: #e4e2db;
}
.screen-body {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.screen-body > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

/* Device variants */
.screen--tablet {
  max-width: 520px;
  border-radius: 22px;
  padding: 12px;
  background: #1b1e1b;
  border: 0;
}
.screen--tablet .screen-body {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: var(--screen-bg);
}
.screen--phone {
  max-width: 200px;
  border-radius: 30px;
  padding: 9px;
  background: #1b1e1b;
  border: 0;
}
.screen--phone .screen-body {
  aspect-ratio: 9 / 16.5;
  border-radius: 22px;
  background: var(--screen-bg);
}
.screen--handheld {
  max-width: 210px;
  border-radius: 24px 24px 34px 34px;
  padding: 22px 11px 46px;
  background: linear-gradient(180deg, #2a2e2a, #171916);
  border: 0;
  position: relative;
}
.screen--handheld::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 46px;
  height: 5px;
  margin-left: -23px;
  border-radius: 3px;
  background: var(--color-sage);
  opacity: 0.9;
}
.screen--handheld::after {
  content: '';
  position: absolute;
  bottom: 14px;
  left: 50%;
  width: 52px;
  height: 18px;
  margin-left: -26px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.screen--handheld .screen-body {
  aspect-ratio: 3 / 4.6;
  border-radius: 6px;
  background: var(--screen-bg);
}
.screen--console {
  background: #121512;
  border-color: rgba(255, 255, 255, 0.06);
}
.screen--console .screen-bar {
  background: #1a1d1a;
  border-color: rgba(255, 255, 255, 0.06);
}
.screen--console .screen-bar i {
  background: #3a3f3a;
}
.screen--console .screen-bar b {
  background: #252925;
}

/* Skeleton interface elements (shown until real screenshots are added) */
.ui {
  position: absolute;
  inset: 0;
  display: grid;
  font-family: var(--font-mono);
  font-size: 9px;
  color: #8b918a;
}
.ui-app {
  grid-template-columns: 18% 1fr;
}
.ui-side {
  background: #f1efe9;
  border-right: 1px solid var(--screen-line);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.ui-side .logo {
  width: 55%;
  height: 8px;
  background: var(--screen-ink);
  border-radius: 2px;
  margin-bottom: 10px;
}
.ui-side span {
  height: 6px;
  border-radius: 3px;
  background: #dcd9d1;
}
.ui-side span.on {
  background: var(--color-sage);
  width: 80%;
}
.ui-main {
  padding: 12px 14px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 10px;
  min-width: 0;
}
.ui-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ui-head .t {
  width: 32%;
  height: 9px;
  background: #c9c7bf;
  border-radius: 2px;
}
.ui-head .b {
  width: 14%;
  height: 14px;
  background: var(--screen-ink);
  border-radius: 3px;
}
.ui-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.ui-kpi {
  background: #fff;
  border: 1px solid var(--screen-line);
  border-radius: 4px;
  padding: 7px;
  display: grid;
  gap: 5px;
}
.ui-kpi i {
  display: block;
  height: 5px;
  width: 50%;
  background: #dedbd3;
  border-radius: 3px;
}
.ui-kpi b {
  display: block;
  height: 10px;
  width: 70%;
  background: #2a2d29;
  border-radius: 2px;
}
.ui-kpi em {
  display: block;
  height: 4px;
  width: 35%;
  background: var(--color-sage-light);
  border-radius: 3px;
}
.ui-panels {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 8px;
  min-height: 0;
}
.ui-card {
  background: #fff;
  border: 1px solid var(--screen-line);
  border-radius: 4px;
  padding: 8px;
  min-height: 0;
  overflow: hidden;
}
.ui-card svg {
  width: 100%;
  height: 100%;
  display: block;
}
.ui-rows {
  display: grid;
  gap: 6px;
}
.ui-row {
  display: grid;
  grid-template-columns: 10px 1fr 22%;
  gap: 6px;
  align-items: center;
}
.ui-row::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-sage-light);
}
.ui-row.warn::before {
  background: #d9c08f;
}
.ui-row i {
  height: 5px;
  background: #e2dfd8;
  border-radius: 3px;
}
.ui-row b {
  height: 5px;
  background: #cfccc4;
  border-radius: 3px;
}
.ui-table {
  display: grid;
  gap: 0;
  border: 1px solid var(--screen-line);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
}
.ui-table div {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 0.6fr;
  gap: 10px;
  padding: 6px 8px;
  border-top: 1px solid var(--screen-line);
}
.ui-table div:first-child {
  border-top: 0;
  background: #f6f5f1;
}
.ui-table span {
  height: 5px;
  background: #e3e0d9;
  border-radius: 3px;
}
.ui-table span:last-child {
  background: var(--color-sage-light);
  width: 70%;
}

.ui-map {
  position: relative;
  min-height: 0;
}
.ui-map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Console / event stream skeleton */
.ui-console {
  padding: 14px 16px;
  align-content: start;
  gap: 6px;
  color: #7f8a7e;
  font-size: clamp(8px, 0.8vw, 10.5px);
  line-height: 1.5;
}
.ui-console p {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
.ui-console .k {
  color: var(--color-sage-light);
}
.ui-console .v {
  color: #e6e4dc;
}
.ui-console .d {
  color: #4f574f;
}
.ui-console .w {
  color: #d9c08f;
}
.ui-console .cursor {
  display: inline-block;
  width: 7px;
  height: 11px;
  background: var(--color-sage);
  vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Handheld scanning skeleton */
.ui-scan {
  grid-template-rows: auto auto 1fr auto;
  padding: 10px;
  gap: 8px;
}
.ui-scan .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ui-scan .top i {
  width: 40%;
  height: 7px;
  background: #2a2d29;
  border-radius: 2px;
}
.ui-scan .top b {
  width: 18%;
  height: 7px;
  background: var(--color-sage-light);
  border-radius: 4px;
}
.ui-ring {
  aspect-ratio: 1;
  width: 62%;
  margin: 4px auto;
  border-radius: 50%;
  border: 6px solid #e8e5de;
  border-top-color: var(--color-sage);
  display: grid;
  place-items: center;
  animation: spin 6s linear infinite;
}
.ui-ring b {
  width: 40%;
  height: 9px;
  background: #2a2d29;
  border-radius: 2px;
  animation: spin 6s linear infinite reverse;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.ui-scan .list {
  display: grid;
  gap: 5px;
  align-content: start;
}
.ui-scan .list span {
  height: 16px;
  border-radius: 3px;
  background: #fff;
  border: 1px solid var(--screen-line);
  position: relative;
}
.ui-scan .list span::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  width: 50%;
  height: 4px;
  background: #dcd9d1;
  border-radius: 2px;
}
.ui-scan .go {
  height: 20px;
  border-radius: 4px;
  background: var(--screen-ink);
}

/* Schedule / service-operations skeleton */
.ui-sched {
  grid-template-rows: auto 1fr;
  padding: 10px 12px;
  gap: 8px;
}
.ui-sched .cal {
  display: grid;
  grid-template-columns: 26px repeat(5, 1fr);
  grid-auto-rows: 1fr;
  gap: 4px;
}
.ui-sched .cal > i {
  background: #f0eee8;
  border-radius: 3px;
}
.ui-sched .cal > b {
  border-radius: 3px;
  background: var(--color-sage-light);
}
.ui-sched .cal > b.alt {
  background: #d8d1c0;
}
.ui-sched .cal > b.dk {
  background: #3a3f39;
}
.ui-sched .cal > s {
  text-decoration: none;
  height: 4px;
  align-self: center;
  background: #dcd9d1;
  border-radius: 2px;
}

/* Mobile components skeleton */
.ui-kit {
  grid-template-rows: auto;
  align-content: start;
  padding: 16px 12px;
  gap: 11px;
}
.ui-kit .h {
  width: 55%;
  height: 10px;
  background: #2a2d29;
  border-radius: 2px;
  margin-bottom: 4px;
}
.ui-kit .seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #ebe9e2;
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
  height: 18px;
}
.ui-kit .seg i:first-child {
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.ui-kit .field {
  height: 22px;
  border: 1px solid #d5d2ca;
  border-radius: 6px;
  background: #fff;
}
.ui-kit .tg {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ui-kit .tg i {
  width: 45%;
  height: 5px;
  background: #d5d2ca;
  border-radius: 3px;
}
.ui-kit .tg b {
  width: 26px;
  height: 15px;
  border-radius: 8px;
  background: var(--color-sage);
  position: relative;
}
.ui-kit .tg b::after {
  content: '';
  position: absolute;
  right: 2px;
  top: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
}
.ui-kit .tg.off b {
  background: #d5d2ca;
}
.ui-kit .tg.off b::after {
  right: auto;
  left: 2px;
}
.ui-kit .slider {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--screen-ink) 62%, #dcd9d1 62%);
  position: relative;
  margin: 6px 0;
}
.ui-kit .slider::after {
  content: '';
  position: absolute;
  left: 62%;
  top: -5px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #c9c6be;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.ui-kit .chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}
.ui-kit .chips i {
  height: 15px;
  width: 30%;
  border-radius: 8px;
  background: #ebe9e2;
}
.ui-kit .chips i:first-child {
  background: var(--color-sage-light);
}
.ui-kit .btn {
  height: 26px;
  border-radius: 7px;
  background: var(--screen-ink);
  margin-top: 6px;
}

/* ---------- Technology / stack panel ---------- */
.stack-panel {
  background: var(--band-bg);
  color: var(--band-text);
  border: 1px solid var(--line-strong);
  border-radius: var(--img-radius);
  padding: clamp(1.6rem, 3vw, 2.4rem);
}
.stack-panel .eyebrow {
  color: #d9b970;
}
.stack-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem 2rem;
  margin-top: 1.4rem;
}
.stack-groups h3 {
  font-size: 0.95rem;
  letter-spacing: 0;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: var(--band-text);
  font-family: var(--font-label);
}
.stack-groups ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.stack-groups li {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--band-muted);
  padding-left: 1rem;
  position: relative;
}
.stack-groups li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 1px;
  background: var(--color-sage);
}

/* ---------- Services list with thumbnails ---------- */
.service-rows .list-row {
  grid-template-columns: 70px minmax(0, 1fr) minmax(0, 300px);
  gap: 2rem;
  padding: 2.2rem 0;
}
.service-rows .media {
  aspect-ratio: 3 / 2;
}
.service-rows .screen {
  box-shadow: 0 12px 30px rgba(15, 18, 16, 0.12);
}
.service-rows .screen-thumb {
  background: var(--surface-2);
  border-radius: var(--img-radius);
  padding: 1rem;
  display: grid;
  place-items: center;
}

/* ---------- Focus lists (industry pages) ---------- */
.focus-list {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: var(--border);
}
.focus-list li {
  padding: 0.9rem 0;
  border-bottom: var(--border);
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
  font-size: 0.98rem;
}
.focus-list li:nth-child(odd) {
  padding-right: 1rem;
}
.focus-list li::before {
  content: '→';
  color: var(--sage-deep);
  font-size: 0.85rem;
}

/* ---------- Work / case studies ---------- */
.case-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(2rem, 4vw, 3.5rem) 0;
  border-top: var(--border);
}
.case-feature:nth-of-type(even) > :first-child {
  order: 2;
}
.case-feature .showcase-stage {
  min-height: 360px;
}
.case-feature h3 {
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
}
.case-feature .tag-list {
  margin-bottom: 1.6rem;
}
.case-meta {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 0.3rem 2rem;
  margin: 1.4rem 0;
  padding: 1rem 0;
  border-top: var(--border);
  border-bottom: var(--border);
}
.case-meta dt {
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.case-meta dd {
  margin: 0;
  font-size: 0.9rem;
}

/* ---------- Insights ---------- */
.insight-card.has-cover {
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  transition:
    box-shadow 0.4s ease,
    transform 0.4s var(--ease-out);
}
.insight-card.has-cover:hover {
  box-shadow: var(--shadow-soft);
  transform: translateY(-3px);
  border-color: var(--line-strong) !important;
}
.insight-card.has-cover .media {
  aspect-ratio: 16 / 9;
  border-radius: 0;
}
.insight-card.has-cover .insight-body {
  padding: 1.5rem 1.6rem 1.7rem;
}
.insight-card.has-cover h2 {
  font-size: 1.45rem;
  margin: 0.7rem 0;
}
.insight-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line-strong);
  margin-bottom: 1.25rem;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
}
.insight-featured:hover {
  color: inherit;
}
.insight-featured .media {
  aspect-ratio: auto;
  min-height: 340px;
  border-radius: 0;
}
.insight-featured .insight-body {
  padding: clamp(1.6rem, 3vw, 2.6rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.insight-featured h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  margin: 1rem 0;
}
.article-hero-media {
  margin-top: clamp(2rem, 4vw, 3rem);
  aspect-ratio: 21 / 8;
}

/* ---------- Contact ---------- */
.contact-visual {
  margin-bottom: 2rem;
}
.contact-visual .media {
  aspect-ratio: 16 / 9;
}
.contact-points {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.8rem;
  padding: 1.3rem 0 0;
  border-top: var(--border);
}
.contact-points div {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 0.8rem;
  align-items: start;
  font-size: 0.92rem;
  color: var(--text-2);
}
.contact-points svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent);
  stroke-width: 1.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-top: 0.2rem;
}

/* Wide trailing cards (fill otherwise-empty grid cells) */
.card--wide {
  grid-column: span 2;
}
.article-grid > .insight-card.has-cover:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}
.article-grid > .insight-card.has-cover:last-child:nth-child(odd) .article-card-link {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  height: 100%;
}
.article-grid > .insight-card.has-cover:last-child:nth-child(odd) .media {
  aspect-ratio: auto;
  min-height: 300px;
}
.article-grid > .insight-card.has-cover:last-child:nth-child(odd) .insight-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.split--stretch {
  align-items: stretch;
}
.split--stretch .media {
  height: 100%;
  aspect-ratio: auto;
  min-height: 420px;
}

/* ---------- Scroll reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
.js .reveal-d1 {
  transition-delay: 0.08s;
}
.js .reveal-d2 {
  transition-delay: 0.16s;
}
.js .reveal-d3 {
  transition-delay: 0.24s;
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .hero-chip {
    left: 1rem;
    bottom: 1rem;
  }
}
@media (max-width: 1080px) {
  .showcase-item.span-8,
  .showcase-item.span-7 {
    grid-column: span 12;
  }
  .showcase-item.span-6,
  .showcase-item.span-5,
  .showcase-item.span-4 {
    grid-column: span 6;
  }
  .band--image {
    grid-template-columns: 1fr 1fr;
  }
  .band--image .text-link {
    grid-column: 1 / -1;
    justify-self: start;
  }
}
@media (max-width: 900px) {
  .hero--visual .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    margin-right: 0;
  }
  .hero-visual .media {
    aspect-ratio: 16 / 11;
  }
  .hero-chip {
    left: 1rem;
    bottom: 1rem;
  }
  .icon-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .icon-strip > div:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .icon-strip > div:nth-child(n + 3) {
    border-top: var(--border);
  }
  .split,
  .page-hero-split,
  .case-feature,
  .insight-featured {
    grid-template-columns: 1fr;
  }
  .split--reverse > :first-child,
  .case-feature:nth-of-type(even) > :first-child {
    order: 0;
  }
  .split .sticky-media {
    position: static;
  }
  .service-rows .list-row {
    grid-template-columns: 50px minmax(0, 1fr);
  }
  .service-rows .list-row > :last-child {
    grid-column: 2;
  }
  .page-hero--media .hero-banner,
  .article-hero-media {
    aspect-ratio: 16 / 9;
  }
  .insight-featured .media {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }
}
@media (min-width: 641px) and (max-width: 900px) {
  .grid-3 > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  .showcase-item.span-6,
  .showcase-item.span-5,
  .showcase-item.span-4 {
    grid-column: span 12;
  }
  .icon-strip {
    grid-template-columns: 1fr;
  }
  .icon-strip > div,
  .icon-strip > div + div {
    padding: 1.2rem 0;
    border-left: 0;
  }
  .icon-strip > div + div {
    border-top: var(--border);
  }
  .band--image {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .band--image .band-copy {
    padding-left: 1rem;
  }
  .focus-list {
    grid-template-columns: 1fr;
  }
  .stack-groups {
    grid-template-columns: 1fr;
  }
  .case-meta {
    grid-template-columns: 1fr 1fr;
  }
  .media-stack {
    padding-bottom: 0;
  }
  .media-stack .media:last-child {
    display: none;
  }
  .card--wide {
    grid-column: auto;
  }
  .article-grid > .insight-card.has-cover:last-child:nth-child(odd) .article-card-link {
    display: block;
  }
  .article-grid > .insight-card.has-cover:last-child:nth-child(odd) .media {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }
  .hero-chip {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
  }
  .ui-ring,
  .ui-ring b,
  .hero-chip .dot,
  .ui-console .cursor {
    animation: none;
  }
}

/* ---------- Industry pages: intro, pain points, focus grid, steps ---------- */
.h2-sm {
  font-size: clamp(1.9rem, 3vw, 2.6rem);
}
.industry-intro {
  align-items: center;
}
.prose-plain p {
  color: var(--color-graphite);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 0 1.1rem;
  max-width: 60ch;
}
.industry-intro .inline-note {
  margin-top: 1.6rem;
  max-width: 56ch;
}
.pain-panel {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line-strong);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  position: relative;
  overflow: hidden;
}
.pain-panel::after {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}
.pain-panel .eyebrow {
  color: var(--accent-text);
}
.pain-panel h3 {
  color: var(--text);
  font-size: 1.35rem;
  margin: 0 0 1.2rem;
}
.pain-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pain-list li {
  position: relative;
  padding: 0.85rem 0 0.85rem 2rem;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  line-height: 1.5;
}
.pain-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.05rem;
  width: 1.1rem;
  height: 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}
.pain-list li::after {
  content: '';
  position: absolute;
  left: 0.4rem;
  top: 1.45rem;
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: var(--accent);
}
.pain-link {
  display: inline-block;
  margin-top: 1.4rem;
  color: var(--accent-text);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
}
.pain-link:hover {
  color: var(--text);
  border-color: var(--text);
}

.section--tint {
  background: var(--surface);
}
.focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line-2);
  border-radius: var(--img-radius);
  overflow: hidden;
}
.focus-card {
  background: var(--bg);
  padding: clamp(1.5rem, 2.4vw, 2rem);
  transition: background 0.25s var(--ease-out);
}
.focus-card:hover {
  background: var(--surface-2);
}
.focus-card h3 {
  font-size: 1.12rem;
  margin: 1.1rem 0 0.5rem;
}
.focus-card p {
  color: var(--color-graphite);
  margin: 0;
  line-height: 1.6;
  font-size: 0.97rem;
}
.focus-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: rgba(201, 165, 90, 0.1);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
}
.focus-icon svg {
  width: 21px;
  height: 21px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
  counter-reset: none;
}
.step {
  position: relative;
  padding-top: 1.4rem;
  border-top: 2px solid var(--color-stone);
}
.step::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  width: 3.5rem;
  height: 2px;
  background: var(--color-sage);
}
.step-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.step-num {
  font-family: var(--font-display);
  font-size: 2.8rem;
  line-height: 1;
  color: var(--accent);
  letter-spacing: 0;
}
.step h3 {
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}
.step p {
  color: var(--color-graphite);
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .focus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .steps {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .focus-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Work: case details as rows ---------- */
.case-meta--rows {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0.3rem 0;
}
.case-meta--rows > div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
  padding: 0.7rem 0;
}
.case-meta--rows > div + div {
  border-top: 1px solid var(--line);
}
.case-meta--rows dt {
  padding-top: 0.2rem;
}
.case-meta--rows dd {
  line-height: 1.6;
  color: var(--color-graphite);
}
@media (max-width: 640px) {
  .case-meta--rows > div {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }
}

/* ---------- Contact form states ---------- */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
[data-form-status].is-ok {
  color: var(--ok);
}
[data-form-status].is-error {
  color: var(--danger);
}
.contact-points a {
  color: inherit;
}

/* ---------- Soft corners: imagery, panels, buttons ---------- */
.showcase-stage,
.band,
.pain-panel,
.insight-featured,
.insight-card.has-cover,
.card--media {
  border-radius: var(--img-radius);
  overflow: hidden;
}
.insight-featured .media,
.card--media .media {
  border-radius: 0;
}
.button,
.nav .nav-cta {
  border-radius: 6px;
}

/* ---------- Uncropped, smaller photos (Work page) ---------- */
.media--fit {
  aspect-ratio: 3 / 2;
  width: 100%;
  max-width: 480px;
}
.page-hero-split .media--fit {
  aspect-ratio: 3 / 2;
  justify-self: end;
  align-self: center;
}
.split .media--fit {
  margin-inline: auto;
}
@media (max-width: 900px) {
  .media--fit,
  .page-hero-split .media--fit {
    max-width: none;
    justify-self: stretch;
  }
}

/* ---------- Black & gold theme details ---------- */
.hero--visual h1 {
  font-size: clamp(2.6rem, 4.4vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
h1 em,
h2 em {
  font-style: italic;
  color: var(--accent-text);
}
.icon-strip strong,
.focus-card h3,
.step h3,
.showcase-item figcaption strong,
.list-row h3,
.card h3,
.pain-panel h3 {
  font-family: var(--font-display);
}
.card {
  transition: background 0.25s ease;
}
.grid-2 .card:hover,
.grid-3 .card:hover,
.grid-4 .card:hover {
  background: var(--surface-2);
}
.grid-2,
.grid-3,
.grid-4 {
  border-radius: var(--img-radius);
  overflow: hidden;
}
.card-link {
  border-bottom-color: var(--line-strong);
}
.card-link:hover {
  color: var(--accent-text);
}
.media {
  background: var(--surface-2);
}
.showcase-stage--dark {
  background: radial-gradient(120% 90% at 50% 0%, rgba(201, 165, 90, 0.18), transparent 60%), var(--band-bg);
}
.form-panel {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--img-radius);
  padding: clamp(1.4rem, 3vw, 2.4rem);
  align-self: start;
}
.inline-note {
  border-left-color: var(--accent);
}

/* Theme toggle */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}
.theme-toggle:hover {
  color: var(--accent-text);
  border-color: var(--accent);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle .icon-sun {
  display: none;
}
html[data-theme='light'] .theme-toggle .icon-sun {
  display: block;
}
html[data-theme='light'] .theme-toggle .icon-moon {
  display: none;
}
.theme-toggle .label {
  display: none;
}
@media (max-width: 1220px) {
  .theme-toggle {
    width: auto;
    height: auto;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    display: flex;
    gap: 0.7rem;
    justify-content: flex-start;
    padding: 0.8rem 0;
    font-size: 0.86rem;
    font-weight: 500;
  }
  .theme-toggle .label {
    display: inline;
  }
}
html.theme-anim,
html.theme-anim *,
html.theme-anim *::before,
html.theme-anim *::after {
  transition:
    background-color 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease !important;
}
@media (prefers-reduced-motion: reduce) {
  html.theme-anim,
  html.theme-anim * {
    transition: none !important;
  }
}
.list-row .number {
  color: var(--accent-text);
}
@media (max-width: 640px) {
  .header-inner {
    gap: 1rem;
  }
  .wordmark {
    flex-shrink: 1;
    min-width: 0;
  }
  .wordmark strong {
    font-size: 1.02rem;
    letter-spacing: 0.22em;
  }
  .wordmark span {
    font-size: 0.46rem;
    letter-spacing: 0.06em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .menu-toggle {
    flex-shrink: 0;
  }
}
@media (max-width: 900px) {
  .media-stack .media:last-child {
    right: 0;
  }
}
@media (max-width: 380px) {
  .wordmark span {
    white-space: normal;
    overflow: visible;
    line-height: 1.3;
  }
}
.ui-console {
  grid-auto-rows: max-content;
}
.ui-console--thumb {
  font-size: clamp(9px, 0.78vw, 11px);
  gap: 5px;
  padding: 14px 16px;
}
@media (max-width: 640px) {
  .ui-console--thumb {
    gap: 2px;
    padding: 10px 14px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .media img,
  a:hover .media img,
  .media:hover img {
    transition: none;
    transform: none;
  }
}
.about-stats .stat strong {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  font-weight: 500;
  color: var(--accent-text);
  line-height: 1.1;
}
.about-stats .stat span {
  font-size: 0.88rem;
}

/* ==========================================================================
   Languages: switcher, per-script fonts, right-to-left (Arabic)
   ========================================================================== */
.lang-switch {
  position: relative;
}
.lang-switch summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 40px;
  padding: 0 0.85rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  cursor: pointer;
  color: var(--text-2);
  font-size: 0.8rem;
  font-weight: 600;
  transition:
    color 0.2s ease,
    border-color 0.2s ease;
}
.lang-switch summary::-webkit-details-marker {
  display: none;
}
.lang-switch summary:hover,
.lang-switch[open] summary {
  color: var(--accent-text);
  border-color: var(--accent);
}
.lang-switch summary svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}
.lang-switch ul {
  position: absolute;
  top: calc(100% + 0.5rem);
  inset-inline-end: 0;
  min-width: 180px;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  z-index: 60;
}
.nav .lang-switch li a {
  display: block;
  padding: 0.55rem 0.8rem;
  border: 0;
  border-radius: 6px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.nav .lang-switch li a:hover {
  background: var(--surface-2);
  color: var(--accent-text);
}
.nav .lang-switch li a[aria-current] {
  color: var(--accent-text);
  text-decoration: none;
}
@media (max-width: 1220px) {
  .lang-switch {
    border-bottom: 1px solid var(--line);
  }
  .lang-switch summary {
    height: auto;
    padding: 0.8rem 0;
    border: 0;
    border-radius: 0;
    font-size: 0.86rem;
  }
  .lang-switch ul {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.2rem;
    min-width: 0;
    padding: 0 0 0.8rem;
    background: none;
    border: 0;
    box-shadow: none;
  }
}

/* Latin glyphs stay in Playfair / Montserrat; other scripts fall back to good system fonts. */
html:lang(zh) {
  --font-sans: 'Montserrat', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-display: 'Playfair Display', 'Songti SC', 'Noto Serif SC', 'Source Han Serif SC', 'STSong', 'SimSun', serif;
  --font-label: var(--font-sans);
}
html:lang(ja) {
  --font-sans:
    'Montserrat', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', 'Meiryo', 'Noto Sans JP', sans-serif;
  --font-display: 'Playfair Display', 'Hiragino Mincho ProN', 'Yu Mincho', 'Noto Serif JP', serif;
  --font-label: var(--font-sans);
}
html:lang(th) {
  --font-sans: 'Montserrat', 'Noto Sans Thai', 'Leelawadee UI', 'Thonburi', 'Tahoma', sans-serif;
  --font-display: 'Playfair Display', 'Noto Serif Thai', 'Leelawadee UI', 'Thonburi', serif;
  --font-label: var(--font-sans);
}
html:lang(ar) {
  --font-sans: 'Montserrat', 'Noto Kufi Arabic', 'Segoe UI', 'Geeza Pro', 'Tahoma', sans-serif;
  --font-display:
    'Playfair Display', 'Noto Naskh Arabic', 'Amiri', 'Geeza Pro', 'Sakkal Majalla', 'Times New Roman', serif;
  --font-label: var(--font-sans);
}

/* Wide tracking and tight leading suit Latin capitals, not these scripts. */
html:is(:lang(zh), :lang(ja), :lang(th), :lang(ar))
  :is(
    h1,
    h2,
    h3,
    .eyebrow,
    .meta,
    .case-meta dt,
    .media-tag,
    figcaption,
    .media-caption,
    .nav-cta,
    .button,
    .tag-list li
  ) {
  letter-spacing: 0;
}
html:is(:lang(zh), :lang(ja)) :is(h1, h2, h3) {
  line-height: 1.3;
}
html:lang(th) :is(h1, h2, h3) {
  line-height: 1.45;
}
html:lang(th) body {
  line-height: 1.8;
}
html:lang(ar) :is(h1, h2, h3) {
  line-height: 1.5;
}
html:lang(ar) body {
  line-height: 1.85;
}
html:lang(ar) body *:not(.wordmark *):not(code):not(pre) {
  letter-spacing: 0 !important;
}
html:is(:lang(zh), :lang(ja)) .eyebrow {
  font-size: 0.8rem;
}

/* Right-to-left */
[dir='rtl'] .skip-link {
  left: auto;
  right: 1rem;
}
[dir='rtl'] .hero-aside {
  border-left: 0;
  border-right: 1px solid var(--color-stone);
  padding: 0.3rem 1.5rem 0.3rem 0;
}
[dir='rtl'] .inline-note {
  border-left: 0;
  border-right: 2px solid var(--accent);
  padding: 0.2rem 1rem 0.2rem 0;
}
[dir='rtl'] .media .media-tag {
  left: auto;
  right: 1rem;
}
[dir='rtl'] .hero-visual {
  margin-right: 0;
  margin-left: calc(var(--page-gutter) * -1);
}
[dir='rtl'] .hero-visual::before {
  inset: -1.25rem -1.25rem auto auto;
  border-left: 0;
  border-right: 1px solid var(--line-strong);
}
[dir='rtl'] .hero-chip {
  left: auto;
  right: clamp(-3.5rem, -4.5vw, -1rem);
}
[dir='rtl'] .dash-kpis > div + div {
  border-left: 0;
  border-right: 1px solid var(--line);
}
[dir='rtl'] .icon-strip > div + div {
  padding-left: 0;
  border-left: 0;
  padding-right: 1.4rem;
  border-right: var(--border);
}
[dir='rtl'] .media-stack .media:last-child {
  right: auto;
  left: -6%;
}
[dir='rtl'] .band--image .band-copy {
  border-left: 0;
  padding-left: 0;
  border-right: 1px solid rgba(201, 165, 90, 0.4);
  padding-right: 2rem;
}
[dir='rtl'] .stack-groups li {
  padding-left: 0;
  padding-right: 1rem;
}
[dir='rtl'] .stack-groups li::before {
  left: auto;
  right: 0;
}
[dir='rtl'] .focus-list li:nth-child(odd) {
  padding-right: 0;
  padding-left: 1rem;
}
[dir='rtl'] .pain-list li {
  padding: 0.85rem 2rem 0.85rem 0;
}
[dir='rtl'] .pain-list li::before {
  left: auto;
  right: 0;
}
[dir='rtl'] .pain-list li::after {
  left: auto;
  right: 0.4rem;
}
[dir='rtl'] .pain-panel::after {
  right: auto;
  left: -80px;
}
[dir='rtl'] .step::before {
  left: auto;
  right: 0;
}
[dir='rtl'] .hp-field {
  left: auto;
  right: -9999px;
}
/* App-screen mockups and code stay left-to-right, like real screenshots. */
[dir='rtl'] :is(.screen, .ui-console, pre, code, .hero-chip .dash-chart) {
  direction: ltr;
}
/* Arrows point the reading direction */
[dir='rtl'] .wordmark {
  direction: ltr;
}
@media (max-width: 1220px) {
  [dir='rtl'] .hero-visual {
    margin-left: 0;
  }
}
@media (max-width: 900px) {
  [dir='rtl'] .hero-chip {
    right: 1rem;
    left: auto;
  }
  [dir='rtl'] .media-stack .media:last-child {
    left: 0;
  }
  [dir='rtl'] .icon-strip > div:nth-child(3) {
    padding-right: 0;
    border-right: 0;
  }
  [dir='rtl'] .band--image .band-copy {
    padding-right: 1rem;
  }
}
@media (max-width: 640px) {
  [dir='rtl'] .stat:nth-child(2) {
    border-left: 0;
    padding-left: 0;
    border-right: 1px solid var(--color-stone);
    padding-right: 1rem;
  }
  [dir='rtl'] .icon-strip > div,
  [dir='rtl'] .icon-strip > div + div {
    border-right: 0;
    padding-right: 0;
  }
}
.nav a,
.nav .nav-cta,
.lang-switch summary {
  white-space: nowrap;
}

/* Subtle tiled background (art-deco lattice); solid sections and cards cover it. */
body {
  background-image: url('../images/patterns/tile-dark.svg');
  background-size: 44px 44px;
}
html[data-theme='light'] body {
  background-image: url('../images/patterns/tile-light.svg');
}
.showcase {
  grid-auto-rows: 1fr;
}
/* Keep the hero's punchline on one line where it fits. */
html:lang(en-CA) .h1-turn {
  white-space: nowrap;
}
@media (max-width: 350px) {
  .h1-turn {
    white-space: normal;
  }
}

/* Alternate sections: the hero sits on the lattice, then solid panel, lattice, panel...
   The alternating fill separates sections, so no hairlines between them;
   items inside a section (case studies, service rows) keep theirs. */
.section {
  border-top: 0;
}
main > .section:nth-child(odd of .section) {
  background: var(--surface);
}
main > .section:nth-child(even of .section) {
  background: transparent;
}
.case-feature:first-child,
.list-rows > :first-child {
  border-top: 0;
}
/* Breathing room under hero photos before the next section. */
.page-hero--media {
  padding-bottom: clamp(3rem, 5.5vw, 5.25rem);
}
/* Nicer line breaks: no orphaned last words, balanced headings. */
p,
li,
figcaption,
dd {
  text-wrap: pretty;
}
h1,
h2,
h3 {
  text-wrap: balance;
}
/* Room under the "at a glance" strip before the first panel. */
main > section.container:has(> .icon-strip) {
  padding-bottom: clamp(2.5rem, 4.5vw, 4rem);
}
.band p,
.lead,
.section-heading p {
  text-wrap: balance;
}
/* Contact: common questions */
.faq-item {
  padding: 1.5rem 0;
  border-top: var(--border);
}
.faq-item:first-child {
  border-top: 0;
  padding-top: 0;
}
.faq-item h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  margin: 0 0 0.55rem;
}
.faq-item p {
  color: var(--text-2);
  margin: 0;
  max-width: 64ch;
  line-height: 1.7;
}
/* 404 */
.notfound-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.notfound-code {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(7rem, 18vw, 15rem);
  line-height: 0.85;
  text-align: center;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.9;
  user-select: none;
}
.notfound-links .card {
  text-decoration: none;
  color: inherit;
  min-height: 0;
}
.notfound-links .card h3 {
  margin: 0.7rem 0 0.35rem;
}
.notfound-links .card p {
  margin: 0;
  color: var(--muted);
}
.notfound-links .card:hover h3 {
  color: var(--accent-text);
}
.notfound-langs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.4rem;
  margin: 2.2rem 0 0;
}
.notfound-langs a {
  color: var(--text-2);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
}
.notfound-langs a:hover {
  color: var(--accent-text);
}
@media (max-width: 900px) {
  .notfound-inner {
    grid-template-columns: 1fr;
  }
  .notfound-code {
    order: -1;
    text-align: start;
    font-size: clamp(5rem, 26vw, 8rem);
  }
}
.list-row p + p {
  margin-top: 0.75rem;
}

/* ---------- Page transitions ----------
   Cross-document view transitions (browsers without support simply navigate).
   The header holds still; the old page dissolves into a soft blur while a gold
   light sweeps across, then the new page rises into focus. */
@view-transition {
  navigation: auto;
}
.site-header {
  view-transition-name: site-header;
}
::view-transition {
  background-color: var(--bg);
  background-image: linear-gradient(
    105deg,
    transparent 38%,
    rgba(230, 201, 135, 0.16) 48%,
    rgba(201, 165, 90, 0.26) 50%,
    rgba(230, 201, 135, 0.16) 52%,
    transparent 62%
  );
  background-size: 260% 100%;
  background-repeat: no-repeat;
  animation: vt-sweep 0.9s cubic-bezier(0.65, 0, 0.35, 1) both;
}
::view-transition-group(root) {
  animation-duration: 0.9s;
}
::view-transition-old(root) {
  animation: vt-out 0.42s cubic-bezier(0.4, 0, 1, 1) both;
}
::view-transition-new(root) {
  animation: vt-in 0.78s cubic-bezier(0.16, 1, 0.3, 1) 0.16s both;
}
::view-transition-group(site-header) {
  animation-duration: 0.5s;
}
@keyframes vt-sweep {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: 0% 0;
  }
}
@keyframes vt-out {
  to {
    opacity: 0;
    filter: blur(10px) brightness(0.7);
    transform: scale(0.975);
  }
}
@keyframes vt-in {
  from {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(22px) scale(1.012);
  }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}
/* Longer nav labels in these languages: tighter spacing so the header fits. */
html:is(:lang(ja), :lang(es), :lang(fr)) .nav {
  gap: clamp(0.75rem, 1.05vw, 1.2rem);
}
/* Oil & Energy previews: 3D drilling replay and rig map (SVG). */
.screen-body > .drill-view,
.screen-body > .rig-map {
  display: block;
  width: 100%;
  height: 100%;
}
.drill-path {
  stroke-dasharray: 100;
  animation: drill-replay 9s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}
.drill-time {
  stroke-dasharray: 100;
  animation: drill-replay 9s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}
.drill-bit {
  animation: drill-bit 9s ease infinite;
}
.map-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: map-pulse 2.4s ease-out infinite;
}
@keyframes drill-replay {
  0% {
    stroke-dashoffset: 100;
  }
  72%,
  100% {
    stroke-dashoffset: 0;
  }
}
@keyframes drill-bit {
  0%,
  66% {
    opacity: 0;
  }
  74%,
  100% {
    opacity: 1;
  }
}
@keyframes map-pulse {
  from {
    transform: scale(1);
    opacity: 0.7;
  }
  to {
    transform: scale(3);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .drill-path,
  .drill-time,
  .drill-bit,
  .map-pulse {
    animation: none;
  }
}
.screen-body > .ui-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.net-flow {
  animation: net-flow 1.6s linear infinite;
}
.net-led {
  animation: net-led 2s ease-in-out infinite;
}
@keyframes net-flow {
  to {
    stroke-dashoffset: -20;
  }
}
@keyframes net-led {
  50% {
    opacity: 0.25;
  }
}
@media (prefers-reduced-motion: reduce) {
  .net-flow,
  .net-led {
    animation: none;
  }
}
