/* Industrial design case studies.
   Read like a printed portfolio: pictures carry the story, text stays short and light.
   Everything sits on the top bar's edges, on the same 2fr 1fr 1fr grid as the index pages:
   the question in the first column, the explanation from the second. */
body.idk { --acc: #9A6A4F; --tint: #F4EFEA; --tint2: #ECE6E0; --grey: #8C827B; background: #fff; }
body.idk .case-hero { margin: 20px var(--gut) 0; }
body.idk .case-hero img, body.idk .case-hero video { display: block; width: 100%; height: auto; border-radius: 6px; }

.k { margin: 0 var(--gut); display: grid; grid-template-columns: 2fr 1fr 1fr; column-gap: 6px; }
.k > * { grid-column: 1 / -1; min-width: 0; }
.k + .k { margin-top: clamp(28px, 3vw, 44px); }
.k.k--gap { margin-top: clamp(110px, 14vw, 220px); }
.k em { font-style: normal; color: var(--acc); }

/* title */
.k-title { padding: clamp(64px, 9vw, 140px) 0 0; }
.k-title h1 { grid-column: 1; margin: 0; font-size: clamp(44px, 6vw, 96px); font-weight: 300; line-height: .95; letter-spacing: -.035em; color: #1F1712; }
.k-title .k-sub { grid-column: 1; margin: 14px 0 0; font-size: 15px; color: var(--grey); }
.k-title .k-lede { grid-column: 2 / -1; grid-row: 1 / span 2; align-self: end; margin: 0; max-width: 30em; font-size: clamp(17px, 1.4vw, 21px); font-weight: 300; line-height: 1.45; color: #2B1B11; }
.k-meta { display: grid; grid-template-columns: 2fr 1fr 1fr; column-gap: 6px; margin-top: clamp(56px, 7vw, 100px); }
.k-meta > div { display: grid; grid-template-columns: 1fr 1fr; column-gap: 6px; }
.k-meta > div:not(:first-child) { display: block; }
.k-meta dt { font-size: 12px; color: var(--grey); margin-bottom: 4px; }
.k-meta dd { margin: 0 0 14px; font-size: 14px; color: #2B1B11; line-height: 1.4; }

/* chapter: number and question on the left, explanation on the right */
.k-head h2 { grid-column: 1; margin: 0; padding-right: 32px; font-size: clamp(20px, 1.7vw, 26px); font-weight: 400; line-height: 1.2; letter-spacing: -.015em; color: #1F1712; }
.k-head h2 small { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 400; letter-spacing: .02em; color: var(--grey); }
.k-head .k-txt { grid-column: 2 / -1; max-width: 34em; }
.k-head p { margin: 0 0 12px; font-size: 15px; line-height: 1.65; color: #6F6258; }
.k-head p b { font-weight: 500; color: #2B1B11; }

/* pictures */
.k figure { margin: 0; }
.k img, .k video { display: block; width: 100%; height: auto; border-radius: 6px; background: #F3F1EE; }
.k figcaption { margin-top: 10px; font-size: 12px; color: var(--grey); }
.k-row { display: grid; gap: 12px; align-items: start; }
.k-row--2 { grid-template-columns: 1fr 1fr; }
.k-row--21 { grid-template-columns: 2fr 1fr; }
.k-row--12 { grid-template-columns: 1fr 2fr; }
.k-row--3 { grid-template-columns: repeat(3, 1fr); }
.k-row.k-crop img { aspect-ratio: var(--ar, 4 / 3); object-fit: cover; }
/* a row whose pictures share one height, cropped to fit */
.k-row.k-fill { aspect-ratio: var(--ar, 2.4 / 1); }
.k-row.k-fill figure, .k-row.k-fill img { height: 100%; object-fit: cover; }
.k-learn a { color: inherit; }
.k-learn a:hover { color: var(--acc); }
/* one large picture and two stacked beside it */
.k-detail { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.k-detail > div { display: grid; gap: 12px; grid-template-rows: 1fr 1fr; }
.k-detail img { height: 100%; object-fit: cover; }
.k-detail figure { position: relative; min-height: 0; }
.k-detail figcaption { position: absolute; left: 14px; top: 4px; color: rgba(255,255,255,.85); }

/* numbered points under a picture */
.k-points { display: grid; grid-template-columns: 2fr 1fr 1fr; column-gap: 6px; row-gap: 28px; margin-top: 8px; }
.k-points.k-points--4 { grid-template-columns: repeat(4, 1fr); }
.k-points > div { padding-right: 24px; }
.k-points span { display: block; font-size: 12px; color: var(--grey); margin-bottom: 14px; }
.k-points h3 { margin: 0 0 6px; font-size: 15px; font-weight: 500; color: #2B1B11; }
.k-points p { margin: 0; max-width: 24em; font-size: 13.5px; line-height: 1.55; color: #7A6E66; }

/* a band of numbers on soft panels */
.k-stats { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 6px; }
.k-stats > div { background: var(--tint); border-radius: 6px; padding: clamp(22px, 2.4vw, 36px); min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; }
.k-stats > div:nth-child(2) { background: var(--tint2); }
.k-stats > div:last-child:not(:first-child) { background: var(--acc); color: #fff; }
.k-stats b { font-size: clamp(42px, 4.6vw, 72px); font-weight: 300; letter-spacing: -.03em; line-height: 1; }
.k-stats b small { font-size: 15px; letter-spacing: 0; margin-left: 8px; }
.k-stats span { font-size: 13px; line-height: 1.5; max-width: 22em; opacity: .8; }

/* a quote, large and light */
.k-quote { grid-column: 2 / -1; margin: 0; }
.k-quote p { margin: 0; font-size: clamp(22px, 2.2vw, 34px); font-weight: 300; line-height: 1.3; letter-spacing: -.015em; color: #1F1712; }
.k-quote cite { display: block; margin-top: 14px; font-size: 13px; font-style: normal; color: var(--grey); }

/* closing */
.k-close { padding: clamp(120px, 15vw, 240px) 0 0; }
.k-close h2 { grid-column: 1; margin: 0; font-size: clamp(36px, 4.4vw, 68px); font-weight: 300; letter-spacing: -.03em; line-height: 1; color: #1F1712; }
.k-close .k-lede { grid-column: 2 / -1; align-self: end; margin: 0; max-width: 28em; font-size: 17px; font-weight: 300; line-height: 1.5; color: #2B1B11; }
.k-learn { grid-column: 2 / -1 !important; display: grid; grid-template-columns: 1fr 1fr; column-gap: 6px; margin-top: clamp(56px, 7vw, 96px); }
.k-learn h3 { margin: 0 0 12px; font-size: 12px; font-weight: 400; color: var(--grey); }
.k-learn ul { list-style: none; margin: 0; padding: 0 24px 0 0; }
.k-learn li { margin-bottom: 10px; font-size: 14px; line-height: 1.5; color: #2B1B11; }
.k-next { grid-column: 2 / -1 !important; justify-self: start; margin: clamp(56px, 7vw, 96px) 0 clamp(80px, 10vw, 140px); font-size: 15px; color: #2B1B11; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.k-next:hover { color: var(--acc); }

@media (max-width: 860px) {
  .k, .k-meta, .k-points, .k-points.k-points--4 { grid-template-columns: 1fr; }
  .k > *, .k-title .k-lede, .k-head .k-txt, .k-quote, .k-close .k-lede, .k-learn, .k-next { grid-column: 1 !important; grid-row: auto !important; }
  .k-title .k-lede, .k-close .k-lede { margin-top: 24px; }
  .k-head h2 { margin-bottom: 16px; }
  .k-row--2, .k-row--21, .k-row--12, .k-detail { grid-template-columns: 1fr; }
  .k-row--3 { grid-template-columns: 1fr 1fr; }
  .k-row.k-fill { aspect-ratio: auto; }
  .k-stats { grid-template-columns: 1fr; }
  .k-stats > div { min-height: 150px; }
  .k-learn { grid-template-columns: 1fr; row-gap: 24px; }
}

/* app screens laid out side by side on a soft panel */
.k-phones { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: clamp(12px, 2.4vw, 40px); align-items: start;
  padding: clamp(28px, 5vw, 80px); border-radius: 6px; background: var(--tint); }
.k-phones.dark { background: #15131A; }
.k-phones img { border-radius: clamp(14px, 1.8vw, 28px); background: transparent; box-shadow: 0 24px 60px -30px rgba(0,0,0,.35); }
@media (max-width: 860px) { .k-phones { grid-template-columns: repeat(2, 1fr); } }

/* No picture is ever cropped. In a row, each picture's column is as wide as its own shape,
   so they all come out the same height (widths are set from each picture's ratio by site.js). */
.k-row { display: flex !important; gap: 12px; align-items: flex-start; }
.k-row > figure { flex: var(--r, 1) 1 0; min-width: 0; }
.k img, .k video { width: 100%; height: auto !important; object-fit: contain !important; aspect-ratio: auto !important; }
@media (max-width: 860px) { .k-row { flex-wrap: wrap; } .k-row > figure { flex-basis: 100%; } }

.k-phones video { width: 100%; height: auto; display: block; border-radius: clamp(14px, 1.8vw, 28px); box-shadow: 0 24px 60px -30px rgba(0,0,0,.35); }
.k-phones figure { margin: 0; } .k-phones.dark figcaption { color: #B9B2AC; }

/* a feature's flow, step by step: phone screenshots in a row, numbered */
.k-steps { list-style: none; margin: 0; padding: clamp(24px, 3vw, 48px); display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: clamp(12px, 1.6vw, 24px);
  background: #10171C; border-radius: 6px; counter-reset: step; }
.k-steps li { counter-increment: step; max-width: 260px; }
.k-steps img { width: 100%; height: auto !important; display: block; border-radius: clamp(10px, 1.2vw, 18px); }
.k-steps span { display: block; margin-top: 10px; font-size: 12px; line-height: 1.4; color: #C9C2BC; }
.k-steps span::before { content: counter(step, decimal-leading-zero) "  "; color: #7E8B93; }
/* the recording of that feature, on its own */
.k-demo { display: flex; flex-direction: column; align-items: center; padding: clamp(28px, 4vw, 64px); background: #10171C; border-radius: 6px; }
.k-demo video { width: min(340px, 70vw) !important; border-radius: 28px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); }
.k-demo figcaption { color: #9AA5AC; margin-top: 14px; }

/* a plain side-by-side comparison */
.k-compare { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.4; }
.k-compare th { text-align: left; font-weight: 500; padding: 10px 12px 10px 0; border-bottom: 1px solid #111; }
.k-compare td { padding: 12px 12px 12px 0; border-bottom: 1px solid #E8E3DF; color: #4A4440; vertical-align: top; }
.k-compare td:first-child { color: #8C827B; width: 26%; }
.k-logos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.k-logos figure { margin: 0; }
.k-logos .tile { position: relative; aspect-ratio: 2 / 1; overflow: hidden; background: #fff; border: 1px solid #E8E3DF; border-radius: 6px; }
.k-logos .tile img { position: absolute; inset: 22% 0; width: 100% !important; height: 56% !important; object-fit: contain; background: transparent !important; }
.k-logos .tile.full { border: 0; }
.k-logos .tile.full img { inset: 0; height: 100% !important; object-fit: cover; }
@media (max-width: 520px) { .k-logos { grid-template-columns: 1fr; } }
