/* ============================================================================
   CODENdSTUDIO — components
   ========================================================================== */

/* ---------------- header ---------------- */
/* Kinoform's fixed header: pinned to the viewport, transparent over the hero and
   frosted once you scroll. --cs-lo rides the giant wordmark's flight — it is 0
   while the hero wordmark still owns the top of the page and reaches 1 exactly
   as that wordmark lands on the logo, so the compact logo fades in underneath
   it instead of appearing twice. The hero reserves 64px so nothing is covered. */
.cs-head { position: fixed; inset: 0 0 auto 0; z-index: 60; --cs-lo: 0; }
.cs-head-bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s5);
  height: 64px;
  transition: background-color .35s var(--ease), box-shadow .35s var(--ease);
}
.cs-head.is-solid .cs-head-bar {
  background: rgba(242, 244, 246, .82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 -1px 0 var(--line);
}
.cs-head.is-open .cs-head-bar {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}

.cs-logo { display: inline-flex; align-items: center; gap: 11px; min-height: 44px; }
/* the compact identity is the destination of the wordmark morph, so it is drawn
   only as the morph completes */
.cs-logo-mark, .cs-logo-word { opacity: var(--cs-lo); transition: opacity .1s linear; }
.cs-logo:focus-visible .cs-logo-mark, .cs-logo:focus-visible .cs-logo-word,
.cs-head.is-open .cs-logo-mark, .cs-head.is-open .cs-logo-word { opacity: 1; }

/* reduced motion: the wordmark still travels to the header, but with no easing
   the fade-through-zero left the header completely blank once the hero wordmark
   was hidden. The compact identity is simply always drawn instead. */
@media (prefers-reduced-motion: reduce) {
  .cs-logo-mark, .cs-logo-word { opacity: 1; }
}
.cs-logo-mark { display: block; width: auto; height: 18px; flex: none; }
.cs-logo-word {
  display: inline-flex; align-items: baseline;
  font-family: var(--display); font-weight: 800; font-stretch: 125%;
  font-size: 23px; letter-spacing: -.021em; line-height: 1; color: var(--ink);
}
.cs-logo-accent { color: var(--blue); }

.cs-nav { display: flex; align-items: center; gap: clamp(16px, 2vw, 30px); }
.cs-nav-link {
  position: relative;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .04em;
  color: var(--ink); padding: 6px 0;
}
.cs-nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 1px; height: 1.5px;
  background: var(--blue);
  transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease);
}
.cs-nav-link:hover::after, .cs-nav-link:focus-visible::after { transform: scaleX(1); transform-origin: left; }

.cs-nav-cta {
  display: inline-flex; align-items: center;
  padding: 9px 16px; border-radius: var(--r2);
  background: var(--blue-text); color: #fff;
  font-size: 13px; font-weight: 700;
  transition: background .25s var(--ease);
}
.cs-nav-cta:hover { background: var(--blue-deep); }

.cs-menu-btn { display: none; width: 44px; height: 44px; position: relative; }
.cs-menu-btn span {
  position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--ink);
  transition: transform .3s var(--ease);
}
.cs-menu-btn span:first-child { top: 19px; }
.cs-menu-btn span:last-child { top: 25px; }
.cs-head.is-open .cs-menu-btn span:first-child { transform: translateY(3px) rotate(45deg); }
.cs-head.is-open .cs-menu-btn span:last-child { transform: translateY(-3px) rotate(-45deg); }

.cs-menu {
  position: fixed; inset: 0; z-index: -1;
  background: var(--bg); padding: 96px var(--gutter) 32px;
  display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0; visibility: hidden;
  transition: opacity .3s var(--ease), visibility 0s linear .3s;
}
.cs-head.is-open .cs-menu { opacity: 1; visibility: visible; transition: opacity .3s var(--ease); }
.cs-menu-link {
  display: flex; align-items: baseline; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-family: var(--display); font-weight: 800; font-stretch: 125%;
  font-size: clamp(30px, 9vw, 44px); letter-spacing: -.03em; line-height: 1;
}
.cs-menu-link span { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--blue-text); }
.cs-menu-foot { display: grid; gap: 16px; padding-top: 28px; }
.cs-menu-foot p { font-family: var(--mono); font-size: 12px; color: var(--mute); }

/* ---------------- hero ---------------- */
.cs-hero { position: relative; padding-top: 64px; overflow: hidden; }

.cs-hero-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--s5); padding-top: clamp(20px, 3vw, 44px);
}
.cs-hero-intro {
  max-width: min(620px, 56vw);
  font-size: clamp(15px, 1.15vw, 18px); line-height: 1.5; color: var(--mute);
}
.cs-hero-intro strong { color: var(--ink); font-weight: 600; }
.cs-hero-meta { display: flex; align-items: center; gap: 8px; white-space: nowrap; margin-top: 4px; }
.cs-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); flex: none; }

/* oversized wordmark — the width is fitted by JS so it never overflows */
.cs-wordmark {
  margin: clamp(10px, 1.6vw, 26px) 0 0;
  text-align: center;
  font-family: var(--display); font-weight: 800; font-stretch: 125%;
  /* Fitted in CSS, not JS: 'CodendStudio' measures 8.23255px wide per 1px of font size
     (Archivo 800 @ 125% width), so 0.97 / 8.23255 = .11782 of the viewport. Doing this
     in CSS means the correct size is painted immediately; a JS resize after load
     registered as a new LCP candidate and pushed mobile LCP to ~3.4s. */
  font-size: calc((100vw - var(--cs-sb, 0px)) * .11782);
  line-height: .9; letter-spacing: -.045em;
  color: var(--ink);
  pointer-events: none;
}
.cs-wordmark-word { display: inline-flex; white-space: nowrap; }
.cs-wm-mask {
  display: inline-block; overflow: hidden; vertical-align: top;
  padding-bottom: .06em; margin-bottom: -.06em;
}
.cs-wm-i { display: inline-block; will-change: transform; }
.cs-wm-i--accent { color: var(--blue); }

/* ---------------- hero gallery ---------------- */
.cs-gallery {
  position: relative;
  margin-top: clamp(18px, 2.6vw, 40px);
  overflow: hidden;
  /* NOTE: no `cursor: none` here. Hiding the pointer before the custom cursor is
     actually painted leaves the user with no cursor at all (e.g. when the
     hover/pointer media query does not match). The class below is added by JS
     only once the custom cursor is visible. */
}
.cs-gallery-track {
  display: flex; align-items: center;
  gap: clamp(10px, 1.1vw, 18px);
  padding-block: clamp(14px, 2vw, 26px);
  width: max-content;
  will-change: transform;
}
.cs-tile {
  flex: none;
  overflow: hidden;
  border-radius: var(--r2);
  background: var(--line-soft);
  transition: transform .5s var(--ease-out), opacity .4s var(--ease);
}
.cs-tile img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }

/* varied widths and vertical offsets give the row an art-directed rhythm */
.cs-tile--a  { width: clamp(200px, 24vw, 340px); aspect-ratio: 4 / 3; }
.cs-tile--b  { width: clamp(170px, 21vw, 300px); aspect-ratio: 7 / 5; transform: translateY(-14px); }
.cs-tile--c  { width: clamp(220px, 27vw, 380px); aspect-ratio: 16 / 11; }
.cs-tile--d  { width: clamp(150px, 18vw, 260px); aspect-ratio: 2 / 3; transform: translateY(12px); }
.cs-tile--e  { width: clamp(200px, 24vw, 340px); aspect-ratio: 4 / 3; transform: translateY(-8px); }
.cs-tile--f  { width: clamp(150px, 18vw, 260px); aspect-ratio: 2 / 3; }
.cs-tile--g  { width: clamp(210px, 25vw, 360px); aspect-ratio: 16 / 11; transform: translateY(10px); }
.cs-tile--h  { width: clamp(150px, 18vw, 250px); aspect-ratio: 2 / 3; transform: translateY(-10px); }
.cs-tile--i  { width: clamp(190px, 23vw, 320px); aspect-ratio: 7 / 5; }
.cs-tile--j  { width: clamp(200px, 24vw, 340px); aspect-ratio: 7 / 5; transform: translateY(8px); }
.cs-tile--k  { width: clamp(140px, 17vw, 240px); aspect-ratio: 2 / 3; transform: translateY(-6px); }
.cs-tile--l  { width: clamp(205px, 25vw, 350px); aspect-ratio: 16 / 11; }

/* hover: restrained forward step, no 3D */
.cs-tile:hover { transform: translateY(-6px) scale(1.012); }

/* fallback CTA for touch + keyboard; hidden when the custom cursor is active */
.cs-reel-cta {
  display: inline-flex; align-items: center; gap: 9px;
  position: relative; z-index: 2;
  margin: 0 auto var(--s5);
  padding: 10px 18px 10px 12px;
  border-radius: var(--r2);
  background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 700;
  transition: background .25s var(--ease);
}
.cs-gallery .cs-reel-cta { display: flex; width: fit-content; }
.cs-reel-cta:hover { background: #000; }
.cs-reel-cta-icon {
  display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue);
}
.cs-gallery.cs-cursor-zone .cs-reel-cta { display: none; }

/* ---------------- marquee ---------------- */
.cs-marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: clamp(12px, 1.6vw, 22px);
  background: var(--bg);
}
.cs-marquee-track { display: flex; width: max-content; will-change: transform; }
.cs-marquee-group { display: flex; align-items: center; flex: none; }
.cs-mq-word {
  font-family: var(--display); font-weight: 800; font-stretch: 125%;
  font-size: clamp(30px, 4.6vw, 76px); line-height: 1;
  letter-spacing: -.035em; white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.4px var(--ink);
  padding-inline: .18em;
}
.cs-mq-word--fill { color: var(--blue); -webkit-text-stroke: 0; }
.cs-mq-sep {
  font-family: var(--mono); font-size: clamp(14px, 1.6vw, 22px);
  color: var(--blue-text); padding-inline: .5em;
}

/* ---------------- intro ---------------- */
.cs-intro-grid {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 96px); align-items: start;
}
.cs-intro-title { margin-top: var(--s4); }
.cs-intro-copy { margin-top: clamp(20px, 2.4vw, 34px); }
.cs-intro-side { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.cs-count {
  font-family: var(--display); font-weight: 800; font-stretch: 125%;
  font-size: clamp(64px, 9vw, 148px); line-height: .82; letter-spacing: -.05em;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.cs-count-note { margin-top: var(--s3); }
.cs-intro-list {
  margin-top: var(--s6); display: grid; gap: 7px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em; color: var(--mute);
}

/* ---------------- service showcases ---------------- */
.cs-services-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s5); padding-bottom: clamp(24px, 3vw, 44px);
}
/* Typographic disciplines — no imagery. Two columns: headline | supporting copy.
   The copy (description + capability list) is one flowed column so there is no
   stranded paragraph with a void beneath it. Sections alternate sides. */
.cs-show {
  position: relative;
  padding-block: clamp(30px, 4vw, 62px);
  border-top: 1px solid var(--line);
}
.cs-show:first-of-type { border-top: 0; }

.cs-show-body {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  gap: clamp(18px, 3.4vw, 64px);
  align-items: start;
}
.cs-show-num { grid-column: 1 / -1; margin-bottom: clamp(12px, 1.4vw, 22px); }

.cs-show-title {
  grid-column: 1; grid-row: 2;
  font-family: var(--display); font-weight: 800; font-stretch: 125%;
  font-size: clamp(30px, 5.6vw, 88px); line-height: .92;
  letter-spacing: -.04em; color: var(--ink);
  text-wrap: balance;
}

.cs-show-copy {
  grid-column: 2; grid-row: 2;
  display: grid;
  gap: clamp(16px, 2vw, 28px);
  align-content: start;
}
.cs-show-desc {
  font-size: clamp(15px, 1.1vw, 18px); line-height: 1.6;
  color: var(--mute); max-width: 42ch;
}
.cs-show-caps {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .02em; color: var(--mute);
}
.cs-show-caps li { padding-block: 8px; border-top: 1px solid var(--line-soft); }

/* mirrored sections: copy on the left, headline on the right */
.cs-show--alt .cs-show-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr); }
.cs-show--alt .cs-show-title { grid-column: 2; grid-row: 2; text-align: right; }
.cs-show--alt .cs-show-copy { grid-column: 1; grid-row: 2; }
.cs-show--alt .cs-show-desc { justify-self: end; text-align: right; }

@media (hover: hover) {
  .cs-show-body { transition: padding-left .45s var(--ease); }
  .cs-show:hover .cs-show-body { padding-left: 10px; }
}

/* ---------------- process ---------------- */
.cs-process-head {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 72px); align-items: end;
  padding-bottom: clamp(36px, 5vw, 72px);
}
.cs-process-title { margin-top: var(--s4); }

.cs-flow { position: relative; padding-top: 26px; }
.cs-flow-line {
  position: absolute; left: 0; right: 0; top: 0;
  width: 100%; height: 2px; overflow: visible;
}
.cs-flow-path { stroke: var(--line); stroke-width: 1.5; }
.cs-flow-path--on { stroke: var(--blue); stroke-width: 2; stroke-linecap: round; }

.cs-flow-steps {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(12px, 1.8vw, 28px);
}
.cs-flow-step { position: relative; padding-top: 22px; }
.cs-flow-node {
  position: absolute; left: 0; top: -31px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--ink);
}
.cs-flow-step.is-on .cs-flow-node { background: var(--blue); box-shadow: none; }
.cs-flow-num { color: var(--blue-text); }
.cs-flow-name {
  margin-top: 6px;
  font-size: clamp(15px, 1.35vw, 20px); font-weight: 700; font-stretch: 110%;
  line-height: 1.2; letter-spacing: -.015em; color: var(--ink);
}
.cs-flow-copy { margin-top: 8px; font-size: 13.5px; line-height: 1.55; color: var(--mute); }

.cs-flow-previews {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(12px, 1.8vw, 28px); margin-top: clamp(28px, 3.4vw, 52px);
}
.cs-flow-thumb { overflow: hidden; border-radius: var(--r2); background: var(--line-soft); }
.cs-flow-thumb img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 15%; }

/* ---------------- capabilities ---------------- */
/* NB: max-width in `ch` here would resolve against the container's 16px font, not the
   heading's, which clipped the headline. Constrain with a real length instead. */
.cs-caps-head { max-width: min(760px, 54vw); }
.cs-caps-title { margin-top: var(--s4); }
.cs-cap-list { margin-top: clamp(36px, 5vw, 72px); border-top: 1px solid var(--line); }
.cs-cap { border-bottom: 1px solid var(--line); }
.cs-cap-link {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.15fr) 40px;
  align-items: baseline; gap: clamp(12px, 2vw, 32px);
  padding: clamp(18px, 2.4vw, 32px) 0;
  transition: padding-left .4s var(--ease);
}
.cs-cap-link:hover, .cs-cap-link:focus-visible { padding-left: 14px; }
.cs-cap-num { color: var(--mute); transition: color .3s var(--ease); }
.cs-cap-link:hover .cs-cap-num { color: var(--blue-text); }
.cs-cap-name {
  font-family: var(--display); font-weight: 800; font-stretch: 125%;
  font-size: clamp(24px, 3.4vw, 46px); line-height: 1; letter-spacing: -.032em;
  color: var(--ink);
  transition: color .3s var(--ease);
}
.cs-cap-link:hover .cs-cap-name { color: var(--blue); }
.cs-cap-copy { font-size: 14px; line-height: 1.5; color: var(--mute); }
.cs-cap-arrow {
  justify-self: end; align-self: center;
  color: var(--mute);
  transition: transform .35s var(--ease), color .3s var(--ease);
}
.cs-cap-link:hover .cs-cap-arrow { transform: translateX(6px); color: var(--blue-text); }

/* ---------------- contact ---------------- */
.cs-contact-panel {
  background: var(--dark);
  color: #fff;
  padding: clamp(28px, 4.4vw, 72px);
  border-radius: var(--r3);
  position: relative;
  overflow: hidden;
}
.cs-contact-label { color: rgba(255, 255, 255, .95); }
.cs-contact-title { color: #fff; margin-top: var(--s4); }
.cs-contact-title em { color: var(--blue); }
.cs-contact-body {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: clamp(32px, 5vw, 88px);
  margin-top: clamp(32px, 4.4vw, 64px);
}
.cs-contact-intro { font-size: clamp(16px, 1.2vw, 19px); line-height: 1.6; color: #fff; max-width: 36ch; }
.cs-contact-facts { margin-top: var(--s6); display: grid; gap: var(--s4); }
.cs-contact-facts div { border-top: 1px solid rgba(255, 255, 255, .26); padding-top: 11px; }
.cs-contact-facts dt { color: rgba(255, 255, 255, .95); }
.cs-contact-facts dd { margin-top: 4px; font-size: 15px; font-weight: 600; color: #fff; }
.cs-contact-mail { border-bottom: 1px solid rgba(255, 255, 255, .38); }
.cs-contact-mail:hover { border-color: #fff; }

.cs-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 22px; }
.cs-field { display: flex; flex-direction: column; min-width: 0; }
.cs-field--full { grid-column: 1 / -1; }
.cs-field label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: #fff; margin-bottom: 7px;
}
.cs-opt { text-transform: none; letter-spacing: 0; color: rgba(255, 255, 255, .8); }
.cs-field input, .cs-field select, .cs-field textarea {
  appearance: none; -webkit-appearance: none;
  width: 100%; font: inherit; font-size: 15px;
  color: #fff; background: rgba(255, 255, 255, .07);
  border: 0; border-bottom: 1px solid rgba(255, 255, 255, .38);
  border-radius: 0;
  padding: 11px 0;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.cs-field textarea { resize: vertical; min-height: 104px; line-height: 1.5; }
.cs-field input::placeholder, .cs-field textarea::placeholder { color: rgba(255, 255, 255, .78); }
.cs-field input:hover, .cs-field select:hover, .cs-field textarea:hover {
  border-bottom-color: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .1);
}
.cs-field input:focus, .cs-field select:focus, .cs-field textarea:focus {
  outline: none; border-bottom-color: var(--blue); background: rgba(255, 255, 255, .12);
}
.cs-field input[aria-invalid="true"], .cs-field select[aria-invalid="true"], .cs-field textarea[aria-invalid="true"] {
  border-bottom-color: #FF9A9A;
}
.cs-select { position: relative; }
.cs-select::after {
  content: ""; position: absolute; right: 4px; top: 45%;
  width: 7px; height: 7px; border-right: 1.5px solid #fff; border-bottom: 1.5px solid #fff;
  transform: translateY(-50%) rotate(45deg); pointer-events: none;
}
.cs-field select { padding-right: 26px; cursor: pointer; }
.cs-field select:invalid { color: rgba(255, 255, 255, .78); }
.cs-field select option { color: var(--ink); background: #fff; }
.cs-err {
  min-height: 15px; margin-top: 5px;
  font-family: var(--mono); font-size: 11px; line-height: 1.3; color: #FF9A9A;
}
.cs-err:not(:empty)::before { content: "! "; }

.cs-form-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 24px; }
.cs-form-note { font-size: 13px; color: rgba(255, 255, 255, .9); }
.cs-submit[aria-busy="true"] { pointer-events: none; opacity: .8; }
.cs-submit[aria-busy="true"] .cs-submit-label::after { content: "…"; }

.cs-done { padding: 8px 0 0; outline: none; }
.cs-done-title {
  font-family: var(--display); font-weight: 800; font-stretch: 125%;
  font-size: clamp(24px, 2.6vw, 38px); line-height: 1.05; letter-spacing: -.03em; color: #fff;
}
.cs-done-copy { margin-top: 10px; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, .92); max-width: 40ch; }
.cs-done-again {
  margin-top: 18px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em;
  text-transform: uppercase; color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .5);
}
.cs-done-again:hover { border-color: #fff; }

/* ---------------- availability ---------------- */
.cs-avail-head {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 72px); align-items: end;
  padding-bottom: clamp(32px, 4vw, 60px);
}
.cs-avail-title { margin-top: var(--s4); }
.cs-avail-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 40px);
  border-top: 1px solid var(--line);
  padding-top: clamp(20px, 2.4vw, 32px);
}
.cs-avail-item dt { color: var(--mute); }
.cs-avail-item dd {
  margin-top: 8px;
  font-family: var(--display); font-weight: 700; font-stretch: 120%;
  font-size: clamp(17px, 1.7vw, 24px); line-height: 1.15; letter-spacing: -.02em; color: var(--ink);
}
.cs-avail-item p { margin-top: 8px; font-size: 13.5px; line-height: 1.55; color: var(--mute); }

/* ---------------- footer ---------------- */
.cs-foot { border-top: 1px solid var(--line); padding-top: clamp(48px, 6vw, 88px); overflow: hidden; }
.cs-foot-top {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
}
.cs-foot-mail {
  display: inline-block; margin-top: 10px;
  font-family: var(--display); font-weight: 800; font-stretch: 112%;
  font-size: clamp(20px, 3vw, 40px); letter-spacing: -.03em; line-height: 1.1;
  color: var(--ink); border-bottom: 2px solid var(--blue);
}
.cs-foot-mail:hover { color: var(--blue-text); }
.cs-foot-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); }
.cs-foot-nav div { display: grid; align-content: start; gap: 7px; }
.cs-foot-nav .cs-label { margin-bottom: 4px; }
.cs-foot-nav a { font-size: 14px; color: var(--mute); transition: color .2s var(--ease); }
.cs-foot-nav a:hover { color: var(--ink); }

.cs-foot-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 28px; margin-top: clamp(32px, 4vw, 56px);
  padding-block: 20px; border-top: 1px solid var(--line);
}
.cs-foot-copy, .cs-foot-links a {
  font-family: var(--mono); font-size: 12px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--mute);
}
.cs-foot-links { display: flex; gap: 22px; }
.cs-foot-links a:hover { color: var(--ink); }

.cs-foot-mark-clip {
  overflow: hidden; padding-inline: var(--gutter);
  margin-top: clamp(8px, 1.6vw, 20px);
  height: .78em; font-size: 19vw;
}
.cs-foot-mark {
  display: block; width: max-content;
  font-family: var(--display); font-weight: 800; font-stretch: 125%;
  line-height: .82; letter-spacing: -.05em; white-space: nowrap;
  color: var(--ink); margin-top: -.02em;
}
.cs-foot-mark-accent { color: var(--blue); }

/* ---------------- showreel modal ---------------- */
.cs-reel {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  padding: clamp(12px, 2.4vw, 36px);
  visibility: hidden; opacity: 0;
  transition: opacity .3s var(--ease), visibility 0s linear .3s;
}
.cs-reel.is-open { visibility: visible; opacity: 1; transition: opacity .3s var(--ease); }
.cs-reel-backdrop { position: absolute; inset: 0; background: rgba(8, 12, 14, .9); }
.cs-reel-inner {
  position: relative; width: min(1280px, 100%);
  transform: translateY(12px) scale(.985);
  transition: transform .45s var(--ease-out);
}
.cs-reel.is-open .cs-reel-inner { transform: none; }
.cs-reel-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-bottom: 10px;
}
.cs-reel-bar .cs-label { color: rgba(255, 255, 255, .92); }
.cs-reel-close {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
  transition: background .2s var(--ease), box-shadow .2s var(--ease);
}
.cs-reel-close:hover { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px #fff; }
.cs-reel-stage { position: relative; background: #000; border-radius: var(--r2); overflow: hidden; }
.cs-reel-video { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.cs-reel-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: #fff; color: var(--ink);
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.cs-reel-play:hover { transform: translate(-50%, -50%) scale(1.06); }
.cs-reel.is-playing .cs-reel-play { opacity: 0; pointer-events: none; }

/* reduced motion: the process diagram resolves to its completed state,
   since the node lighting is normally driven by the draw timeline */
@media (prefers-reduced-motion: reduce) {
  .cs-flow-node { background: var(--blue); box-shadow: none; }
  .cs-flow-path--on { stroke: var(--blue); }
}

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) {
  .cs-intro-grid, .cs-process-head, .cs-avail-head { grid-template-columns: 1fr; }
  .cs-intro-side { align-items: flex-start; text-align: left; margin-top: var(--s5); }
  .cs-contact-body { grid-template-columns: 1fr; }
  .cs-avail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-foot-top { grid-template-columns: 1fr; }
  .cs-cap-link { grid-template-columns: 44px minmax(0, 1fr) 32px; }
  .cs-cap-copy { grid-column: 2 / -1; }
  .cs-show-body { grid-template-columns: 1fr; }
  .cs-show--alt .cs-show-body { grid-template-columns: 1fr; }
  .cs-show-title, .cs-show--alt .cs-show-title { grid-column: 1; grid-row: 2; text-align: left; }
  /* stacked: title row 2, copy row 3 — same row would overlap them */
  .cs-show-copy, .cs-show--alt .cs-show-copy { grid-column: 1; grid-row: 3; }
  .cs-show--alt .cs-show-desc { justify-self: start; text-align: left; }
  .cs-show-caps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .cs-nav { display: none; }
  .cs-menu-btn { display: block; }
  .cs-flow-steps { grid-template-columns: 1fr; gap: 0; }
  .cs-flow-line { display: none; }
  .cs-flow-step {
    padding: 16px 0 16px 26px;
    border-left: 1px solid var(--line);
  }
  .cs-flow-node { left: -4.5px; top: 22px; }
  .cs-flow-step.is-on { border-left-color: var(--blue); }
  .cs-flow-previews { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cs-form-grid { grid-template-columns: 1fr; }
  .cs-foot-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .cs-hero-top { flex-direction: column; }
  .cs-hero-intro { max-width: none; }
  .cs-hero-meta { display: none; }
  .cs-services-head { flex-direction: column; align-items: flex-start; }
  .cs-show-caps { grid-template-columns: 1fr; }
  .cs-avail-grid { grid-template-columns: 1fr; }
  .cs-flow-previews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-tile { border-radius: var(--r2); }
  .cs-foot-nav { grid-template-columns: 1fr; gap: var(--s5); }
  .cs-contact-panel { border-radius: var(--r2); }
}

/* ============================================================================
   HERO VIDEO PREVIEWS — four real GIF tiles + PLAY VIDEO cursor + hover preview
   + full-source modal. Kept deliberately restrained: no glass, no glow, no 3D.
   ========================================================================== */

/* ---- video tile: exact 16:9, clips cleanly, keeps gallery rhythm ---- */
.cs-tile--video {
  position: relative;
  width: clamp(190px, 22vw, 320px);
  aspect-ratio: 16 / 9;
  background: var(--ink);
  isolation: isolate;
}
.cs-tile--video .cs-tile-gif {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%;
  display: block;
}
/* the whole tile is the control; it sits above the gif but is transparent */
.cs-tile-hit {
  position: absolute; inset: 0; z-index: 2;
  background: transparent; border: 0; cursor: pointer;
  border-radius: inherit;
}
.cs-tile-hit:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.cs-tile--video:hover .cs-tile-gif { transform: scale(1.04); }
.cs-tile--video .cs-tile-gif { transition: transform .5s var(--ease-out); }

/* a small play chip so the tile reads as video even before hover */
.cs-tile--video::after {
  content: "";
  position: absolute; left: 10px; bottom: 10px; z-index: 3;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue-text) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5.4v13.2L19 12z' fill='%23fff'/%3E%3C/svg%3E") center/58% no-repeat;
  pointer-events: none;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.cs-tile--video:hover::after { transform: scale(1.12); }

/* ---- PLAY VIDEO cursor ---- */
.cs-vcursor {
  position: fixed; left: 0; top: 0; z-index: 58;
  width: 96px; height: 96px; margin: -48px 0 0 -48px;
  display: grid; place-items: center;
  pointer-events: none; opacity: 0; visibility: hidden;
  will-change: transform;
}
.cs-vcursor-ring { position: absolute; inset: 0; border-radius: 50%; background: var(--dark); }
.cs-vcursor-inner {
  position: relative; display: grid; place-items: center; gap: 3px;
  color: #fff; text-align: center;
}
.cs-vcursor-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: .1em;
  text-transform: uppercase; line-height: 1;
}
/* only hide the native pointer once our cursor is actually painted */
.cs-gallery.cs-vcursor-active .cs-tile--video,
.cs-gallery.cs-vcursor-active .cs-tile-hit { cursor: none; }

/* ---- muted hover preview popup ---- */
.cs-vhover {
  position: fixed; left: 0; top: 0; z-index: 57;
  width: 232px; aspect-ratio: 9 / 16;
  pointer-events: none;
  opacity: 0; visibility: hidden;
  will-change: transform;
  background: #000;
  border-radius: var(--r2);
  overflow: hidden;
  box-shadow: 0 20px 44px -24px rgba(8, 12, 14, .8);
}
.cs-vhover-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-vhover-bar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--blue);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ---- full video modal ---- */
.cs-vmodal {
  position: fixed; inset: 0; z-index: 95;
  display: grid; place-items: center;
  padding: clamp(12px, 2.4vw, 36px);
  visibility: hidden; opacity: 0;
  transition: opacity .3s var(--ease), visibility 0s linear .3s;
}
.cs-vmodal.is-open { visibility: visible; opacity: 1; transition: opacity .3s var(--ease); }
.cs-vmodal-backdrop { position: absolute; inset: 0; background: rgba(8, 12, 14, .92); }
.cs-vmodal-inner {
  position: relative;
  width: min(520px, 100%);
  transform: translateY(12px) scale(.985);
  transition: transform .45s var(--ease-out);
}
.cs-vmodal.is-open .cs-vmodal-inner { transform: none; }
.cs-vmodal-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-bottom: 10px;
}
.cs-vmodal-title { color: rgba(255, 255, 255, .92); }
.cs-vmodal-close {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
  transition: background .2s var(--ease), box-shadow .2s var(--ease);
}
.cs-vmodal-close:hover { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px #fff; }
.cs-vmodal-stage {
  position: relative; background: #000; border-radius: var(--r2); overflow: hidden;
}
/* the footage is 9:16; letterbox it instead of cropping the frame away */
.cs-vmodal-video {
  display: block; width: 100%;
  max-height: min(78vh, 820px);
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #000;
}
/* `display: grid` beats the [hidden] attribute, so the message painted even while
   hidden. Restore the attribute's meaning explicitly. */
.cs-vmodal-error {
  position: absolute; inset: 0; display: grid; place-items: center;
  margin: 0; padding: 24px; text-align: center;
  font-size: 14px; color: rgba(255, 255, 255, .9);
  background: var(--dark);
}
.cs-vmodal-error[hidden] { display: none; }

@media (max-width: 860px) {
  .cs-vhover, .cs-vcursor { display: none !important; }
  .cs-vmodal-inner { width: min(440px, 100%); }
}
@media (max-width: 480px) {
  .cs-tile--video { width: clamp(160px, 42vw, 220px); }
  .cs-vmodal { padding: 12px; }
  .cs-vmodal-video { max-height: 74vh; }
}
@media (prefers-reduced-motion: reduce) {
  .cs-vhover, .cs-vcursor { display: none !important; }
  .cs-tile--video .cs-tile-gif { transition: none; }
}
