/* Real app screens on a tablet, picked from a list. Markup: [data-scr]; behaviour: assets/screen-tabs.js.
   .scr--dark sits on the soil-dark sections. */

.scr {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr);
  gap: clamp(18px, 3vw, 40px);
  align-items: center;
}
.scr--flip { grid-template-columns: minmax(280px, 1fr) minmax(0, 1.55fr); }
.scr--flip .scr__device { order: 2; }

.scr__device {
  padding: clamp(7px, 1vw, 12px);
  border-radius: clamp(14px, 1.8vw, 24px);
  background: #141210;
  box-shadow: 0 30px 70px rgba(26, 22, 18, .22), inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.scr__screen {
  position: relative;
  aspect-ratio: var(--ar, 5 / 3);
  border-radius: clamp(8px, 1vw, 12px);
  overflow: hidden;
  background: #0c0a08;
}
.scr__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: var(--pos, 50% 0);
  opacity: 0;
  transition: opacity .45s ease;
}
.scr__img.is-on { opacity: 1; }

/* screen-tabs.js gives the list a min-height that holds room for its longest body, so the list keeps
   one height whichever step is lit (nothing beside it re-centres, nothing below it moves); the
   items stay packed at the top of it */
.scr__list { display: grid; gap: 6px; align-content: start; }
.scr__item {
  position: relative;
  display: grid; gap: 4px;
  padding: 14px 16px 15px 18px;
  border: 0; border-radius: 12px;
  background: transparent;
  color: var(--ink);
  text-align: left; font: inherit; cursor: pointer;
  overflow: hidden;
  transition: background .2s ease;
}
.scr__item::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 2px;
  background: var(--line-2);
}
.scr__item:hover { background: rgba(26, 22, 18, .04); }
.scr__item:focus-visible { outline: 2px solid var(--brand-orange); outline-offset: 2px; }
.scr__item.is-on { background: #fff; box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(26, 22, 18, .07); }
.scr__item.is-on::before { background: var(--ink); }
.scr__step { font-size: 12px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.scr__name { font-size: 18px; font-weight: 800; line-height: 1.25; letter-spacing: -0.01em; }
.scr__body { display: none; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.scr__item.is-on .scr__body { display: block; }
/* a copy of a body that screen-tabs.js measures for that room, out of the flow and unseen */
.scr .scr__item .scr__body.is-gauge { display: block; position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; }
.scr__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: transparent; }
.scr__bar::after { content: ""; position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: var(--brand-green); }
.scr.is-ticking .scr__item.is-on .scr__bar::after { animation: scr-tick var(--scr-dur, 6s) linear both; }
@keyframes scr-tick { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.scr__note { margin-top: 14px; font-size: 13px; color: var(--ink-3); line-height: 1.5; }

/* dark sections */
.scr--dark .scr__item { color: #f3ece0; }
.scr--dark .scr__item::before { background: rgba(243, 236, 224, .2); }
.scr--dark .scr__item:hover { background: rgba(243, 236, 224, .05); }
.scr--dark .scr__item.is-on { background: rgba(243, 236, 224, .08); box-shadow: none; }
.scr--dark .scr__item.is-on::before { background: #f3ece0; }
.scr--dark .scr__step { color: rgba(243, 236, 224, .55); }
.scr--dark .scr__body { color: #d8cfbc; }
.scr--dark .scr__device { background: #050403; box-shadow: 0 30px 70px rgba(0, 0, 0, .4), inset 0 0 0 1px rgba(255, 255, 255, .08); }
.scr--dark .scr__note { color: rgba(243, 236, 224, .55); }

@media (max-width: 900px) {
  .scr, .scr--flip { grid-template-columns: 1fr; }
  .scr--flip .scr__device { order: 0; }
  .scr__list { gap: 2px; }
  .scr__item { padding: 11px 12px 12px 16px; }
  .scr__item::before { top: 11px; bottom: 11px; }
  .scr__name { font-size: 16px; }
  .scr__body { font-size: 14.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .scr__img, .scr__item { transition: none; }
}
/* the site's motion switch (assets/motion.js): screens swap without the crossfade */
html.da-still .scr__img, html.da-still .scr__item { transition: none; }
html.da-still .scr__bar::after { animation: none; }
