/* attashah.dev v6: the desk hero (variant D, the default), ported from the old page's opening (public/index.html, "opening: the desk clip is the hero").
   A full-bleed shot of him seated at his desk, typing. Without scripting or with reduced motion it is the still of that (img/desk-seated-start.jpg)
   with the words over it. With motion, js/desk.js pins the first screen (.hero.hd-run is the scroll track, .hero-in the pinned screen) and the scroll plays
   the camera round behind his shoulder. The words, and the title block that takes the place of the old "how I work" lines, are v6's own.
   ?hero=a and ?hero=b show the two figure heroes (css/hero.css) instead. */
.hero[data-variant=d]{display:block;min-height:0;padding:0;overflow:visible;isolation:auto;--hd-w:min(31vw,28rem)}
.hero[data-variant=d] .hero-in{display:block;position:relative;height:100svh;overflow:hidden;isolation:isolate;background:var(--sheet)}
.hero[data-variant=d].hd-run{height:calc(100svh * 2.68)} /* the pin: 100svh of screen and 168% of scroll (js/desk.js: K = .96 units at 1.75svh each) */
.hero[data-variant=d].hd-run .hero-in{position:sticky;top:0}
.hero[data-variant=d] .hero-strip{display:none}

/* the shot: the clip fills the screen (object-fit: cover), the bottom fades into the sheet. The still is the stage's own background, so the first
   paint is him seated at the desk (the clip's own first frame), and the clip takes over once it has been fetched. */
.hero[data-variant=d] .hd-stage{display:block;position:absolute;inset:0;z-index:0;-webkit-mask-image:linear-gradient(#000 84%,transparent);mask-image:linear-gradient(#000 84%,transparent);
  background:var(--sheet) url(/img/desk-seated-start.jpg) 50% 50%/cover no-repeat;overflow:hidden}
.hd-stage video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none}
.hd-stage video:not([src]){visibility:hidden}
/* the monitors: live copies of the screens (screens.js), pinned onto the monitors of the clip's last frame in the clip's own 1280x720 space */
.hero[data-variant=d]:not(.hd-run) .hd-screens{display:none}
.hd-screens{position:absolute;left:0;top:0;width:1280px;height:720px;transform-origin:0 0;opacity:0;pointer-events:none;-webkit-mask:url(/img/desk-seated-mask.png) 0 0/100% 100%;mask:url(/img/desk-seated-mask.png) 0 0/100% 100%}
.hd-screens .scr{position:absolute;left:0;top:0;transform-origin:0 0;overflow:hidden}

/* the words: his name, role, summary and the two actions, left of the monitors */
.hero[data-variant=d] .hero-copy{display:block;position:absolute;z-index:4;left:var(--gutter);top:50%;transform:translateY(-50%);width:var(--hd-w)}
.hero[data-variant=d] .hero-name{font-size:clamp(3.2rem,6.4vw,7rem);line-height:.94;white-space:normal;margin:0 0 .2em -.04em}
.hero[data-variant=d] .hero-name .w{display:block;overflow:hidden;padding-block:.04em}
.hero[data-variant=d] .hero-name .w>span{display:inline-block}
.hero[data-variant=d] .hero-name::after{width:auto}
.hero[data-variant=d] .hero-role,.hero[data-variant=d] .hero-sum{max-width:none}
.hero[data-variant=d] .hero-role{font-size:clamp(1.3rem,1.9vw,2.2rem)}
.hero[data-variant=d] .hero-sum{font-size:clamp(.98rem,1.15vw,1.2rem);line-height:1.46;text-shadow:0 1px 10px var(--sheet),0 0 3px var(--sheet)}
.hero[data-variant=d] .hero-acts{margin-top:clamp(14px,2.4svh,28px)}
.hero[data-variant=d] .hero-acts .btn{background:color-mix(in srgb,var(--sheet) 62%,transparent);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}
.hero[data-variant=d] .hero-acts .btn.main{background:var(--tan)}

/* the title block: where the old page put its "how I work" lines, the bottom of the screen once the camera is behind him. It is a band of the seven
   facts along the foot of the shot (the shot already fades into the sheet there), because the old slot, the empty desk at the bottom right, is full of
   him and the monitors at this crop. A scrim under it keeps the words readable over his hands and the keyboard. */
.hero[data-variant=d] .hero-block{position:absolute;z-index:4;left:var(--gutter);right:var(--gutter);bottom:max(10px,2.4svh);top:auto;width:auto;margin:0;padding-top:clamp(18px,4svh,40px);
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));column-gap:clamp(16px,2.2vw,36px);font-size:clamp(.8rem,.92vw,1.04rem);line-height:1.35;border-top:0;
  text-shadow:0 1px 10px var(--sheet),0 0 3px var(--sheet)}
.hero[data-variant=d] .hero-block::before{content:"";position:absolute;z-index:-1;left:calc(var(--gutter) * -1);right:calc(var(--gutter) * -1);top:0;bottom:calc(max(10px,2.4svh) * -1);background:linear-gradient(transparent,color-mix(in srgb,var(--sheet) 88%,transparent) 42%)}
.hero[data-variant=d] .hero-block>div{display:block;padding:.42em 0;border-top:var(--pen-1,1px) solid var(--rule);border-bottom:0}
.hero[data-variant=d] .hero-block dt{display:block;margin-bottom:.1em}
.hero[data-variant=d] .hero-block .hb-certs i{width:1.7em;height:1.7em}
.hero[data-variant=d].hd-run .hero-block{opacity:0;visibility:hidden}

/* narrow screens (the old page's 820 px): the shot on top, 75vw tall, the words under it. The title block takes the words' place once they fade. */
@media (max-width:820px){
  .hero[data-variant=d]:not(.hd-run) .hero-in{height:auto;overflow:visible}
  .hero[data-variant=d] .hd-stage{inset:0 0 auto;height:75vw}
  .hero[data-variant=d]:not(.hd-run) .hd-stage{position:relative}
  .hero[data-variant=d] .hero-copy{top:calc(75vw + 6px);transform:none;left:var(--gutter);right:var(--gutter);width:auto}
  .hero[data-variant=d]:not(.hd-run) .hero-copy{position:relative;top:auto;padding:10px var(--gutter) 0;left:auto;right:auto}
  .hero[data-variant=d] .hero-name{font-size:min(5.5rem,17.4vw)}
  .hero[data-variant=d] .hero-name .w{display:inline-block;vertical-align:top}
  .hero[data-variant=d] .hero-role{font-size:1.3rem}
  .hero[data-variant=d] .hero-sum{font-size:.97rem}
  .hero[data-variant=d] .hero-block{display:block;top:calc(75vw + 18px);bottom:auto;padding-top:0;border-top:var(--pen-3,2px) solid var(--line);font-size:.9rem;text-shadow:none}
  .hero[data-variant=d] .hero-block::before{display:none}
  .hero[data-variant=d] .hero-block>div{display:grid;border-top:0;border-bottom:1px solid var(--rule)}
  .hero[data-variant=d] .hero-block dt{margin:0}
  .hero[data-variant=d]:not(.hd-run) .hero-block{position:relative;top:auto;bottom:auto;left:auto;right:auto;margin:14px var(--gutter) 24px}
  .hero[data-variant=d] .hero-block>div{grid-template-columns:4.9rem minmax(0,1fr)}
  .hero[data-variant=d] .hero-block dt{font-size:.875rem} /* the field names stay readable on a phone: 14 px, not the 12 px of a note */
}
/* a phone on its side: the band of facts is set small so it keeps to the foot of the shot */
@media (max-height:520px) and (min-width:821px){.hero[data-variant=d] .hero-block{font-size:.75rem;line-height:1.25;column-gap:14px;padding-top:16px;bottom:6px}.hero[data-variant=d] .hero-block>div{padding:.3em 0}.hero[data-variant=d] .hero-block .hb-certs i{width:1.5em;height:1.5em}}
/* a phone on its side: the old page keeps the name, the role and the two buttons; the summary goes */
@media (max-height:520px){.hero[data-variant=d] .hero-sum{display:none}.hero[data-variant=d] .hero-name{font-size:min(3.2rem,9vh)}}
@media (max-height:520px) and (max-width:820px){.hero[data-variant=d] .hero-name .w{display:inline-block}}
@media (pointer:coarse){.hero[data-variant=d] .hero-block .hb-two a{min-height:44px;min-width:44px}.hero[data-variant=d] .hero-block .hb-two{row-gap:8px}.hero[data-variant=d] .hero-block .hb-exp a{display:inline-flex;align-items:center;min-height:44px;padding-block:0;margin-block:-12px}}
