/* Benjineering Labs · app pages, one template for all four
 * After Mallard & Claret's article page (details.so/inspo/mallardandclaret-dceirf):
 * an oversized headline over a full-width photograph that drifts as you scroll,
 * then a 24-column split: a narrow sidebar of facts that stays put on desktop,
 * a spacer, and the story on the right (a large lead, copy, a screenshot set in
 * a tinted frame that opens from an inset mask, a ruled feature list), ending in
 * a dark "more apps" band. Adapted to the site: Inter, the site's ink and
 * violet, sentence-case pills, and CSS sticky in place of a ScrollTrigger pin. */

.app { --pad: clamp(20px, 2vw, 32px); --gap: clamp(16px, 2vw, 32px); --nav-clear: 104px; }
.app-row { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); column-gap: var(--gap); max-width: 1520px; margin: 0 auto; padding: 0 var(--pad); }

/* ---------- hero ---------- */
.app-hero { padding-top: clamp(140px, 13vw, 200px); }
.app-hero-text { grid-column: 1 / span 15; display: flex; flex-direction: column; gap: clamp(20px, 2vw, 32px); }
.app-hero h1 { font: 500 clamp(60px, 9vw, 148px)/1.02 "Inter", sans-serif; letter-spacing: -0.05em; margin: -0.06em 0 -0.06em; }
.app-hero-info { font: 400 16px/1.45 "Inter", sans-serif; letter-spacing: -0.01em; color: var(--dim); max-width: 46ch; }
.app-hero-info b { display: block; font-weight: 500; color: var(--ink); text-wrap: pretty; }
.app-hero-img { position: relative; grid-column: 1 / -1; margin-top: clamp(40px, 4vw, 64px); aspect-ratio: 16 / 8; overflow: hidden; border-radius: 4px; background: #d8d8dc; }
.app-hero-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; scale: 1.14; will-change: transform; }
.app-tags { position: absolute; z-index: 1; left: 14px; top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.app-tags span { font: 500 12.5px/1 "Inter", sans-serif; letter-spacing: -0.005em; color: #fff; background: rgb(23 25 32 / 0.62); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); padding: 8px 12px; border-radius: 999px; }

/* ---------- the split ---------- */
.app-detail { padding-top: clamp(80px, 8vw, 120px); padding-bottom: clamp(100px, 10vw, 160px); align-items: start; }
.app-side { grid-column: 1 / span 6; position: sticky; top: var(--nav-clear); display: flex; flex-direction: column; gap: 24px; }
.app-side-head { display: flex; align-items: center; gap: 14px; }
.app-side-head img { width: 44px; height: 44px; border-radius: 22.5%; box-shadow: 0 4px 14px rgb(23 25 32 / 0.14); }
.app-side-head h2 { font: 400 22px/1.15 "Inter", sans-serif; letter-spacing: -0.025em; }
.app-links { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px dashed var(--line-strong); border-bottom: 1px dashed var(--line-strong); }
.app-links > span { font: 500 14px/1 "Inter", sans-serif; color: var(--ink); }
.app-links div { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.app-links a { font: 500 13px/1 "Inter", sans-serif; color: var(--ink); background: #ececf1; padding: 9px 12px; border-radius: 4px; transition: background-color 0.25s ease-out, color 0.25s ease-out; }
.app-facts { display: grid; grid-template-columns: auto 1fr; gap: 10px 24px; font: 400 14.5px/1.4 "Inter", sans-serif; letter-spacing: -0.01em; }
.app-facts dt { font-weight: 500; color: var(--ink); }
.app-facts dd { color: var(--dim); }
.app-facts a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }

.app-btn { display: inline-flex; width: fit-content; align-items: center; padding: 10px 16px; border-radius: 2rem; border: 1px solid var(--ink); background: var(--ink); color: #fff; font: 500 14px/1.1 "Inter", sans-serif; letter-spacing: -0.01em; transition: all 0.25s ease-out; }
.app-btn.is-ghost { background: transparent; color: var(--ink); }
.app-btn:focus-visible { outline: 2px solid var(--vio); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .app-btn:hover { background: transparent; color: var(--ink); }
  .app-btn.is-ghost:hover { background: var(--ink); color: #fff; }
  .app-links a:hover { background: var(--ink); color: #fff; }
}

.app-body { grid-column: 13 / span 11; display: flex; flex-direction: column; gap: clamp(80px, 7vw, 100px); }
.app-copy { display: flex; flex-direction: column; gap: 20px; }
.app-lead { font: 400 clamp(28px, 2.6vw, 40px)/1.12 "Inter", sans-serif; letter-spacing: -0.03em; color: var(--ink); text-wrap: pretty; margin-bottom: 12px; }
.app-copy p:not(.app-lead) { font: 400 16px/1.6 "Inter", sans-serif; letter-spacing: -0.01em; color: var(--dim); text-wrap: pretty; }

/* The screenshot frame: the app sits centred on a tint, inside an inset mask. */
.app-shot { --tint: #ebe6da; aspect-ratio: 69 / 48; display: flex; align-items: center; justify-content: center; background: var(--tint); border-radius: 4px; overflow: hidden; }
.app-shot.is-writual { --tint: #e6e1d8; }
.app-shot.is-aerial { --tint: #e2dfee; }
.app-shot.is-narwhal { --tint: #241a3d; }
.app-shot-inner { display: flex; align-items: center; justify-content: center; gap: 4%; width: 80%; height: 75%; will-change: clip-path; }
.app-shot.is-phones .app-shot-inner img { height: 100%; width: auto; aspect-ratio: 643 / 1398; flex: none; border-radius: clamp(10px, 1.6vw, 22px); box-shadow: 0 18px 40px -14px rgb(23 25 32 / 0.35); }
.app-shot.is-mac .app-shot-inner img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 30px rgb(0 0 0 / 0.28)); }

/* Features: a ruled block, a small cite line, then the names large. */
.app-features { border-top: 1px solid var(--ink); padding-top: 16px; }
.app-cite { display: flex; gap: 12px; font: 400 14.5px/1.4 "Inter", sans-serif; color: var(--dim); }
.app-cite b { font-weight: 500; color: var(--ink); }
.app-features ul { list-style: none; margin-top: clamp(28px, 3vw, 44px); }
.app-features li { padding: 18px 0 20px; border-bottom: 1px dashed var(--line-strong); }
.app-features li:first-child { padding-top: 0; }
.app-features h3 { font: 400 clamp(26px, 2.4vw, 36px)/1.1 "Inter", sans-serif; letter-spacing: -0.03em; color: var(--ink); }
.app-features p { margin-top: 8px; font: 400 15.5px/1.55 "Inter", sans-serif; letter-spacing: -0.01em; color: var(--dim); max-width: 52ch; }
.app-end { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- more apps: the dark band ---------- */
.app-more { background: #1c1d22; color: #fff; padding: clamp(64px, 7vw, 104px) 0 clamp(72px, 8vw, 120px); }
.app-more-head { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.app-more h2 { font: 400 clamp(44px, 5.4vw, 84px)/1 "Inter", sans-serif; letter-spacing: -0.045em; }
.app-more .app-btn { background: #fff; border-color: #fff; color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .app-more .app-btn:hover { background: transparent; color: #fff; } }
.app-more ul { grid-column: 1 / -1; list-style: none; margin-top: clamp(72px, 9vw, 120px); }
.app-more li { border-top: 1px dashed rgb(255 255 255 / 0.28); }
.app-more li a { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); column-gap: var(--gap); padding: 24px 0; color: #fff; }
.app-more-thumb { grid-column: 1 / span 6; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; background: #2a2b31; }
.app-more-thumb img { width: 100%; height: 100%; object-fit: cover; transition: scale 0.8s cubic-bezier(.25,.46,.45,.94); }
.app-more-text { grid-column: 7 / span 14; display: flex; flex-direction: column; gap: 12px; }
.app-more h3 { font: 400 clamp(30px, 3vw, 46px)/1.05 "Inter", sans-serif; letter-spacing: -0.035em; transition: color 0.25s ease-out; }
.app-more-text p { font: 400 16px/1.5 "Inter", sans-serif; color: rgb(255 255 255 / 0.62); max-width: 44ch; }
@media (hover: hover) and (pointer: fine) {
  .app-more li a:hover .app-more-thumb img { scale: 1.05; }
  .app-more li a:hover h3 { color: #b9adff; }
}

/* The headline rises out of a mask once, as on the rest of the site. The mask
 * gets room below the line so descenders (the g in Sprig) are not cut. */
.app-line-mask { padding-bottom: 0.16em; margin-bottom: -0.16em; }
.js-app [data-mask] { visibility: hidden; }
.js-app [data-mask].is-split { visibility: visible; }

@media (max-width: 1231px) {
  .app-body { grid-column: 10 / span 15; }
  .app-side { grid-column: 1 / span 8; }
  .app-shot-inner { width: 90%; height: 85%; }
}
@media (max-width: 1023px) {
  .app-side { position: static; }
}
@media (max-width: 767px) {
  .app-hero-text, .app-side, .app-body, .app-more-thumb, .app-more-text { grid-column: 1 / -1; }
  .app-hero-img { aspect-ratio: 390 / 420; }
  .app-hero-img img { scale: 1; }
  .app-side-head { display: none; }
  .app-links { border-top: 0; padding-top: 0; }
  .app-detail { padding-top: 56px; row-gap: 80px; }
  .app-body { gap: 80px; }
  .app-more-text { margin-top: 18px; }
}
