/* caddydocs.com, the film at the top (12/4/2026): "Caddy Meaningful Video Reddit", sitting in a MacBook.
   The section stays out of any stacking context so the page's grain (body::after, z-index 60) lies over its
   matte black; the MacBook rises above the grain (z-index 61), so the screen is clean, as the hero's is. */

.film-top {
  --ft-nav: var(--nav, 52px);
  position: relative;
  display: flex;
  justify-content: center;
  padding: calc(var(--ft-nav) + clamp(26px, 5.5vh, 68px)) 16px clamp(52px, 8vh, 96px);
  overflow: hidden;
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, .09));
  background:
    radial-gradient(58% 62% at 50% 46%, rgba(70, 88, 214, .30), rgba(70, 88, 214, 0) 72%),
    radial-gradient(40% 45% at 86% 92%, rgba(212, 160, 72, .13), rgba(212, 160, 72, 0) 70%),
    radial-gradient(36% 40% at 10% 12%, rgba(120, 84, 200, .12), rgba(120, 84, 200, 0) 70%);
}

/* One unit: the lid's width. Everything on the Mac is a share of it, so it reads the same at every size.
   The whole Mac fits one window under the bar: lid plus base is about .735 of its width tall. */
.ft-mac {
  --w: min(1120px, 86vw, calc((100vh - 210px) / .735));
  position: relative;
  z-index: 61;
  width: var(--w);
}
@supports (height: 100svh) {
  .ft-mac { --w: min(1120px, 86vw, calc((100svh - 210px) / .735)); }
}

.ft-lid {
  position: relative;
  padding: calc(var(--w) * .0175) calc(var(--w) * .0175) calc(var(--w) * .03);
  border-radius: calc(var(--w) * .031) calc(var(--w) * .031) calc(var(--w) * .011) calc(var(--w) * .011);
  background: #08080a;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .05),
    0 0 0 1.5px #4b4c53,
    0 0 0 2.5px #141416,
    0 34px 90px rgba(0, 0, 0, .62),
    0 0 150px rgba(86, 104, 255, .16);
}
/* The aluminium's lit top edge. */
.ft-lid::before {
  content: "";
  position: absolute;
  inset: -1.5px -1.5px auto;
  height: 40%;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 30%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1.5px;
}

.ft-screen {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1280 / 826;
  border-radius: calc(var(--w) * .007);
  background: #0f1020;
}
.ft-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* The camera housing, over the middle of the menu bar, where macOS leaves it. */
.ft-notch {
  position: absolute;
  top: 0;
  left: 50%;
  width: calc(var(--w) * .088);
  height: calc(var(--w) * .0158);
  transform: translateX(-50%);
  border-radius: 0 0 calc(var(--w) * .0075) calc(var(--w) * .0075);
  background: #08080a;
}
.ft-notch::after {
  content: "";
  position: absolute;
  top: 34%;
  left: 50%;
  width: calc(var(--w) * .0044);
  height: calc(var(--w) * .0044);
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a3550, #0a0c12 70%);
}

/* The base: a thin slab wider than the lid, lit along the hinge, with the thumb scoop in the middle. */
.ft-base {
  position: relative;
  width: 113%;
  margin-left: -6.5%;
  height: calc(var(--w) * .021);
  border-radius: 0 0 calc(var(--w) * .034) calc(var(--w) * .034) / 0 0 calc(var(--w) * .017) calc(var(--w) * .017);
  background: linear-gradient(180deg, #74757c 0%, #45464c 14%, #26272c 52%, #111114 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 1px 0 rgba(0, 0, 0, .6);
}
.ft-base::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 15%;
  height: 46%;
  transform: translateX(-50%);
  border-radius: 0 0 calc(var(--w) * .011) calc(var(--w) * .011);
  background: linear-gradient(180deg, #0d0d0f, #26272b);
}
/* Its shadow on the desk. */
.ft-base::after {
  content: "";
  position: absolute;
  left: 3%;
  right: 3%;
  top: 70%;
  height: calc(var(--w) * .06);
  z-index: -1;
  background: radial-gradient(50% 50% at 50% 30%, rgba(0, 0, 0, .78), rgba(0, 0, 0, 0) 100%);
}

/* Pause and play: small, in the screen's corner, shown on hover, on focus, when paused, and always on touch. */
.ft-toggle {
  position: absolute;
  right: clamp(8px, 1.6%, 18px);
  bottom: clamp(8px, 2.4%, 22px);
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  background: rgba(18, 18, 20, .58);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .14);
  transition: opacity .2s ease;
}
.ft-toggle::before,
.ft-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 14px;
  border-radius: 1px;
  background: #f5f5f7;
}
.ft-toggle::before { transform: translate(-6px, -7px); }
.ft-toggle::after { transform: translate(2px, -7px); }
.ft-paused .ft-toggle::before {
  width: 0;
  height: 0;
  border-radius: 0;
  background: none;
  border-left: 13px solid #f5f5f7;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  transform: translate(-4px, -8px);
}
.ft-paused .ft-toggle::after { display: none; }
.ft-mac:hover .ft-toggle,
.ft-paused .ft-toggle,
.ft-toggle:focus-visible { opacity: 1; }
.ft-toggle:focus-visible { outline: 2px solid #f5f5f7; outline-offset: 3px; }
@media (hover: none) {
  .ft-toggle { opacity: .85; width: 36px; height: 36px; }
}

/* The hero's arrow waits until the hero is on screen, so its click on the middle Caddy is seen. */
.edge.ft-hold .pointer { animation-play-state: paused; }

@media (max-width: 600px) {
  .film-top { padding: calc(var(--ft-nav) + 22px) 12px 40px; }
  .ft-mac { --w: 88vw; }
}
