/* App Development: six case studies on one page. Each case takes its app's colors through --ac / --ac2 / --bg. */

.work-hero { position: relative; padding: clamp(130px, 16vw, 200px) 0 clamp(40px, 6vw, 72px); overflow: hidden; isolation: isolate; }
.work-hero::before {
  content: ""; position: absolute; inset: -20% -10% auto 30%; height: 640px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(201, 161, 91, .22), transparent 72%);
}
.work-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 20%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 20%, #000 20%, transparent 75%);
}
.work-hero .display { margin: 20px 0 22px; max-width: 13ch; }
.work-hero .lede { margin: 0; }
.work-facts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.work-facts .chip b { color: var(--paper); font-weight: 500; }

/* Index of the six apps */
.work-index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: clamp(40px, 6vw, 72px); }
.wtile {
  --ac: var(--brass);
  position: relative; display: block; border-radius: var(--radius); overflow: hidden;
  background: var(--plate); border: 1px solid var(--line);
  transition: transform .55s var(--ease-out), border-color .4s, box-shadow .55s var(--ease-out);
}
.wtile img { width: 100%; height: auto; aspect-ratio: 900 / 502; object-fit: cover; transition: transform .9s var(--ease-out); }
.wtile .wt { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 14px 16px 16px; }
.wtile strong { font-family: var(--serif); font-weight: 400; font-size: 24px; letter-spacing: -.01em; }
.wtile span { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.wtile::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ac); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease-out); }
.wtile:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--ac) 60%, transparent); box-shadow: 0 24px 60px -24px color-mix(in srgb, var(--ac) 55%, transparent); }
.wtile:hover img { transform: scale(1.04); }
.wtile:hover::after { transform: scaleX(1); }
.wtile:active { transform: translateY(-1px) scale(.99); }
@media (max-width: 960px) { .work-index { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .work-index { gap: 10px; } .wtile { border-radius: 14px; } .wtile .wt { padding: 10px 12px 12px; } .wtile strong { font-size: 18px !important; } .wtile span { display: none; } }

/* One case study */
.case {
  --ac: var(--brass); --ac2: var(--brass-hi); --bg: var(--plate);
  position: relative; isolation: isolate; scroll-margin-top: 80px;
  padding-block: clamp(64px, 9vw, 120px); border-top: 1px solid var(--line);
}
.case::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 520px at 88% 18%, color-mix(in srgb, var(--ac) 13%, transparent), transparent 70%);
}
.case .cgrid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.case .num { font-family: var(--mono); font-size: 12px; letter-spacing: .18em; color: var(--ac); }
.case .banner { border-radius: var(--radius); overflow: hidden; background: var(--bg); border: 1px solid var(--line); margin: 16px 0 24px; box-shadow: 0 30px 80px -40px color-mix(in srgb, var(--ac) 60%, transparent); }
.case .banner img { width: 100%; height: auto; aspect-ratio: 900 / 502; object-fit: cover; }
.case .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.case .meta .chip.status { color: var(--paper); border-color: color-mix(in srgb, var(--ac) 55%, transparent); background: color-mix(in srgb, var(--ac) 12%, transparent); }
.case .meta .chip.status .dot { background: var(--ac); box-shadow: 0 0 10px var(--ac); }
.case h2 { font-family: var(--serif); font-size: clamp(40px, 5vw, 64px); line-height: 1; letter-spacing: -.03em; }
.case .tag { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 2.2vw, 28px); color: var(--ac2); margin: 8px 0 26px; }
.case .blk { margin-top: 22px; }
.case .blk h3 { font-family: var(--mono); font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ac); margin-bottom: 8px; }
.case .blk p { margin: 0; max-width: 62ch; color: var(--dim); }
.case ul.hl { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.case ul.hl li { position: relative; padding-left: 24px; max-width: 62ch; color: var(--dim); }
.case ul.hl li::before { content: ""; position: absolute; left: 3px; top: .58em; width: 8px; height: 8px; transform: rotate(45deg); background: var(--ac); box-shadow: 0 0 12px color-mix(in srgb, var(--ac) 70%, transparent); }
.case ul.hl b { color: var(--paper); font-weight: 500; }
.case .stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.case .stats div { padding: 12px 16px; min-width: 100px; border-radius: 14px; background: rgba(236, 230, 216, .03); border: 1px solid var(--line); }
.case .stats b { display: block; font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1; color: var(--paper); font-variant-numeric: tabular-nums; }
.case .stats span { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.case .more { margin-top: 28px; }
.case .more .btn-glass { --accent: var(--ac); }

/* Phones */
.phones { display: flex; justify-content: center; gap: clamp(12px, 1.6vw, 20px); position: sticky; top: 96px; padding-top: 40px; }
.phones figure { margin: 0; flex: 1 1 0; min-width: 0; max-width: 230px; transition: transform .7s var(--ease-out); }
.phones figure:nth-child(2) { transform: translateY(36px); }
.phones.two figure { max-width: 260px; }
.phones.two figure:nth-child(2) { transform: translateY(48px); }
.phones img {
  width: 100%; height: auto; border-radius: 26px; border: 6px solid #05070c; background: #05070c;
  box-shadow: 0 0 0 1px var(--line-2), 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 50px -18px color-mix(in srgb, var(--ac) 55%, transparent);
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out);
}
.phones figure:hover img { transform: translateY(-6px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ac) 60%, transparent), 0 36px 70px -20px rgba(0, 0, 0, .75), 0 0 70px -14px color-mix(in srgb, var(--ac) 75%, transparent); }
.phones figcaption { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); text-align: center; margin-top: 12px; }

@media (max-width: 980px) {
  .case .cgrid { grid-template-columns: 1fr; }
  .phones { position: static; justify-content: flex-start; overflow-x: auto; padding: 4px 2px 18px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .phones::-webkit-scrollbar { display: none; }
  .phones figure, .phones.two figure { flex: 0 0 44%; max-width: none; scroll-snap-align: start; }
  .phones figure:nth-child(2), .phones.two figure:nth-child(2) { transform: none; }
}
@media (max-width: 560px) { .phones figure, .phones.two figure { flex-basis: 62%; } .phones img { border-radius: 22px; border-width: 5px; } }

/* How we build */
.habits { border-top: 1px solid var(--line); background: linear-gradient(180deg, var(--night), var(--ink)); }
.habits .card .from { display: block; margin-top: 14px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--brass); }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }

/* Closing call */
.work-cta { border-top: 1px solid var(--line); text-align: center; position: relative; isolation: isolate; overflow: hidden; }
.work-cta::before { content: ""; position: absolute; inset: auto 0 -40% 0; height: 520px; z-index: -1; background: radial-gradient(closest-side, rgba(201, 161, 91, .18), transparent 70%); }
.work-cta .h2 { max-width: 16ch; margin: 18px auto 18px; }
.work-cta .lede { margin: 0 auto 30px; }
.work-cta .btn-row { justify-content: center; }
.work-cta .note { margin-top: 26px; font-size: 13px; color: var(--mute); }

html[data-calm] .wtile, html[data-calm] .wtile img, html[data-calm] .phones img { transition: none; }

@media (max-width: 760px) {
  .work-hero { padding-top: 104px; }
  .work-hero .display { max-width: none; }
  .case { padding-block: 52px; }
  .case h2 { font-size: 38px; }
  .case .tag { font-size: 20px; margin-bottom: 18px; }
  .case .stats b { font-size: 26px; }
  .case .stats div { min-width: 84px; padding: 10px 12px; }
  .wtile strong { font-size: 21px; }
}
