/* TEMPORARY: SKYFALL on top of the homepage (see top-video/section.js).
   Desktop: the YouTube video. Phones (<=700px): the photo instead of the video. */
.tv-top { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; padding: 0 !important; }
.tv-top__frame, .tv-top iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* black curtain over the player while YouTube starts (hides its title bar / thumbnail), then fades out */
.tv-top__cover { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: #000; transition: opacity 3.5s ease; }
.tv-top.is-playing .tv-top__cover { opacity: 0; }
/* catches clicks so YouTube's own UI never shows; a click toggles the sound */
.tv-top__shield { position: absolute; inset: 0; z-index: 2; cursor: pointer; background: transparent; border: 0; padding: 0; }

.tv-top__sound {
  position: absolute; z-index: 4; top: 76px; right: var(--gutter);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border: 1px solid rgba(255,255,255,.55); border-radius: 999px;
  background: rgba(0,0,0,.45); color: #fff; cursor: pointer;
  font: 400 10px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background .3s, border-color .3s;
}
.tv-top__sound:hover { background: rgba(0,0,0,.7); border-color: #fff; }
.tv-top__sound svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tv-top__sound .on, .tv-top.is-muted .tv-top__sound .off { display: block; }
.tv-top__sound .off, .tv-top.is-muted .tv-top__sound .on { display: none; }
.tv-top.is-muted .tv-top__sound { animation: tv-top-pulse 2s ease-in-out infinite; }
@keyframes tv-top-pulse { 50% { border-color: #fff; background: rgba(0,0,0,.7); } }

/* title + Watch Now, stacked at the bottom centre */
.tv-top__dock {
  position: absolute; z-index: 3; left: 50%; bottom: max(7%, 28px); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: clamp(16px, 2vw, 26px); pointer-events: none;
}
/* the video is taller than the screen on wide monitors: keep the dock inside the first screen */
@media (min-aspect-ratio: 16/9) and (min-width: 701px) { .tv-top__dock { bottom: calc(100% - 100svh + 44px); } }
.tv-top__dock > * { pointer-events: auto; }

/* SKYFALL in gold: #87744d, a soft glow, a slow float and a glare that sweeps across now and then */
.tv-top__title { margin: 0; width: min(30vw, 400px); opacity: 0; transform-origin: 50% 50%; }
.tv-top__glow { display: block; }
.tv-top__glow {
  filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .55)) drop-shadow(0 0 5px rgba(214, 190, 128, .5)) drop-shadow(0 0 16px rgba(135, 116, 77, .5));
  animation: tv-top-float 6s ease-in-out infinite;
}
.tv-top__logo {
  display: block; width: 100%; aspect-ratio: 884 / 115;
  -webkit-mask: url("/top-video/skyfall.png") center / 100% 100% no-repeat; mask: url("/top-video/skyfall.png") center / 100% 100% no-repeat;
  background:
    linear-gradient(105deg, transparent 40%, rgba(255, 244, 214, .9) 49%, rgba(255, 250, 235, 1) 50%, rgba(255, 244, 214, .9) 51%, transparent 60%) -150% 0 / 250% 100% no-repeat,
    linear-gradient(180deg, #a8925f 0%, #87744d 45%, #6f5f3d 100%);
  animation: tv-top-glare 7s ease-in-out infinite 1s;
}
@keyframes tv-top-float { 0%, 100% { transform: translateY(0) rotate(-.3deg); } 50% { transform: translateY(-5px) rotate(.3deg); } }
@keyframes tv-top-glare { 0%, 55% { background-position: -150% 0, 0 0; } 85%, 100% { background-position: 250% 0, 0 0; } }

.tv-top__watch {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 30px; background: #fff; color: #0b0b0b; border-radius: 999px;
  font: 500 12px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; white-space: nowrap;
  box-shadow: 0 8px 30px rgba(0,0,0,.35); transition: background .3s, color .3s;
}
.tv-top__watch:hover { background: #0b0b0b; color: #fff; }

@media (max-width: 700px) {
  /* phones: the photo, at its own proportions, instead of the video */
  .tv-top { aspect-ratio: 1290 / 1493; background: #1a1a1a url("/top-video/skyfall-mobile.jpg") center / cover no-repeat; }
  .tv-top__frame, .tv-top iframe, .tv-top__cover, .tv-top__shield, .tv-top__sound { display: none; }
  .tv-top__dock { bottom: 22px; gap: 14px; }
  .tv-top__title { width: 62vw; }
  .tv-top__watch { padding: 12px 22px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { .tv-top__glow, .tv-top__logo { animation: none; } }
