/* =====================================================================
   YLP Studio — OUR PORTFOLIO page components (portfolio.html)
   Relies on tokens.css + styles.css for the shared design system
   (header, footer, buttons, type, .wrap/.section*). Only the gallery-
   specific components live here.
   ===================================================================== */

/* hero */
.pf-head { padding: var(--s-5) 0 var(--s-6); }
.backlink { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: var(--w-bold);
  font-size: 15px; text-decoration: none; border-bottom: 2px solid var(--ink); padding-bottom: 1px; margin-bottom: var(--s-4); }
.backlink:hover { box-shadow: inset 0 -8px 0 var(--volt); }
.pf-head h1 { font-size: var(--t-display); font-weight: var(--w-black); line-height: 1.02; letter-spacing: -.035em; margin: 0; }
.pf-head .subhead { margin-top: var(--s-2); }

/* gallery — one block per set. LEFT = number + name + thumbnail stack (4-then-3);
   RIGHT = big hero image with prev/next arrows. 42.5/57.5 split. */
.gallery { padding-bottom: var(--s-7); }
.gal { display: grid; grid-template-columns: 42.5fr 57.5fr; gap: var(--s-4); align-items: start; }
.gal + .gal { margin-top: var(--s-6); border-top: 1px solid var(--hairline); padding-top: var(--s-6); }
.gal__stage { min-width: 0; }
.gal__main { width: 100%; border: 1px solid var(--hairline); background: var(--paper);
  position: relative; aspect-ratio: 1 / 1; overflow: hidden; }
.gal__main img { width: 100%; height: 100%; object-fit: cover; }
.gal__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--ink); background: rgba(255, 255, 255, .92); color: var(--ink); cursor: pointer;
  font-size: 22px; font-weight: var(--w-black); line-height: 1; display: flex; align-items: center; justify-content: center;
  z-index: 3; transition: background var(--motion) var(--ease), transform 90ms var(--ease); }
.gal__nav:hover { background: var(--volt); }
.gal__nav:active { transform: translateY(-50%) scale(.88); }
.gal__prev { left: 10px; }
.gal__next { right: 10px; }
.gal__hint { text-align: left; margin: var(--s-3) 0 var(--s-2); }
.gal__hint span { display: inline-block; font-size: 12px; font-weight: var(--w-bold); color: var(--ink);
  letter-spacing: .01em; box-shadow: inset 0 -.35em 0 var(--volt); padding: 1px 3px; }
.gal__strip { margin-top: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.gal__th { position: relative; aspect-ratio: 1 / 1; padding: 0; border: 1px solid var(--hairline); background: var(--paper);
  cursor: pointer; overflow: hidden; transition: border-color var(--motion) var(--ease); }
.gal__th img { width: 100%; height: 100%; object-fit: cover; }
.gal__th.is-active { outline: 2px solid var(--ink); outline-offset: -2px; border-color: var(--ink); }
.gal__th:hover { border-color: var(--ink); }
.gal__info { align-self: start; }
.gal__head { display: flex; align-items: center; gap: 14px; }
.numbox { display: inline-block; background: var(--volt); color: var(--ink); font-weight: var(--w-black);
  letter-spacing: -.03em; line-height: 1; padding: .06em .16em; border-radius: var(--r);
  font-size: clamp(28px, 3.4vw, 40px); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.gal__name { font-size: clamp(18px, 2.1vw, 22px); font-weight: var(--w-black); line-height: 1.14; letter-spacing: -.03em; margin: 0; }
.gal__name .bl, .gal__name .pl { display: block; }

/* back-to-top square (footer, top-right) */
.foot-toptop { display: flex; justify-content: flex-end; margin-bottom: var(--s-3); }
.to-top { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  background: var(--volt); color: var(--ink); border: 0; border-radius: var(--r); text-decoration: none;
  font-size: 22px; font-weight: var(--w-black); line-height: 1; cursor: pointer;
  transition: background var(--motion) var(--ease), transform 90ms var(--ease); }
.to-top:hover { background: var(--volt-hover); }
.to-top:active { transform: scale(.9); }

/* phone: stack, image on top */
@media (max-width: 700px) {
  .gal { grid-template-columns: 1fr; gap: var(--s-3); }
  .gal__stage { order: -1; }
}
