/* ==================================================================
   Guided — homework  (LOCAL PREVIEW ONLY)

   An upright shot with a definition under it, not a wide screenshot.
   Two layers, cross-faded by the two steps above it.
   ================================================================== */

/* apple.css carries `section img { display: block !important }`, which
   beats an inline display:none — so the authored wide mockup keeps
   rendering under the photograph unless it is out-specified here.
   #homework img is (1,0,1) against that rule's (0,0,2). */
#homework img,
#homework .gs-ph {
  display: none !important;
}

.gs-hw {
  display: grid;
  justify-items: center;
  gap: 0;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}

.gs-hw-shot {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  background-color: #161617;
}

/* NB: keyframes, not a transition. A CSS transition can stick in a
   permanently "running" state in this runtime and never reach its end
   value, which leaves the wrong photograph on screen after a click. */
.gs-hw-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
}

@keyframes gsShotIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes gsShotOut { from { opacity: 1; } to { opacity: 0; } }

.gs-hw-layer.is-shown { animation: gsShotIn 0.45s ease forwards; }
.gs-hw-layer.was-shown { animation: gsShotOut 0.45s ease forwards; }

/* ---- the two steps, now controls ---- */

.gs-hw-step {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  opacity: 0.55;
}

.gs-hw-step:hover { opacity: 0.8; }

.gs-hw-step.is-on {
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.gs-hw-step:active { transform: scale(0.97); }

.gs-hw-step:focus-visible {
  outline: 2px solid #0071E3;
  outline-offset: 3px;
}

/* stand-in until the artwork is dropped in */
.gs-hw-shot.is-empty {
  position: relative;
  background-image: none !important;
  border: 1px dashed #3A3A3C;
}

.gs-hw-shot.is-empty::after {
  content: "assets/homework-ipad.jpg — upright, 3:4";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: #6E6E73;
}

@media (max-width: 1024px) {
  .gs-hw { max-width: 340px; }
  .gs-hw-shot { border-radius: 20px; }
}
