/* Home scene "hero" (tools/templates/pages/home/hero.mjs): the first screen. The MacBook is a rendered image
   sequence (tools/hero/render.mjs) that assets/scenes/hero.js scrubs on a canvas with the scroll. Without
   scenes the words come first and the last frame stands under them, still. Scoped to .sc-hero / .hr-*. */

.sc-hero { margin-top: calc(-1 * var(--header-stack)); background: var(--backdrop); }
.sc-hero .scene-pin { display: flex; flex-direction: column; align-items: center; text-align: center; padding: calc(var(--header-stack) + 72px) 0 112px; }

/* Words */
.sc-hero .hr-copy { order: 1; position: relative; padding: 0 24px; display: flex; flex-direction: column; align-items: center; }
.sc-hero .hr-title { font: 600 80px/1.04 var(--font-display); letter-spacing: -0.045em; color: #F5F6F8; text-wrap: balance; max-width: 1000px; }
.sc-hero .hr-title span { display: block; }
.sc-hero .hr-title .dim { color: #8A93A3; }
.sc-hero .hr-lead { font: 400 21px/32px var(--font); color: var(--text-secondary); max-width: 640px; margin-top: 22px; text-wrap: pretty; }
.sc-hero .hr-cta { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px 30px; margin-top: 32px; }
.sc-hero .btn.primary { background: #2F6BEF; color: #FFFFFF; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.sc-hero .btn.primary:hover { background: #3D77F5; }
.sc-hero .hr-more { display: inline-flex; align-items: center; gap: 4px; font: 400 19px/24px var(--font); color: #8FB2FF; }
.sc-hero .hr-more svg { width: 14px; height: 14px; transition: transform var(--d-fast) var(--ease-out); }
.sc-hero .hr-more:hover { text-decoration: underline; text-underline-offset: 4px; }
.sc-hero .hr-more:hover svg { transform: translateX(2px); }

/* The picture (still): the last frame, cropped to the Mac and the half beside it */
.sc-hero .hr-stage { order: 2; width: 100%; margin-top: 24px; }
.sc-hero .hr-still img {
  display: block; width: 100%; max-width: 1440px; height: auto; margin: 0 auto; aspect-ratio: 16 / 7.4; object-fit: cover; object-position: 50% 72%;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 7%, #000 90%, transparent); mask-image: linear-gradient(180deg, transparent, #000 7%, #000 90%, transparent);
}
.sc-hero .hr-film { display: none; }

/* The closing line */
.sc-hero .hr-caption { order: 3; margin-top: 8px; padding: 0 24px; font: 600 48px/1.08 var(--font-display); letter-spacing: -0.035em; color: #F5F6F8; text-wrap: balance; }
.sc-hero .hr-caption span { display: block; }
.sc-hero .hr-caption .dim { color: #8A93A3; }

/* Playing: the film fills the pinned screen; the words sit over its empty top and leave as you scroll */
.js-scenes .sc-hero .scene-pin { padding: 0; justify-content: flex-start; }
.js-scenes .sc-hero .hr-stage { position: absolute; inset: 0; margin: 0; }
.js-scenes .sc-hero .hr-still { display: none; }
.js-scenes .sc-hero .hr-film { display: block; width: 100%; height: 100%; }
.js-scenes .sc-hero .hr-copy {
  position: absolute; left: 0; right: 0; top: calc(var(--header-stack) + 4.4vh);
  opacity: calc(1 - var(--t, 0) * 1.15); transform: translateY(calc(var(--t, 0) * -56px));
  pointer-events: var(--copy-pe, auto);
}
.js-scenes .sc-hero .hr-title { font-size: min(80px, 8.4vh); }
.js-scenes .sc-hero .hr-lead { margin-top: min(22px, 2.3vh); }
.js-scenes .sc-hero .hr-cta { margin-top: min(32px, 3.3vh); }
.js-scenes .sc-hero .hr-caption {
  position: absolute; left: 0; right: 0; top: calc(var(--header-stack) + 5.5vh); margin: 0;
  font-size: min(56px, 6.2vh); opacity: var(--t, 0); transform: translateY(calc((1 - var(--t, 0)) * 28px));
}
/* Portrait frames (phones, tablets upright): the half rises into the space above the Mac, so the closing
   line comes in at the bottom, under the Mac */
.js-scenes .sc-hero[data-set="m"] .hr-caption {
  top: auto; bottom: max(5.2vh, 36px); font-size: min(40px, 7vw); line-height: 1.12;
  transform: translateY(calc((1 - var(--t, 0)) * 20px));
}

@media (max-width: 599px) {
  .sc-hero .scene-pin { padding: calc(var(--header-stack) + 40px) 0 88px; }
  .sc-hero .hr-copy { padding: 0 20px; }
  .sc-hero .hr-title { font-size: 42px; line-height: 1.08; letter-spacing: -0.04em; }
  .sc-hero .hr-lead { font-size: 17px; line-height: 25px; margin-top: 14px; max-width: 350px; }
  .sc-hero .hr-cta { margin-top: 22px; gap: 12px 22px; }
  .sc-hero .btn.lg { height: 46px; padding: 0 20px; font-size: 16px; }
  .sc-hero .hr-more { font-size: 17px; }
  .sc-hero .hr-stage { margin-top: 20px; }
  .sc-hero .hr-still img { aspect-ratio: 0.78; object-position: 50% 30%; }
  .sc-hero .hr-caption { font-size: min(30px, 7vw); line-height: 1.12; letter-spacing: -0.03em; padding: 0 20px; }
  .js-scenes .sc-hero .hr-copy { top: calc(var(--header-stack) + 3vh); }
  .js-scenes .sc-hero .hr-title { font-size: min(42px, 5vh); }
  .js-scenes .sc-hero .hr-lead { margin-top: min(14px, 1.7vh); }
  .js-scenes .sc-hero .hr-cta { margin-top: min(22px, 2.6vh); }
}
/* each sentence of the closing line on a line of its own where it fits; on the narrowest phones it wraps */
@media (min-width: 375px) { .sc-hero .hr-caption span { white-space: nowrap; } }
