/* Reserve the final screen size before the film opens, including when JavaScript is off. */
.home-workshop.wrap {
  display: block;
  width: 100%;
  padding: 0;
  color: #f4f2eb;
  background: #10191e;
}
.home-workshop .home-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .88fr);
  gap: 0 clamp(32px, 7.5vw, 135px);
  align-items: start;
  width: min(100%, 1760px);
  margin-inline: auto;
  padding: clamp(32px, 4.5vw, 76px) var(--gutter) clamp(44px, 6vw, 100px);
}
.home-workshop .home-copy h2 { grid-column: 1; grid-row: 1 / span 2; margin: 0; color: #f4f2eb; }
.home-workshop .home-copy > p { grid-column: 2; margin-top: .8rem; max-width: 54ch; color: #cbd1d1; }
.home-workshop .home-copy > p:first-of-type { margin-top: 0; }
.home-workshop .home-copy a { color: #edce9e; }
.home-workshop figure {
  --film-top: var(--mast-height, 0px);
  --film-room: calc(100vh - var(--film-top));
  --film-screen: min(56.25vw, var(--film-room));
  --film-start: min(40vw, calc(var(--film-screen) * .7));
  display: grid;
  grid-template-rows: var(--film-screen) auto;
  justify-items: center;
  width: 100%;
  max-width: none;
  margin: 0;
}
@supports (height: 100dvh) {
  .home-workshop figure { --film-room: calc(100dvh - var(--film-top)); }
}
.home-workshop figure > :is(video, img) {
  grid-area: 1 / 1;
  place-self: start center;
  display: block;
  width: var(--film-width, 100%);
  height: calc(var(--film-start) + (var(--film-screen) - var(--film-start)) * var(--film-progress, 1));
  aspect-ratio: auto;
  object-fit: contain;
  background: #080d10;
  border-radius: calc((1 - var(--film-progress, 1)) * clamp(17px, 3vw, 38px));
  scroll-margin-top: var(--film-top);
}
.home-workshop figure > img { object-fit: cover; object-position: 48% 47%; }
.home-workshop .workshop-fit { display: none; }
html:has(#film-oynatici:target) { scroll-padding-top: 0; }
.home-workshop video:focus-visible { outline: 2px solid var(--bronze); outline-offset: 4px; }
.home-workshop figure video:fullscreen { width: 100%; height: 100%; object-fit: contain; border-radius: 0; }
.home-workshop figure > :is(figcaption, p) { grid-column: 1; margin: 10px var(--gutter) 0; color: #cbd1d1; }

@media (max-width: 760px), (orientation: landscape) and (max-height: 530px) {
  .home-workshop figure {
    --film-screen: var(--film-room);
    --film-start: min(36vw, calc(var(--film-room) * .65));
  }
}
@media (max-width: 760px) {
  .home-workshop .home-copy { display: block; }
  .home-workshop .home-copy > p:first-of-type { margin-top: 1rem; }
  .home-workshop.wrap figure { margin: 0; }
}
@media (max-width: 760px) and (orientation: portrait) {
  .home-workshop figure[data-workshop-fit="fill"] > video:not(:fullscreen) { object-fit: cover; }
  .home-workshop .workshop-fit:not([hidden]) {
    grid-area: 1 / 1;
    place-self: start end;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    margin-right: calc((100% - var(--film-width, 100%)) / 2 + 10px);
    padding: 0 12px;
    min-height: 44px;
    border: 1px solid rgb(235 230 216 / 35%);
    border-radius: 6px;
    background: rgb(16 25 30 / 88%);
    color: #faf6ed;
    font: inherit;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1;
  }
  .home-workshop .workshop-fit::before {
    content: "";
    width: 14px;
    height: 9px;
    border: 1px solid #ddc9a8;
    border-radius: 1px;
  }
  .home-workshop [data-workshop-fit="contain"] .workshop-fit::before { width: 9px; height: 14px; }
}

/* Only mounted during a title's entrance, so editor markup and line wrapping
   return to their native form when the visitor continues reading. */
.bh-title-lines, .bh-title-line, .bh-title-line > span { display: block; }
.bh-title-line { clip-path: inset(-.16em -.08em -.08em); }
.bh-seam, .bh-weld { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .bh-rise { animation: bh-rise .66s cubic-bezier(.18,.69,.19,1) both; }
  .bh-settle { animation: bh-settle .72s cubic-bezier(.16,.7,.28,1) both; }
  .bh-strike { position: relative; }
  .bh-strike > .bh-seam {
    position: absolute;
    display: block;
    pointer-events: none;
    left: 1px;
    top: -10px;
    width: 42px;
    height: 1px;
    color: #957044;
  }
  .bh-seam::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background: currentColor;
    transform-origin: left;
    animation: bh-draw-seam .57s cubic-bezier(.33,.65,.47,1) both;
  }
  .bh-seam > .bh-weld {
    display: block;
    position: absolute;
    right: 0;
    top: 0;
    width: 3px;
    height: 3px;
    margin-top: -1px;
    border-radius: 50%;
    background: #fff1be;
    box-shadow: 0 0 8px 2px #e8a650;
    animation: bh-contact .34s ease-out .47s both;
  }
  .bh-weld i {
    --dx: 14px; --dy: -8px; --angle: -28deg;
    position: absolute;
    left: 2px;
    top: 0;
    width: 8px;
    height: 1px;
    border-radius: 100%;
    background: linear-gradient(to right, #ab6728, #ffda87);
    transform-origin: left;
    animation: bh-filing .31s ease-out .49s both;
  }
  .bh-weld i:nth-child(2) { --dx: 7px; --dy: -14px; --angle: -62deg; width: 6px; }
  .bh-weld i:nth-child(3) { --dx: 17px; --dy: 3px; --angle: 9deg; }
  .bh-weld i:nth-child(4) { --dx: 8px; --dy: 9px; --angle: 43deg; width: 5px; }
}
@keyframes bh-rise {
  from { transform: translateY(.46em); opacity: .24; }
  to { transform: none; opacity: 1; }
}
@keyframes bh-settle {
  from { transform: translateX(9px); opacity: .78; }
  to { transform: none; opacity: 1; }
}
@keyframes bh-draw-seam { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes bh-contact { 0%,100% { opacity: 0; } 16%,48% { opacity: 1; } }
@keyframes bh-filing {
  0% { opacity: 0; transform: rotate(var(--angle)) scaleX(.2); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx),var(--dy)) rotate(var(--angle)) scaleX(.7); }
}
@media print {
  .bh-seam { display: none !important; }
  .bh-rise, .bh-settle { animation: none !important; }
  .bh-title-line { clip-path: none; }
  .bh-title-line > span { transform: none !important; opacity: 1 !important; }
  .home-workshop.wrap { background: white; }
  .home-workshop .home-copy :is(h2,p,a) { color: black; }
  .home-workshop figure { display: block; }
  .home-workshop figure > :is(video, img) { width: 100%; height: auto; aspect-ratio: 16 / 9; }
}
