/* Vonken. A photo of Arlo with a burning, sparking piece of wood, bleeding off the left edge into pure black, and the
   about copy on the black to its right. vonken.js lets sparks fall from the burning wood (pushed around by the pointer)
   and makes the lit parts of the photo breathe. The stage is taller than the section so the parallax never shows an edge. */
.vk{
  --over:7%;--ph:.93;--f:66%;
  position:relative;height:100vh;height:100svh;min-height:560px;overflow:clip;isolation:isolate;background:#000;
  -webkit-mask-image:linear-gradient(180deg,transparent 0,rgba(0,0,0,.5) 2%,#000 6%,#000 94%,rgba(0,0,0,.5) 98%,transparent 100%);
  mask-image:linear-gradient(180deg,transparent 0,rgba(0,0,0,.5) 2%,#000 6%,#000 94%,rgba(0,0,0,.5) 98%,transparent 100%);
}
.vk-stage{position:absolute;left:0;right:0;top:calc(var(--over) * -1);bottom:calc(var(--over) * -1);will-change:transform}

/* photo box: 3:4 like the source, height set against the stage so it can bleed a little past the section */
.vk-photo{
  position:absolute;left:0;top:calc((1 - var(--ph)) * 50%);height:calc(var(--ph) * 100%);aspect-ratio:3 / 4;
  -webkit-mask-image:
    linear-gradient(90deg,#000 0,#000 var(--f),rgba(0,0,0,.82) calc(var(--f) + (100% - var(--f)) * .28),rgba(0,0,0,.5) calc(var(--f) + (100% - var(--f)) * .56),rgba(0,0,0,.16) calc(var(--f) + (100% - var(--f)) * .83),transparent 100%),
    linear-gradient(180deg,transparent 0,rgba(0,0,0,.45) 6%,#000 16%,#000 82%,rgba(0,0,0,.4) 93%,transparent 100%);
  -webkit-mask-composite:source-in;
  mask-image:
    linear-gradient(90deg,#000 0,#000 var(--f),rgba(0,0,0,.82) calc(var(--f) + (100% - var(--f)) * .28),rgba(0,0,0,.5) calc(var(--f) + (100% - var(--f)) * .56),rgba(0,0,0,.16) calc(var(--f) + (100% - var(--f)) * .83),transparent 100%),
    linear-gradient(180deg,transparent 0,rgba(0,0,0,.45) 6%,#000 16%,#000 82%,rgba(0,0,0,.4) 93%,transparent 100%);
  mask-composite:intersect;
}
.vk-photo picture,.vk-photo img{display:block;width:100%;height:100%}
.vk-photo img{object-fit:cover;user-select:none;-webkit-user-drag:none}
.vk-photo > picture:first-child{position:absolute;inset:0}

/* the fire's light on the face and shirt: the same photo again, brightened, screened on top, opacity driven by noise */
.vk-lit{position:absolute;inset:0;mix-blend-mode:screen;opacity:.2;pointer-events:none}
.vk-lit img{filter:brightness(1.9) contrast(1.12) saturate(1.2)}
.vk-glow{
  position:absolute;inset:0;mix-blend-mode:screen;opacity:.5;pointer-events:none;
  background:radial-gradient(ellipse 46% 36% at 54% 44%,rgba(255,150,70,.34),rgba(255,110,50,.12) 48%,transparent 100%);
}

.vk-sparks{position:absolute;inset:0;width:100%;height:100%;mix-blend-mode:screen;pointer-events:none}

.vk-copy{position:absolute;z-index:2;left:54%;top:50%;width:min(38vw,640px);transform:translateY(-50%)}
.vk-statement{margin:0;font-family:var(--serif);font-weight:400;font-size:var(--fs-lead);line-height:1.1;letter-spacing:-.01em;color:var(--open-white);text-wrap:balance}
.vk-body{margin:clamp(22px,2.4vw,34px) 0 0;max-width:38ch;font-size:var(--fs-text);line-height:1.5;color:var(--text)}
.vk-traits{position:relative;list-style:none;margin:clamp(24px,2.6vw,38px) 0 0;padding:18px 0 0;display:flex;flex-wrap:wrap;gap:6px 28px;
  font-size:var(--fs-small);font-weight:500;letter-spacing:.03em;color:var(--muted)}
.vk-traits::before{content:"";position:absolute;left:0;right:0;top:0;height:1px;background:rgba(255,243,220,.16);transform-origin:left center;transform:scaleX(var(--rule,1))}
/* hidden until vonken.js runs the reveal; shown anyway after 4 s if the script never does */
.js .vk-copy:not(.is-set) .vk-statement,.js .vk-copy:not(.is-set) .vk-body,.js .vk-copy:not(.is-set) .vk-traits{opacity:0;animation:vk-failsafe 0s 4s forwards}
@keyframes vk-failsafe{to{opacity:1}}

/* phone, narrow window or a screen taller than it is wide (the photo is 0.7 x the height, so it would run under the copy):
   the photo runs wider than the screen so the face and the fire are big, and the black room under it is where the sparks fall */
@media (max-width:899px) and (min-height:600px),(max-aspect-ratio:11/10){
  .vk{--pw:min(128vw,66svh);height:auto;min-height:0}
  .vk-stage{--over:4%}
  .vk-photo{--ph:1;--f:78%;top:var(--over);height:auto;width:var(--pw);left:min(0px,calc((100vw - var(--pw)) * .55))}
  .vk-copy{position:relative;left:auto;top:auto;width:auto;transform:none;padding:calc(var(--pw) * 1.3333 * .94) var(--gutter) clamp(72px,14vw,110px)}
  .vk-statement{font-size:clamp(26px,7.2vw,34px);line-height:1.14}
}

/* landscape phone or short window: photo and copy stay side by side, the copy tucked against the photo's own width */
@media (max-height:599px) and (min-aspect-ratio:11/10){
  .vk{min-height:0}
  .vk-copy{left:calc(.7 * 100svh + clamp(12px,3vw,40px));right:var(--gutter);width:auto;max-width:640px}
  .vk-statement{font-size:clamp(20px,3.3vw,30px);line-height:1.12}
  .vk-body{margin-top:14px;font-size:var(--fs-small)}
  .vk-traits{margin-top:16px;padding-top:12px}
}

/* print: see base.css */
@media print{
  .vk-copy{position:static!important;width:auto!important;margin:18pt 0 0!important;padding:0!important}
  .vk-statement{font-family:var(--serif)!important;font-weight:500!important;font-size:15pt!important;line-height:1.25!important}
  .vk-body{max-width:none!important;margin:8pt 0 0!important;font-size:10.5pt!important;line-height:1.45!important}
  .vk-traits{display:flex!important;flex-wrap:wrap!important;gap:0 14pt!important;margin:8pt 0 0!important;padding:0!important;font-size:10.5pt!important;font-weight:600!important;letter-spacing:0!important}
  .vk-traits::before{display:none!important}
  .vk-stage{display:none!important}
}
