/* ==========================================================================
   Intro reel: "I lead teams. I still design."
   A 31-second product-design intro that covers the hero, then becomes it: its last frame is the
   homepage hero, and the dark stage dissolves into the page. Editorial and restrained: the site's
   type, a 12-column grid, interface fragments drawn as simple blocks, orange only for key words,
   numbers and the human decision points. Sizes use container units (cqw/cqh) of .intro__frame.
   ========================================================================== */
.intro {
  --ink: #0c0f14;
  --paper: #f3f4f6;
  --mute: #8b93a1;
  --dim: #5b6474;
  --line: #262d38;
  --or: #e8501a;
  --or-text: #ff6a2b; /* orange for small text on ink: 6.3:1 */
  --sky: #38bdf8;
  position: absolute;
  inset: 0 0 auto 0;
  height: calc(100svh - var(--header-h));
  min-height: 420px;
  z-index: 30; /* under the header (50) and VEMA (55, 56) */
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
.intro[hidden] {
  display: none;
}
.intro__frame {
  position: relative;
  height: 100%;
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
  container-type: size;
}
@media (min-width: 720px) {
  .intro__frame {
    width: min(100% - 4rem, var(--container));
  }
}

/* The hero sits 50px higher than the usual hero spacing (as with the previous reel) */
.hero:has(.intro) {
  padding-top: max(1.5rem, calc(clamp(3.5rem, 2rem + 7vw, 8rem) - 50px));
}

/* While the reel plays, the real hero waits underneath (still in the accessibility tree) */
.hero.intro-on > .container > .eyebrow,
.hero.intro-on > .container > h1,
.hero.intro-on > .container > .hero__lede,
.hero.intro-on > .container > .hero__cta {
  opacity: 0;
}

/* The site's 12-column grid, faint, behind everything */
.intro__grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter, 1.5rem);
  pointer-events: none;
}
.intro__grid i {
  display: block;
  background: rgba(255, 255, 255, 0.028);
  border-inline: 1px solid rgba(255, 255, 255, 0.035);
  transform-origin: 50% 0;
}

.intro__stage {
  position: absolute;
  inset: 0;
}
.intro__art {
  position: absolute;
  left: 46%;
  right: 0;
  top: 11%;
  bottom: 13%;
  width: 54%;
  height: 76%;
  overflow: visible;
}
@container (orientation: portrait) {
  .intro__art {
    left: 0;
    width: 100%;
    top: 43%;
    height: 47%;
  }
}
.intro__art text {
  font-family: var(--font-body);
  font-weight: 500;
}
@container (orientation: portrait) { /* the artboard is smaller on phones: larger labels */
  .intro__art .lab { font-size: 24px; }
  .intro__art .lab-s,
  .intro__art .lab-o { font-size: 17px; }
  .intro__art .trk { font-size: 21px; }
  .intro__art .lab-btn { font-size: 15px; }
}
/* Nothing shows until the first frame is drawn */
.intro [data-s],
.intro__art,
.intro-sel,
.intro-cursor {
  visibility: hidden;
}

/* Text column: left in landscape, top in portrait */
.intro-t {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 42%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.intro-t--wide {
  width: 100%;
}
@container (orientation: portrait) {
  .intro-t {
    width: 100%;
    top: 7%;
    bottom: auto;
    height: 34%;
    justify-content: flex-end;
  }
  .intro-t--wide {
    top: 0;
    bottom: 0;
    height: auto;
    justify-content: center;
  }
}
.intro-t > * + * {
  margin-top: clamp(0.75rem, 2.2cqh, 1.6rem);
}

/* Masked lines: each line rises out of its own slot */
.intro .m {
  display: block;
  overflow: hidden;
  padding: 0.04em 0 0.1em;
  margin: -0.04em 0 -0.1em;
}
.intro .m > span {
  display: inline-block;
  transform: translateY(110%);
  will-change: transform;
}

.intro-k {
  font-family: var(--font-body);
  font-size: clamp(11px, 1.05cqw, 14px);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--mute);
}
.intro-h {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, min(4.5cqw, 8cqh), 66px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--paper);
}
.intro-h--m {
  font-size: clamp(24px, min(3.7cqw, 7cqh), 54px);
}
.intro-h--xl {
  font-size: clamp(36px, min(8.2cqw, 13.5cqh), 124px);
  line-height: 1;
  letter-spacing: -0.035em;
}
@container (orientation: portrait) {
  .intro-h {
    font-size: clamp(24px, 8.4cqw, 46px);
  }
  .intro-h--xl {
    font-size: clamp(34px, 13cqw, 72px);
  }
}
.intro-h em,
.intro-num em {
  font-style: normal;
  color: var(--or);
}
.intro-soft {
  font-weight: 500;
  color: #aab1bd;
}
.intro-strong {
  font-weight: 800;
}
.intro-sm {
  font-family: var(--font-body);
  font-size: clamp(13px, 1.45cqw, 19px);
  font-weight: 500;
  color: var(--mute);
}
@container (orientation: portrait) {
  .intro-sm {
    font-size: clamp(12px, 3.6cqw, 16px);
  }
}

/* A row of small words that light up one at a time */
.intro-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35em 0.6em;
}
.intro-row > span {
  display: inline-block;
}
.intro-row .intro-arrow {
  color: var(--dim);
}
.intro-chip {
  display: inline-block;
  padding: 0.3em 0.75em;
  border: 1px solid #343c49;
  border-radius: 999px;
  font-size: 0.86em;
  color: #c9ced6;
}

/* Big numbers */
.intro-nums {
  display: grid;
}
.intro-nums > div {
  grid-area: 1 / 1;
}
.intro-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, min(10.5cqw, 17cqh), 168px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
@container (orientation: portrait) {
  .intro-num {
    font-size: clamp(52px, 19cqw, 110px);
  }
}
.intro-num + .intro-sm {
  margin-top: 0.6rem;
  font-size: clamp(14px, 1.7cqw, 22px);
  color: #c9ced6;
}

/* Scene 08: five disciplines, then one */
.intro-words {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  white-space: nowrap;
}
.intro-words > span {
  display: inline-block;
  flex: none; /* never squeezed: words keep their width and slide, they don't get clipped */
  overflow: hidden;
  vertical-align: bottom;
}
@container (orientation: portrait) {
  .intro-h.intro-words {
    flex-wrap: wrap;
    row-gap: 0.1em;
    font-size: clamp(22px, 6.8cqw, 40px);
  }
}
.intro-words .intro-dot { /* centered on the capitals, like the site's separators */
  display: inline-block;
  align-self: center;
  width: 0.16em;
  height: 0.16em;
  margin: 0.06em 0.32em 0;
  border-radius: 50%;
  background: var(--or);
}

/* Scene 09: the homepage hero, drawn by the reel. Mirrors .hero .eyebrow / .hero h1 exactly. */
.intro-final {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
}
.intro-final .intro-k {
  margin-bottom: 1.1rem;
}
.intro-final .eyebrow {
  color: var(--sky);
}
.intro-final__h1 {
  margin-top: 1.4rem;
  max-width: 14ch;
  font-family: var(--font-display);
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
  color: var(--paper);
}
.intro-final__h1 em {
  font-style: normal;
  color: var(--sky);
}
.hero:has(.intro-play) .eyebrow {
  padding-right: 56px; /* room for the replay button, in the reel and on the page alike */
}

/* The designer's selection: a frame with handles and a live size tag */
.intro-sel {
  position: absolute;
  left: 0;
  top: 0;
  border: 1.5px solid var(--or);
  pointer-events: none;
  opacity: 0;
}
.intro-sel b {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--ink);
  border: 1.5px solid var(--or);
}
.intro-sel b:nth-child(1) { left: -5px; top: -5px; }
.intro-sel b:nth-child(2) { right: -5px; top: -5px; }
.intro-sel b:nth-child(3) { left: -5px; bottom: -5px; }
.intro-sel b:nth-child(4) { right: -5px; bottom: -5px; }
.intro-sel span {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--or);
  color: #fff;
  font: 600 11px/1.4 var(--font-body);
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.intro-cursor {
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 24px;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Controls: top-right while playing (the replay button lives here afterwards) */
.intro__ui {
  position: absolute;
  top: 14px;
  right: 0;
  display: flex;
  gap: 8px;
  z-index: 2;
}
.intro-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  min-width: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(12, 15, 20, 0.6);
  color: var(--paper);
  font: 600 13px/1 var(--font-body);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.intro-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
}
.intro-btn:focus-visible,
.intro__bar:focus-visible,
.intro-play:focus-visible {
  outline: 3px solid var(--sky);
  outline-offset: 3px;
}
.intro-btn.is-waiting { /* sound is on but the browser waits for a first tap: invite one */
  border-color: var(--or);
  animation: intro-wait 1.8s ease-in-out infinite;
}
.intro-btn__hint {
  display: none;
}
.intro-btn--icon.is-waiting {
  width: auto;
  padding: 0 12px 0 10px;
}
.intro-btn.is-waiting .intro-btn__hint {
  display: inline;
}
@keyframes intro-wait {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 80, 26, 0); }
  50% { box-shadow: 0 0 0 5px rgba(232, 80, 26, 0.35); }
}
@media (prefers-reduced-motion: reduce) {
  .intro-btn.is-waiting { animation: none; }
}
.intro-btn svg {
  width: 14px;
  height: 14px;
}
.intro-btn--icon {
  padding: 0;
  justify-content: center;
  width: 36px;
}
.intro-btn .i-play,
.intro-btn.is-paused .i-pause,
.intro-btn[aria-pressed="true"] .i-off,
.intro-btn[aria-pressed="false"] .i-on {
  display: none;
}
.intro-btn.is-paused .i-play {
  display: block;
}

/* Timeline: a thin line along the bottom edge; drag it, or use the arrow keys */
.intro__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  touch-action: none;
  transition: height 0.15s ease;
  z-index: 2;
}
.intro__bar::before { /* a taller, invisible grab area */
  content: "";
  position: absolute;
  inset: -20px 0 0;
}
.intro__bar:hover,
.intro__bar:focus-visible,
.intro__bar.is-drag {
  height: 6px;
}
.intro__bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--or);
}

/* Replay: the orange dot button at the top-right of the hero, like the current reel's */
.intro-play {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  right: max(1.25rem, calc((100vw - var(--container)) / 2));
  z-index: 40;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--brand-orange, #e8501a);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 32px -8px rgba(232, 80, 26, 0.8);
  transition: transform 0.2s ease, opacity 0.2s ease;
  visibility: hidden;
}
@media (min-width: 720px) {
  .intro-play {
    right: max(2rem, calc((100vw - var(--container)) / 2));
  }
}
.intro-play svg {
  width: 18px;
  height: 18px;
  margin-left: 2px;
}
.intro-play:hover {
  transform: scale(1.08);
}
.intro-play.is-ready {
  visibility: visible;
}
.intro-play.is-ready.is-away {
  visibility: hidden;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}
