/* unwd.net — video gallery + player
   Ink #0D0D0D · paper #EBE6DC · signal #E6431D. No serif.
   Same palette hooks as profile-splash.css; override freely from the canvas. */

:root {
  --unwd-ink:    #0D0D0D;
  --unwd-paper:  #EBE6DC;
  --unwd-signal: #E6431D;
  --unwd-panel:  #131313;
  --unwd-rule:   rgba(235, 230, 220, .16);
  --unwd-quiet:  rgba(235, 230, 220, .56);
  --unwd-font:   var(--font-sans, "Archivo", "Helvetica Neue", Helvetica, sans-serif);
}

html.unwd-video-open, html.unwd-video-open body { overflow: hidden; }

/* ------------------------------------------------------------------- grid */
.unwd-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: clamp(16px, 2.4vw, 32px);
  font-family: var(--unwd-font);
}

.unwd-video-empty {
  font-family: var(--unwd-font);
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em;
  color: var(--unwd-quiet);
}

/* ------------------------------------------------------------------- card */
.unwd-video-card {
  display: flex; flex-direction: column;
  appearance: none; background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: inherit; text-align: left; text-decoration: none;
  cursor: pointer;
}
.unwd-video-card:focus-visible {
  outline: 2px solid var(--unwd-signal);
  outline-offset: 4px;
}

.unwd-video-card__frame {
  position: relative; display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0A0A0A;
}
.unwd-video-card__img {
  display: block; width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1), filter .3s;
}
.unwd-video-card__img--empty {
  background: repeating-linear-gradient(
    135deg, #141414 0 12px, #101010 12px 24px);
}
.unwd-video-card:hover .unwd-video-card__img,
.unwd-video-card:focus-visible .unwd-video-card__img { transform: scale(1.035); }

/* play / offsite cue */
.unwd-video-card__cue {
  position: absolute; left: 16px; bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  background: var(--unwd-signal); color: var(--unwd-ink);
  transition: transform .25s cubic-bezier(.2, .7, .2, 1);
}
.unwd-video-card:hover .unwd-video-card__cue { transform: scale(1.08); }
.unwd-video-card--offsite .unwd-video-card__cue {
  background: transparent; color: var(--unwd-paper);
  border: 1px solid var(--unwd-rule);
  width: 38px; height: 38px;
}

.unwd-video-card__duration,
.unwd-video-card__res {
  position: absolute; right: 12px;
  padding: .3em .6em;
  background: rgba(6, 6, 6, .78);
  color: var(--unwd-paper);
  font-size: .6rem; font-weight: 700;
  letter-spacing: .14em; font-variant-numeric: tabular-nums;
}
.unwd-video-card__duration { bottom: 12px; }
.unwd-video-card__res      { top: 12px; color: var(--unwd-signal); }

.unwd-video-card__body {
  display: flex; flex-direction: column; gap: .35rem;
  padding-top: 14px;
}
.unwd-video-card__title {
  font-size: clamp(.95rem, 1.4vw, 1.08rem);
  font-weight: 700; line-height: 1.25;
  color: currentColor;
}
.unwd-video-card:hover .unwd-video-card__title { color: var(--unwd-signal); }
.unwd-video-card__meta {
  display: flex; align-items: center; gap: .8em;
  font-size: .62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em;
  color: var(--unwd-quiet);
}
.unwd-video-card__flag {
  padding: .18em .5em;
  border: 1px solid var(--unwd-rule);
  letter-spacing: .14em;
}

/* ----------------------------------------------------------- inline single */
.unwd-video-inline { font-family: var(--unwd-font); }
.unwd-video-inline .unwd-video-player {
  display: block; width: 100%; height: auto;
  aspect-ratio: 16 / 9;
  background: #000;
}
.unwd-video-inline__caption {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin: .7rem 0 0;
  font-size: .62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em;
  color: var(--unwd-quiet);
}
.unwd-video-inline__title { color: var(--unwd-paper); }
.unwd-video-inline__dur   { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- overlay */
.unwd-video-overlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(0px, 3vw, 48px);
  background: rgba(6, 6, 6, .93);
  -webkit-backdrop-filter: blur(8px) saturate(.8);
          backdrop-filter: blur(8px) saturate(.8);
  overflow: hidden;
  font-family: var(--unwd-font);
}
.unwd-video-overlay[hidden] { display: none; }

.unwd-video-overlay__panel {
  display: flex; flex-direction: column;
  width: min(1120px, 100%); max-height: 100%;
  background: var(--unwd-panel);
  color: var(--unwd-paper);
  font-size: 16px; line-height: 1.5;
  box-shadow: 0 40px 120px rgba(0, 0, 0, .6);
  overflow: hidden;
}
.unwd-video-overlay__panel:focus { outline: none; }

.unwd-video-overlay__head {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 16px clamp(20px, 4vw, 40px);
  border-bottom: 1px solid var(--unwd-rule);
}
.unwd-video-overlay__title {
  margin: 0; font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .22em;
}
.unwd-video-overlay__title::before {
  content: ""; display: inline-block; width: 8px; height: 8px;
  margin-right: .8em; background: var(--unwd-signal);
}
.unwd-video-overlay__close {
  appearance: none; background: none; cursor: pointer;
  border: 1px solid var(--unwd-rule); padding: .45em .9em;
  font: inherit; font-size: .62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em; color: var(--unwd-quiet);
  transition: border-color .15s, color .15s;
}
.unwd-video-overlay__close:hover,
.unwd-video-overlay__close:focus-visible {
  color: var(--unwd-paper); border-color: var(--unwd-signal); outline: none;
}

.unwd-video-overlay__media { flex: 0 0 auto; background: #000; }
.unwd-video-player {
  display: block; width: 100%; height: auto;
  max-height: 62vh;
  background: #000;
}
.unwd-video-player__fallback { padding: 2rem; color: var(--unwd-quiet); }
.unwd-video-player__fallback a { color: var(--unwd-signal); }

.unwd-video-overlay__meta {
  flex: 1 1 auto; overflow-y: auto;
  padding: clamp(18px, 3vw, 32px) clamp(20px, 4vw, 40px) clamp(24px, 4vw, 40px);
  -webkit-overflow-scrolling: touch;
}
.unwd-video-overlay__facts {
  display: flex; flex-wrap: wrap; gap: .5em 1.4em;
  margin: 0 0 1.1rem;
  font-size: .62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em;
  color: var(--unwd-quiet);
}
.unwd-video-overlay__para {
  margin: 0 0 .9rem;
  font-size: .95rem; line-height: 1.65;
  color: rgba(235, 230, 220, .84);
  max-width: 68ch;
}
.unwd-video-overlay__credits { list-style: none; margin: 1.2rem 0 0; padding: 0; }
.unwd-video-overlay__credit {
  display: flex; gap: 1rem; padding: .45rem 0;
  border-top: 1px solid var(--unwd-rule);
  font-size: .8rem;
}
.unwd-video-overlay__credit-role {
  flex: 0 0 11rem;
  font-size: .6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .16em;
  color: var(--unwd-quiet);
  padding-top: .2em;
}
.unwd-video-overlay__tags {
  display: flex; flex-wrap: wrap; gap: .5em;
  list-style: none; margin: 1.4rem 0 0; padding: 0;
}
.unwd-video-overlay__tag {
  padding: .3em .7em;
  border: 1px solid var(--unwd-rule);
  font-size: .58rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--unwd-quiet);
}
.unwd-video-overlay__project {
  display: inline-block; margin-top: 1.6rem;
  color: var(--unwd-signal); text-decoration: none;
  font-size: .62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .18em;
  border-bottom: 1px solid currentColor; padding-bottom: .2em;
}

/* --------------------------------------------------------------- responsive */
@media (max-width: 640px) {
  .unwd-video-overlay { padding: 0; }
  .unwd-video-overlay__panel { width: 100%; height: 100%; max-height: 100%; }
  .unwd-video-player { max-height: 42vh; }
  .unwd-video-overlay__credit { flex-direction: column; gap: .15rem; }
  .unwd-video-overlay__credit-role { flex: none; }
}

@media (prefers-reduced-motion: reduce) {
  .unwd-video-card__img,
  .unwd-video-card__cue { transition: none; }
  .unwd-video-card:hover .unwd-video-card__img { transform: none; }
  .unwd-video-card:hover .unwd-video-card__cue { transform: none; }
}
