/* ROUND 15, STEP 4 · a graphic work opens in place (gv.js), and the sign on the open line that it does.
   Flat ground, no glass, no shadow, no thin rule. The large picture is placed by gv.js on a spring. */

/* ---------- the sign on the open line of the list ---------- */
/* A bone pill on the picture: a plus (the page's sign for "this opens") and how many pictures the work has. */
.b7-open {
  position: absolute; left: 0.6rem; bottom: 0.6rem; display: inline-flex; align-items: center; gap: 0.45rem;
  height: 34px; padding: 0 0.85rem 0 0.7rem; border-radius: 99px; background: var(--bone); color: var(--ink);
  font-weight: 600; font-size: 0.9375rem; line-height: 1; letter-spacing: -0.01em; white-space: nowrap;
  opacity: 0; pointer-events: none; will-change: opacity;
}
.b7-open i { position: relative; flex: none; display: block; width: 11px; height: 11px; }
.b7-open i::before, .b7-open i::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; border-radius: 2px; background: var(--ink); }
.b7-open i::after { transform: rotate(90deg); }
/* Under the pointer the picture comes a little nearer. */
.b7-sheet { transform-origin: 0 50%; transition: transform 0.35s var(--ease); }
@media (hover: hover) and (pointer: fine) { .b7-row:hover .b7-sheet { transform: scale(1.025); } }

/* ---------- the large view ---------- */
.gv { position: fixed; inset: 0; z-index: 70; background: var(--void); color: var(--bone); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; opacity: 0; transition: opacity 0.22s linear; }
.gv[hidden] { display: none; }
.gv.is-open { opacity: 1; }
.gv-in { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.8fr); column-gap: clamp(2rem, 4.4vw, 5.5rem); align-items: stretch; min-height: 100%; padding: 76px var(--gut) clamp(1.6rem, 4vh, 2.6rem); }
.gv-fig { position: relative; margin: 0 64px; min-width: 0; height: calc(100vh - 76px - clamp(1.6rem, 4vh, 2.6rem)); height: calc(100svh - 76px - clamp(1.6rem, 4vh, 2.6rem)); }
.gv-pic { position: absolute; left: 0; top: 0; display: block; overflow: hidden; cursor: pointer; touch-action: pan-y; will-change: left, top, width, height; }
.gv-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }
.gv-b { opacity: 0; transition: opacity 0.22s linear; }

.gv-side { align-self: center; min-width: 0; padding-bottom: 1rem; opacity: 0; transform: translate3d(0, 18px, 0); transition: opacity 0.3s linear 0.12s, transform 0.5s var(--ease) 0.12s; }
.gv.is-open .gv-side { opacity: 1; transform: none; }
.gv-name { font-weight: 800; text-transform: lowercase; font-size: clamp(2.2rem, 3.5vw, 4.6rem); line-height: 0.96; letter-spacing: -0.048em; text-wrap: balance; }
.gv-w { display: inline-block; }
.gv.is-open .gv-w { animation: gv-focus 0.62s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
@keyframes gv-focus { from { opacity: 0; filter: blur(12px); } to { opacity: 1; filter: blur(0); } }
.gv-facts { margin-top: 0.9rem; font-size: clamp(1.0625rem, 1.2vw, 1.3rem); line-height: 1.32; color: var(--bone-dim); }
.gv-desc { margin-top: clamp(1.1rem, 2.8vh, 1.8rem); max-width: 34em; font-size: clamp(1.0625rem, 1.25vw, 1.4rem); line-height: 1.42; }
.gv-cap { margin-top: clamp(1.4rem, 3.6vh, 2.4rem); min-height: 1.4em; display: flex; gap: 0.9rem; font-size: clamp(1.0625rem, 1.2vw, 1.3rem); line-height: 1.32; }
.gv-count { flex: none; color: var(--bone-dim); font-variant-numeric: tabular-nums; }
.gv-count:empty { display: none; }
.gv-thumbs { margin-top: 0.9rem; display: flex; flex-wrap: wrap; gap: 8px; }
.gv-thumbs:empty { display: none; }
.gv-thumb { position: relative; flex: none; width: 76px; height: 56px; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: none; cursor: pointer; opacity: 0.42; transition: opacity 0.2s linear, transform 0.25s var(--ease); }
.gv-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.gv-thumb:hover { opacity: 0.8; }
.gv-thumb[aria-pressed="true"] { opacity: 1; transform: scale(1.06); }
.gv-thumb:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; opacity: 1; }

.gv-close { position: fixed; z-index: 2; top: 14px; right: var(--gut); min-height: 48px; padding: 0 1.4rem; border: 0; border-radius: 99px; background: var(--bone); color: var(--ink); font-family: inherit; font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.02em; cursor: pointer; transition: transform 0.2s var(--ease); }
.gv-close:hover { transform: scale(1.05); }
.gv-close:active { transform: scale(0.97); }
.gv-close:focus-visible { outline: 2px solid var(--bone); outline-offset: 4px; }

/* A flat band behind the buttons at the top: when the view scrolls (a phone, a short window), the picture
   and the words pass under it and not under the buttons. */
.gv-in::before { content: ''; position: fixed; z-index: 1; left: 0; right: 0; top: 0; height: 74px; background: var(--void); }

/* The arrows: next and previous picture. Bone discs beside the picture, never on it; they keep their place
   when a picture has another shape. The arrow itself does not move (Rodion: no animated arrow). */
.gv-arrow { position: absolute; top: 50%; margin-top: -24px; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; background: var(--bone); cursor: pointer; transition: transform 0.2s var(--ease); }
.gv-arrow[hidden] { display: none; }
.gv-prev { left: -62px; }
.gv-next { right: -62px; }
.gv-arrow .gv-ar { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -8px; }
.gv-prev .gv-ar { margin-left: -4px; transform: scaleX(-1); }
.gv-arrow .gv-ar::before, .gv-arrow .gv-ar::after { content: ''; position: absolute; right: 0; top: 50%; width: 11px; height: 2.5px; margin-top: -1.25px; border-radius: 2px; background: var(--ink); transform-origin: 100% 50%; }
.gv-arrow .gv-ar::before { transform: rotate(45deg); }
.gv-arrow .gv-ar::after { transform: rotate(-45deg); }
.gv-arrow:hover { transform: scale(1.06); }
.gv-arrow:active { transform: scale(0.95); }
.gv-arrow:focus-visible { outline: 2px solid var(--bone); outline-offset: 4px; }

/* From work to work. Quiet pills: one tone step from the ground. */
.gv-works { margin-top: clamp(1.6rem, 4.4vh, 2.8rem); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 1.0625rem; }
.gv-works[hidden] { display: none; }
.gv-wcount { flex: 1 0 100%; margin-bottom: 0.25rem; color: var(--bone-dim); font-variant-numeric: tabular-nums; }
.gv-wbtn { min-height: 46px; padding: 0 1.15rem; border: 0; border-radius: 99px; background: #1d1c1a; color: var(--bone); font-family: inherit; font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.015em; cursor: pointer; transition: background-color 0.2s linear, color 0.2s linear; }
.gv-wbtn:hover { background: var(--bone); color: var(--ink); }
.gv-wbtn:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; }

/* ---------- a narrow window: the picture, then the words ---------- */
@media (max-width: 899.98px) {
  .gv-in { display: block; padding: 78px var(--gut) 2.4rem; }
  .gv-fig { height: 50vh; margin: 0; }
  /* The arrows stand at the top left, opposite the Close button: the picture under them changes its height. */
  .gv-arrow { position: fixed; z-index: 2; top: 14px; margin-top: 0; }
  .gv-prev { left: var(--gut); }
  .gv-next { left: calc(var(--gut) + 56px); right: auto; }
  .gv-works { order: 6; }
  .gv-side { padding-top: 1.1rem; }
  .gv-name { font-size: clamp(2rem, 9.4vw, 3.4rem); }
  .gv-cap { margin-top: 0; padding-bottom: 0.2rem; }
  .gv-side { display: flex; flex-direction: column; }
  .gv-cap { order: 1; } .gv-thumbs { order: 2; margin-top: 0.7rem; } .gv-name { order: 3; margin-top: 1.6rem; } .gv-facts { order: 4; } .gv-desc { order: 5; max-width: none; }
  .gv-thumb { width: 64px; height: 48px; }
}
