.branding { padding: 90px 0 100px; background: #ece8ff; color: var(--ink); }
.branding > .section-kicker, .branding-intro, .branding-close { margin-left: var(--gutter); margin-right: var(--gutter); }
.branding-intro { margin-top: 80px; margin-bottom: 90px; }
.branding h2 { max-width: 1350px; font-size: clamp(48px, 7.5vw, 128px); line-height: 1.02; letter-spacing: -.065em; }
.branding h2 em { display: block; color: var(--purple); }
.branding-intro > p { max-width: 650px; margin: 35px 0 0 auto; font-size: 19px; }
/* Bottom-sticky overlap: https://codepen.io/HenryZarza/pen/VwYagOO
   Earlier cards sit above later cards and lift away as the page scrolls. */
.brand-projects { position: relative; isolation: isolate; overflow: clip; }
.brand-project { --card-paper: #ece8ff; position: sticky; bottom: 0; z-index: var(--card-layer); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr) minmax(0, 1fr); grid-template-areas: 'before copy after'; align-items: center; height: calc(100svh - 86px); min-height: 560px; padding: 46px var(--gutter); background: var(--card-paper); border-top: 1px solid rgba(85, 69, 169, .22); box-shadow: 0 22px 36px -28px rgba(20, 16, 40, .6); }
.brand-project:nth-child(even) { --card-paper: #e1d9f5; }
.brand-project-heading { grid-area: copy; align-self: stretch; display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 2; min-width: 0; padding: 28px clamp(20px, 3vw, 52px); background: var(--card-paper); }
.brand-index { display: block; margin-bottom: 30px; color: var(--purple); font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.brand-project h3 { font-size: clamp(26px, 2.65vw, 46px); line-height: 1.08; letter-spacing: -.05em; overflow-wrap: break-word; }
.brand-project-heading > p { margin-top: 24px; font-size: 16px; line-height: 1.6; color: var(--muted); }
.brand-demo { display: block; margin-top: 22px; font-size: 12px; line-height: 1.5; color: var(--purple); font-weight: 800; }
.brand-figure { min-width: 0; width: 100%; overflow: clip; }
.brand-figure--before { grid-area: before; }
.brand-figure--after { grid-area: after; }
.brand-figure-inner { transform: translateX(var(--brand-slide, 0%)); }
.brand-image { display: grid; place-items: center; width: 100%; height: min(47vw, 57svh); max-height: 630px; padding: 22px; overflow: hidden; background: var(--ink); }
.brand-image img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.brand-figure--source .brand-image { background: #fff; padding: 14px; }
.brand-figure--context .brand-image { padding: 0; background: var(--deep); }
.brand-figure figcaption { display: flex; justify-content: space-between; gap: 12px; padding-top: 15px; font-size: 12px; line-height: 1.4; font-weight: 800; }
.brand-figure figcaption > span:last-child { color: var(--muted); font-weight: 400; }
.branding-close { display: grid; grid-template-columns: 1.2fr 1fr; gap: 9vw; border-top: 1px solid var(--rule); padding-top: 65px; margin-top: 75px; }
.branding-close h3 { font-size: clamp(32px, 4vw, 68px); letter-spacing: -.055em; line-height: 1.08; }
.branding-close h3 em { color: var(--purple); }
.branding-close p { font-size: 17px; }
.branding-close .text-link { margin-top: 23px; }
@media (max-width: 800px) {
  .brand-project { height: calc(100svh - 74px); min-height: 620px; padding: 24px var(--gutter); grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: 'before' 'copy' 'after'; gap: 0; }
  .brand-project-heading { align-items: center; text-align: center; padding: 24px 0; }
  .brand-index { margin-bottom: 12px; }
  .brand-project h3 { font-size: clamp(26px, 6.5vw, 38px); }
  .brand-project-heading > p { max-width: 450px; margin-top: 12px; font-size: 16px; line-height: 1.45; }
  .brand-demo { margin-top: 10px; }
  .brand-figure, .brand-figure-inner { height: 100%; min-height: 0; }
  .brand-figure { display: grid; grid-template-rows: minmax(0, 1fr) auto; }
  .brand-image { height: 100%; min-height: 0; max-height: none; padding: 12px; }
  .brand-figure--source .brand-image { padding: 8px; }
  .brand-figure--context .brand-image { padding: 0; }
  .brand-figure figcaption { padding-top: 9px; }
}
@media (max-width: 600px) {
  .branding { padding-top: 55px; padding-bottom: 65px; }
  .branding-intro { margin-top: 50px; margin-bottom: 50px; }
  .branding h2 { font-size: clamp(40px, 10.5vw, 63px); }
  .branding-intro > p { font-size: 16px; margin-top: 28px; }
  .branding-close { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; margin-top: 45px; }
  .branding-close h3 { font-size: 38px; }
  .branding-close p { font-size: 16px; }
  .branding-close .text-link { font-size: 15px; gap: 18px; }
}
@media (prefers-reduced-motion: reduce), (max-height: 700px) {
  .brand-project { position: relative; height: auto; min-height: 0; padding-top: 38px; padding-bottom: 38px; }
  .brand-image { height: auto; aspect-ratio: 1.1; }
}
@media (prefers-reduced-motion: reduce) {
  .brand-figure-inner { transform: none !important; }
}
@media (max-width: 800px) and (prefers-reduced-motion: reduce), (max-width: 800px) and (max-height: 700px) {
  .brand-project { grid-template-rows: auto auto auto; }
  .brand-image { aspect-ratio: 1.65; }
}
