/* =========================================================
   zojo.com.au - David Gross
   Fonts - self-hosted, static weights
   Place the .woff2 files in assets/fonts/
   ========================================================= */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   zojo.com.au - David Gross
   Design tokens
   ========================================================= */

:root {
  /* Palette - slate/ink with a single signal accent */
  --ink:        #14181D;
  --ink-2:      #1D242C;
  --slate:      #5C6672;
  --slate-2:    #8A939E;
  --rule:       #D8DCE1;
  --paper:      #F6F7F8;
  --paper-2:    #FFFFFF;
  --signal:     #E8590C;   /* signage amber-orange */
  --signal-dim: #FBEDE4;

  /* Type */
  --display: "Bricolage Grotesque", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Scale */
  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
  --step-0:  clamp(1rem, 0.97rem + 0.15vw, 1.08rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
  --step-2:  clamp(1.6rem, 1.35rem + 1.2vw, 2.4rem);
  --step-3:  clamp(2.2rem, 1.6rem + 3vw, 4.4rem);

  /* Layout */
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --measure: 62ch;
  --max: 1440px;
  --rule-w: 1px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:        #F1F3F5;
    --ink-2:      #DCE1E6;
    --slate:      #99A3AE;
    --slate-2:    #6C7681;
    --rule:       #2A3138;
    --paper:      #0E1216;
    --paper-2:    #14181D;
    --signal:     #FF7A2F;
    --signal-dim: #2A1B12;
  }
}

/* =========================================================
   Base
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.55;
  font-feature-settings: "cv05" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* contains full-bleed 100vw heroes without a scrollbar */
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1em; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0; }

/* =========================================================
   Masthead
   ========================================================= */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem var(--gutter);
  max-width: var(--max);
  margin-inline: auto;
  border-bottom: var(--rule-w) solid var(--rule);
}

.wordmark {
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.wordmark-name {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--step-0);
  letter-spacing: -0.01em;
}

.wordmark-role {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.masthead nav {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.masthead nav a {
  text-decoration: none;
  color: var(--slate);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.masthead nav a:hover { color: var(--ink); border-bottom-color: var(--signal); }

/* =========================================================
   Hero
   ========================================================= */

.hero {
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(3.5rem, 12vh, 9rem) var(--gutter) clamp(3rem, 9vh, 6rem);
}

.eyebrow {
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate);
  margin: 0 0 clamp(1.5rem, 4vh, 3rem);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--signal);
  flex: none;
}

.hero h1 {
  font-size: var(--step-3);
  max-width: 18ch;
  margin-bottom: clamp(1.5rem, 4vh, 2.5rem);
}

.hero-sub {
  max-width: var(--measure);
  color: var(--slate);
  font-size: var(--step-1);
  line-height: 1.45;
  margin-bottom: clamp(2rem, 6vh, 4rem);
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink);
}

.scroll-cue svg { transition: transform 0.3s ease; }
.scroll-cue:hover svg { transform: translateY(4px); }
.scroll-cue:hover { color: var(--signal); }

/* =========================================================
   Departures board - the signature element
   ========================================================= */

.board {
  max-width: var(--max);
  margin-inline: auto;
  padding: 0 var(--gutter) clamp(4rem, 10vh, 7rem);
}

.board-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 0.9rem;
  border-bottom: 2px solid var(--ink);
}

.board-head h2 {
  font-size: var(--step-1);
}

.board-legend {
  display: none;
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate-2);
}

@media (min-width: 900px) {
  .board-legend {
    display: grid;
    grid-template-columns: 15rem 1fr 16rem;
    gap: 1.5rem;
    width: min(70%, 56rem);
  }
}

.departures {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: dep;
}

.dep {
  border-bottom: var(--rule-w) solid var(--rule);
  position: relative;
}

.dep > a {
  display: grid;
  grid-template-columns: 2.5rem 1fr 1.5rem;
  grid-template-areas:
    "idx client arrow"
    "idx title arrow"
    "idx tags  arrow";
  gap: 0.2rem 1rem;
  align-items: baseline;
  padding: 1.5rem 0;
  text-decoration: none;
  transition: padding-left 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
              background-color 0.25s;
}

@media (min-width: 900px) {
  .dep > a {
    grid-template-columns: 3.5rem 15rem 1fr 16rem 2rem;
    grid-template-areas: "idx client title tags arrow";
    align-items: center;
    gap: 1.5rem;
    padding: 1.35rem 0;
  }
}

.dep-index {
  grid-area: idx;
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--slate-2);
  font-variant-numeric: tabular-nums;
  align-self: start;
}

.dep-client {
  grid-area: client;
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--signal);
}

.dep-title {
  grid-area: title;
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.2;
}

.dep-tags {
  grid-area: tags;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--slate);
  margin-top: 0.35rem;
}

@media (min-width: 900px) {
  .dep-tags { margin-top: 0; justify-content: flex-end; }
}

.dep-arrow {
  grid-area: arrow;
  color: var(--slate-2);
  font-size: var(--step-1);
  justify-self: end;
  align-self: center;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.25s;
}

@media (hover: hover) and (min-width: 900px) {
  .dep > a:hover { padding-left: 1rem; }
  .dep > a:hover .dep-arrow { transform: translateX(6px); color: var(--signal); }
  .dep > a:hover .dep-title { color: var(--signal); }
}

.dep > a:focus-visible { background: var(--signal-dim); }

/* Hover thumbnail - desktop pointer devices only */
.dep-thumb {
  display: none;
  margin: 0;
}

@media (hover: hover) and (min-width: 1100px) {
  .dep-thumb {
    display: block;
    position: absolute;
    top: 50%;
    right: 18rem;
    width: 20rem;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    transform: translateY(-50%) scale(0.94);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 18px 45px -18px rgba(0, 0, 0, 0.45);
  }
  .dep-thumb img { width: 100%; height: 100%; object-fit: cover; }
  .dep:hover .dep-thumb,
  .dep:focus-within .dep-thumb {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

/* =========================================================
   About
   ========================================================= */

.about {
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(3rem, 9vh, 6rem) var(--gutter);
  border-top: var(--rule-w) solid var(--rule);
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .about { grid-template-columns: 15rem 1fr; gap: 4rem; }
}

.about h2 {
  font-family: var(--mono);
  font-size: var(--step--1);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate);
}

.about-body { max-width: var(--measure); }

.lede {
  font-family: var(--display);
  font-size: var(--step-2);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.about-body p:not(.lede) { color: var(--slate); }

.facts {
  margin: 2.5rem 0 0;
  display: grid;
  gap: 0.75rem;
  border-top: var(--rule-w) solid var(--rule);
  padding-top: 1.5rem;
}

.facts > div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
}

.facts dt {
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-2);
}

.facts dd { margin: 0; }

/* Capabilities key - labelled groups of tag-styled skills. Reuses .facts'
   dt label styling and .cs-tags' pill styling rather than a plain list. */
.capabilities {
  margin: 2.5rem 0 0;
  display: grid;
  gap: 1.75rem 2rem;
  border-top: var(--rule-w) solid var(--rule);
  padding-top: 1.5rem;
}
@media (min-width: 640px) {
  .capabilities { grid-template-columns: repeat(2, 1fr); }
}
.capabilities dt {
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-2);
  margin-bottom: 0.75rem;
}
.capabilities dd { margin: 0; }
.capabilities .cs-tags { margin: 0; }

/* =========================================================
   Connect + footer
   ========================================================= */

.connect {
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(4rem, 12vh, 8rem) var(--gutter);
  border-top: 2px solid var(--ink);
  text-align: center;
}

.connect h2 {
  font-size: var(--step-3);
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.6rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid var(--ink);
  transition: background-color 0.25s, color 0.25s;
}

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

.colophon {
  max-width: var(--max);
  margin-inline: auto;
  padding: 1.5rem var(--gutter) 3rem;
  border-top: var(--rule-w) solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--slate);
}

.colophon p { margin: 0; }

.social {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.colophon a { text-decoration: none; }
.colophon a:hover { color: var(--signal); }

/* =========================================================
   Contact page
   ========================================================= */

.contact {
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(3.5rem, 12vh, 8rem) var(--gutter);
  display: grid;
  gap: 3rem;
}

@media (min-width: 900px) {
  .contact { grid-template-columns: 1.1fr 1fr; gap: 5rem; }
}

.contact h1 {
  font-size: var(--step-3);
  margin-bottom: 1.5rem;
}

.contact-intro { max-width: 40ch; color: var(--slate); font-size: var(--step-1); }

.channels {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--ink);
}

.channels li { border-bottom: var(--rule-w) solid var(--rule); }

.channels a {
  display: grid;
  grid-template-columns: 7rem 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 1.25rem 0;
  text-decoration: none;
  transition: padding-left 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.channels a:hover { padding-left: 0.75rem; }

.channels .ch-label {
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-2);
}

.channels .ch-value {
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 500;
  letter-spacing: -0.015em;
}

.channels a:hover .ch-value { color: var(--signal); }

.channels .ch-arrow { color: var(--slate-2); }

.availability {
  border: 1px solid var(--rule);
  padding: 1.5rem;
  background: var(--paper-2);
}

.availability h2 {
  font-family: var(--mono);
  font-size: var(--step--1);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate);
  margin-bottom: 0.75rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--slate);
  margin-bottom: 1rem;
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  flex: none;
}

/* =========================================================
   Case study pages
   ========================================================= */

.cs {
  max-width: var(--max);
  margin-inline: auto;
  padding: 0 var(--gutter);
}

/* Back link bar */
.cs-nav {
  max-width: var(--max);
  margin-inline: auto;
  padding: 1.25rem var(--gutter);
  border-bottom: var(--rule-w) solid var(--rule);
}

.cs-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
}
.cs-back:hover { color: var(--signal); }

/* Header */
.cs-head {
  padding-top: clamp(2.5rem, 8vh, 5rem);
  padding-bottom: clamp(2rem, 5vh, 3.5rem);
  max-width: 60rem;
}

.cs-client {
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--signal);
  margin: 0 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.cs-client::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--signal);
  flex: none;
}

/* Page icon - small wayfinding glyph above the title.
   Source glyphs are white - invert for the light (default) background;
   leave them white where the dark scheme's background is already dark. */
.cs-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  display: block;
  margin: 0 0 2rem;
  filter: invert(1);
}
@media (prefers-color-scheme: dark) {
  .cs-icon { filter: none; }
}

.cs-head h1 {
  font-size: var(--step-3);
  margin-bottom: 1.25rem;
}

.cs-summary {
  font-size: var(--step-1);
  color: var(--slate);
  max-width: var(--measure);
  line-height: 1.45;
  margin-bottom: 1.75rem;
}

.cs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.cs-tags li {
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
  border: 1px solid var(--rule);
  padding: 0.3rem 0.7rem;
}

/* Hero image - boxed variant (default, within max width) */
.cs-hero {
  margin: 0 0 clamp(2.5rem, 7vh, 5rem);
  aspect-ratio: 16 / 8;
  overflow: hidden;
  background: var(--paper-2);
}
.cs-hero img { width: 100%; height: 100%; object-fit: cover; }

/* Hero image - full-bleed parallax variant.
   Breaks out of the .cs max-width to span the full viewport, and pins the
   image while content scrolls over it. The <img> is kept for accessibility
   and SEO but hidden; the visible image is a fixed background. */
.cs-hero--parallax {
  position: relative;
  /* Break out of any centered/padded parent to true viewport width */
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: 0;
  margin-bottom: clamp(2.5rem, 7vh, 5rem);
  aspect-ratio: auto;
  height: clamp(340px, 62vh, 640px);
  overflow: hidden;
  background-color: var(--paper-2);
  background-image: var(--cs-hero-src);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Hide the semantic <img> without removing it from the accessibility tree */
.cs-hero--parallax img {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* background-attachment: fixed misbehaves on most touch browsers (the image
   jumps or stretches). Fall back to a normal scrolling cover image there. */
@media (hover: none), (pointer: coarse) {
  .cs-hero--parallax { background-attachment: scroll; }
}

/* Respect reduced-motion: no pinned/parallax movement */
@media (prefers-reduced-motion: reduce) {
  .cs-hero--parallax { background-attachment: scroll; }
}

/* Meta block - role / scope / result, timetable-style */
.cs-meta {
  display: grid;
  gap: 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  margin-bottom: clamp(3rem, 8vh, 5.5rem);
}
@media (min-width: 760px) {
  .cs-meta { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1040px) {
  .cs-meta { grid-template-columns: repeat(4, 1fr); }
}

.cs-meta > div {
  padding: 1.5rem 1.5rem 1.75rem 0;
  border-bottom: var(--rule-w) solid var(--rule);
}
@media (min-width: 1040px) {
  .cs-meta > div {
    border-bottom: none;
    border-right: var(--rule-w) solid var(--rule);
    padding-right: 1.5rem;
  }
  /* Cells after the first sit to the right of a vertical rule -
     give them breathing room from that line */
  .cs-meta > div + div { padding-left: 24px; }
  .cs-meta > div:last-child { border-right: none; }
}

.cs-meta dt {
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-2);
  margin-bottom: 0.6rem;
}
.cs-meta dd {
  margin: 0;
  font-size: var(--step-0);
  line-height: 1.4;
}

/* Content sections */
.cs-section {
  padding-bottom: clamp(3rem, 8vh, 5.5rem);
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 900px) {
  /* Empty left column pushes the whole block (eyebrow + body) toward centre;
     eyebrow then body follow in compact columns */
  .cs-section {
    grid-template-columns: 0.3fr 12rem minmax(0, 50rem);
    gap: 0 3.5rem;
  }
  .cs-section > .cs-eyebrow { grid-column: 2; }
  .cs-section-body { grid-column: 3; }
}

.cs-section > .cs-eyebrow {
  font-family: var(--mono);
  font-size: var(--step--1);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate);
  margin: 0;
  padding-top: 0.4rem;
}

.cs-section-body { max-width: var(--measure); }
@media (min-width: 900px) {
  .cs-section-body { max-width: none; }
}
.cs-section-body h2 {
  font-size: var(--step-2);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.cs-section-body p { color: var(--slate); }
.cs-section-body p strong { color: var(--ink); font-weight: 600; }
.cs-section-body > :last-child { margin-bottom: 0; }

/* Figures within case studies - full content width */
.cs-figure {
  margin: 0 0 clamp(2.5rem, 7vh, 4.5rem);
}
.cs-figure img {
  width: 100%;
  background: var(--paper-2);
  border: var(--rule-w) solid var(--rule);
}
.cs-figure figcaption {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--slate-2);
  margin-top: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Two-up figure row */
.cs-figure-row {
  display: grid;
  gap: 1rem;
  margin: 0 0 clamp(2.5rem, 7vh, 4.5rem);
}
@media (min-width: 760px) {
  .cs-figure-row { grid-template-columns: 1fr 1fr; }
}
.cs-figure-row figure { margin: 0; }
.cs-figure-row img { width: 100%; border: var(--rule-w) solid var(--rule); background: var(--paper-2); }

/* =========================================================
   Full-width image band - breaks out of .cs to span the viewport,
   with a soft backing panel like the Framer original. Put the image
   inside .cs-band-inner so it stays centred and readably sized.
   ========================================================= */
.cs-band {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 0;
  margin-bottom: clamp(2.5rem, 7vh, 5rem);
  padding: clamp(2.5rem, 7vw, 6rem) var(--gutter);
  background: var(--paper-2);
}

/* Alternating tone - add .cs-band--tint for the grey panels */
.cs-band--tint { background: var(--paper); }

.cs-band-inner {
  max-width: var(--max);
  margin-inline: auto;
}

/* Narrower band content - for images that shouldn't run the full width */
.cs-band-inner--narrow { max-width: 1100px; }
.cs-band-inner img {
  width: 100%;
  display: block;
  background: var(--paper-2);
}

/* Stacked figures within a band get vertical spacing between them */
.cs-band-inner > figure { margin: 0; }
.cs-band-inner > figure + figure { margin-top: clamp(1rem, 2.5vw, 2rem); }

/* Optional caption under a band */
.cs-band figcaption {
  max-width: var(--max);
  margin: 0.9rem auto 0;
  text-align: left;
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--slate-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* When the band image is narrowed, align its caption to the same column */
.cs-band--narrow figcaption { max-width: 1100px; }

/* Two-up inside a band */
.cs-band-inner.is-two-up {
  display: grid;
  gap: clamp(1rem, 2vw, 2rem);
}
@media (min-width: 760px) {
  .cs-band-inner.is-two-up { grid-template-columns: 1fr 1fr; }
}
.cs-band-inner.is-two-up figure { margin: 0; }

/* Three-up inside a band - e.g. a row of process-stage thumbnails */
.cs-band-inner.is-three-up {
  display: grid;
  gap: clamp(1rem, 2vw, 2rem);
}
@media (min-width: 760px) {
  .cs-band-inner.is-three-up { grid-template-columns: repeat(3, 1fr); }
}
.cs-band-inner.is-three-up figure { margin: 0; }

/* Video inside a band - sits in the same centred inner as images */
.cs-band-inner video {
  width: 100%;
  height: auto;
  display: block;
  background: var(--ink);
}

/* Brand/partner logo strip inside a band */
.cs-logos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.75rem, 4vw, 2.5rem);
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 640px) { .cs-logos { grid-template-columns: repeat(4, 1fr); } }
.cs-logos img { width: 100%; height: auto; display: block; }

/* Video aligned to the body-text column (not full-bleed).
   Uses the same left offset as .cs-section so it lines up with copy. */
.cs-video-inline {
  margin: 0 0 clamp(2.5rem, 7vh, 5rem);
  display: grid;
}
@media (min-width: 900px) {
  .cs-video-inline {
    grid-template-columns: 0.3fr 12rem minmax(0, 50rem);
    gap: 0 3.5rem;
  }
  .cs-video-inline > * { grid-column: 3; }
}
.cs-video-inline video {
  width: 100%;
  max-width: 630px;
  height: auto;
  aspect-ratio: 16 / 9;
  display: block;
  background: var(--ink);
}
/* Modifier for portrait-orientation demo clips - the default 630px max-width
   assumes landscape and reads oversized as a tall, narrow strip. */
.cs-video-inline--portrait video { max-width: 400px; }
.cs-video-inline figcaption {
  margin: 0.9rem 0 0;
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--slate-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* =========================================================
   In-section lists - design principles, process steps, targets.
   Live inside .cs-section-body, below the paragraphs.
   ========================================================= */

/* Definition-style list: a bold term + its explanation (e.g. principles) */
.cs-deflist {
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}
.cs-deflist > div {
  border-top: var(--rule-w) solid var(--rule);
  padding-top: 1.25rem;
}
.cs-deflist dt {
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.cs-deflist dd {
  margin: 0;
  color: var(--slate);
}

/* Simple marked list - business targets, bullet points.
   Each <li> is a flex row: the marker (::before) is a fixed, non-shrinking
   flex item and the text is its own flex item in the remaining space, so
   every wrapped line inherits the text item's left edge - a hanging
   indent that doesn't depend on padding/marker-position values staying
   in sync (the old position:absolute + padding-left approach). */
.cs-list {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}
.cs-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--slate);
}
.cs-list li::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-top: 0.5em;
  background: var(--signal);
}
/* The text needs to be a real flex item, not the raw text node left after
   ::before - an anonymous flex item wrapping bare text doesn't reliably
   report its content width, so wrapped lines can render outside the
   marker's column. min-width: 0 lets it shrink below its content's
   single-line width instead of overflowing the row. */
.cs-list li > span {
  flex: 1 1 auto;
  min-width: 0;
}

/* Modifier - swap the amber square marker for a custom icon. */
.cs-list--arrow li::before {
  width: 14px;
  height: 14px;
  margin-top: 0.3em;
  background: url('/assets/images/bullet-arrow.png') center / contain no-repeat;
}

/* Two side-by-side list groups, each with a heading - lives inside
   .cs-section-body alongside prose, not a full-width band. */
.cs-list-groups {
  margin-top: 1.75rem;
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 760px) {
  .cs-list-groups { grid-template-columns: 1fr 1fr; gap: 2rem 3rem; }
}
.cs-list-group h3 {
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0;
}
.cs-list-group .cs-list { margin-top: 1.1rem; }

/* Process grid - Discovery / Prototyping / Testing / Delivery.
   Full-width band content, laid out as equal columns. */
.cs-process {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 640px) { .cs-process { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .cs-process { grid-template-columns: repeat(4, 1fr); } }

.cs-process > li {
  border-top: 2px solid var(--ink);
  padding-top: 1.1rem;
}
.cs-process dt,
.cs-process h3 {
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--signal);
  margin: 0 0 0.6rem;
}
.cs-process p { margin: 0; color: var(--slate); font-size: var(--step-0); }

/* Modifier - 3 columns on desktop instead of 4 (six steps, two rows) */
@media (min-width: 980px) { .cs-process--3up { grid-template-columns: repeat(3, 1fr); } }

/* Stat grid - headline numbers with mono labels, timetable-style */
.cs-stats {
  display: grid;
  gap: clamp(1.75rem, 4vw, 2.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 640px) { .cs-stats { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .cs-stats { grid-template-columns: repeat(6, 1fr); } }
.cs-stats > li {
  border-top: 2px solid var(--ink);
  padding-top: 1.1rem;
}
.cs-stat-value {
  display: block;
  font-family: var(--display);
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--signal);
  line-height: 1.05;
  margin-bottom: 0.5rem;
}
.cs-stat-label { display: block; color: var(--slate); font-size: var(--step--1); }

/* Inline stat row - sits inside .cs-section-body alongside prose instead of
   a full-width band. Larger type than .cs-stats since there are only three
   figures carrying the section, not six in a dense band. */
.cs-stats-row {
  margin-top: 1.75rem;
  display: grid;
  gap: 1.5rem 0;
  border-top: 2px solid var(--ink);
  padding-top: 1.1rem;
}
@media (min-width: 640px) {
  .cs-stats-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }
  .cs-stats-row > div {
    border-right: var(--rule-w) solid var(--rule);
    padding-right: 1.5rem;
  }
  .cs-stats-row > div + div { padding-left: 1.5rem; }
  .cs-stats-row > div:last-child { border-right: none; }
}
.cs-stats-row .cs-stat-value {
  font-size: clamp(2.5rem, 1.8rem + 3vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.cs-stats-row .cs-stat-label {
  font-family: var(--body);
  font-size: 1.25rem;
  color: var(--slate);
}

/* Pull quotes - customer feedback, two-up */
.cs-quotes {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 760px) { .cs-quotes { grid-template-columns: 1fr 1fr; } }
.cs-quotes blockquote {
  margin: 0;
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.45;
  color: var(--ink);
}
.cs-quotes blockquote::before { content: "\201C"; color: var(--signal); }
.cs-quotes footer {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-2);
}

/* Optional heading centred above a band's content */
.cs-band-title {
  max-width: var(--max);
  margin: 0 auto clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  font-size: var(--step-2);
  letter-spacing: -0.02em;
}

/* Launch link */
.cs-launch {
  padding: clamp(3rem, 8vh, 5rem) 0 clamp(3.5rem, 9vh, 6rem);
  border-top: 2px solid var(--ink);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  align-items: baseline;
  justify-content: space-between;
}
.cs-launch p {
  margin: 0;
  font-family: var(--display);
  font-size: var(--step-2);
  letter-spacing: -0.02em;
  max-width: 22ch;
}

/* Prev / next footer */
.cs-more {
  border-top: var(--rule-w) solid var(--rule);
}
.cs-more a {
  max-width: var(--max);
  margin-inline: auto;
  padding: 2rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-decoration: none;
  transition: background-color 0.25s;
}
.cs-more a:hover { background: var(--signal-dim); }
.cs-more .cs-more-label {
  font-family: var(--mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
}
.cs-more .cs-more-title {
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 500;
  letter-spacing: -0.015em;
}
.cs-more a:hover .cs-more-title { color: var(--signal); }

/* Space between a list and a paragraph that follows it */
.cs-list + p { margin-top: 1.5rem; }
