/* ============================================================
   REELS — Dr Singh's short explainers
   ============================================================

   Three 9:16 films on a cream band between the FAQ and the closing
   call to action.

   The tile is a hairline-framed plate, the same device the clinic
   tour uses, because these are the same practice photographed in the
   same way and should not arrive looking like a widget from
   elsewhere. Nothing here imitates Instagram's chrome: no rounded
   gradient ring, no heart, no card shadow. The only borrowed thing is
   the aspect ratio, which is the one part that is actually ours —
   the films were shot 9:16.

   THE GOLD LAW HOLDS HERE. --gold (#c89116) is 2.68:1 on cream and
   never sets text on it. Every gold-coloured word below is
   --gold-deep (#8a6206, 5.26:1). Gold appears on this band only as a
   rule, a frame or a fill behind white — never as type on light.
   ============================================================ */

.reels-head {
  align-items: flex-end;
  gap: var(--sp-5);
}

/* .section-mark ships styled for the Ink bands — gold-on-ink type over a
   translucent white rule. On cream both are wrong, so both are restated. */
.reels .section-mark {
  padding-top: 0;
  border-top: 0;
  color: var(--gold-deep);
}

.reels-handle {
  flex: none;
  white-space: nowrap;
}

/* ---------- the grid ----------

   Three across from 56rem. Below that the tiles become a swipeable
   row rather than a stack: three 9:16 plates stacked vertically make
   a column roughly four phone-screens tall, which buries the closing
   CTA underneath a wall of video. A row that scrolls keeps the
   section one screen deep at any width.

   The negative margin lets the row bleed to the viewport edge while
   the first tile still lines up with the heading above it. */
.reel-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(13rem, 68vw);
  gap: var(--sp-5);
  margin: 0 calc(var(--gutter) * -1);
  padding: 0 var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  list-style: none;
  scrollbar-width: none;
}

.reel-grid::-webkit-scrollbar {
  display: none;
}

.reel {
  scroll-snap-align: start;
  min-width: 0;
}

@media (min-width: 56rem) {
  .reel-grid {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-columns: auto;
    margin: 0;
    padding: 0;
    overflow: visible;
    scroll-snap-type: none;
    gap: var(--sp-6);
  }
}

/* ---------- the plate ---------- */

.reel-stage {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: var(--ink);
  border: 1px solid var(--rule-soft);
  box-shadow: 0 1px 0 rgba(26, 18, 11, 0.04);
}

.reel-poster,
.reel-stage video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* A film that has been started replaces the poster, so the poster is
   taken out of the flow rather than left painting underneath it. */
.reel-stage.is-playing .reel-poster,
.reel-stage.is-playing .reel-play {
  display: none;
}

/* ---------- the play control ----------

   The whole plate is the button. A small target floating over a large
   image is a worse hit area on a phone than the image itself, and
   there is nothing else on the plate to click.

   A faint wash sits under the dot so it reads against both the bright
   and the dark parts of a poster frame, without dimming the whole
   photograph the way a full overlay would. */
.reel-play {
  position: absolute;
  inset: 0;
  display: grid;
  /* Bottom left, not centred. Every one of these films is a head-and-
     shoulders shot of Dr Singh, and a centred dot lands squarely on her
     face — which is the one thing the poster is there to show. Down in
     the corner it sits on the desk, where the gradient already is. */
  place-items: end start;
  padding: var(--sp-5);
  width: 100%;
  border: 0;
  background: linear-gradient(
    to bottom,
    rgba(26, 18, 11, 0) 45%,
    rgba(26, 18, 11, 0.34) 100%
  );
  color: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.reel-play-dot {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  /* Ink, not white. Every one of these posters is a brightly lit room with a
     pale desk across the bottom third, and a white dot on it reads as a
     smudge — it was surviving on its drop shadow alone. Ink is also the
     page's own dark, so the control belongs to this site rather than looking
     like a video player dropped onto it. */
  background: var(--ink);
  color: var(--parchment);
  box-shadow: 0 2px 16px rgba(26, 18, 11, 0.36);
  transition: transform 180ms ease, background-color 180ms ease;
}

/* The triangle is optically centred, not geometrically: a play glyph
   with its flat edge on the left reads as sitting left of centre when
   its bounding box is centred. */
.reel-play-dot svg {
  margin-left: 2px;
}

/* Gold Deep as a ground, with the parchment triangle on it — 5.26:1, and the
   only place gold appears at size on this band. Gold as type on cream would
   be 2.68:1 and is forbidden; gold behind near-white is not. */
.reel-play:hover .reel-play-dot,
.reel-play:focus-visible .reel-play-dot {
  transform: scale(1.06);
  background: var(--gold-deep);
}

.reel-play:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: -4px;
}

@media (prefers-reduced-motion: reduce) {
  .reel-play-dot {
    transition: none;
  }

  .reel-play:hover .reel-play-dot,
  .reel-play:focus-visible .reel-play-dot {
    transform: none;
  }
}

/* ---------- the caption ---------- */

.reel-meta {
  margin-top: var(--sp-4);
}

.reel-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
}

.reel-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 600;
}

/* The running time is the one number on the band. Tabular figures so a
   column of them lines up, and gold-deep to tie it to the eyebrow
   without competing with the title. */
.reel-time {
  flex: none;
  margin: 0;
  font-family: var(--caps);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--gold-deep);
}

.reel-link {
  display: inline-block;
  margin-top: var(--sp-2);
  font-family: var(--caps);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.reel-link:hover,
.reel-link:focus-visible {
  border-bottom-color: var(--gold-deep);
}
