/* Homepage applications: the photo opens for the row under the pointer. */
#applications {
  padding: 120px 0 72px;
  background: var(--off-black, #0a0a0a);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  scroll-margin-top: 100px;
}

#applications .section-inner { position: relative; z-index: 1; max-width: 1280px; }

/* Reuse the footer's drawing-sheet border and edge markings. */
.apps-sheet {
  --cad-line: rgba(255, 255, 255, 0.2);
  --cad-line-strong: rgba(255, 255, 255, 0.34);
  --cad-ink-dim: rgba(255, 255, 255, 0.3);
  --cad-mono: 'Share Tech Mono', ui-monospace, Menlo, Consolas, monospace;
  --sheet-outer: 14px;
  --sheet-inner: 40px;
}

.apps-sheet::after {
  background: none;
  -webkit-mask-image: none;
  mask-image: none;
}

@media (min-width: 821px) and (max-width: 1280px) {
  #applications .section-inner { padding-inline: 64px; }
}

.apps-head {
  max-width: 760px;
  margin: 0 auto 86px;
  text-align: center;
}

.apps-head .section-label { margin-bottom: 26px; }

.apps-title {
  color: #f4f4f4;
  font-size: clamp(38px, 5.8vw, 76px);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.apps-title span { color: #8d9095; }

.apps-deck {
  max-width: 470px;
  margin: 26px auto 0;
  color: #999ca1;
  font-size: 15px;
  line-height: 1.7;
}

.apps-count {
  margin-top: 24px;
  color: #858a91;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.app-list { list-style: none; }

.app-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(28px, 5vw, 72px);
  min-height: 350px;
  padding: 40px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.app-index {
  color: #91969d;
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.app-visual {
  position: relative;
  min-width: 0;
  aspect-ratio: 1.8;
  isolation: isolate;
}

.app-photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #15181d;
  border-radius: 5px;
  clip-path: inset(0% round 5px);
}

.app-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.43);
}

.app-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--photo-position, center);
}

.app-name {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #fff;
  font-size: clamp(21px, 2.15vw, 29px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.04em;
  text-align: center;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.app-name a { color: inherit; text-decoration: none; }
.app-name a::after { content: ''; position: absolute; inset: 0; }
.app-name a:focus-visible { outline: 2px solid #9dc0ff; outline-offset: 8px; }

.app-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 17px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #92979f;
}

.app-status { display: inline-flex; align-items: center; gap: 6px; color: #a9c8b9; }
.app-status::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.app-status.soon { color: #c5ae8e; }

.app-copy { color: #b1b3b7; font-size: 14px; line-height: 1.75; max-width: 410px; }

.app-go {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  margin-top: 22px;
  padding: 5px 0;
  color: #eeeff1;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
}

.app-go .arrow { display: inline-block; transition: transform 180ms ease; }
.app-go:hover .arrow { transform: translateX(5px); }
.app-go:hover { color: #9dc0ff; }
.app-go:focus-visible, .apps-foot a:focus-visible { outline: 2px solid #9dc0ff; outline-offset: 6px; }

.apps-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
  padding-top: 30px;
  color: #8e939b;
  font-size: 12px;
  line-height: 1.7;
}

.apps-foot p { max-width: 620px; }
.apps-foot a { color: #dedfe2; text-decoration: none; white-space: nowrap; }
.apps-foot a:hover { color: #9dc0ff; }

/* The controller owns timing so interrupted hovers cannot shorten transitions.
   Photos remain visible without JavaScript, on touch screens, and with reduced motion. */
@media (min-width: 1025px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .apps-motion .app-photo {
    clip-path: inset(50% round 5px);
  }
  .apps-motion .app-name {
    color: #c4c7cb;
  }
}

@media (max-width: 820px) {
  #applications { padding: 80px 0 52px; }
  #applications .section-inner { padding: 0 36px; }
  .apps-sheet { --sheet-outer: 8px; --sheet-inner: 22px; }
  .apps-sheet .cad-zone,
  .apps-sheet .cad-center,
  .apps-sheet .cad-cross { display: none; }
  .apps-head { margin-bottom: 42px; }
  .apps-head .section-label { margin-bottom: 22px; }
  .apps-deck { font-size: 14px; }
  .apps-count { font-size: 9px; letter-spacing: 0.1em; }
  .app-row {
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: start;
    gap: 22px 16px;
    padding: 32px 0;
    min-height: 0;
  }
  .app-index { padding-top: 5px; }
  .app-visual { display: flex; flex-direction: column-reverse; gap: 22px; aspect-ratio: auto; }
  .app-photo { position: relative; inset: auto; width: 100%; aspect-ratio: 1.6; }
  .app-photo::after { background: rgba(0, 0, 0, 0.12); }
  .app-name { position: static; padding: 0; justify-content: flex-start; text-align: left; font-size: 25px; }
  .app-detail { grid-column: 2; }
  .app-meta { margin-bottom: 12px; }
  .app-copy { max-width: none; }
  .app-go { margin-top: 15px; }
  .apps-foot { flex-direction: column; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .app-go .arrow { transition: none; }
}
