/* The homepage's intelligence pieces: the hero film (assets/home/hero-film.js) and the sections built around
   invited agents, visiting agents, the library and presentations (docs/homepage-intelligence.md). */

/* ---- The hero film: over the stage (bar to foot) from the first paint, then over the frame's body once the
   runner has built it. Its poster is the Together still, wide or narrow by the stage's width. */
.hero-film { position: absolute; z-index: 4; inset: 0; overflow: hidden; background: #f5f1e5; pointer-events: none; transition: opacity .45s ease, visibility 0s 0s }
.hero-film[data-shown="false"] { opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s .45s }
.hero-film :is(.hero-film-poster, .hero-film-player, .hero-film-still) { position: absolute; inset: 0; width: 100%; height: 100% }
.hero-film-poster > svg, .hero-film-player > svg { display: block; width: 100%; height: 100% }
.hero-film[data-poster="off"] .hero-film-poster { visibility: hidden }
.hero-film-still { object-fit: contain }
.hero-film-poster > .hero-poster-n { display: none }
@container replay (max-width: 559px) {
  .hero-film-poster > .hero-poster-w { display: none }
  .hero-film-poster > .hero-poster-n { display: block }
}
.replay .rp-body:has(> .hero-film) { position: relative }
@media (scripting: enabled) {
  .replay:not([data-built]) > .hero-film { top: var(--rp-bar); bottom: calc(var(--rp-status) + var(--rp-label) + 1.4rem + 1px) }
  .replay:not([data-built]):has(> .hero-film) > .rp-account { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap }
}
@media (scripting: none) { .hero-film { display: none } }
@media (prefers-reduced-motion: reduce) { .hero-film, .hero-film[data-shown="false"] { transition: none } }
@media (max-width: 800px) {
  .hero > .session.replay:not([data-built]) > .hero-film { top: var(--rp-bar); bottom: calc(var(--rp-status-narrow) + var(--rp-label-narrow) + 1.4rem + 1px) }
}

/* ---- The intelligence sections: Invite any AI (gallery and four rooms), visiting agents, the library builder and
   presentations. Lotties are 328 × 410 and drawn no smaller than 328px wide, so their words stay at 12px or more. */
.intel { padding: clamp(44px,5.4vw,96px) var(--pad); border-bottom: 1px solid var(--line) }
.intel h2 { font-size: clamp(2.1rem,3.5vw,4rem); line-height: 1.02; letter-spacing: -.01em }
.intel-head { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: clamp(1.2rem,4vw,4.5rem); align-items: end; margin-bottom: clamp(26px,3vw,48px) }
.intel-head > p { font-size: 1.06rem; line-height: 1.55; color: #33493f }
.intel .lottie-loop { margin: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #f5f1e5; min-width: 0 }
.intel .lottie-loop img, .intel .lottie-loop .lottie-player svg { display: block; width: 100%; height: auto }
.intel-invite { display: grid; grid-template-columns: minmax(328px,440px) minmax(0,1fr); gap: clamp(1.5rem,4vw,4.5rem); align-items: center }
.intel-facts { display: grid; gap: 0; margin: 0; border-top: 1px solid var(--line) }
.intel-facts > div { display: grid; grid-template-columns: minmax(9rem,13rem) minmax(0,1fr); gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line) }
.intel-facts dt { font-weight: 700; font-size: 1.15rem }
.intel-facts dd { margin: 0; color: #33493f; line-height: 1.5 }
.rooms-head { margin: clamp(40px,4.6vw,76px) 0 clamp(18px,2vw,28px); font-size: clamp(1.5rem,2.2vw,2.3rem) }
.rooms { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: clamp(18px,2.2vw,36px) }
.room { display: grid; grid-template-columns: minmax(328px,360px) minmax(0,1fr); gap: 1.2rem; align-items: center; min-width: 0 }
@media (min-width: 1600px) { .rooms { grid-template-columns: repeat(4, minmax(0,1fr)) } .room { grid-template-columns: minmax(0,1fr); align-items: start } }
.room h3 { font-size: 1.35rem; line-height: 1.15; margin: .1rem 0 .45rem }
.room-copy p:not(.kicker) { color: #33493f; line-height: 1.5; font-size: .96rem }
.room-copy .kicker { margin-bottom: .2rem; color: #4a5f53 }
.intel-split { display: grid; grid-template-columns: minmax(0,1fr) minmax(328px,440px); gap: clamp(1.5rem,5vw,6rem); align-items: center }
.intel-build .intel-split { grid-template-columns: minmax(328px,440px) minmax(0,1fr) }
.intel-copy > p:not(.kicker):not(.moment-links) { margin-top: 1.1rem; font-size: 1.06rem; line-height: 1.55; color: #33493f }
.intel-copy .receipt { margin-top: 1.4rem }
.intel-copy .moment-links { margin-top: 1.3rem }
.intel-visit { background: #f1efe4 }
.intel-present { background: #0f1a2b; color: #e8eef8 }
.intel-present .intel-copy > p:not(.kicker):not(.moment-links), .intel-present .receipt dd { color: #d5e0ef }
.intel-present .kicker, .intel-present .receipt dt { color: #b8c9e2 }
.intel-present a { color: #ffd28a }
.intel-present .lottie-loop { border-color: #2b3d5c; background: #0f1a2b }
@media (max-width: 1240px) { .rooms { grid-template-columns: minmax(0,1fr) } }
@media (max-width: 900px) {
  .intel-head, .intel-invite, .intel-split, .intel-build .intel-split { grid-template-columns: minmax(0,1fr) }
  .intel-invite > .lottie-loop, .intel-split > .lottie-loop { max-width: 440px; width: 100%; justify-self: center }
  .intel-build .intel-split > .lottie-loop { order: 2 }
}
@media (max-width: 720px) {
  .room { grid-template-columns: minmax(0,1fr); justify-items: center }
  .room > .lottie-loop { width: 100%; max-width: 440px }
  .room-copy { width: 100%; max-width: 440px }
  .intel-facts > div { grid-template-columns: minmax(0,1fr); gap: .25rem }
}
/* On the narrowest phones the loops reach into the gutter (16px each side), so they are drawn at 328px and up. */
@media (max-width: 400px) { .intel .lottie-loop { width: calc(100% + 2 * var(--pad) - 32px) !important; max-width: none !important; margin-inline: calc(16px - var(--pad)) } }
