/* The About page. Loads after main.css and uses its tokens, bar, brands, note and footer; DESIGN.md has the why.
   The bold moment is his all-access pass on a lanyard. The story lights up line by line as you read, and the snapshot
   is called like a show (standby, go). */

/* ---------- a strip of console tape, as on the homepage ---------- */
.aka span, .photo-tape span {
  display: block; padding: .24em .8em .18em; color: #151515; font: 400 1em/1.1 var(--hand); letter-spacing: 0;
  background: linear-gradient(180deg, rgba(255,255,255,.4), rgba(255,255,255,0) 40%, rgba(0,0,0,.05)), var(--tape);
  clip-path: polygon(0 6%, 100% 0, 98.6% 18%, 100% 34%, 98.2% 52%, 100% 70%, 98.8% 86%, 100% 100%, 0 96%, 1.4% 80%, 0 62%, 1.8% 44%, 0 28%, 1.2% 14%);
}

/* ---------- hello: the name on the left, the pass hanging on the right ---------- */
.hello {
  position: relative; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 32px; align-items: end; padding-block: 140px clamp(64px, 11vh, 120px);
}
.hello h1 { font-size: clamp(3.5rem, 9vw, 8.6rem); letter-spacing: -0.045em; line-height: .9; }
.keep { white-space: nowrap; }
/* "aka Fee." slapped on after the pass lands, like he labels everything */
.aka {
  display: inline-block; vertical-align: bottom; margin-left: .3em; font-size: .27em;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .55));
  animation: slap-aka .4s cubic-bezier(.2, .9, .3, 1.25) 1.25s both;
}
@keyframes slap-aka { from { opacity: 0; transform: translateY(-.2em) scale(1.5) rotate(-9deg); } to { opacity: 1; transform: translateY(-.25em) rotate(-4deg); } }
.hello-tags { margin-top: clamp(22px, 4vh, 36px); font: 600 clamp(1.15rem, 1.8vw, 1.5rem)/1.35 var(--display); letter-spacing: -0.01em; }
.hello-tags span { white-space: nowrap; }  /* a phrase never breaks in half; Smiley Problem-Solver has its own line (his ask, 21 Oct) */
.hello-lead { margin-top: 14px; max-width: 40em; color: var(--smoke); font-size: clamp(1.06rem, 1.25vw, 1.18rem); }

/* ---------- the pass: hung from the top of the page (the pass itself is in main.css) ---------- */
.hello .rig { align-self: start; justify-self: center; margin-top: -140px; }

/* ---------- the story: lit as you read ---------- */
.story { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 110px); align-items: start; padding-block: clamp(40px, 8vh, 100px) clamp(80px, 12vh, 140px); }
.story-photo { position: sticky; top: 104px; margin: 0; }
/* opens out of a slit as it arrives (--o from about.js), then drifts slowly while you read (--d) */
.story-frame {
  aspect-ratio: 3 / 4; max-height: calc(100svh - 150px); overflow: hidden; border-radius: 6px; background: var(--panel);
  clip-path: inset(calc((1 - var(--o, 1)) * 22%) calc((1 - var(--o, 1)) * 8%) round 6px);
}
.story-frame img {
  width: 100%; height: 100%; object-fit: cover;
  transform: translateY(calc(var(--d, .5) * -5% + 2.5%)) scale(calc(1.1 + (1 - var(--o, 1)) * .18));
}
/* click it and it turns over, like the pass: the back is the photo on his pass, him and the Stanley Cup (his ask, 21 Oct).
   It gives a small half-turn the first time it opens, so people know it moves. */
.story-photo { perspective: 1600px; }
.story-flip {
  position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 6px; background: none; color: inherit; cursor: pointer;
  transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3, 1.25, .5, 1);
}
.story-flip .story-frame { display: block; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.story-flip .story-back { position: absolute; inset: 0; transform: rotateY(180deg); }
.story-photo.flipped .story-flip { transform: rotateY(180deg); }
@media (hover: hover) {
  .story-photo:not(.flipped) .story-flip:hover { transform: rotateY(-9deg); }
  .story-photo.flipped .story-flip:hover { transform: rotateY(189deg); }
}
.story-photo.peek:not(.flipped) .story-flip { animation: peek 1.2s cubic-bezier(.3, 1.2, .5, 1) .5s; }
@keyframes peek { 35% { transform: rotateY(-28deg); } 70% { transform: rotateY(5deg); } }
.photo-tape {
  position: absolute; left: -14px; bottom: 26px; font-size: clamp(1.25rem, 1.8vw, 1.6rem);
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .55)); opacity: 0; transform: scale(1.5) rotate(-9deg);
  transition: opacity .16s ease, transform .34s cubic-bezier(.2, .9, .3, 1.25);
}
.story-photo.open .photo-tape { opacity: 1; transform: rotate(-4deg); }
.story-copy p { font-size: clamp(1.14rem, 1.45vw, 1.34rem); line-height: 1.62; max-width: 36em; }
.story-copy p + p { margin-top: 1.25em; }
.story-copy .story-end { margin-top: 1.1em; font: 800 clamp(1.9rem, 3.4vw, 2.9rem)/1.05 var(--display); letter-spacing: -0.03em; }
.glow { font-style: normal; color: var(--amber); }
/* each word sits dim until the reading line passes it, in reading order across the whole story (--p and --k on the
   story, --i on the word, from about.js) */
.lit .w { opacity: calc(.22 + .78 * clamp(0, (var(--p, 0) - var(--i, 0)) * var(--k, 14), 1)); transition: opacity .2s linear; }

/* ---------- snapshot: his story in order, run like a show ---------- */
.snap { padding-block: clamp(40px, 8vh, 100px) clamp(80px, 13vh, 150px); }
.snap-title { font-size: clamp(3rem, 9vw, 8rem); letter-spacing: -0.045em; line-height: .9; }
.cues { position: relative; list-style: none; margin: clamp(40px, 7vh, 80px) 0 0; padding: 0; }
/* the cable down the left: grey, filled amber as far as the show has got (--fill) */
.cues::before, .cues::after { content: ""; position: absolute; left: 7px; top: 10px; bottom: 0; width: 2px; background: var(--line); }
.cues::after { background: var(--amber); transform: scaleY(var(--fill, 0)); transform-origin: 50% 0; }
.cue {
  position: relative; display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) minmax(0, 1.35fr); gap: 10px clamp(24px, 4vw, 64px);
  padding: 0 0 clamp(48px, 8vh, 84px) 46px;
}
.cue:last-child { padding-bottom: 0; }
.cue-call { display: flex; gap: .9em; padding-top: .55em; font: 600 .78rem/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--smoke); }
.cue-call b { font-weight: 600; color: var(--white); transition: color .3s; }
.cue-light {
  position: absolute; z-index: 1; left: 0; top: .5rem; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid #3A3A3A; background: var(--black); transition: background .3s, border-color .3s, box-shadow .3s;
}
.cue h3 { font-size: clamp(1.5rem, 2.4vw, 2.15rem); line-height: 1.08; }
.cue p { color: #D5D9E0; font-size: 1.08rem; max-width: 40em; }
.cue h3, .cue p { opacity: .26; transition: opacity .5s ease; }
.cue.go h3, .cue.go p, .cue.done h3, .cue.done p { opacity: 1; }
.cue.standby .cue-light { border-color: var(--amber); animation: standby .9s steps(1, end) infinite; }
.cue.go .cue-light {
  border-color: var(--amber); background: var(--amber);
  box-shadow: 0 0 0 6px rgba(242, 165, 65, .16), 0 0 24px 4px rgba(242, 165, 65, .5); animation: go .5s cubic-bezier(.2, .9, .3, 1.5);
}
.cue.go .cue-call b { color: var(--amber); }
.cue.done .cue-light { border-color: #4A4A4A; background: #4A4A4A; }
@keyframes standby { 50% { border-color: #3A3A3A; } }
@keyframes go { from { transform: scale(1.7); } }

/* ---------- clients: the homepage's brands, opening the light section ---------- */
.credits-top { padding-top: clamp(80px, 12vh, 140px); }
.credits-top .wrap { border-top: 0; padding-top: 0; }
.credits-sub { margin-top: 12px; color: var(--muted-ink); font-size: 1.12rem; }

/* ---------- phones and small tablets ---------- */
@media (max-width: 800px) {
  .hello { grid-template-columns: 1fr; min-height: 0; gap: 26px; padding-block: 0 72px; }
  .hello .rig { --pw: min(46vw, 196px); --strap: 64px; grid-row: 1; margin-top: 0; }
  .story { grid-template-columns: 1fr; gap: 40px; }
  .story-photo { position: relative; top: 0; width: min(100%, 460px); }
  .story-frame { max-height: none; }
  .photo-tape { left: -6px; }
  .cue { grid-template-columns: 1fr; gap: 8px; padding-left: 40px; }
  .cue-call { padding-top: 0; }
  .cue-light { top: .15rem; }
}
