/* Two homepage features: Swaey's looks (the cat or six pets, and the reply's words lit as they're said) and
   windows by voice. Drawn by assets/js/looks.js. */

/* ——— Swaey's looks ——— */
.lk-isl {
  position: absolute; z-index: 6; top: 0; left: 50%; transform: translateX(-50%);
  width: min(78%, 360px); min-height: 34px; padding: 7px 16px 10px 44px;
  background: #000; border-radius: 0 0 18px 18px;
  box-shadow: 0 10px 26px -8px rgba(255, 170, 60, .55);
}
.lk-peek { position: absolute !important; left: 12px; top: 4px; }
.lk-say { margin: 0; min-height: 2.6em; font: 600 12.5px/1.3 var(--font-sf); color: rgba(255,255,255,.16); letter-spacing: -.005em; }
/* A word before it's said is faint; as it's said it switches on in amber cells with a bloom, then settles into
   white type (the app's LED switch-on, 0.35 s). */
.lk-say .lw { position: relative; display: inline-block; white-space: pre; transition: color .35s ease-out .12s; }
.lk-say .lw::after {
  content: attr(data-w); position: absolute; inset: 0; color: #ffb347; white-space: pre; opacity: 0;
  text-shadow: 0 0 6px rgba(255, 170, 60, .95), 0 0 14px rgba(255, 140, 30, .55);
  -webkit-mask: conic-gradient(#000 25%, transparent 0 50%, #000 0 75%, transparent 0) 0 0 / 2px 2px;
          mask: conic-gradient(#000 25%, transparent 0 50%, #000 0 75%, transparent 0) 0 0 / 2px 2px;
}
.lk-say .lw.on { color: #fff; }
.lk-say .lw.on::after { animation: lk-lit .5s ease-out both; }
@keyframes lk-lit { 0% { opacity: 0; } 18% { opacity: 1; } 100% { opacity: 0; } }

.lk-win {
  position: absolute; left: 7%; right: 7%; top: 25%; bottom: 8%;
  display: flex; flex-direction: column; border-radius: 12px; overflow: hidden;
  background: rgba(14, 16, 26, .92); color: #fff;
  box-shadow: 0 0 0 .5px rgba(255,255,255,.14), 0 24px 50px -18px rgba(0,0,0,.7);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.lk-tl { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; flex: none; }
.lk-tl i, .wn-tl i { width: 9px; height: 9px; border-radius: 50%; background: #ff5f57; }
.lk-tl i:nth-child(2), .wn-tl i:nth-child(2) { background: #febc2e; }
.lk-tl i:nth-child(3), .wn-tl i:nth-child(3) { background: #28c840; }
.lk-tl b { margin-left: auto; margin-right: auto; padding-right: 36px; font-size: 11.5px; font-weight: 600; color: rgba(255,255,255,.75); }
.lk-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 42% 1fr; }
.lk-hero {
  position: relative; display: grid; place-items: center;
  background: radial-gradient(60% 60% at 50% 58%, rgba(33, 97, 255, .35), transparent 70%),
              conic-gradient(rgba(255,255,255,.035) 25%, transparent 0 50%, rgba(255,255,255,.035) 0 75%, transparent 0) 0 0 / 6px 6px;
  border-right: .5px solid rgba(255,255,255,.08);
}
.lk-side { display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 12px; min-width: 0; }
.lk-h { font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.lk-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.lk-pick button {
  position: relative; display: grid; place-items: center; aspect-ratio: 1; min-width: 0; padding: 0;
  border: 0; border-radius: 10px; background: rgba(255,255,255,.06); cursor: pointer;
  transition: background .15s, transform .15s;
}
.lk-pick button:hover { background: rgba(255,255,255,.11); transform: translateY(-1px); }
.lk-pick button.on {
  background: conic-gradient(rgba(107,179,255,.32) 25%, rgba(33,97,255,.18) 0 50%, rgba(107,179,255,.32) 0 75%, rgba(33,97,255,.18) 0) 0 0 / 3px 3px;
  box-shadow: inset 0 0 0 1.5px #6bb3ff, 0 0 14px rgba(33, 97, 255, .55);
}
.lk-pick button:focus-visible { outline: 2px solid #6bb3ff; outline-offset: 2px; }
.lk-pick [data-cat] { pointer-events: none; }
.lk-note { margin-top: auto; font-size: 11px; color: rgba(255,255,255,.45); }

/* ——— Windows by voice ——— */
.wn-isl {
  position: absolute; z-index: 9; top: 0; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 34px; max-width: 86%;
  background: #000; border-radius: 0 0 14px 14px; color: #fff;
  box-shadow: 0 10px 24px -8px rgba(var(--electric-rgb, 33, 97, 255), .7);
  transition: opacity .25s;
}
.wn-isl [data-cat] { position: absolute !important; left: 9px; top: 3px; }
.wn-isl p { margin: 0; font: 600 12px/1 var(--font-sf); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wn-isl em { flex: none; padding: 2px 6px; border-radius: 999px; background: rgba(40, 200, 64, .2); color: #6be38a; font: 600 10px/1.3 var(--font-mono, monospace); font-style: normal; }
.wn-isl.quiet { opacity: 0; }

.wn {
  position: absolute; display: flex; flex-direction: column; overflow: hidden;
  left: var(--x); top: var(--y); width: var(--w); height: var(--h); z-index: var(--z, 1);
  border-radius: 9px; background: #fff;
  box-shadow: 0 0 0 .5px rgba(0,0,0,.18), 0 14px 30px -12px rgba(0,0,0,.5);
  transition: left .55s var(--ease-island, cubic-bezier(.32, .72, 0, 1)), top .55s var(--ease-island, cubic-bezier(.32, .72, 0, 1)),
              width .55s var(--ease-island, cubic-bezier(.32, .72, 0, 1)), height .55s var(--ease-island, cubic-bezier(.32, .72, 0, 1));
}
.wn-tl { display: flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; flex: none; background: #f1f1f3; border-bottom: .5px solid rgba(0,0,0,.08); }
.wn-tl i { width: 7px; height: 7px; }
.wn-tl b { margin: 0 auto; padding-right: 30px; font: 600 9.5px/1 var(--font-sf); color: #555; white-space: nowrap; }
.wn-b { flex: 1; min-height: 0; padding: 9px; display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
.wn-b span { display: block; height: 7px; border-radius: 4px; background: #e6e7ec; flex: none; }
.wn-b--web span:first-child { height: 34%; border-radius: 6px; background: linear-gradient(135deg, #ffd5a8, #ff9fb2 55%, #a9b8ff); }
.wn-b--web span:nth-child(2) { width: 70%; height: 9px; background: #c9cbd3; }
.wn-b--web span:nth-child(4) { width: 55%; }
.wn-b--notes { background: #fffbe9; }
.wn-b--notes span { background: #e9dfb4; } .wn-b--notes span:first-child { width: 50%; height: 9px; background: #d8c56f; }
.wn-b--notes span:nth-child(3) { width: 80%; } .wn-b--notes span:nth-child(5) { width: 60%; }
.wn-b--msgs { justify-content: flex-end; }
.wn-b--msgs span { width: 52%; height: 14px; border-radius: 8px; }
.wn-b--msgs span:nth-child(2) { align-self: flex-end; width: 44%; background: #0a84ff; }
.wn-b--files { flex-direction: row; flex-wrap: wrap; align-content: flex-start; gap: 9px; }
.wn-b--files span { width: 26px; height: 21px; border-radius: 3px 3px 4px 4px; background: linear-gradient(#7cc4ff, #3a9bf2); }

@media (prefers-reduced-motion: reduce) {
  .wn { transition: none; }
  .lk-say .lw { transition: none; }
  .lk-say .lw.on::after { animation: none; }
}
