/* Stitches case study — teal #477A73 system */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root {
  --st-teal: #477a73;
  --st-pink: #ff739e;
  --st-muted: #797979;
  --st-line: #11112d;
  --st-chip-bg: #477a73;
  --st-max: 764px;
  --st-pad-x: clamp(24px, 6vw, 85px);
}

.stitches-page {
  background: #fff;
  color: #000;
}

/* ——— Hero ——— */

.st-hero {
  position: relative;
  width: 100%;
  background: var(--st-teal);
  min-height: min(925px, 120vw);
  overflow: hidden;
}

.st-hero__art {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

body.stitches-page > header.nav-bar {
  z-index: 1000;
  padding: 12px 51px;
}

/* ——— Lead block ——— */

.st-lead {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 56px) var(--st-pad-x) 48px;
  background: #fff;
}

.st-lead__row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 4vw, 40px);
  max-width: 1270px;
  margin: 0 auto;
}

.st-lead__main {
  flex: 1 1 280px;
  max-width: 654px;
  display: flex;
  flex-direction: column;
  gap: 21px;
}

.st-kicker {
  margin: 0;
  font-weight: 600;
  font-size: 16px;
  line-height: 19px;
  letter-spacing: 0.15em;
  color: var(--st-teal);
}

.st-title {
  margin: 0;
  font-weight: 600;
  font-size: clamp(28px, 5vw, 52px);
  line-height: 1.15;
  color: #000;
}

.st-meta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 24px 90px;
}

.st-meta__col {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.st-meta__label {
  font-weight: 600;
  font-size: 14px;
  line-height: 17px;
  letter-spacing: 0.1em;
  color: var(--st-muted);
}

.st-meta__value {
  font-weight: 600;
  font-size: 14px;
  line-height: 17px;
  color: var(--st-teal);
}

.st-lead__rule {
  width: 2px;
  min-height: 200px;
  background: var(--st-teal);
  align-self: center;
  flex-shrink: 0;
}

.st-chips {
  flex: 0 1 510px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-sizing: border-box;
}

.st-chips__rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.st-chips__row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
}

/* Flowing chip layout — 2-3 per row */
.st-chips__flow {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-start;
}

.st-chips__bento {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.st-chips__bento .st-chips__row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 10px 12px;
  align-items: flex-start;
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
}

.st-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  min-height: 30px;
  background: var(--st-chip-bg);
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  line-height: 17px;
  letter-spacing: 0.1em;
  color: #fff;
  white-space: nowrap;
}

/* ——— Main column ——— */

.st-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 40px var(--st-pad-x) 120px;
}

.st-stack {
  max-width: var(--st-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 100px;
}

/* Extra air between product videos and the rule above “Looking back” */
.st-main + .st-stack {
  padding-top: 56px;
}

.st-divider {
  border: none;
  border-top: 1px solid var(--st-line);
  width: 100%;
  margin: 0;
}

.st-section {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.st-section--idea {
  gap: 0;
}

.st-section--idea .st-eyebrow {
  margin-bottom: 8px;
}

.st-section--idea .st-h2 {
  margin: 0;
}

.st-idea-columns {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 50px;
  align-items: flex-start;
  margin-top: 50px;
}

.st-idea-columns .st-body,
.st-idea-columns .st-quote-list {
  flex: 1 1 280px;
  min-width: 0;
}

.st-idea-columns .st-quote-list {
  margin-top: 78px;
}

.st-idea-left {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.st-section__head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.st-eyebrow {
  margin: 0;
  font-weight: 600;
  font-size: 16px;
  line-height: 19px;
  letter-spacing: 0.15em;
  color: var(--st-muted);
}

.st-h2 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.2;
  color: var(--st-teal);
}

.st-body {
  margin: 0;
  font-weight: 400;
  font-size: 16px;
  line-height: 19px;
  letter-spacing: 0.02em;
  color: #000;
}

/* ——— Split layout ——— */

.st-split {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 50px;
  align-items: flex-start;
}

.st-split__col {
  flex: 1 1 280px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.st-split--logos {
  flex-wrap: nowrap;
  align-items: flex-start;
}

.st-split--logos .st-split__col:first-child {
  flex: 0 0 370px;
}

.st-split--logos .st-split__col:last-child {
  flex: 0 0 343px;
}

.st-split__col--center {
  justify-content: center;
  align-self: center;
}

.st-quote-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 53px;
  text-align: center;
  align-items: center;
}

.st-quote-list li {
  font-size: 16px;
  line-height: 19px;
  letter-spacing: 0.02em;
}

/* ——— Stats ——— */

.st-stat-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 32px 54px;
}

.st-stat-row--centered {
  justify-content: center;
  text-align: center;
}

.st-stat {
  flex: 0 1 138px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.st-stat__big {
  margin: 0;
  font-weight: 600;
  font-size: 32px;
  line-height: 39px;
  color: var(--st-teal);
}

.st-stat__big--pink {
  color: var(--st-pink);
}

.st-stat__small {
  margin: 0;
  font-size: 12px;
  line-height: 15px;
  letter-spacing: 0.02em;
}

/* ——— Process grid ——— */

.st-process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 23px;
}

.st-process-step {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.st-process-step__n {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--st-muted);
}

.st-process-step__title {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.1em;
}

.st-process-step__body {
  margin: 0;
  font-size: 14px;
  line-height: 17px;
}

.st-process-step__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  line-height: 17px;
}

.st-process-step__list li {
  position: relative;
  padding-left: 0.85em;
}

.st-process-step__list li::before {
  content: "·";
  position: absolute;
  left: 0;
}

/* ——— Persona cards ——— */

.st-personas {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 17px;
}

.st-persona {
  flex: 1 1 200px;
  max-width: 236px;
  min-height: 376px;
  background: var(--st-teal);
  border-radius: 20px;
  padding: 16px 18px 15px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.st-persona__avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}

.st-persona__avatar img {
  display: block;
  width: 100%;
  height: auto;
}

.st-persona__text {
  font-weight: 400;
  font-size: 14px;
  line-height: 17px;
  letter-spacing: 0.02em;
  color: #fff;
}

.st-persona__text strong {
  font-weight: 700;
}

/* ——— Brand ——— */

.st-brand-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 50px;
  align-items: flex-end;
}

.st-brand-row__text {
  flex: 1 1 280px;
  max-width: 368px;
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.st-figure {
  margin: 0;
}

.st-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.st-logo-pair {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 25px;
  align-items: center;
}

/* Clip logo art to a single border — no green bleed past #11112D frame.
   clip-path hides paint but not layout box; absolute + translate centers the visible art. */
.st-logo-pair__cell {
  position: relative;
  flex: 0 0 172px;
  width: 172px;
  height: 136px;
  border: 1px solid var(--st-line);
  border-radius: 10px;
  box-sizing: border-box;
  background: var(--st-teal);
  overflow: hidden;
  padding: 0;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s ease;
}

.st-logo-pair__cell img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
  object-position: center center;
  display: block;
  border: none;
  border-radius: 0;
  /* Half of top inset — re-centers painted content after top clip */
  transform: translate(-50%, -50%) translateY(-7px);
  clip-path: inset(14px 0 0 0);
  -webkit-clip-path: inset(14px 0 0 0);
}

.st-figure--logo-grid {
  margin: 0;
  border: 1px solid var(--st-line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-sizing: border-box;
  line-height: 0;
  position: relative;
}

.st-figure--logo-grid img {
  display: block;
  position: relative;
  width: 100%;
  height: auto;
  margin: 0;
  object-fit: contain;
  object-position: center center;
  clip-path: inset(18px 0 0 0);
  -webkit-clip-path: inset(18px 0 0 0);
  /* Half of top inset to re-center visible grid art */
  transform: translateY(-9px);
}

.st-logo-finals {
  display: flex;
  flex-direction: column;
  gap: 23px;
}

.st-logo-box {
  position: relative;
  border: 1px solid var(--st-line);
  border-radius: 10px;
  overflow: hidden;
  min-height: 214px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}

.st-logo-box--teal {
  background: var(--st-teal);
}

.st-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ——— Typography ——— */

.st-type-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 40px 65px;
  align-items: flex-start;
}

.st-type-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: -92px;
  margin-left: auto;
  width: max-content;
}

.st-type-samples {
  display: flex;
  flex-direction: row;
  gap: 50px;
  flex-wrap: wrap;
  margin-top: 0;
}

.st-type-box {
  width: 71px;
  height: 101px;
  border: 1px solid var(--st-line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1;
  font-synthesis: weight;
}

.st-type-copy__lead {
  margin-bottom: 10px;
}

.st-type-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  line-height: 17px;
  letter-spacing: 0.1em;
  color: #000;
  margin-top: 0;
  width: max-content;
  margin-left: 0;
  align-items: flex-start;
  text-align: left;
}

.st-type-rail span {
  display: block;
  width: max-content;
  text-align: left;
}

@keyframes stitchesHeroDrift {
  0% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

.st-hero__art {
  animation: stitchesHeroDrift 6s ease-in-out infinite;
}

/* ——— Product screens ——— */

.st-screens {
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.st-screen-block {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.st-screen-block--records {
  margin-bottom: 40px;
}

/* Phone mockup — same dimensions as Memo product phone (220px × 430:932) */
.st-product-phone-frame {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  line-height: 0;
  width: 220px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  transition: transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1),
              box-shadow 0.28s ease;
}

.st-product-phone-video {
  display: block;
  width: 220px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 430 / 932;
  object-fit: cover;
  border: none;
  border-radius: 0;
  background: #0a0a0a;
  box-sizing: border-box;
}

/* ——— Links ——— */

.st-links-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 21px 26px;
}

.st-link-card {
  flex: 1 1 300px;
  max-width: 369px;
  padding: 15px 20px;
  background: var(--st-teal);
  border-radius: 10px;
  color: #fff;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  text-decoration: none;
  box-sizing: border-box;
}

.st-link-card:hover {
  opacity: 0.92;
}

.st-link-card__icon {
  width: 50px;
  height: 50px;
  flex-shrink: 0;
}

.st-link-card__icon img {
  width: 50px;
  height: 50px;
  display: block;
}

.st-link-card__text {
  flex: 1;
  min-width: 0;
}

.st-link-card__title {
  margin: 0 0 6px;
  font-weight: 600;
  font-size: 16px;
  line-height: 19px;
}

.st-link-card__sub {
  margin: 0;
  font-weight: 500;
  font-size: 12px;
  line-height: 15px;
  opacity: 0.9;
}

.st-link-card__arrow {
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  flex-shrink: 0;
}

/* ——— Quote banner ——— */

.st-quote-banner {
  background: #000;
  color: #fff;
  padding: 88px 24px;
  text-align: center;
}

.st-quote-banner blockquote {
  margin: 0 auto;
  max-width: 1154px;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 3.5vw, 32px);
  line-height: 1.22;
}

/* True full-viewport-width bleed */
.st-main .st-quote-banner--bleed {
  position: relative;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  max-width: none;
  margin-top: 80px;
  margin-bottom: 0;
  box-sizing: border-box;
}

/* ============================================================
   HOVER POP-OUT ANIMATIONS
   ============================================================ */

.st-chip {
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.22s ease;
  cursor: default;
}
.st-chip:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 4px 12px rgba(71, 122, 115, 0.4);
}

.st-stat {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.st-stat:hover {
  transform: translateY(-6px) scale(1.04);
}

.st-process-step {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: default;
}
.st-process-step:hover {
  transform: translateY(-5px);
}

.st-persona {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s ease;
}
.st-persona:hover {
  transform: scale(1.03) translateY(-6px);
  box-shadow: 0 16px 36px rgba(71, 122, 115, 0.4);
}

/* Logo construction cells (hover) */
.st-logo-pair__cell:hover {
  transform: scale(1.03) translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.st-logo-final__box {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s ease;
}
.st-logo-final__box:hover {
  transform: scale(1.04) translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.st-type-box {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.2s ease, color 0.2s ease;
}
.st-type-box:hover {
  transform: scale(1.12) translateY(-4px);
  background: var(--st-teal);
  color: #fff;
}

.st-screen-wrap:hover .st-product-phone-frame {
  transform: scale(1.02) translateY(-5px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

/* Brand colour swatch */
.st-brand-colours {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s ease;
  display: block;
}
.st-brand-colours:hover {
  transform: scale(1.03) translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

/* Link cards */
.st-link-card {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s ease;
}
.st-link-card:hover {
  transform: scale(1.03) translateY(-4px);
  box-shadow: 0 12px 28px rgba(71, 122, 115, 0.4);
  opacity: 1;
}

/* ——— Responsive ——— */

@media (max-width: 900px) {
  .st-lead__rule { display: none; }
  .st-process-grid { grid-template-columns: 1fr 1fr; }
  .st-persona { max-width: none; }
  .st-hero { min-height: auto; }
  body.stitches-page > header.nav-bar {
    width: calc(100% - 32px);
    padding: 12px 24px;
    flex-direction: column;
    gap: 12px;
    border-radius: 24px;
  }
  body.stitches-page > header.nav-bar .nav-bar__links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }
  .st-idea-columns .st-quote-list { margin-top: 0; }
}

@media (max-width: 600px) {
  .st-process-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   MOBILE — ≤ 480px
   ============================================================ */
@media (max-width: 480px) {

  .st-hero { min-height: 60vw; }

  body.stitches-page > header.nav-bar {
    padding: 10px 16px;
    gap: 6px;
    border-radius: 20px;
    width: calc(100% - 20px);
  }
  body.stitches-page > header.nav-bar .nav-bar__links { gap: 14px; font-size: 14px; }

  /* Lead */
  .st-lead { padding: 24px 16px 32px; }
  .st-lead__row { flex-direction: column; gap: 20px; }
  .st-lead__main { max-width: 100%; }
  .st-chips { flex: none; width: 100%; border: none; padding: 0; }
  .st-kicker { font-size: 13px; }
  .st-title { font-size: clamp(26px, 8vw, 42px); }
  .st-meta { gap: 16px 24px; }

  /* Main */
  .st-main { padding: 24px 16px 80px; }
  .st-stack { gap: 60px; }

  /* Split → stack */
  .st-split { flex-direction: column; gap: 28px; }
  .st-split--logos { flex-wrap: wrap; }
  .st-split__col { flex: none; width: 100%; }

  /* Stats */
  .st-stat-row { gap: 24px 32px; }
  .st-stat { flex: 0 1 calc(50% - 16px); }
  .st-stat__big { font-size: 24px; }

  /* Process */
  .st-process-grid { grid-template-columns: 1fr 1fr; }

  /* Persona cards → stack */
  .st-personas { flex-direction: column; gap: 16px; }
  .st-persona { max-width: 100%; width: 100%; }

  /* Brand */
  .st-brand-row { flex-direction: column; gap: 24px; }
  .st-brand-row__text { max-width: 100%; }
  .st-logo-pair { flex-wrap: wrap; }
  .st-logo-pair__cell {
    flex: 1 1 46%;
    max-width: calc(50% - 13px);
    min-width: 140px;
  }
  .st-logo-final { gap: 16px; }

  /* Type */
  .st-type-row { flex-direction: column; gap: 24px; }
  .st-type-right { margin-top: 0; margin-left: 0; width: 100%; }
  .st-type-samples { margin-top: 0; }
  .st-type-sample { gap: 16px; }

  .st-idea-columns .st-quote-list { margin-top: 0; }

  /* Link cards */
  .st-links-grid { gap: 12px; }
  .st-link-card { max-width: 100%; width: 100%; padding: 12px 16px; }

  /* Quote banner */
  .st-main .st-quote-banner--bleed { padding: 56px 20px; margin-top: 60px; }
  .st-quote-banner blockquote { font-size: clamp(18px, 5vw, 26px); }
}
