/* ==========================================================================
   Case studies: shared components (Luna, KU Brand, Asian's). The page layout,
   top bar and outline are in compact.css.
   Sections:
     1. Page basics
     2. Outcome numbers
     3. Story in short
     4. Stages
     5. Shared case-study components
     6. Ending: takeaways and more case studies
   ========================================================================== */

/* the active part in the outline gets a wash of the accent */
:root {
  --wash-color: var(--accent);
}

/* 1. Page basics ------------------------------------------------------------ */
:root {
  --top-h: 60px;
  /* there is no site header on a case study; anything that made room for it
     uses the top bar */
  --header-h: var(--top-h);
  --header-top: 0px;
}
html {
  /* links land below the top bar */
  scroll-padding-top: calc(var(--top-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* 2. Outcome numbers -------------------------------------------------------- */
/* big bold numbers in the accent with short capital captions under them */
.meta__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px clamp(32px, 5vw, 64px);
}
.meta__stats li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 15rem;
}
.meta__num {
  font-family: var(--heading-font);
  font-size: clamp(3.25rem, 2.25rem + 3vw, 5rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.01em;
  color: var(--accent-text);
}
.meta__cap {
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
}

/* 3. Story in short --------------------------------------------------------- */
.story__text {
  max-width: 798px;
  font-family: var(--heading-font);
  font-size: var(--fs-statement);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* 4. Stages ----------------------------------------------------------------- */
.stage {
  display: flex;
  flex-direction: column;
  padding-top: clamp(48px, 8vh, 96px);
}

/* Behind the scenes: extra detail (more wireframes, the full brand system)
   sits in a framed panel with its own darker palette, so it reads as
   separate from the story in both themes. The panel redefines the colour
   tokens, so everything inside follows its palette. */
.reel {
  --bg: #16171b;
  --surface: #1e1f24;
  --surface-2: #26272d;
  --ink: #ecece7;
  --text: #b9b9b4;
  --line: rgba(236, 236, 231, 0.14);
  --accent: #ff8a5c;
  --accent-text: #ffab85;
  --on-accent: #0b0b0c;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(20px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg);
  box-shadow: 0 24px 48px -28px rgb(0 0 0 / 0.55);
  color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .reel {
    --bg: #1d1e23;
    --surface: #25262c;
    --surface-2: #2d2e34;
    --accent: #ff7a45;
    --accent-text: #ff9d73;
    border-color: rgba(236, 236, 231, 0.18);
  }
}
:root[data-theme="dark"] .reel {
  --bg: #1d1e23;
  --surface: #25262c;
  --surface-2: #2d2e34;
  --accent: #ff7a45;
  --accent-text: #ff9d73;
  border-color: rgba(236, 236, 231, 0.18);
}
.reel__head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.reel__kicker {
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.reel__title {
  font-size: var(--fs-h3);
  line-height: 1.25;
  color: var(--ink);
}
.reel__intro {
  max-width: 40em;
  line-height: var(--lh-body);
  color: var(--text);
}

/* the margin note */
.stage .callout:not(.callout--statement) {
  gap: 2px;
  max-width: 340px;
  padding: 4px 0 4px 44px;
  font-family: "Kalam", var(--body-font);
  color: var(--accent-text);
  rotate: -1.2deg;
  transform-origin: 0 0;
}
.stage .callout:not(.callout--statement)::before {
  content: "";
  width: 34px;
  height: 22px;
  margin: 2px 0 -24px -44px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 22' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M32 18C22 18 12 14 5 5'/%3E%3Cpath d='M4 12 5 4l8 1'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 22' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M32 18C22 18 12 14 5 5'/%3E%3Cpath d='M4 12 5 4l8 1'/%3E%3C/svg%3E") center / contain no-repeat;
}
.stage .callout:not(.callout--statement) .eyebrow {
  font-family: "Kalam", var(--body-font);
  font-size: var(--fs-small);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text);
}
.stage .callout:not(.callout--statement) p:not(.eyebrow) {
  font-size: 1.15rem;
  line-height: 1.4;
}
/* section text lines up with its title (no indent) */

@media (prefers-reduced-motion: reduce) {
  .stage .callout:not(.callout--statement) {
    rotate: none;
  }
}

/* 5. Shared case-study components ------------------------------------------ */

/* numbered overview pieces: three columns, tall heading */
.pieces h3 {
  padding-top: 40px;
}
a.card {
  text-decoration: none;
  transition: border-color 0.2s;
}
a.card:hover {
  border-top-color: var(--accent);
}
.problem h4 {
  font-size: var(--fs-h3);
  line-height: 1.3;
}

/* problem rows: title on the left, details on the right */
.problem {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr);
  gap: 12px 36px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.problem__success {
  margin: 14px 0 16px;
  line-height: 1.5;
}
@media (max-width: 640px) {
  .problem {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* text next to a callout */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 48px;
  align-items: start;
}
.split > div {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.split p {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
}
@media (max-width: 860px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* flip cards: both faces share one grid cell and turn over on click */
.flip-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.flip {
  display: grid;
  min-height: 140px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  perspective: 900px;
  cursor: pointer;
}
.flip__face {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
  border-radius: var(--r-sm);
  background: var(--surface);
  font-weight: 500;
  line-height: 1.5;
  backface-visibility: hidden;
  transition: rotate 0.6s ease;
}
.flip__face--back {
  justify-content: center;
  background: var(--surface-2);
  rotate: y 180deg;
}
.flip[aria-pressed="true"] .flip__face--front {
  rotate: y -180deg;
}
.flip[aria-pressed="true"] .flip__face--back {
  rotate: y 0deg;
}
.flip__num {
  font-family: var(--heading-font);
  font-size: 1.25rem;
}
@media (max-width: 640px) {
  .flip-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* panels switched by tabs */
.switcher {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* accordion rows built on <details> */
.rows {
  display: flex;
  flex-direction: column;
}
.rows details {
  padding: 16px 0;
}
.rows summary {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.rows summary::-webkit-details-marker {
  display: none;
}
.rows summary::after {
  content: "+";
  margin-left: auto;
  font-size: 1.375rem;
  color: var(--accent-text);
}
.rows details[open] summary::after {
  content: "−";
}
.rows__num {
  font-family: var(--heading-font);
  font-size: 1.25rem;
  color: var(--accent-text);
}
.what-instead {
  display: grid;
  gap: 12px;
  padding-top: 16px;
}
.what-instead dt {
  font-weight: 500;
  color: var(--text);
}
.what-instead dd {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

/* decision table: what I did / instead of */
.decisions {
  display: flex;
  flex-direction: column;
}
.decisions__row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 32px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.decisions__row--head {
  padding: 14px 0;
  font-weight: 500;
  color: var(--text);
}
.decisions__title {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-weight: 500;
}
.decisions__title span {
  font-family: var(--heading-font);
  font-size: 1.25rem;
  color: var(--accent-text);
}
.decisions p {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}
.decisions__before {
  color: var(--text);
}
@media (max-width: 860px) {
  .decisions__row {
    grid-template-columns: minmax(0, 1fr);
  }
  .decisions__row--head {
    display: none;
  }
}

/* big numbers */
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.stats b {
  display: block;
  font-family: var(--heading-font);
  font-size: 3rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
}
.stats > div > span {
  display: block;
  margin-top: 10px;
  color: var(--text);
}
/* stats between two rules */
.stats--ruled {
  gap: 43px;
  padding-block: 48px;
  border-block: 1px solid var(--line);
}
@media (max-width: 640px) {
  .stats {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* two figures side by side */
.figure-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 860px) {
  .figure-pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* a row of small UI parts (icons, panels) on a dark tile */
.parts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  border-radius: var(--r-xl);
  background: #000000;
}
.parts img {
  width: auto;
  max-height: 120px;
}

/* timeline across a surgery */
.timeline-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.timeline-4 li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 14px;
  border-top: 4px solid var(--ink);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}
.timeline-4 li:first-child {
  border-top-color: var(--accent);
}
.timeline-4 span {
  color: var(--text);
}
.timeline-4 b {
  font-family: var(--heading-font);
  color: var(--accent-text);
}
.timeline-4 p {
  color: var(--text);
  font-size: var(--fs-small);
  line-height: 1.5;
}
@media (max-width: 860px) {
  .timeline-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 6. Ending: takeaways and more case studies ------------------------------- */
.takeaways {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.takeaways ol {
  display: flex;
  flex-direction: column;
}
.takeaways li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  padding: 30px 0;
}
.takeaways li > b {
  font-family: var(--heading-font);
  font-size: 1.5rem;
  line-height: 1;
}
.takeaways h4 {
  font-size: var(--fs-h3);
  line-height: 1.3;
}
.takeaways p {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
}
.takeaways__aside {
  position: sticky;
  top: 120px;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: #000000;
}
@media (max-width: 860px) {
  .takeaways {
    grid-template-columns: minmax(0, 1fr);
  }
  .takeaways__aside {
    position: static;
  }
}

.more {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 64px;
}
.more__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.more__card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
}
.more__card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-lg);
  transition: scale 0.4s ease;
}
.more__card:hover img {
  scale: 1.02;
}
.more__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}
.more__meta b {
  font-family: var(--heading-font);
  font-size: var(--fs-sub);
  font-weight: 600;
  line-height: 1.25;
}
.more__meta span {
  letter-spacing: 0.06em;
  color: var(--text);
}
@media (max-width: 640px) {
  .more__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.page-end {
  height: clamp(64px, 10vh, 120px);
}

/* Tooltip for principle chips (placed by case-study.js) */
.tooltip {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 320px;
  padding: 14px 16px;
  border-radius: var(--r);
  background: #18181b;
  color: #f2f2ee;
  box-shadow: var(--shadow);
  pointer-events: none;
}
.tooltip b {
  color: #ff9d73;
}
.tooltip p {
  line-height: 1.5;
}

/* 7. Shared blocks for KU Brand and Asian's -------------------------------- */
/* a short statement on the left, a numbered list on the right */
.intro-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 32px 56px;
  align-items: start;
}
.intro-split__text {
  max-width: 30ch;
  font-size: var(--fs-lead);
  line-height: 1.5;
}
.numbered {
  display: flex;
  flex-direction: column;
}
.numbered > li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 6px 8px;
  align-items: baseline;
  padding-block: 18px;
  border-top: 1px solid var(--line);
}
.numbered--label > li {
  grid-template-columns: 80px minmax(0, 1fr);
}
.numbered b {
  grid-row: span 2;
  font-weight: 600;
  color: var(--accent-text);
}
.numbered--label b {
  font-size: var(--fs-small);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.numbered h3 {
  font-size: var(--fs-h3);
  line-height: 1.3;
}
.numbered p {
  grid-column: 2;
  line-height: 1.5;
  color: var(--text);
}
@media (max-width: 860px) {
  .intro-split {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* a heading on the left and its text on the right, above a rule */
.pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr);
  gap: 12px 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.pair h4 {
  font-size: var(--fs-sub);
  line-height: 1.25;
  color: var(--accent-text);
}
.pair p {
  max-width: 36em;
  line-height: var(--lh-body);
  color: var(--text);
}
@media (max-width: 640px) {
  .pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* a goal statement beside the issues it answers */
.goal {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 32px 56px;
  align-items: start;
}
.goal__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.goal__statement {
  font-family: var(--heading-font);
  font-size: 1.875rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.issues .card {
  padding: 4px 0 4px 20px;
  border-top: 0;
  border-left: 2px solid var(--accent);
}
@media (max-width: 860px) {
  .goal {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* a row of steps with a dot on the line above each */
.path .card {
  border-top-color: var(--line);
}
.path .card::before {
  content: "";
  width: 10px;
  height: 10px;
  margin: -21px 0 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* photos in a dark frame */
.photo {
  max-width: 720px;
}

/* text beside a drawing, one row per step */
.steps {
  display: flex;
  flex-direction: column;
  gap: 64px;
}
.step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 32px 56px;
  align-items: start;
}
.step__text {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.step__text b {
  font-family: var(--heading-font);
  font-weight: 600;
  color: var(--accent-text);
}
.step__text h4 {
  font-size: var(--fs-h3);
  line-height: 1.3;
}
.step__text p {
  max-width: 36em;
  line-height: var(--lh-body);
  color: var(--text);
}
.step__figure {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.step__figure svg {
  width: 100%;
  height: auto;
  border-radius: var(--r-xl);
}
.step__figure figcaption {
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--text);
}
@media (max-width: 860px) {
  .step {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* Scrollytelling, in the manner of Apple's feature pages (case-study.js
   adds .steps--story). On wider screens the steps sit on one large tile: the
   text of each step scrolls by in large type on the left while the drawings
   share one spot on the right, pinned and centred in the screen; the step
   you are reading brings its drawing in with a fade and a slight zoom. The
   steps unwrap into one grid (display: contents) so every drawing can sit in
   the same cell beside all the text. */
@media (min-width: 861px) {
  .steps--story {
    --story-top: calc(var(--top-h) + var(--opener-h, 0px));
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 0 clamp(32px, 5vw, 80px);
    padding: 0 clamp(24px, 4vw, 64px);
    border-radius: 32px;
    background: color-mix(in srgb, var(--ink) 5%, var(--bg));
  }
  .steps--story > .step {
    display: contents;
  }
  .steps--story .step__text {
    grid-column: 1;
    justify-content: center;
    gap: 14px;
    min-height: calc(100vh - var(--story-top));
  }
  .steps--story .step__text b {
    font-family: var(--body-font, inherit);
    font-size: var(--fs-small);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }
  .steps--story .step__text b::before {
    content: "Step ";
  }
  .steps--story .step__text h4 {
    font-size: clamp(1.75rem, 2.8vw, 2.75rem);
    line-height: 1.1;
    color: var(--text);
    transition: color 0.4s ease;
  }
  .steps--story .is-active .step__text h4 {
    color: var(--ink);
  }
  .steps--story .step__text p {
    font-size: clamp(1.0625rem, 1.3vw, 1.25rem);
    line-height: 1.6;
  }
  .steps--story .step__figure {
    position: sticky;
    top: var(--story-top);
    grid-column: 2;
    grid-row: 1 / span 20;
    align-self: start;
    justify-content: center;
    height: calc(100vh - var(--story-top));
    opacity: 0;
    scale: 0.92;
    pointer-events: none;
    transition: opacity 0.6s ease, scale 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  }
  .steps--story .is-active .step__figure {
    opacity: 1;
    scale: 1;
    pointer-events: auto;
  }
  .steps--story .step__figure svg {
    max-height: calc(100vh - var(--story-top) - 120px);
    box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.5);
  }
  .steps--story .step__figure figcaption {
    text-align: center;
  }
}
@media (min-width: 861px) and (prefers-reduced-motion: reduce) {
  .steps--story .step__text h4,
  .steps--story .step__figure {
    scale: 1;
    transition: none;
  }
}

/* Decision log: each decision is a card with its number, the decision and
   how it was applied, in a grid; the number sits on an accent rule. */
.rules-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 16px;
}
.rules-list > li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  background: var(--surface);
}
.rules-list .eyebrow {
  color: var(--accent-text);
}
.rules-list h3 {
  font-size: var(--fs-h3);
  line-height: 1.25;
}
.rules-list p {
  line-height: 1.5;
  color: var(--text);
}

/* a callout whose lines read as statements */
.callout--statement {
  max-width: 760px;
}
.callout--statement p:not(.eyebrow) {
  font-family: var(--heading-font);
  font-size: var(--fs-sub);
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
}
.callout--statement p:not(.eyebrow) + p {
  font-size: var(--fs-sub);
  line-height: 1.3;
  color: var(--ink);
}
.callout--statement p.callout__small:not(.eyebrow) {
  font-family: var(--body-font);
  font-size: var(--fs-small);
  font-weight: 400;
  color: var(--text);
}

/* numbered pieces in one row */
.numbered--row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 20px;
}
@media (max-width: 860px) {
  .numbered--row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .numbered--row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* four stats in a row */
.stats--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stats--four > div > span {
  line-height: 1.5;
}
@media (max-width: 860px) {
  .stats--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* flip cards with a label, a solution and a hint */
.flip-cards--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.flip--tall {
  min-height: 300px;
}
.flip--tall .flip__face {
  justify-content: flex-start;
  gap: 8px;
}
.flip--tall .flip__face--back {
  justify-content: center;
}
.flip__label {
  margin-top: 8px;
  font-size: var(--fs-small);
  color: var(--text);
}
.flip__hint {
  margin-top: auto;
  font-weight: 500;
  color: var(--accent-text);
}
@media (max-width: 1100px) {
  .flip-cards--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .flip-cards--4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* takeaways without a picture */
.takeaways--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
}

/* Motion: a short video of wireframes or a prototype (see the KU Brand
   wireframes). It waits on its poster under a big play button; once it
   plays, the video's own controls take over, and when it ends the button
   comes back to replay it. */
.motion__frame {
  position: relative;
}
.motion__video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #0b0f14;
}
.motion__start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  border: 0;
  background: rgb(11 15 20 / 0.45);
  color: #fff;
  font: inherit;
  cursor: pointer;
  transition: background 0.2s ease;
}
.motion__start:hover {
  background: rgb(11 15 20 / 0.3);
}
.motion__start[hidden] {
  display: none;
}
.motion__disc {
  display: grid;
  place-items: center;
  width: clamp(64px, 9vw, 92px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.45);
  transition: scale 0.2s ease;
}
.motion__start:hover .motion__disc {
  scale: 1.06;
}
.motion__disc svg {
  width: 42%;
  height: 42%;
  margin-left: 6%; /* the triangle looks centred when nudged right */
  fill: currentColor;
}
.motion__cue {
  padding: 6px 14px;
  border-radius: 999px;
  background: rgb(11 15 20 / 0.72);
  font-size: 0.9375rem;
  font-weight: 600;
}
.motion__start:focus-visible {
  outline: none;
}
.motion__start:focus-visible .motion__disc {
  outline: 3px solid #fff;
  outline-offset: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .motion__start,
  .motion__disc {
    transition: none;
  }
}

/* A button that takes you to something to try on the page (the KU color
   sandbox): tinted in the accent with a play mark, so it reads as an
   invitation rather than a second main action */
.button--play {
  gap: 8px;
  border: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
  color: var(--accent-text);
}
.button--play:hover {
  background: color-mix(in srgb, var(--accent) 22%, var(--bg));
}
.button--play svg,
.cp-card__links .button--play svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
