/*
  Watch feed layout. Loaded only on the Watch page.

  Desktop: the headline and actions to the left of a centered 9:16 stage,
  the Sound and step buttons to the right. Phone: the stage runs edge to
  edge, with the text under it. The page scrolls normally; the step buttons
  bring the next clip to the top of the window.
*/

@layer pages {

  .watch-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 40px 0 20px;
    border-bottom: var(--line-thick);
  }
  .watch-head .mast { font-size: 60px; }
  .watch-head .intro { font-style: italic; font-size: 20px; color: var(--ink-2); max-width: 720px; }

  .clip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 40px;
    padding: 28px 0;
    border-bottom: var(--line);
  }

  .clip-info {
    align-self: end;
    justify-self: end;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 460px;
    text-align: right;
  }
  .clip-title { font-size: var(--fs-h3); }
  .clip-caption { font-size: var(--fs-small); color: var(--ink-2); }
  .clip-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 16px; padding-top: 4px; }

  .clip-stage {
    position: relative;
    height: min(82svh, 860px);
    aspect-ratio: 9 / 16;
    background: var(--ink);
  }
  .clip-video { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
  /* A paused clip shows a paper play square, like the home band cards. */
  .clip-paused {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 64px;
    height: 64px;
    margin: -32px 0 0 -32px;
    background: var(--paper);
    pointer-events: none;
  }
  .clip-paused::before {
    content: "";
    position: absolute;
    left: 24px;
    top: 18px;
    border-left: 22px solid var(--ink);
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
  }
  .clip.is-armed.is-paused .clip-paused { display: block; }

  .clip-tools {
    align-self: end;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: var(--line);
    justify-self: start;
  }
  .clip-tools[hidden] { display: none; }
  .clip-tools button {
    width: 100%;
    padding: 10px 14px;
    border-top: var(--line);
    font-family: var(--mono);
    font-size: var(--fs-label);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: left;
  }
  .clip-tools button:first-child { border-top: 0; }
  .clip-tools button:hover { background: var(--ink); color: var(--paper); }
  .clip-sound[aria-pressed="true"] { background: var(--red); color: var(--white); }

  .clip-more { display: block; padding: 24px 0; text-align: center; }

  @media (max-width: 1100px) {
    .clip { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "stage info" "stage tools"; gap: 16px 32px; }
    .clip-stage { grid-area: stage; height: min(78svh, 760px); }
    .clip-info { grid-area: info; justify-self: start; text-align: left; }
    .clip-actions { justify-content: flex-start; }
    .clip-tools { grid-area: tools; align-self: start; flex-direction: row; }
    .clip-tools button { width: auto; border-top: 0; border-left: var(--line); }
    .clip-tools button:first-child { border-left: 0; }
  }

  @media (max-width: 720px) {
    .watch-head { padding: 24px 0 14px; }
    .watch-head .mast { font-size: 36px; }
    .watch-head .intro { font-size: 17px; }
    .clip {
      grid-template-columns: minmax(0, 1fr);
      grid-template-areas: "stage" "tools" "info";
      gap: 12px;
      padding: 0 0 24px;
    }
    .clip-stage {
      height: auto;
      width: calc(100% + 2 * var(--pad));
      max-height: 86svh;
      margin-inline: calc(-1 * var(--pad));
    }
    .clip-title { font-size: 24px; }
  }
}
