/* ============================================================
   WORK PAGE — work.css
   ============================================================ */

/* ─── Base page ─── */
body.no-loader {
  background: var(--bone);
}

body.no-loader .header {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
  background: var(--black) !important;
}


/* ─── Page wrapper ─── */
.wk-page {
  min-height: 100vh;
  position: relative;
  z-index: 1;
  background: var(--black);
}

/* ─── Page heading ─── */
.wk-heading-wrap {
  padding: clamp(100px, 14vw, 180px) clamp(24px, 5vw, 80px) clamp(20px, 3vw, 40px);
}

.wk-heading {
  font-family: var(--font-heading);
  font-size: clamp(5rem, 18vw, 24rem);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: -0.03em;
  color: var(--bone);
  margin: 0;
}

/* ─── 4-column grid ─── */
.wk-grid {
  padding: 0 clamp(24px, 5vw, 80px) clamp(80px, 10vw, 140px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 1.2vw, 18px);
}

/* ─── Card ─── */
.wk-card {
  align-self: start;
  cursor: pointer;
  transition: opacity 0.4s ease;
}

.wk-card--wide {
  grid-column: span 2;
}


/* ─── Card thumbnail ─── */
.wk-card-thumb {
  position: relative;
  width: 100%;
  display: block;
  overflow: hidden;
}

.wk-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Aspect ratio variants */
.wk-card-thumb--916 { aspect-ratio: 9 / 16; }
.wk-card-thumb--169 { aspect-ratio: 16 / 9; }
.wk-card-thumb--45  { aspect-ratio: 4 / 5;  }


/* iframe fills the container */
.wk-card-thumb iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
  display: block;
  pointer-events: none;
}

/* ─── Card info ─── */
.wk-card-info {
  /* .wk-card-thumb is positioned, so it paints in a later stage than a
     static sibling and its 1.06 hover scale — which grows the box
     visually without affecting layout — spills over this name. Matching
     position here puts both in the same stage, where DOM order applies. */
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: clamp(10px, 1vw, 18px);
  padding: clamp(8px, 0.7vw, 11px) 0 0;
  font-family: var(--font-mono);
  font-size: clamp(10px, 0.85vw, 13px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(238, 219, 193, 0.6);
}

.wk-card-name { font-weight: 500; }

/* ─── Fullscreen expand overlay ─── */
.wk-expand {
  position: fixed;
  inset: 0;
  z-index: 400;
  visibility: hidden;
  pointer-events: none;
  background: var(--black);
  clip-path: inset(50% 50% 50% 50%);
  cursor: pointer;
}

.wk-expand video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  pointer-events: auto;
  object-fit: contain;
  background: var(--black);
}

.wk-expand-close {
  position: absolute;
  top: clamp(20px, 3vw, 40px);
  right: clamp(20px, 3vw, 48px);
  z-index: 20;
  width: clamp(48px, 4.5vw, 68px);
  height: clamp(48px, 4.5vw, 68px);
  border-radius: 50%;
  background: rgba(238, 219, 193, 0.08);
  border: 1px solid rgba(238, 219, 193, 0.3);
  color: var(--bone);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.wk-expand-close svg {
  width: 40%;
  height: 40%;
}

.wk-expand-close:hover {
  background: rgba(238, 219, 193, 0.18);
  border-color: rgba(238, 219, 193, 0.75);
  transform: scale(1.08) rotate(90deg);
}

.wk-expand-meta {
  position: absolute;
  bottom: clamp(28px, 4vw, 56px);
  left: clamp(24px, 4vw, 64px);
  z-index: 10;
  pointer-events: none;
}

.wk-expand-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(9px, 0.7vw, 11px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(238, 219, 193, 0.5);
  margin-bottom: 0.4em;
}

.wk-expand-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 9rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--bone);
  margin: 0;
  /* honours the newline in data-expand-title without needing innerHTML */
  white-space: pre-line;
}

/* ─── Footer overrides for bone page ─── */

/* ─── Responsive ─── */
@media (min-width: 901px) and (max-width: 1200px) {
  .wk-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-flow: dense;
  }
  .wk-card--wide { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .wk-grid { grid-template-columns: repeat(2, 1fr); }
  .wk-card--wide { grid-column: span 2; }
}

@media (max-width: 640px) {
  .wk-grid { grid-template-columns: repeat(2, 1fr); }
  .wk-heading-wrap { padding-top: 120px; }
  .wk-heading { font-size: clamp(3rem, 18vw, 6rem); }
}

@media (max-width: 400px) {
  .wk-heading { font-size: clamp(2.8rem, 16vw, 4rem); }
}
