/* Hero. The photo, the name, and a full-frame cutout of Arlo on top so the name sits between them.
   --ex (0..1, set from hero.js on scroll) fades the section out, --sc scales photo and cutout together.
   Without JS it renders its final state. */
.hero{
  --ex:0;--nf:clamp(56px,13.6vw,300px);
  --s:max(calc(100vw / 2400),calc(100svh / 1600));
  position:relative;height:100vh;height:100svh;overflow:clip;isolation:isolate;background:#000;
  -webkit-mask-image:linear-gradient(180deg,#000 calc(100% - var(--ex) * 24%),transparent 100%);
  mask-image:linear-gradient(180deg,#000 calc(100% - var(--ex) * 24%),transparent 100%);
}
.js .hero{--sc:1.04}
.hero > img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:48% 40%;user-select:none;-webkit-user-drag:none}
/* photo and cutout carry the same grade and the same scale, so the cutout's edge never shows or slips */
.hero-photo,.hero-cut{filter:brightness(.86) saturate(1.04) contrast(1.05);transform:scale(var(--sc,1))}
.hero-photo{z-index:1}
.hero-cut{z-index:5}
/* the foot of the frame (below Arlo's belt) darkens so the name reads; the left darkens so the wordmark and the role
   line hold 4.5:1 on the bright wall (--rw, the role column's right edge, comes from hero.js). Warm near-black, so the
   yellow wall goes brown instead of grey. */
.hero-shade{position:absolute;inset:0;z-index:2;pointer-events:none;
  background:linear-gradient(180deg,transparent 70%,rgba(14,8,3,.62) 100%),linear-gradient(90deg,rgba(14,8,3,.64),rgba(14,8,3,.6) var(--rw,26vw),transparent calc(var(--rw,26vw) + 22vw))}

/* name sits between the photo and the cutout, so Arlo can stand in front of it */
.hero-name{
  position:absolute;z-index:4;left:var(--gutter);right:var(--gutter);bottom:var(--nb,clamp(10px,2vh,24px));margin:0;
  font-family:var(--serif);font-weight:500;font-size:var(--nf);line-height:.86;letter-spacing:-.04em;color:var(--open-white);
  white-space:nowrap;text-align:center;opacity:calc(1 - var(--ex) * 1.6);transform:translate3d(0,calc(var(--ex) * -36px),0);
}
.name-in{display:inline-block;text-align:inherit}
.hero-name .w{display:inline-block}
.hero-name .ln{padding:.06em .04em .12em;margin:-.06em -.04em -.12em}

.hero-top{
  position:absolute;z-index:7;left:var(--gutter);right:var(--gutter);top:clamp(16px,3.4vh,34px);
  display:flex;justify-content:space-between;align-items:center;opacity:calc(1 - var(--ex) * 2.2);
}
/* the stamp is exactly as wide as the name under it: width 0 keeps it out of the track size, min-width fills it */
.hero-top .wordmark{display:inline-grid;gap:7px;color:var(--open-white)}
.hero-top .wordmark img{display:block;width:0;min-width:100%;height:auto}
.hero-top .wordmark b{font-weight:inherit;color:var(--amber)}
.hero-top{flex-wrap:wrap;row-gap:10px}
.hero-links{display:flex;gap:10px;margin-left:auto}
.hero-links .btn{white-space:nowrap}
@media (max-width:420px){.hero-links{gap:6px}.hero-links .btn:not(.btn--li){padding:14px 18px}}
.hero-aside{position:absolute;z-index:7;left:var(--gutter);top:var(--rt,max(120px,calc(540 * var(--s) + (100svh - 1600 * var(--s)) * .4 - 30px)));width:min(27ch,30vw);opacity:calc(1 - var(--ex) * 2.2)}
.hero-role{margin:0;font-size:var(--fs-text);line-height:1.5;color:var(--text);text-shadow:0 1px 12px rgba(0,0,0,.7)}
.hero-role span:first-child{color:var(--open-white);font-weight:500}
/* first stop for the keyboard; above everything in the hero so nothing can cover it while it has focus */
.skip{position:absolute;z-index:60;top:clamp(16px,3.4vh,34px);left:0;right:0;width:max-content;margin:0 auto;display:inline-flex;align-items:center;min-height:48px;padding:12px 26px;border-radius:999px;background:#000;color:var(--open-white);font:600 var(--fs-small)/1 var(--sans);text-decoration:none;white-space:nowrap;outline:2px solid var(--amber);outline-offset:0}
.skip:not(:focus){clip-path:inset(50%);width:1px;min-height:0;height:1px;padding:0;overflow:hidden;outline:0}

/* the words arrive on CSS alone, from the first paint: they never wait for fonts, script or photos */
@keyframes hero-in{from{opacity:0;transform:translateY(16px)}}
.hero-top .wordmark,.hero-top .btn,.hero-role{animation:hero-in .8s var(--ease-out) backwards}
.hero-top .wordmark{animation-delay:.3s}
.hero-role{animation-delay:.4s}
.hero-top .btn{animation-delay:.5s}
.js .hero-cut{opacity:0}
.js .hero-name{visibility:hidden}

/* role-top: the role line moves to the top, over the PAR bar, and gets its own dark ground down to its last line (--rb) */
.hero.role-top .hero-aside{top:calc(var(--tb,calc(clamp(16px,3.4vh,34px) + 90px)) + 24px);width:min(42ch,100% - 2 * var(--gutter))}
.hero.role-top .hero-role{font-size:var(--fs-small)}
.hero.role-top .hero-shade{background:linear-gradient(180deg,rgba(14,8,3,.92),rgba(14,8,3,.88) calc(var(--rb,170px) + 6px),transparent calc(var(--rb,170px) + 56px)),linear-gradient(180deg,transparent 70%,rgba(14,8,3,.62) 100%)}
/* before hero.js has measured (class .fitted) a portrait window already gets the role-top layout, so nothing jumps */
@media (min-width:641px) and (max-aspect-ratio:1/1){
  .hero:not(.fitted) .hero-aside{top:calc(var(--tb,calc(clamp(16px,3.4vh,34px) + 90px)) + 24px);width:min(42ch,100% - 2 * var(--gutter))}
  .hero:not(.fitted) .hero-role{font-size:var(--fs-small)}
}
.hero-name.wide{text-align:left}
@media (max-height:620px) and (min-width:641px){
  .hero-aside{display:none}
}
/* phone: the name stacks and the role line is always at the top */
@media (max-width:640px){
  .hero-name{text-align:left;line-height:.88}
  .hero-name .w{display:block}
  .hero-aside{display:contents}
  .hero-role{position:absolute;z-index:7;left:var(--gutter);top:calc(var(--tb,calc(clamp(16px,3.4vh,34px) + 90px)) + 24px);width:min(42ch,100% - 2 * var(--gutter));font-size:var(--fs-small);opacity:calc(1 - var(--ex) * 2.2)}
  .hero-shade{background:linear-gradient(180deg,rgba(14,8,3,.92),rgba(14,8,3,.88) calc(var(--rb,215px) + 6px),transparent calc(var(--rb,215px) + 56px)),linear-gradient(180deg,transparent 70%,rgba(14,8,3,.62) 100%)}
}

/* print: see base.css */
@media print{
  .hero-name{position:static!important;display:block!important;margin:0!important;font-family:var(--serif)!important;font-weight:600!important;font-size:30pt!important;line-height:1.05!important;letter-spacing:-.01em!important;white-space:normal!important;text-align:left!important}
  .hero-name *{display:inline!important;overflow:visible!important;margin:0!important;padding:0!important}
  .hero-aside{position:static!important;width:auto!important;margin-top:8pt!important}
  .hero-role{position:static!important;width:auto!important;font-size:12pt!important;line-height:1.4!important}
  .hero-role span{display:block!important}
  .skip,.hero > img,.hero-shade,.hero-top{display:none!important}
}
