/* Lightning Command Lines: the four apps on the home page (Products), and the larger view of their pictures.
   Loaded after site.css on the home page only; it uses site.css's colours, type and its .window frame, and adds nothing
   to any other page. A file of its own (not an edit of site.css) so a cached site.css can never pair with this page.
   Unit SELL / S-FRONT, Wed Nov 25 2026. */

.head-link { justify-self: end; align-self: end; }

/* one row per app: the words on one side, its picture in the site's black window on the other, sides alternating */
.apps { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(56px, 7vw, 104px); }
.app { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4.5vw, 72px); align-items: center; }
.app:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.app:nth-child(even) .app-text { order: 2; }

.app-id { display: flex; align-items: center; gap: 16px; }
.app-id img { width: 56px; height: 56px; flex: none; border-radius: 13px; box-shadow: 0 14px 28px -18px rgba(11, 15, 25, .55); }
.app-id h3 { margin: 0; font: 650 24px/1.2 var(--sans); letter-spacing: -.015em; color: var(--ink); }
.apps .app-tag { margin: 5px 0 0; font: 700 11.5px/1.45 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--deep); }
.apps .app-head { margin: 24px 0 22px; max-width: 22ch; font: 660 clamp(1.4rem, 2.1vw, 1.85rem)/1.22 var(--sans); letter-spacing: -.02em; color: var(--ink); text-wrap: balance; }

.app-window { position: relative; }
.app-window .window-bar { height: 44px; padding: 0 14px; gap: 10px; }
.app-shot { position: relative; display: block; background: var(--black); cursor: zoom-in; }
.app-shot img { width: 100%; height: auto; }
.app-shot:focus-visible { outline-offset: -4px; }
.app-zoom {
  position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px;
  border-radius: 8px; border: 1px solid rgba(247, 249, 252, .24); background: rgba(5, 7, 13, .8); color: var(--d1);
  font: 600 13.5px/1 var(--sans); transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.app-zoom .i { width: 16px; height: 16px; }
.app-shot:hover .app-zoom, .app-shot:focus-visible .app-zoom { background: var(--blue); border-color: var(--blue); }

/* the larger view: the browser's own dialog; without the script the link opens the picture itself */
.zoom {
  width: fit-content; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 0; overflow: auto;
  border: 1px solid var(--line-d); border-radius: 14px; background: var(--black); color: var(--d1);
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, .8);
}
.zoom::backdrop { background: rgba(5, 7, 13, .86); }
.zoom figure { margin: 0; }
/* the picture's width is set from its proportions (--ar, set by apps.js) so the dialog hugs it at any window size */
.zoom img {
  display: block; height: auto; max-width: none;
  width: min(1440px, calc(100vw - 34px), calc((100vh - 156px) * var(--ar, 1.6)));
  width: min(1440px, calc(100vw - 34px), calc((100dvh - 156px) * var(--ar, 1.6)));
}
.zoom figcaption { padding: 14px 18px 16px; color: var(--d2); font-size: 15px; line-height: 1.5; }
.zoom figcaption b { color: var(--d1); font-weight: 650; }
/* the Close button sits in the dialog's own bar above the picture, never over it */
.zoom-bar { display: flex; justify-content: flex-end; padding: 6px 6px 6px 18px; border-bottom: 1px solid var(--line-d); }
.zoom-close {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border-radius: 10px; border: 1px solid rgba(247, 249, 252, .28); background: rgba(5, 7, 13, .82); color: var(--d1); cursor: pointer;
}
.zoom-close:hover { background: var(--blue); border-color: var(--blue); }
.zoom-close .i { width: 20px; height: 20px; }
html.zoom-lock { overflow: hidden; }

@media (max-width: 960px) {
  .app, .app:nth-child(even) { grid-template-columns: 1fr; gap: 22px; }
  .app:nth-child(even) .app-text { order: 0; }
  .head-link { justify-self: start; }
  .apps .app-head { max-width: 30ch; margin: 18px 0 16px; }
}
@media (max-width: 720px) {
  .app-window .window-bar { height: 40px; padding: 0 12px; }
  .app-zoom { right: 10px; bottom: 10px; padding: 7px 10px; font-size: 12.5px; }
  .app-id h3 { font-size: 22px; }
}
