/* assets/css/videos.css
 * The Videos page (commit 1202).
 *
 * One player at the top and the library under it. The videos themselves are
 * the artwork: forest green frames with the product inside, so the page
 * around them stays quiet - the brand band for the head, white below, and
 * the same ink-edged, hard-shadowed blocks the buttons and the home page's
 * product cards use, so a video card reads as part of the same site.
 */

/* ---- Head ------------------------------------------------------------- */

.watch-head {
  padding: 58px 0 96px;
  background: var(--band);
  text-align: center;
}

.watch-head__inner {
  max-width: 760px;
  margin-inline: auto;
}

.watch-head__title {
  margin-top: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  --hard-shadow-offset: 3px;
  font-size: var(--hero);
  line-height: var(--hero-lh);
}

.watch-head__lead {
  margin-top: 16px;
  font-size: var(--lead);
  line-height: 28px;
  color: var(--ink-soft);
}

/* ---- Player ------------------------------------------------------------
 * Pulled up over the band, so the video is the first thing under the
 * headline rather than a scroll away from it.
 */

.watch-main {
  margin-top: -64px;
  padding: 0;
}

.watch-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 0;
  border: 1px solid var(--forest);
  border-radius: var(--radius);
  background: var(--forest);
  box-shadow: 6px 6px 0 var(--hard-shadow);
  overflow: hidden;
}

.watch-stage[hidden] { display: none; }

.watch-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--verde-900);
}

.watch-player video {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--verde-900);
}

.watch-now {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 26px 24px;
  color: var(--white);
  overflow-y: auto;
}

.watch-now__kind {
  font-family: var(--font-accent);
  font-size: 19px;
  line-height: 1.2;
  color: var(--accent);
}

.watch-now__title {
  margin-top: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--h6);
  line-height: var(--h6-lh);
  color: var(--white);
}

.watch-now__sub {
  margin-top: 6px;
  font-size: var(--body);
  line-height: 22px;
  color: var(--verde-100);
}

.watch-now__len {
  margin-top: 10px;
  font-family: var(--font-data);
  font-size: var(--small);
  color: var(--accent);
}

/* Chapters: each one jumps the video to where it starts. The one playing
   is marked as the video runs. */
.watch-chapters {
  margin: 18px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid rgba(216, 242, 226, 0.16);
  list-style: none;
}

.watch-chapters button {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--verde-100);
  font-family: var(--font-body);
  font-size: var(--small);
  line-height: 18px;
  text-align: left;
  cursor: pointer;
}

.watch-chapters button:hover { background: rgba(216, 242, 226, 0.08); color: var(--white); }

.watch-chapters button[aria-current="true"] {
  background: rgba(166, 232, 196, 0.14);
  color: var(--white);
}

.watch-chapters time {
  font-family: var(--font-data);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* ---- Nothing published yet --------------------------------------------- */

.watch-empty {
  max-width: 640px;
  margin-inline: auto;
  padding: 40px 34px;
  border: 1px solid var(--forest);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 6px 6px 0 var(--hard-shadow);
  text-align: center;
}

.watch-empty[hidden] { display: none; }

.watch-empty h2 {
  font-size: var(--h6);
  line-height: var(--h6-lh);
}

.watch-empty p {
  margin: 10px 0 22px;
  color: var(--ink-soft);
  line-height: 24px;
}

/* ---- Library ------------------------------------------------------------ */

.watch-lib {
  padding: 72px 0 24px;
}

/* 1208: one heading and one grid (see videos.js). */
.watch-lib__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.watch-lib__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--h5);
  line-height: var(--h5-lh);
}

.watch-chips { display: flex; gap: 8px; flex-wrap: wrap; }

.watch-chip {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--forest);
  border-radius: var(--radius-btn);
  background: var(--card);
  color: var(--forest);
  font-family: var(--font-body);
  font-size: var(--small);
  cursor: pointer;
}

.watch-chip:hover { background: var(--verde-50); }
.watch-chip[aria-pressed="true"] { background: var(--band); }

.watch-grid {
  display: grid;
  /* Three across, whatever the count: one or two videos sit at a card's
     width from the left edge, like the start of a full row. */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.watch-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 1px solid var(--forest);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.watch-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--hard-shadow);
}

.watch-card[aria-current="true"] {
  box-shadow: 5px 5px 0 var(--hard-shadow);
}

.watch-card__frame {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--forest);
}

.watch-card__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The play mark: a circle in the band green, the triangle in ink. */
.watch-card__play {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--forest);
  border-radius: 50%;
  background: var(--band);
}

.watch-card__play::before {
  content: "";
  margin-left: 3px;
  border-left: 13px solid var(--forest);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}

.watch-card__len {
  position: absolute;
  right: 12px;
  bottom: 14px;
  padding: 3px 8px;
  border-radius: var(--radius-btn);
  background: rgba(5, 52, 36, 0.86);
  color: var(--white);
  font-family: var(--font-data);
  font-size: var(--small);
  font-variant-numeric: tabular-nums;
}

/* Which shelf it is from, on the frame; the Now playing tag replaces it. */
.watch-card__kind {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 3px 9px;
  border-radius: var(--radius-btn);
  background: rgba(5, 52, 36, 0.86);
  color: var(--verde-100);
  font-size: var(--small);
}

.watch-card__kind[hidden] { display: none; }

.watch-card__playing {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 3px 9px;
  border-radius: var(--radius-btn);
  background: var(--band);
  color: var(--forest);
  font-size: var(--small);
}

.watch-card__body {
  display: block;
  padding: 18px 20px 22px;
}

.watch-card__title {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 20px;
  line-height: 26px;
}

.watch-card__sub {
  display: block;
  margin-top: 6px;
  font-size: var(--body);
  line-height: 22px;
  color: var(--ink-soft);
}

/* ---- Close -------------------------------------------------------------- */

.watch-cta {
  padding: 64px 0 96px;
}

.watch-cta__box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: center;
  padding: 34px 40px;
  border-radius: var(--radius);
  background: var(--forest);
  color: var(--white);
}

.watch-cta__title {
  font-size: var(--h5);
  line-height: var(--h5-lh);
  color: var(--white);
}

.watch-cta__body {
  margin-top: 8px;
  font-size: var(--lead);
  line-height: 26px;
  color: var(--verde-100);
}

/* ---- Narrow screens ----------------------------------------------------- */

@media (max-width: 960px) {
  .watch-stage { grid-template-columns: 1fr; }
  .watch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .watch-now { max-height: none; }
}

@media (max-width: 640px) {
  .watch-head { padding: 40px 0 80px; }
  .watch-lib { padding-top: 52px; }
  .watch-lib__head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .watch-grid { grid-template-columns: 1fr; }
  .watch-cta__box { grid-template-columns: 1fr; padding: 28px 24px; }
}

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