/* home.css: places and sizes the home page's parts (the components live in components.css). */
@import url("../arsenal/pinned-stage.css");

/* ---------- hero: full-bleed footage, words over the left half ---------- */
.hero { position: relative; isolation: isolate; display: flex; align-items: center; min-height: clamp(660px, 100svh, 920px); padding-top: var(--header-h); box-sizing: border-box; background: var(--c-ink); overflow: hidden; }
.hero__media { position: absolute; inset: 0; z-index: 0; }
/* The change (asked by the user): the next picture fades in over the leaving clip's last half second, both clips playing
   (home.js keeps the leaving one running), in place of the kit's 1.4 s glide. */
[data-kit-scene="rotate"] [data-kit-slide] { position: absolute; inset: 0; margin: 0; visibility: hidden; overflow: hidden; opacity: 0; }
[data-kit-scene="rotate"] [data-kit-slide][data-kit-on] { visibility: visible; z-index: 2; opacity: 1; transition: opacity 500ms cubic-bezier(0.45, 0, 0.55, 1); }
[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-prev])) [data-kit-slide][data-kit-on] { transition: none; }
[data-kit-scene="rotate"] [data-kit-slide][data-prev] { visibility: visible; z-index: 1; opacity: 1; }
[data-kit-scene="rotate"] [data-kit-slide] video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; }
[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-kit-on])) [data-kit-slide]:not([data-kit-slide] ~ [data-kit-slide]) { visibility: visible; } /* the first picture shows before the scripts run */
[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-kit-on])) [data-kit-slide]:not([data-kit-slide] ~ [data-kit-slide]) { opacity: 1; } /* this site fades its slides in: the first one is there at once */
[data-kit-scene="rotate"] [data-kit-slide] video { inset: 1px; width: calc(100% - 2px); height: calc(100% - 2px); } /* each clip 1 px inside its frame: the first picture stays the largest paint */
[data-kit-scene="rotate"] [data-kit-slide] { --pos: 50% 0%; } /* the first picture framed as its clip */
.hero__shade { position: absolute; inset: 0; z-index: 1; pointer-events: none; background:
  linear-gradient(90deg, rgb(16 19 23 / 0.95) 0%, rgb(16 19 23 / 0.9) 30%, rgb(16 19 23 / 0.62) 46%, rgb(16 19 23 / 0.12) 64%, rgb(16 19 23 / 0) 74%),
  linear-gradient(0deg, rgb(16 19 23 / 0.45) 0%, rgb(16 19 23 / 0) 26%),
  linear-gradient(180deg, rgb(16 19 23 / 0.72) 0%, rgb(16 19 23 / 0.3) 12%, rgb(16 19 23 / 0) 24%); }
/* .wrap is content-box (its gutters sit outside its width), so the width leaves room for both gutters */
.hero__in { position: relative; z-index: 2; width: calc(100% - 2 * var(--gutter)); display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 3vw, 36px); padding-block: clamp(36px, 5vw, 64px) clamp(56px, 7vw, 88px); }
.hero__copy { max-width: 640px; min-width: 0; }
.hero__title { font-size: min(var(--fs-display), 9.4vw); color: var(--c-on-brand); }
/* the field word rolls over with the picture: the old one out (0-280 ms), the new one in (180-520 ms), home.js */
.hero__slot { display: block; position: relative; overflow: hidden; padding-bottom: 0.16em; margin-bottom: -0.16em; }
/* the roll clips the word, so on a computer the slot runs past the copy's 640 px, in em because the headline is in rem and grows with the visitor's browser text size while 640 px does not: a long field word never loses its end */
@media (min-width: 900px) { .hero__slot { margin-right: -4em; } }
.hero__word { display: block; color: var(--c-accent); white-space: nowrap; }
.hero__word--ghost { position: absolute; top: 0; left: 0; pointer-events: none; animation: hero-word-out 280ms cubic-bezier(0.5, 0, 0.75, 0) both; }
.hero__slot.is-swapping .hero__word:not(.hero__word--ghost) { animation: hero-word-in 340ms 180ms cubic-bezier(0.25, 1, 0.5, 1) both; }
@keyframes hero-word-out { to { transform: translateY(-0.7em); opacity: 0; } }
@keyframes hero-word-in { from { transform: translateY(0.7em); opacity: 0; } }
.hero__line { margin-top: 22px; max-width: 54ch; font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); color: var(--c-on-ink-soft); }
.hero__line strong { color: var(--c-on-brand); font-weight: 600; }
.hero .picker { width: 100%; max-width: 520px; }
.hero__card { position: absolute; z-index: 3; right: var(--cx, 6%); bottom: var(--cy, 20%); opacity: clamp(0, calc((var(--kit-in, 1) - 0.5) * 2), 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 18px)); }
.stop--hero { right: var(--gutter); bottom: 24px; }

@media (max-width: 899px) {
  .hero { display: flex; flex-direction: column; align-items: stretch; min-height: 0; }
  .hero__in { order: 1; padding-block: 28px 32px; }
  .hero__media { order: 2; position: relative; inset: auto; aspect-ratio: 16 / 10; }
  .hero__shade { display: none; }
  .hero__card { right: 12px; bottom: 12px; max-width: calc(100% - 24px); padding: 10px 12px; font-size: 0.875rem; }
  .stop--hero { left: 12px; right: auto; bottom: 12px; }
}

/* ---------- plan: tabs on paper, the console over aerial footage ---------- */
.plan__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.plan__title { max-width: 16ch; }
.plan__cta { margin-top: 28px; }
.plan__panel { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; padding: 64px clamp(16px, 2.4vw, 32px) clamp(16px, 2.4vw, 32px); }
.plan__panel:focus-visible { outline-offset: -6px; outline-color: var(--c-accent); }
.plan__scene { width: 100%; max-width: 760px; height: clamp(460px, 40vw, 530px); }
.plan__stage { min-height: 620px; }
@media (max-width: 959px) {
  .plan__grid { grid-template-columns: 1fr; }
  .plan__title { max-width: 20ch; }
  .plan__stage { min-height: 620px; }
  .plan__panel { padding: 60px 6px 12px; }
}

/* ---------- how: the logo-blue block, the route from the chat to new customers along it ---------- */
.how { position: relative; overflow: hidden; isolation: isolate; }
.how__clip { position: absolute; inset: -1px; z-index: -2; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; filter: grayscale(1) contrast(1.15); mix-blend-mode: luminosity; opacity: 0.55; }
.how__tint { position: absolute; inset: 0; z-index: -1; background: var(--c-brand); opacity: 0.62; }
.how__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 48px; }
.how__stage { position: relative; margin-top: clamp(12px, 2vw, 24px); }
/* the route stands on the block itself: no ground of its own, its line white, its token gold, its cards solid */
#how .how__route { position: relative; height: clamp(440px, 37vw, 480px); background: transparent; --rm-bold: var(--c-on-brand); --rm-light: color-mix(in srgb, var(--c-on-brand) 66%, var(--c-brand)); }
#how .how__route .rm-map { display: none; }
#how .how__route .rm-nm { z-index: 3; } /* the token's ring breathes out past the first name: the words stay on top */
@media (max-width: 960px) { #how .how__route .rm-nm span { font-size: 15px; } } /* the last two names stay apart on a tablet */
#how .how__route .rm-nm.now span { color: var(--c-accent); }
/* each station a round ink badge with the mark in it, so the mark stays three clear bars on the line */
#how .how__route .rm-st::before { content: ""; position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; border-radius: 50%; background: var(--c-ink); box-shadow: 0 0 0 2px var(--rm-light); }
#how .how__route .rm-st.lit::before { box-shadow: 0 0 0 2px var(--c-on-brand); }
#how .how__route .rm-st svg { left: -11px; top: -12px; width: 22px; height: 22px; }
#how .how__route .rm-st path { fill: var(--rm-light); stroke: none; }
#how .how__route .rm-st.lit path { fill: var(--c-on-brand); }
#how .how__route .rm-rep span { background: var(--c-accent); color: var(--c-on-accent); }
#how .how__route .rm-av { background: var(--c-brand); }
.how__stop { top: 0; right: 0; }
@media (max-width: 760px) {
  #how .how__route { height: 690px; }
}

/* ---------- worth ---------- */
.worth__head { max-width: 760px; }
.worth__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; margin-top: clamp(28px, 4vw, 44px); align-items: stretch; }
.worth__inputs { display: flex; flex-direction: column; justify-content: center; }
.worth__help { color: var(--c-ink-soft); font-size: var(--fs-small); }
.year__cta { margin-top: 2px; }
@media (max-width: 899px) { .worth__grid { grid-template-columns: 1fr; } }

/* ---------- outcomes: one stage stays pinned, the four jobs read beside it (the arsenal's pinned-stage) ---------- */
.outcomes { position: relative; overflow-x: clip; }
.outcomes .pinned-stage { --pin-stage-h: min(72vh, 640px); --pin-step-h: 66vh; --pin-hold: 12vh; --pin-top-narrow: var(--header-h); --pin-stage-h-narrow: 50svh; --pin-hold-narrow: 2svh; margin-top: clamp(16px, 2vw, 28px); }
@container (width >= 880px) { .outcomes .pinned-stage__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); } }
.outcomes .pinned-stage__title { font-weight: 800; font-stretch: var(--stretch-display); font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.375rem); }
.outcomes .pinned-stage__text { margin-top: 12px; font-size: 1.0625rem; }
.outcomes .pinned-stage__step .link-arrow { align-self: flex-start; margin-top: 16px; }
.outcomes .pinned-stage__fill { background: var(--c-accent); }
.outcomes .pinned-stage__node .pinned-stage__node-on { fill: var(--c-accent); }
.outcomes .pinned-stage__stage { border-radius: var(--radius-l); background: var(--c-ink-raised); box-shadow: none; }
.outcomes .pinned-stage__count { left: 14px; right: auto; top: 14px; height: 40px; background: var(--c-ink); -webkit-backdrop-filter: none; backdrop-filter: none; }
.outcomes .pinned-stage__count b { line-height: 18px; } /* under reduced motion the figure stands alone, with no roll */
.outcomes .pinned-stage__count i { background: var(--c-accent); }
.outcomes .pinned-stage__count i svg { fill: var(--c-on-accent); }
.outcomes__stop { top: 14px; right: 14px; }
/* a chapter: its clip and its scene. Out of turn it is display: none, so both rest and start again with their turn */
.ochapter { position: absolute; inset: 0; z-index: 1; margin: 0; opacity: 0; transition: opacity 420ms var(--ease-out); }
.ochapter.is-on { z-index: 2; opacity: 1; }
.ochapter[hidden] { display: none; }
.ochapter__clip { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; }
.ochapter__veil { position: absolute; inset: 0; background: rgb(16 19 23 / 0.2); }
.ochapter .ochapter__scene { position: absolute; top: 68px; width: min(400px, calc(100% - 32px)); }
.ochapter--found .ochapter__clip { object-position: 26% 50%; }
.ochapter--found .ochapter__scene, .ochapter--answer .ochapter__scene { right: 16px; }
.ochapter--reviews .ochapter__scene { left: 16px; top: auto; bottom: 12px; }
.ochapter--work .ochapter__clip { object-position: 60% 50%; }
.ochapter--work .ochapter__scene { left: 16px; }
@media (prefers-reduced-motion: reduce) { .ochapter { transition: none; } }
@container (width < 880px) {
  .outcomes .pinned-stage__count { display: none; }
  .outcomes .pinned-stage__step { padding-bottom: 96px; } /* the phone's bar stands over the foot of the room */
  .ochapter .ochapter__scene { left: 12px; right: 12px; width: auto; top: 62px; }
  .ochapter--reviews .ochapter__scene { top: auto; bottom: 8px; }
}
/* a phone's stage shows half the clip's width: the crop keeps to the man, whose face stands clear above the card */
@container (width < 560px) { .ochapter--reviews .ochapter__clip { object-position: 30% 0; } }
/* A phone's stage is half a short screen: the rating and its pop say the job there, so the card stays off the face. These
   three go by the screen: inside a scene, @container reads the scene's own box, which is narrow on a computer too. */
@media (max-width: 599px) { .ochapter--reviews .ochapter__scene .rev { display: none; } }
@media (max-width: 599px) and (max-height: 620px) { .ochapter--work .ochapter__scene .chart { height: 76px; } }
/* a phone on its side has no room to pin: the clip alone on top, then the four jobs read as a plain list */
@media (max-height: 480px) and (max-width: 1100px) { .ochapter .ochapter__scene { display: none; } }
@media (max-height: 480px) {
  @container (width < 880px) {
    .outcomes .pinned-stage__stage-wrap::before, .outcomes .pinned-stage__veil { display: none; }
    .outcomes .pinned-stage__stage { position: relative; top: auto; }
    .outcomes .pinned-stage__step { min-height: 0; opacity: 1 !important; }
  }
}

/* ---------- compare, who, faq ---------- */
.outcomes__head, .compare__head, .who__head { max-width: 780px; }
/* the dashboard's picture: new customers by where they came from */
.src-bars { display: grid; gap: 6px; margin-top: 10px; }
.src-bars__row { display: grid; grid-template-columns: 6.2em minmax(0, 1fr); align-items: center; gap: 8px; color: var(--c-ink-soft); font-size: 0.8125rem; line-height: 1.2; }
.src-bars__row i { display: block; width: var(--w); height: 9px; border-radius: 2px; background: var(--c-brand); }
.note-card--wide > span { flex: 1; min-width: 0; }

/* who: the tiles rest graded into the logo blue; a booking lights each one (scene tile-live sets --live) */
.tiles { position: relative; }
.tile__photo { filter: grayscale(calc(1 - var(--live, 1))); }
.tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--c-brand); mix-blend-mode: multiply; opacity: calc((1 - var(--live, 1)) * 0.9); }
.tile:hover, .tile:focus-visible { --live: 1 !important; }
.tile__booked { position: absolute; z-index: 2; top: 14px; padding: 9px 13px 9px 12px; opacity: 0; }
.tile__booked--left { left: 14px; }
.tile__booked--right { right: 14px; }
.tiles__stop { top: 14px; right: 14px; }
@media (max-width: 899px) { .tiles__stop { left: 14px; right: auto; } } /* the first tile spans the row: the stop stands across from its card */
/* one column: the whole board never shows at once, so each tile lights as it comes into view (home.js) and stays lit */
@media (max-width: 559px) {
  .tile__photo { transition: filter 500ms var(--ease-out), transform var(--dur-med) var(--ease-out); }
  .tile::before { transition: opacity 500ms var(--ease-out); }
  .tile__booked { transition: opacity 400ms 150ms var(--ease-out), transform 400ms 150ms var(--ease-out); }
  .tiles[data-scene-ready] .tile:not([data-seen]) { --live: 0 !important; }
  .tiles[data-scene-ready] .tile:not([data-seen]) .tile__booked { opacity: 0 !important; transform: translateY(10px) !important; }
  .tiles[data-scene-ready] .tile[data-seen] { --live: 1 !important; }
  .tiles[data-scene-ready] .tile[data-seen] .tile__booked { opacity: 1 !important; transform: none !important; }
}
.faq__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.faq__side { position: sticky; top: calc(var(--header-h) + 32px); }
.faq__cta { margin-top: 28px; }
@media (max-width: 859px) { .faq__grid { grid-template-columns: 1fr; } .faq__side { position: static; } }

/* ---------- close ---------- */
.close { position: relative; }
