/* KI TECH — KIT's voice layer (tour, dock, captions, chat) and the two new sections.
   Kept apart from style.css so the design system stays readable. */

/* ---------- tour CTA ---------- */
.btn--tour { background: var(--ink); color: var(--mat-lit); padding-inline: 14px 16px; }
.btn--tour:hover { background: #26302d; }
.playdot { width: 22px; height: 22px; border-radius: 50%; background: var(--yellow); display: inline-grid; place-items: center; flex: none; }
.playdot::after { content: ""; width: 0; height: 0; border-left: 8px solid var(--ink); border-top: 5px solid transparent; border-bottom: 5px solid transparent; margin-left: 2px; }
.btn--big { padding: 15px 22px; font-size: 16.5px; }
.tourcta { display: flex; flex-direction: column; gap: 8px; }
.tourcta__hint { font-size: 13.5px; color: var(--steel); }
/* the tour button breathes until someone has taken the tour once */
.tourcta .btn--yellow { position: relative; animation: sonar 2.4s ease-out infinite; }
body.has-toured .tourcta .btn--yellow { animation: none; }
@keyframes sonar { 0% { box-shadow: 0 0 0 0 rgba(255, 196, 0, .55); } 70%, 100% { box-shadow: 0 0 0 16px rgba(255, 196, 0, 0); } }
.asklink { margin-top: 14px; font: inherit; font-size: 14.5px; font-weight: 500; background: none; border: 0; padding: 0 0 2px; cursor: pointer; color: var(--ink); border-bottom: 2px solid var(--yellow); }
.asklink:hover { border-color: var(--ink); }

/* ---------- while KIT boots: a quiet placeholder so the stage never looks broken or empty ---------- */
.stage.is-loading .stage__canvas { display: flex; align-items: center; justify-content: center; }
.stage.is-loading .stage__canvas::before {
  content: ""; width: 15%; aspect-ratio: 1; border-radius: 50%;
  background: var(--yellow); opacity: .85;
  animation: kit-pulse 1.4s ease-in-out infinite;
}
@keyframes kit-pulse { 0%, 100% { transform: scale(.72); opacity: .55; } 50% { transform: scale(1); opacity: .95; } }
.stage__canvas canvas { transition: opacity .35s var(--ease); }
.stage.is-loading .stage__canvas canvas { opacity: 0; position: absolute; }

/* ---------- docked KIT: rides in the corner as a round button, bottom-anchored ---------- */
.stage { transition: none; cursor: default; }
.stage.is-docked {
  position: fixed; z-index: 70; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom));
  width: 108px; height: 108px; margin: 0; cursor: pointer;
  transition: transform .7s var(--ease);
  transform-origin: top left;
}
.stage.is-docked .stage__canvas { aspect-ratio: 1 / 1; width: 108px; height: 108px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 50% 40%, #f4f6f4, var(--mat-deep)); box-shadow: 0 10px 30px -10px rgba(16, 20, 19, .55), 0 0 0 2px var(--mat-lit), 0 0 0 4px var(--ink); transition: box-shadow .3s; }
.stage.is-docked:hover .stage__canvas, .stage.is-docked.is-talking .stage__canvas { box-shadow: 0 10px 30px -10px rgba(16, 20, 19, .55), 0 0 0 2px var(--mat-lit), 0 0 0 4px var(--yellow); }
.stage.is-docked .stage__tag { display: none; }
.stage__ask { display: none; }
.stage.is-docked .stage__ask { display: block; position: absolute; right: 118px; top: 50%; transform: translateY(-50%) translateX(8px); background: var(--ink); color: var(--mat-lit); font-size: 13.5px; font-weight: 500; padding: 8px 12px; border-radius: 2px; white-space: nowrap; opacity: 0; transition: opacity .3s, transform .3s var(--ease); pointer-events: none; }
.stage.is-docked:hover .stage__ask, .stage.is-docked.is-hint .stage__ask { opacity: 1; transform: translateY(-50%); }
.stage.is-docked .stage__ask::after { content: ""; position: absolute; right: -6px; top: 50%; margin-top: -6px; border: 6px solid transparent; border-left-color: var(--ink); border-right: 0; }

/* ---------- tour bar ---------- */
.tourbar { position: fixed; z-index: 65; left: 50%; top: 74px; transform: translate(-50%, calc(-100% - 96px)); display: flex; align-items: center; gap: 14px; padding: 8px 8px 8px 16px; background: var(--ink); color: var(--mat-lit); border-radius: 999px; box-shadow: 0 12px 30px -12px rgba(16, 20, 19, .6); transition: transform .5s var(--ease); max-width: calc(100% - 32px); }
.tourbar::before { content: ""; position: absolute; left: 16px; right: 16px; bottom: 3px; height: 2px; background: rgba(255, 255, 255, .15); border-radius: 2px; }
.tourbar::after { content: ""; position: absolute; left: 16px; bottom: 3px; height: 2px; width: var(--p, 0%); max-width: calc(100% - 32px); background: var(--yellow); border-radius: 2px; transition: width .5s var(--ease); }
.tourbar.is-on { transform: translate(-50%, 0); }
.tourbar__step { font-family: var(--display); font-weight: 700; font-size: 13px; color: #9aa49e; white-space: nowrap; }
.tourbar__name { font-size: 14.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tourbar__btn { font: inherit; font-size: 13.5px; font-weight: 500; border: 0; cursor: pointer; padding: 8px 14px; border-radius: 999px; background: var(--yellow); color: var(--ink); }
.tourbar__btn--stop { background: rgba(255, 255, 255, .12); color: var(--mat-lit); }
.tourbar__btn:hover { filter: brightness(1.08); }

/* ---------- captions ---------- */
.caption { position: fixed; z-index: 66; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); width: min(720px, calc(100% - 160px)); display: flex; align-items: flex-start; gap: 10px; padding: 14px 14px 14px 18px; background: var(--ink); color: var(--mat-lit); border-radius: 4px; box-shadow: 0 16px 40px -14px rgba(16, 20, 19, .6); opacity: 0; pointer-events: none; transition: opacity .35s, transform .5s var(--ease); }
.caption.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.caption p { flex: 1; font-size: clamp(15px, 1.4vw, 18px); line-height: 1.45; max-width: none; }
.caption .w { color: #8f9a94; transition: color .12s; }
.caption .w.on { color: var(--mat-lit); }
.caption.is-wait .w { color: #6e7873; }
.caption__stop { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: var(--mat-lit); font-size: 18px; line-height: 1; cursor: pointer; }
.caption__stop:hover { background: var(--yellow); color: var(--ink); }

/* ---------- chat ---------- */
.chat { position: fixed; z-index: 72; right: 18px; bottom: calc(140px + env(safe-area-inset-bottom)); width: min(400px, calc(100% - 36px)); max-height: min(560px, calc(100vh - 170px)); display: flex; flex-direction: column; background: var(--mat-lit); color: var(--ink); border: 1px solid var(--ink); box-shadow: 0 30px 60px -24px rgba(16, 20, 19, .6); opacity: 0; pointer-events: none; transform: translateY(14px) scale(.98); transform-origin: bottom right; transition: opacity .3s, transform .4s var(--ease); }
.chat.is-open { opacity: 1; pointer-events: auto; transform: none; }
.chat__head { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 14px 14px 12px 18px; border-bottom: 1px solid var(--line); background: var(--ink); color: var(--mat-lit); }
.chat__head b { font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.chat__head span { grid-column: 1; font-size: 12.5px; color: #9aa49e; }
.chat__close { grid-column: 2; grid-row: 1 / 3; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: var(--mat-lit); font-size: 20px; line-height: 1; cursor: pointer; align-self: center; }
.chat__close:hover { background: var(--yellow); color: var(--ink); }
.chat__log { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 10px 13px; font-size: 15px; line-height: 1.45; border-radius: 4px; }
.msg--bot { background: var(--mat); border: 1px solid var(--line); align-self: flex-start; }
.msg--me { background: var(--ink); color: var(--mat-lit); align-self: flex-end; }
.msg a { color: inherit; font-weight: 500; }
.chat__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px 10px; }
.chip { font: inherit; font-size: 13.5px; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--mat-lit); cursor: pointer; transition: background .2s, border-color .2s; }
.chip:hover { border-color: var(--ink); }
.chip--y { background: var(--yellow); border-color: var(--yellow); font-weight: 500; }
.chat__form { display: flex; gap: 6px; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.chat__form input { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 2px; }
.chat__form input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.chat__mic, .chat__send { font: inherit; font-size: 14.5px; font-weight: 500; border: 0; border-radius: 2px; cursor: pointer; }
.chat__mic { width: 42px; display: grid; place-items: center; background: var(--mat); border: 1px solid var(--line); color: var(--ink); }
.chat__mic svg { width: 18px; height: 18px; }
.chat__mic.is-on { background: var(--yellow); border-color: var(--yellow); animation: sonar 1.6s ease-out infinite; }
.chat__send { padding: 0 14px; background: var(--ink); color: var(--mat-lit); }

/* ---------- Found by Google and AI ---------- */
.found__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(28px, 4vw, 70px); align-items: start; }
.found__pts { display: grid; gap: 22px; margin-top: 30px; }
.found__pts > div { padding-top: 18px; border-top: 1px solid var(--line); }
.found__pts h3 { margin-bottom: 8px; }
.found__pts p { font-size: 16px; }
.ask { background: var(--mat-lit); border: 1px solid var(--ink); padding: 18px; position: sticky; top: 92px; }
.ask__tabs { display: flex; gap: 6px; padding: 4px; background: var(--mat); border: 1px solid var(--line); width: max-content; margin-bottom: 18px; }
.ask__tab { font: inherit; font-size: 14px; font-weight: 500; padding: 9px 16px; border: 0; background: none; cursor: pointer; color: var(--steel); }
.ask__tab.is-on { background: var(--ink); color: var(--mat-lit); }
.ask__q { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -.02em; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 999px; margin-bottom: 16px; }
.ask__pane { display: none; padding: 16px; background: #fff; border: 1px solid var(--line); }
.ask[data-mode="google"] .ask__pane--google, .ask[data-mode="ai"] .ask__pane--ai { display: block; }
.ask__url { font-size: 13px; color: #1a7f3a; }
.ask__title { font-size: 19px; color: #1a0dab; margin: 4px 0 6px; line-height: 1.25; }
.ask__desc { font-size: 14.5px; color: #4d5156; }
.ask__meta { font-size: 13px; color: var(--steel); margin-top: 8px; }
.ask__ai { font-size: 15.5px; line-height: 1.55; }
.ask__ai b { background: rgba(255, 196, 0, .35); padding: 0 3px; }
.ask__cite { margin-top: 12px; font-size: 13px; color: var(--steel); padding-left: 10px; border-left: 2px solid var(--yellow); }
.ask__note { margin-top: 12px; font-size: 12.5px; color: var(--steel); }

/* ---------- Films: the bench goes dark for the screening room ---------- */
.films { background: var(--ink); color: var(--mat-lit); }
.films .head { border-color: var(--mat-lit); }
.films .head .count, .films .lead { color: #9aa49e; }
.reel { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 28px); margin-top: 34px; }
.film { position: relative; margin: 0; }
.film--wide { grid-column: span 2; }
.film video { width: 100%; height: auto; display: block; background: #000; border: 1px solid rgba(255, 255, 255, .14); }
.film figcaption { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: baseline; padding: 12px 2px 0; }
.film figcaption span { font-size: 12.5px; color: var(--yellow); }
.film figcaption b { font-weight: 500; font-size: 15.5px; }
.film figcaption em { font-style: normal; font-size: 12.5px; color: #9aa49e; }
.films__foot { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .14); color: #c3cbc6; max-width: 62ch; }

@media (max-width: 1080px) {
  .found__grid { grid-template-columns: 1fr; }
  .ask { position: static; }
  .reel { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .btn--tour { display: none; }
  .mnav .btn { margin-bottom: 8px; justify-content: center; }
  .caption { width: calc(100% - 24px); bottom: calc(112px + env(safe-area-inset-bottom)); }
  .tourbar { top: 66px; gap: 10px; padding-left: 12px; }
  .tourbar__name { display: none; }
  .chat { right: 12px; bottom: calc(108px + env(safe-area-inset-bottom)); width: calc(100% - 24px); max-height: calc(100vh - 136px); }
  .stage.is-docked { width: 84px; height: 84px; right: 12px; bottom: calc(14px + env(safe-area-inset-bottom)); }
  .stage.is-docked .stage__canvas { width: 84px; height: 84px; }
  .stage.is-docked .stage__ask { right: 94px; }
}
@media (max-width: 620px) {
  .reel { grid-template-columns: 1fr; }
  .film--wide { grid-column: span 1; }
  .proof { gap: 18px 22px; }
}
