/* ════════════════════════════════════════════════════════════════════════
   THE APP PREVIEW SYSTEM  ·  /technology, directly below the hero
   ────────────────────────────────────────────────────────────────────────
   Ethan asked for this, in this position, ten times. A drawn iPhone with a
   real capture on its screen, the app names as tabs under it, and the copy
   beside it changing with the selection — the same idea as tnaado.ca/apps.

   The device is DRAWN, not photographed. A photo of a phone would be a
   seventh workstation picture on a page that already has too many, and a
   drawn frame works at every width instead of only above 1180px.
   ════════════════════════════════════════════════════════════════════════ */

.apv {
  background: var(--bone, #faf8f3);
  color: #0a0a0a;
  padding-block: clamp(2.8rem, 6vw, 5rem);
}
.apv__inner {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .78fr);
  gap: clamp(1.8rem, 4vw, 3.6rem);
  align-items: center;
}
@media (max-width: 900px) {
  .apv__inner { grid-template-columns: 1fr; }
  .apv__stage { order: -1; }
}

.apv .eyebrow { color: #a4132c; }
.apv .eyebrow-rule { background: #a4132c; }

.apv__h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  line-height: 1.08;
  margin: 1rem 0 1.6rem;
  color: #0a0a0a;
}
.apv__h2 em { font-style: italic; color: #a4132c; }

/* Only the selected app's copy is in flow; the rest are removed from it so
   the block does not size to the longest description. */
.apv__meta { display: none; }
.apv__meta.is-on { display: block; }

.apv__kind {
  font-family: var(--font-mono);
  font-size: .58rem; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(10,10,10,.55); margin: 0 0 .5rem;
}
.apv__name {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.15;
  margin: 0 0 .55rem; color: #0a0a0a;
}
.apv__desc {
  font-family: var(--font-body);
  font-size: .93rem; line-height: 1.62;
  color: rgba(10,10,10,.68); max-width: 44ch; margin: 0 0 1rem;
}
.apv__go {
  display: inline-block;
  font-family: var(--font-mono); font-size: .6rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: #a4132c; text-decoration: none;
  border-bottom: 1px solid rgba(164,19,44,.35); padding-bottom: 2px;
}
.apv__go--soon { color: rgba(10,10,10,.45); border-bottom-color: rgba(10,10,10,.18); }

/* ── the device ─────────────────────────────────────────────────────── */
.apv__stage { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }

.apv__device {
  width: min(100%, 268px);
  padding: 9px;
  background: linear-gradient(160deg, #2a2a2e 0%, #0e0e10 55%, #232327 100%);
  border-radius: 38px;
  box-shadow: 0 1px 0 rgba(255,255,255,.10) inset,
              0 24px 48px -20px rgba(10,10,10,.45),
              0 4px 12px -6px rgba(10,10,10,.30);
}
.apv__screen {
  position: relative;
  aspect-ratio: 9 / 19.5;
  border-radius: 30px;
  overflow: hidden;
  background: #0a0a0a;
}
.apv__shot {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  /* CONTAIN, not cover. The screen is authored 9/19.5 but the captures
     run 0.4598 to 0.5209, so cover was cropping the bottom off every one —
     the tab bar, which is the part that says what the app is. Contain
     shows the whole capture; the screen's own ink shows in the margin. */
  object-fit: contain; object-position: center;
  opacity: 0; visibility: hidden;
  transition: opacity 220ms cubic-bezier(.23, 1, .32, 1);
}
.apv__shot.is-on { opacity: 1; visibility: visible; }

.apv__notch {
  position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 74px; height: 20px; border-radius: 12px;
  background: #0a0a0a; z-index: 2;
}

/* ── the tabs ───────────────────────────────────────────────────────── */
.apv__tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; }
.apv__tab {
  font-family: var(--font-mono); font-size: .55rem;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .42rem .7rem;
  background: transparent;
  color: rgba(10,10,10,.6);
  border: 1px solid rgba(10,10,10,.16);
  cursor: pointer;
  transition: background 160ms cubic-bezier(.23,1,.32,1),
              color 160ms cubic-bezier(.23,1,.32,1),
              border-color 160ms cubic-bezier(.23,1,.32,1);
}
.apv__tab:hover, .apv__tab:focus-visible { border-color: rgba(10,10,10,.4); color: #0a0a0a; }
.apv__tab.is-on { background: var(--red, #c8102e); border-color: var(--red, #c8102e); color: #fff; }
.apv__tab:active { transform: scale(.97); }

@media (prefers-reduced-motion: reduce) {
  .apv__shot, .apv__tab { transition: none; }
}

/* ── THE CAP THAT WAS BREAKING THIS ───────────────────────────────────
   site.css has:
       img[src*="/apps/screens/"] {
         max-height: clamp(280px, 34vw, 440px);
         object-fit: cover; object-position: top center;
       }
   An attribute selector is (0,1,1) and beats a single class (0,1,0), so
   every earlier fix here was overridden silently — measured `cover` and
   `50% 0%` on the element after writing `contain` twice.

   The cap exists to stop BARE screenshots dominating a page. Inside a drawn
   phone the device IS the containment, so it is restated at two-class
   specificity rather than fought. Result: the capture is 250x542 in a
   250x542 screen instead of 250x440 with 102px of dead glass under it. */
.apv__screen .apv__shot {
  max-height: none;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
