/* ─── Project-page template CSS ───────────────────────────────────────
   Consolidated from what used to be a copy-pasted inline <style> block on
   every single project page (12 pages, drifting slightly each time one
   was copied as a starting point for the next). One canonical copy now:
   change it once, every project page picks it up. */

.project-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 58px;
}

/* Cover: full width, 3:2 */
.pv-cover {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #d3d3d3;
  margin: 0;
  position: relative;
}
.pv-cover img,
.pv-cover .vp-bare {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
}
.pv-cover .vp-bare {
  position: absolute;
  inset: 0;
}

/* Photo pair: two equal 3:4 columns */
.pv-pair {
  display: flex;
  gap: 16px;
}
.pv-pair__photo {
  position: relative;
  flex: 1;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #d3d3d3;
  margin: 0;
}
.pv-pair__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Wide photo: full width, 3:2 */
.pv-wide {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #d3d3d3;
  margin: 0;
  position: relative;
}
.pv-wide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Info rows (About / Challenge / Solution): label left column, text right column */
.pv-info {
  width: 100%;
  margin-top: -8px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.pv-row--about {
  margin-top: -8px;
}

.pv-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.pv-row__label {
  flex: 1;
  margin: 0;
  line-height: 1.2;
}

.pv-row__content {
  flex: 1;
  margin: 0;
  line-height: 1.2;
}

.pv-solution-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pv-divider {
  width: 100%;
  height: 2px;
  background: var(--text);
}

.pv-solution {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.pv-solution__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pv-solution__body > p {
  margin: 0;
  line-height: 1.2;
}

.pv-icon {
  margin: 0;
  line-height: 0;
  display: block;
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.pv-icon img {
  display: block;
  height: 103px;
  width: auto;
  transition: transform 450ms cubic-bezier(0.16, 1, 0.3, 1);
}
.pv-icon:hover img {
  transform: rotate(-10deg);
}

.mobile-project__icon {
  cursor: pointer;
}

.pv-actions {
  display: flex;
  gap: 16px;
}

.pv-action {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.pv-action__bar {
  height: 4px;
  background: var(--text);
  flex-shrink: 0;
}

.pv-action__btn {
  display: block;
  padding: 0;
  background: none;
  border: 0;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.4px;
  color: inherit;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease;
  white-space: nowrap;
}

.pv-action:hover {
  background: #000;
}
.pv-action:hover .pv-action__bar {
  background: #000;
}
.pv-action:hover .pv-action__btn {
  color: #fff;
}

/* Bare video: silent, looping, autoplay-on-scroll, no player chrome. */
.vp-bare {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
}
.pv-pair__photo .vp-bare {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  object-fit: cover;
  margin: 0;
}

/* ─── Video player (custom controls) ─── */
:root {
  --vp-line: rgba(255, 255, 255, 0.2);
  --vp-buffered: rgba(255, 255, 255, 0.5);
  --vp-fill: #ffffff;
  --vp-control: #ffffff;
  --vp-gap: 16px;
  --vp-inset: 26px;
  --vp-thickness: 2px;
  --vp-hit: 24px;
}

.vp {
  position: relative;
  width: 100%;
  background: #000;
  overflow: hidden;
  user-select: none;
  margin: 0;
}

.vp__video {
  display: block;
  width: 100%;
  height: auto;
  margin: -2px 0;
}

.vp--paired {
  position: absolute;
  inset: 0;
}
.vp--paired .vp__video {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  object-fit: cover;
  margin: 0;
}

.vp__hit {
  position: absolute;
  inset: 0;
  cursor: pointer;
  z-index: 1;
}

.vp::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent 110px),
    linear-gradient(to left, rgba(0, 0, 0, 0.35), transparent 130px);
  transition: opacity 0.3s ease;
}
.vp.is-idle::before {
  opacity: 0;
}

.vp--paired::before {
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent 70px),
    linear-gradient(to left, rgba(0, 0, 0, 0.35), transparent 70px);
}

.vp__big {
  position: absolute;
  top: calc(50% - var(--vp-inset) / 2);
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 45px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--vp-control);
  transition: opacity 0.2s ease;
}
.vp__big svg { width: 100%; height: 100%; display: block; }
.vp[data-state="playing"] .vp__big { opacity: 0; pointer-events: none; }

.vp__mute {
  position: absolute;
  top: var(--vp-gap);
  right: var(--vp-gap);
  z-index: 3;
  width: 22px;
  height: 22px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--vp-control);
}
.vp__mute svg { width: 100%; height: 100%; display: block; }
.vp__mute .icon-on { display: none; }
.vp__mute .icon-off { display: block; }
.vp:not([data-muted="true"]) .vp__mute .icon-on { display: block; }
.vp:not([data-muted="true"]) .vp__mute .icon-off { display: none; }

.vp-slider {
  position: absolute;
  z-index: 3;
  cursor: pointer;
  touch-action: none;
}
.vp-slider__track {
  position: absolute;
  background: var(--vp-line);
}
.vp-slider__buffered {
  position: absolute;
  background: var(--vp-buffered);
}
.vp-slider__fill {
  position: absolute;
  background: var(--vp-fill);
}
.vp-slider__head {
  position: absolute;
  background: var(--vp-fill);
  opacity: 0;
  transition: opacity 0.12s ease;
}
.vp-slider.is-dragging .vp-slider__head {
  opacity: 1;
}
/* While the user is actively dragging a slider, thicken the track lines
   slightly (2px → 3px) for tactile feedback--the transition on the
   individual elements picks it up automatically since they all use
   var(--vp-thickness). Override on the element rather than :root so it
   scopes correctly to the active slider only. */
.vp-slider--x.is-dragging .vp-slider__track,
.vp-slider--x.is-dragging .vp-slider__buffered,
.vp-slider--x.is-dragging .vp-slider__fill {
  height: 3px;
  transition: height 0.12s ease;
}
.vp-slider--y.is-dragging .vp-slider__track,
.vp-slider--y.is-dragging .vp-slider__fill {
  width: 3px;
  transition: width 0.12s ease;
}
.vp-slider--x .vp-slider__track,
.vp-slider--x .vp-slider__buffered,
.vp-slider--x .vp-slider__fill {
  transition: height 0.12s ease;
}
.vp-slider--y .vp-slider__track,
.vp-slider--y .vp-slider__fill {
  transition: width 0.12s ease;
}
.vp-slider--x .vp-slider__head {
  top: 50%;
  left: 0%;
  width: 2px;
  height: 12px;
  transform: translate(-50%, -50%);
}
.vp-slider--y .vp-slider__head {
  right: 0;
  bottom: 0%;
  width: 12px;
  height: 2px;
  transform: translate(50%, 50%);
}

.vp-slider--x {
  left: 48px;
  right: var(--vp-inset);
  bottom: calc(var(--vp-inset) - var(--vp-hit) / 2);
  height: var(--vp-hit);
}
.vp-slider--x .vp-slider__track {
  left: 0; right: 0;
  top: 50%;
  height: var(--vp-thickness);
  transform: translateY(-50%);
}
.vp-slider--x .vp-slider__buffered {
  left: 0;
  top: 50%;
  height: var(--vp-thickness);
  transform: translateY(-50%);
  width: 0%;
  /* Buffered only ever grows/shrinks in whole download chunks, so a step
     change reads better than the fill's own instant snap-to-seek--smooths
     it into something that looks like it's actively loading. */
  transition: width 0.2s ease;
}
.vp-slider--x .vp-slider__fill {
  left: 0;
  top: 50%;
  height: var(--vp-thickness);
  transform: translateY(-50%);
  width: 0%;
}

.vp-slider--y {
  top: 47px;
  bottom: 54px;
  right: var(--vp-inset);
  width: var(--vp-hit);
}
.vp-slider--y .vp-slider__track {
  top: 0; bottom: 0;
  right: 0;
  width: var(--vp-thickness);
}
.vp-slider--y .vp-slider__fill {
  bottom: 0;
  right: 0;
  width: var(--vp-thickness);
  height: 70%;
}

.vp__play {
  position: absolute;
  left: var(--vp-gap);
  bottom: var(--vp-gap);
  z-index: 3;
  width: 22px;
  height: 22px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--vp-control);
}
.vp__play svg { width: 100%; height: 100%; display: block; }
.vp__play .icon-pause { display: none; }
.vp[data-state="playing"] .vp__play .icon-play { display: none; }
.vp[data-state="playing"] .vp__play .icon-pause { display: block; }

.vp__mute,
.vp-slider,
.vp__play {
  transition: opacity 0.3s ease;
}
.vp.is-idle .vp__mute,
.vp.is-idle .vp-slider,
.vp.is-idle .vp__play {
  opacity: 0;
  pointer-events: none;
}
.vp--click-reveal.is-idle .vp__big {
  opacity: 0;
  pointer-events: none;
}
.vp.is-idle { cursor: none; }
/* Click-to-reveal (home reel): the video itself is the affordance, so the
   pointer must stay visible while controls are hidden. */
.vp--click-reveal.is-idle { cursor: pointer; }

/* Info-note: tap/click button + sliding caption bar. */
.info-note {
  position: relative;
  overflow: hidden;
}
.info-note__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: stretch;
  height: 20px;
  font-family: 'Inter', sans-serif;
}
.info-note__toggle {
  position: relative;
  flex: 0 0 auto;
  width: 32px;
  height: 20px;
  background: #171717;
  color: #fff;
  border: 0;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1;
  overflow: hidden;
}
.info-note__toggle::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 47%, rgba(255, 255, 255, 0.9) 50%, transparent 53%);
  transform: translateX(-120%);
  pointer-events: none;
}
@media (hover: hover) {
  .info-note__toggle:hover::after {
    animation: info-note-sheen 0.45s ease-in;
  }
}
@keyframes info-note-sheen {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}
.info-note__toggle::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 48px;
  height: 48px;
  transform: translate(-50%, -50%);
}
.info-note__panel {
  flex: 1 1 auto;
  min-width: 0;
  background: #171717;
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 2px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.info-note.is-note-open .info-note__panel {
  opacity: 1;
  pointer-events: auto;
}
.info-note__text {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: -0.2px;
  line-height: 1.2;
}

@media (max-width: 640px) {
  .info-note__icon,
  .info-note__text {
    font-size: 0.75rem;
  }
}

/* Cursor-follow caption (valera, CLAUDE.md's vp-tipslot pattern). Each
   line is its own black rectangle, stacked flush (no shared background);
   shown to the lower-right of the cursor after it rests ~1s over a
   tagged slide. One shared element, teleported to <body> by whichever
   GallerySlot currently owns it--see GallerySlot.vue. */
.vp-tip {
  position: fixed;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.vp-tip span {
  display: block;
  background: #000;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1.25;
  letter-spacing: -0.2px;
  padding: 4px 5px;
  white-space: nowrap;
}
.vp-tip span + span {
  margin-top: -6px;
}
.vp-tip.is-visible {
  opacity: 1;
}
