/* Stella: the orb's still frame, the launcher pill and the conversation panel (js/stella/). */

/* Any orb container: a CSS-drawn still of the galaxy until WebGL has drawn (no image, so never the LCP). */
.orb-still { background: radial-gradient(circle at 50% 50%, #e6fbff 0, #5fd0e0cc 5%, #134350 20%, #0c1b21 39.4%, #3cc3d455 40.2%, #3cc3d400 47%); }
.orb-still.is-ready { background: none; }
/* No WebGL (orb-gl.js adds .no-webgl): a real still of the orb, fetched only in that case. */
.orb-still.no-webgl { background: url(/assets/stella/orb-still.png) center / contain no-repeat; }
.orb-still > canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 0.4s; }
.orb-still.is-ready > canvas { opacity: 1; }

/* Launcher: bottom right, replaces the old ElevenLabs pill. */
.stella-launcher {
  position: fixed; z-index: 40;
  right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 4px; padding: 5px; border-radius: 999px;
  background: #ffffffeb; backdrop-filter: blur(10px); border: 1px solid var(--line);
  box-shadow: 0 18px 40px -18px #10161a55;
}
.stella-launcher__talk {
  display: inline-flex; align-items: center; gap: 10px; padding: 0 16px 0 0; border: 0; border-radius: 999px;
  background: none; color: var(--ink); font: 600 0.95rem/1 var(--font-body); cursor: pointer; touch-action: pan-y;
}
.stella-launcher__orb { width: 46px; height: 46px; border-radius: 50%; }
.stella-launcher__type {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
}
.stella-launcher__type svg { width: 18px; height: 18px; }
/* Every screen: steps aside while the film is on screen (js/stella/stella.js sets .is-away). */
.stella-launcher { transition: opacity 0.3s ease, translate 0.3s cubic-bezier(.2,.8,.2,1), visibility 0s; }
.stella-launcher.is-away {
  opacity: 0; translate: 0 12px; visibility: hidden; pointer-events: none;
  transition: opacity 0.3s ease, translate 0.3s cubic-bezier(.2,.8,.2,1), visibility 0s 0.3s;
}
@media (prefers-reduced-motion: reduce) { .stella-launcher, .stella-launcher.is-away { transition: none; } }
/* Phones: tucked away while the hero's own Stella buttons are on screen (js/stella/stella.js sets .is-tucked). */
@media (max-width: 600px) {
  .stella-launcher.is-tucked {
    opacity: 0; translate: 0 12px; visibility: hidden; pointer-events: none;
    transition: opacity 0.3s ease, translate 0.3s cubic-bezier(.2,.8,.2,1), visibility 0s 0.3s;
  }
}
@media (max-width: 600px) and (prefers-reduced-motion: reduce) { .stella-launcher.is-tucked { transition: none; } }

/* Panel */
.stella-panel {
  position: fixed; z-index: 45; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(380px, calc(100vw - 32px)); max-height: min(640px, calc(100dvh - 32px));
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border-radius: 26px;
  background: linear-gradient(170deg, #fff 0%, #f5f9fa 60%, var(--mist) 100%);
  border: 1px solid var(--line); box-shadow: 0 40px 80px -30px #10161a66;
}
@media (max-width: 560px) {
  .stella-panel { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); width: auto; max-height: 86dvh; border-radius: 26px 26px 20px 20px; }
}
.stella-panel__head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px 18px; border-bottom: 1px solid var(--line); }
.stella-panel__who { display: grid; line-height: 1.25; }
.stella-panel__who strong { font: 600 1.05rem var(--font-display); letter-spacing: -0.02em; }
.stella-panel__who small { color: var(--ink-2); font-size: 0.82rem; }
.stella-panel__who .brand-name { font-size: 1em; } /* the styled company name: lockup.css owns its look */
.stella-panel__mark { flex: none; width: auto; height: 34px; }
.stella-panel__x {
  display: grid; place-items: center; width: 40px; height: 40px; margin-left: auto;
  border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
}
.stella-panel__foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; max-width: none;
  padding: 10px 18px 14px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 0.8rem;
}
.stella-panel__foot a { color: #055768; } /* brand --teal-ink */

.stella-view { display: grid; align-content: start; gap: 14px; padding: 18px; overflow: auto; }
.stella-view h2 { font-size: 1.25rem; line-height: 1.2; letter-spacing: -0.02em; }
.stella-view p { color: var(--ink-2); font-size: 0.95rem; }
.stella-row { display: flex; flex-wrap: wrap; gap: 8px; }
.stella-row--center { justify-content: center; }
.stella-row .btn { min-height: 44px; padding: 0 16px; }
.stella-link { justify-self: start; padding: 6px 2px; border: 0; background: none; color: #055768; font: inherit; font-size: 0.95rem; text-decoration: underline; cursor: pointer; }
.stella-view .stella-status { font: 600 0.78rem var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: #055768; }
.stella-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.stella-consent__ai { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.stella-consent .stella-consent__ai { color: var(--ink); font-size: 0.92rem; }
.stella-chip {
  flex: none; padding: 2px 8px; border-radius: 999px; font: 600 0.72rem var(--font-mono);
  color: #055768; background: rgb(5 87 104 / 0.1); border: 1px solid rgb(5 87 104 / 0.3);
}

.stella-talk { justify-items: center; text-align: center; }
.stella-talk__orb { width: min(220px, 56vw); aspect-ratio: 1; border-radius: 50%; }
.stella-view .stella-caption { min-height: 3.2em; max-width: 30ch; color: var(--ink); font-size: 1rem; }
.stella-view .stella-caption.is-you { color: var(--ink-2); }
.stella-end { color: #932d43; border-color: rgb(147 45 67 / 0.4); }

.stella-chat { grid-template-rows: auto 1fr auto; min-height: 300px; }
.stella-chat__top { display: flex; align-items: center; gap: 10px; }
.stella-chat__top .stella-link { margin-left: auto; }
.stella-chat__orb { flex: none; width: 44px; height: 44px; border-radius: 50%; }
.stella-chat__msgs { display: grid; align-content: start; gap: 8px; }
.stella-view .stella-msg { max-width: 85%; padding: 9px 13px; border-radius: 16px; color: var(--ink); }
.stella-msg--stella { justify-self: start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.stella-view .stella-msg--you { justify-self: end; background: var(--ink); color: var(--white); border-bottom-right-radius: 6px; }
.stella-chat__form { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.stella-chat__form:focus-within { outline: 2px solid var(--teal); outline-offset: 2px; }
.stella-chat__form input { flex: 1; min-width: 0; padding: 6px 10px; border: 0; background: transparent; color: var(--ink); font: 400 16px var(--font-body); }
.stella-chat__form input:focus { outline: none; }
.stella-chat__form .btn { min-height: 40px; padding: 0 16px; }

.stella-note { justify-items: center; text-align: center; }

@media (prefers-reduced-motion: reduce) { .orb-still > canvas { transition: none; } }
