/* ============================================================
   Changing Nepal — services

   Large alternating rows. The service photographs are the best
   imagery on the site — real machines, real workshops — and the
   first pass showed them as 208px thumbnails beside a contents
   column, which read as documentation. They lead here instead,
   at the 955x492 landscape crop rather than the portrait one.
   ============================================================ */

.cn-svc { display: grid; }

.cn-row {
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
  border-bottom: 1px solid var(--cn-line);
  /* Cleared for the fixed header when jumped to from elsewhere. */
  scroll-margin-top: var(--cn-head-h);
}
/* Every second row is tinted, so the sequence has a beat rather than
   running as one long column. */
.cn-row:nth-child(even) { background: var(--cn-bg-soft); }

.cn-row__inner {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 56rem) {
  /* Equal columns: with an uneven split the photograph changed width
     every time it swapped sides, so the sequence never settled. */
  .cn-row__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* The picture changes sides down the page. */
  .cn-row:nth-child(even) .cn-row__shot { order: 2; }

  /* Held in from the page's full 108rem measure. This is what keeps the
     column near 692px, and 692 is the number the crop below is built
     around — at the full width the frame would outgrow the pixels the
     source actually has. A narrower measure also suits a row of two. */
  .cn-row__inner { max-width: calc(90rem + 2 * var(--cn-gutter)); }
}
.cn-row__inner > * { min-width: 0; }

/* ---------- the photograph ----------

   Not the native 955x492. That is a 1.94:1 letterbox, and dropping a
   band that wide into a half-width column next to a tall block of type
   made every photograph read as squashed. A taller frame crops the
   sides but gives the picture some body, and it sits level with the
   copy beside it instead of floating as a sliver.

   3:2 matches the source files exactly, so nothing is cropped away. `cover` only ever samples
   a 492*ratio-wide region of the source, so the taller the frame the
   fewer source pixels are in play: 3:2 uses 738 of the 955 available
   and lands at a 1.07x downscale in a 692px column, while 4:3 would
   use only 656 and start enlarging again. Taller than this and the
   softness comes straight back. */
.cn-row__shot {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--cn-bg-soft);
}

.cn-row__shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--cn-ease);
}
.cn-row:hover .cn-row__shot img { transform: scale(1.04); }

/* A hairline inside the frame, so the picture is bounded on the tinted
   rows where its own edges would otherwise dissolve into the panel. */
.cn-row__shot::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
  pointer-events: none;
}

/* The numeral sits over the corner of the picture, outlined so the
   photograph still reads through it. */
.cn-row__n {
  position: absolute;
  left: 0; bottom: 0;
  z-index: 1;
  padding: 0 0.22em 0.04em;
  font-family: var(--cn-display);
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 800;
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255,255,255,0.85);
  text-shadow: 0 2px 24px rgba(0,0,0,0.35);
  pointer-events: none;
  transition: color 420ms var(--cn-ease);
}
.cn-row:hover .cn-row__n { color: rgba(255,255,255,0.16); }

/* ---------- the copy ---------- */
.cn-row__body { display: grid; gap: 0.75rem; align-content: center; }

.cn-row__t {
  font-family: var(--cn-display);
  font-size: clamp(1.75rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.cn-row__t a { transition: color var(--cn-dur) var(--cn-ease); }
.cn-row:hover .cn-row__t a { color: var(--cn-brand-deep); }

.cn-row__p {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.7;
  color: var(--cn-fg-muted);
  max-width: 52ch;
}

.cn-row__go {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.5rem;
  font-family: var(--cn-data);
  font-size: var(--cn-t-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.cn-row__go .cn-ico { transition: transform var(--cn-dur) var(--cn-ease); }
.cn-row:hover .cn-row__go { color: var(--cn-brand-deep); }
.cn-row:hover .cn-row__go .cn-ico { transform: translate(2px, -2px); }

/* ---------- closing ---------- */
.cn-svc__endgrid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: 1fr;
  align-items: end;
}
@media (min-width: 62rem) {
  .cn-svc__endgrid { grid-template-columns: minmax(0, 1fr) auto; }
}
.cn-svc__endrow { display: flex; flex-wrap: wrap; gap: 0.75rem; }

@media (prefers-reduced-motion: reduce) {
  .cn-row__shot img, .cn-row__go .cn-ico, .cn-row__n { transition: none; }
  .cn-row:hover .cn-row__shot img { transform: none; }
}

/* ============================================================
   Service detail

   Built around how little copy these rows actually carry: the
   longest description on the site is 47 words. A conventional
   article layout leaves most of the screen empty, so the text is
   set beside the photograph and the page earns its length from
   navigation rather than from padding.
   ============================================================ */

.cn-shero {
  padding-block: clamp(2rem, 5vw, 4rem) clamp(2.5rem, 5vw, 4.5rem);
  border-bottom: 1px solid var(--cn-line);
}
.cn-shero__grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 56rem) {
  /* Text slightly narrower than the picture: two or three sentences
     want a short measure, and the photograph is the thing with
     presence here. */
  .cn-shero__grid { grid-template-columns: minmax(0, 0.88fr) minmax(0, 1fr); }
}
.cn-shero__grid > * { min-width: 0; }

.cn-shero__body { display: grid; gap: 0.85rem; align-content: center; }

.cn-shero__t {
  font-family: var(--cn-display);
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  font-weight: 800;
  /* 1.02 is fine for a single line but sets two lines solid, and on a
     title ending in a descender ("Briefing") the ink runs to the very
     bottom of the box — which made the paragraph below look attached
     to it even though the gap measured 30px. */
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.cn-shero__lead {
  /* Set against the title rather than left to the container's uniform
     gap: a heading this size needs roughly 0.7em beneath it before body
     copy, and the grid gap alone was giving it half that. */
  margin-top: 0.45rem;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.7;
  color: var(--cn-fg-muted);
  max-width: 46ch;
}
.cn-shero__row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.6rem; }

.cn-shero__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--cn-bg-soft);
}
.cn-shero__media img { width: 100%; height: 100%; object-fit: cover; }
.cn-shero__media::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
  pointer-events: none;
}

/* ---------- the sequence ---------- */
.cn-flow {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: 1fr;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  list-style: none;
  counter-reset: none;
}
@media (min-width: 40rem) { .cn-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .cn-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.cn-flow__link {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  min-height: 100%;
  padding: 0.85rem 1rem;
  background: var(--cn-bg);
  border: 1px solid var(--cn-line);
  transition: border-color var(--cn-dur) var(--cn-ease),
              background var(--cn-dur) var(--cn-ease),
              transform var(--cn-dur) var(--cn-ease);
}
a.cn-flow__link:hover {
  border-color: var(--cn-brand);
  transform: translateY(-2px);
}
.cn-flow__n {
  flex: none;
  font-family: var(--cn-data);
  font-size: var(--cn-t-xs);
  letter-spacing: 0.08em;
  color: var(--cn-brand-deep);
}
.cn-flow__t { font-weight: 600; line-height: 1.35; }

/* The current one is a span, not a link — it reads as a marker
   rather than something else to click. */
.cn-flow__item.is-here .cn-flow__link {
  background: var(--cn-brand-deep);
  border-color: var(--cn-brand-deep);
  color: #fff;
  cursor: default;
}
.cn-flow__item.is-here .cn-flow__n { color: rgba(255,255,255,0.75); }

/* ---------- previous / next ---------- */
.cn-jump {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 48rem) { .cn-jump { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.cn-jump__side {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem;
  border: 1px solid var(--cn-line);
  min-width: 0;
  transition: border-color var(--cn-dur) var(--cn-ease), background var(--cn-dur) var(--cn-ease);
}
.cn-jump__side--next { justify-content: flex-end; text-align: right; }
a.cn-jump__side:hover { border-color: var(--cn-brand); background: var(--cn-bg-soft); }
/* Holds the column open when there is no previous or next, so a
   "next" card never jumps across to the left-hand side. */
.cn-jump__side--empty { border-color: transparent; }
@media (max-width: 47.99rem) { .cn-jump__side--empty { display: none; } }

.cn-jump__shot {
  flex: none;
  width: 104px;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--cn-bg-soft);
}
.cn-jump__shot img { width: 100%; height: 100%; object-fit: cover; }

.cn-jump__text { display: grid; gap: 0.25rem; min-width: 0; }
.cn-jump__k {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--cn-data);
  font-size: var(--cn-t-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cn-fg-muted);
}
.cn-jump__side--next .cn-jump__k { justify-content: flex-end; }
.cn-jump__side--prev .cn-jump__k .cn-ico { transform: rotate(180deg); }
.cn-jump__t {
  font-family: var(--cn-display);
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
a.cn-jump__side:hover .cn-jump__t { color: var(--cn-brand-deep); }

@media (prefers-reduced-motion: reduce) {
  .cn-flow__link { transition: none; }
  a.cn-flow__link:hover { transform: none; }
}
