/*
 * NOAH-Talk visual shell
 *
 * This last-loaded stylesheet keeps the product surface deliberately separate
 * from the speech, privacy and robot runtimes. All selectors are scoped to the
 * Talk variant so the same DOM can continue to power NOAH Robot unchanged.
 */

body[data-noah-app-variant="talk"] {
  --noah-talk-page: #f7faff;
  --noah-talk-surface: #ffffff;
  --noah-talk-primary: #1769e0;
  --noah-talk-primary-hover: #0f55be;
  --noah-talk-cyan: #38bdf8;
  --noah-talk-ink: #0b1f3a;
  --noah-talk-muted: #52647a;
  --noah-talk-line: #d8e6f5;
  --noah-talk-shadow: 0 12px 32px rgba(22, 85, 160, 0.1);
}

/* Reduced Schmiede-inspired launch surface. */
body[data-noah-app-variant="talk"] > .start-screen {
  width: 100%;
  max-width: none;
  min-height: 100svh;
  grid-template-columns: minmax(20rem, 34rem) minmax(18rem, 24rem);
  grid-template-areas:
    "copy copy"
    "stage actions";
  justify-content: center;
  align-content: center;
  gap: clamp(1rem, 3vw, 3.5rem);
  padding: clamp(1.25rem, 4vw, 4rem);
  color: var(--noah-talk-ink);
  background:
    radial-gradient(circle at 50% 14%, rgba(56, 189, 248, 0.12), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, var(--noah-talk-page) 100%);
}

body[data-noah-app-variant="talk"] .start-copy {
  max-width: 70rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  text-align: center;
}

body[data-noah-app-variant="talk"] .start-logo-row {
  gap: 0.75rem;
}

body[data-noah-app-variant="talk"] .start-logo-row h1 {
  max-width: none;
  color: var(--noah-talk-ink);
  font-size: clamp(1.85rem, 3.2vw, 2.65rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

body[data-noah-app-variant="talk"] .start-copy .subtitle {
  display: block !important;
  max-width: none;
  margin: 0;
  color: var(--noah-talk-muted);
  font-size: clamp(0.95rem, 1.7vw, 1.08rem);
  font-weight: 650;
}

body[data-noah-app-variant="talk"] .brand-mark-image {
  width: 3.25rem;
  height: 3.25rem;
  border: 1px solid var(--noah-talk-line);
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: var(--noah-talk-shadow);
}

body[data-noah-app-variant="talk"] .start-companion-stage {
  min-height: clamp(14rem, 36vw, 23rem);
  grid-template-rows: 1fr;
  overflow: visible;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-noah-app-variant="talk"] .start-companion-stage > .start-robot-face {
  width: min(34rem, 88vw);
  height: clamp(10rem, 24vw, 18rem);
  max-width: none;
  max-height: none;
  animation: noahTalkLaunchFloat 6.8s ease-in-out infinite;
}

body[data-noah-app-variant="talk"] .noah-launch-pad {
  align-self: center;
  width: 100%;
  max-width: 24rem;
  display: grid;
  gap: 0.7rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body[data-noah-app-variant="talk"] .noah-big-button {
  min-height: 4.4rem;
  border: 1px solid transparent;
  border-radius: 1.25rem;
  color: #ffffff;
  background: linear-gradient(135deg, var(--noah-talk-primary), #2f8cff);
  box-shadow: var(--noah-talk-shadow);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-weight: 850;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

body[data-noah-app-variant="talk"] .noah-big-button:hover,
body[data-noah-app-variant="talk"] .noah-big-button:focus-visible {
  background: linear-gradient(135deg, var(--noah-talk-primary-hover), var(--noah-talk-primary));
  box-shadow: 0 14px 34px rgba(22, 85, 160, 0.18);
  transform: translateY(-1px);
}

body[data-noah-app-variant="talk"] .noah-dot {
  background: currentColor;
  opacity: 0.92;
}

body[data-noah-app-variant="talk"] .noah-mic-icon::before,
body[data-noah-app-variant="talk"] .noah-mic-icon::after {
  border-color: currentColor;
}

body[data-noah-app-variant="talk"] .noah-wake-button,
body[data-noah-app-variant="talk"] .noah-wake-button.is-awake {
  min-height: 3.65rem;
  border-color: var(--noah-talk-line);
  color: var(--noah-talk-primary);
  background: var(--noah-talk-surface);
  box-shadow: none;
  font-size: 0.95rem;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

body[data-noah-app-variant="talk"] .noah-wake-button:hover,
body[data-noah-app-variant="talk"] .noah-wake-button:focus-visible,
body[data-noah-app-variant="talk"] .noah-wake-button.is-awake {
  border-color: rgba(23, 105, 224, 0.4);
  color: #ffffff;
  background: var(--noah-talk-primary);
}

body[data-noah-app-variant="talk"] .wake-progress {
  background: var(--noah-talk-cyan);
}

body[data-noah-app-variant="talk"] .noah-model-profile-choice {
  gap: 0.55rem;
}

body[data-noah-app-variant="talk"] .noah-model-profile-button {
  min-height: 3rem;
  border: 1px solid var(--noah-talk-line);
  border-radius: 1rem;
  color: var(--noah-talk-muted);
  background: var(--noah-talk-surface);
  box-shadow: none;
  font-weight: 780;
}

body[data-noah-app-variant="talk"] .noah-model-profile-button:hover,
body[data-noah-app-variant="talk"] .noah-model-profile-button:focus-visible {
  border-color: rgba(23, 105, 224, 0.45);
  color: var(--noah-talk-primary);
  background: #eef5ff;
}

body[data-noah-app-variant="talk"] .noah-model-profile-button.is-active,
body[data-noah-app-variant="talk"] .noah-live-profile-button.is-active {
  border-color: var(--noah-talk-primary);
  color: #ffffff;
  background: var(--noah-talk-primary);
  box-shadow: none;
}

body[data-noah-app-variant="talk"] #startSettingsIconButton {
  min-height: 3.35rem;
  grid-template-columns: auto auto;
  justify-content: center;
  gap: 0.6rem;
  border: 1px solid var(--noah-talk-line);
  border-radius: 1rem;
  color: var(--noah-talk-ink);
  background: var(--noah-talk-surface);
  box-shadow: none;
  text-align: center;
}

body[data-noah-app-variant="talk"] #startSettingsIconButton strong,
body[data-noah-app-variant="talk"] #startSettingsIconButton span {
  color: inherit;
}

body[data-noah-app-variant="talk"] #startSettingsIconButton:hover,
body[data-noah-app-variant="talk"] #startSettingsIconButton:focus-visible {
  border-color: rgba(23, 105, 224, 0.45);
  color: var(--noah-talk-primary);
  background: #eef5ff;
}

body[data-noah-app-variant="talk"] .noah-model-review-notice,
body[data-noah-app-variant="talk"] .noah-runtime-warning {
  border-color: rgba(23, 105, 224, 0.28);
  color: var(--noah-talk-muted);
  background: #eef5ff;
}

/*
 * Blue LED eyes based on the supplied NOAH reference: pure light bodies,
 * feathered alpha edges, no iris, pupil, border or surrounding face frame.
 */
body[data-noah-app-variant="talk"] {
  --noah-eye-core: #0664ff;
  --noah-eye-line: #61dcff;
  --noah-eye-deep: #001dbe;
  --noah-eye-shadow: rgba(0, 91, 255, 0.88);
}

body[data-noah-app-variant="talk"] .noah-eye-rod {
  display: none;
}

body[data-noah-app-variant="talk"] .start-robot-face .eye,
body[data-noah-app-variant="talk"] .noah-eye {
  overflow: hidden;
  border: 0;
  border-radius: 49% 51% 48% 52% / 54% 52% 48% 46%;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(99, 230, 255, 0.98) 0%, var(--noah-eye-core) 34%, var(--noah-eye-deep) 62%, transparent 82%);
  box-shadow: none;
  filter:
    blur(0.025rem)
    drop-shadow(0 0 0.7rem rgba(20, 130, 255, 0.92))
    drop-shadow(0 0 1.7rem var(--noah-eye-shadow));
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0 40%, rgba(0, 0, 0, 0.9) 52%, rgba(0, 0, 0, 0.48) 67%, rgba(0, 0, 0, 0.12) 80%, transparent 96%);
  mask-image: radial-gradient(ellipse at center, #000 0 40%, rgba(0, 0, 0, 0.9) 52%, rgba(0, 0, 0, 0.48) 67%, rgba(0, 0, 0, 0.12) 80%, transparent 96%);
  animation: noahTalkEyeGlow 6.4s ease-in-out infinite;
}

body[data-noah-app-variant="talk"] .start-robot-face .eye::before,
body[data-noah-app-variant="talk"] .noah-eye::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background:
    radial-gradient(circle, rgba(207, 251, 255, 0.8) 0 0.055rem, rgba(46, 174, 255, 0.56) 0.075rem, transparent 0.12rem) 0 0 / 0.34rem 0.34rem,
    repeating-linear-gradient(180deg, rgba(107, 227, 255, 0.38) 0 0.28rem, rgba(0, 84, 255, 0.12) 0.28rem 0.58rem, rgba(0, 12, 90, 0.28) 0.58rem 0.75rem);
  opacity: 0.9;
  mix-blend-mode: screen;
  transform: none;
  transition: none;
  animation: noahTalkLedDrift 14s linear infinite;
  pointer-events: none;
}

body[data-noah-app-variant="talk"] .start-robot-face .eye::after,
body[data-noah-app-variant="talk"] .noah-eye::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 0 52%, rgba(0, 28, 170, 0.1) 70%, transparent 100%);
  mix-blend-mode: normal;
  pointer-events: none;
}

body[data-noah-app-variant="talk"] .start-robot-face .eye {
  width: clamp(6rem, 13vw, 9.8rem);
  height: calc(clamp(4.7rem, 10.2vw, 7.65rem) * var(--eye-height-scale));
}

body[data-noah-app-variant="talk"] .noah-eyes-fullscreen {
  color: #e5f4ff;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(0, 71, 210, 0.18), transparent 48vmin),
    #000000;
}

body[data-noah-app-variant="talk"] .noah-eyes-stage {
  top: 36%;
  width: min(94vw, 74rem);
  height: min(50vh, 32rem);
}

body[data-noah-app-variant="talk"] .noah-eyes-face {
  filter: none;
  animation: noahTalkEyesFloat 6.8s ease-in-out infinite;
}

body[data-noah-app-variant="talk"] .noah-eye {
  top: 50%;
  width: clamp(9rem, 32vw, 27rem);
  height: clamp(7rem, 25vw, 21rem);
  transform: translateY(-50%) scaleX(var(--noah-talk-eye-x, 1)) scaleY(var(--noah-talk-eye-y, 1));
  transform-origin: center;
  transition: transform 80ms ease-in-out, filter 320ms ease, opacity 320ms ease;
}

body[data-noah-app-variant="talk"] .noah-eye-left {
  left: 5%;
  right: auto;
}

body[data-noah-app-variant="talk"] .noah-eye-right {
  left: auto;
  right: 5%;
}

body[data-noah-app-variant="talk"] .noah-eyes-face[data-eye-state="listening"] .noah-eye {
  --noah-talk-eye-x: 1.025;
  --noah-talk-eye-y: 1.025;
  filter: brightness(1.12) saturate(1.08) drop-shadow(0 0 1.8rem rgba(20, 155, 255, 0.9));
}

body[data-noah-app-variant="talk"] .noah-eyes-face[data-eye-state="thinking"] .noah-eye {
  --noah-talk-eye-x: 0.98;
  filter: hue-rotate(8deg) brightness(0.98) saturate(1.1) drop-shadow(0 0 1.65rem rgba(49, 100, 255, 0.82));
}

body[data-noah-app-variant="talk"] .noah-eyes-face[data-eye-state="speaking"] .noah-eye {
  filter: brightness(1.1) saturate(1.12) drop-shadow(0 0 1.85rem rgba(0, 118, 255, 0.9));
  animation: noahTalkEyeGlow 1.8s ease-in-out infinite;
}

body[data-noah-app-variant="talk"] .noah-eyes-face[data-noah-eye-state="emergency"] .noah-eye {
  opacity: 0.68;
  filter: saturate(0.72) brightness(0.72) drop-shadow(0 0 1rem rgba(48, 100, 210, 0.7));
  animation: none;
}

body[data-noah-app-variant="talk"] .noah-eyes-face.is-blinking .noah-eye-left,
body[data-noah-app-variant="talk"] .noah-eyes-face.is-blinking .noah-eye-right {
  --noah-talk-eye-y: 0.055;
  transform: translateY(-50%) scaleX(var(--noah-talk-eye-x, 1)) scaleY(var(--noah-talk-eye-y));
}

body[data-noah-app-variant="talk"] .noah-eyes-settings:hover,
body[data-noah-app-variant="talk"] .noah-eyes-settings:focus-visible,
body[data-noah-app-variant="talk"] .noah-eyes-close:hover,
body[data-noah-app-variant="talk"] .noah-eyes-close:focus-visible {
  border-color: rgba(56, 189, 248, 0.58);
  color: #ffffff;
  background: rgba(23, 105, 224, 0.32);
  outline: 2px solid rgba(56, 189, 248, 0.42);
  outline-offset: 3px;
}

body[data-noah-app-variant="talk"][data-noah-eye-mode="researching"] {
  --noah-eye-core: #1677ff;
  --noah-eye-line: #8be7ff;
  --noah-eye-deep: #1232b8;
  --noah-eye-shadow: rgba(48, 116, 255, 0.86);
}

@keyframes noahTalkLaunchFloat {
  0%, 100% { transform: translate3d(0, -0.2rem, 0); }
  50% { transform: translate3d(0, 0.2rem, 0); }
}

@keyframes noahTalkEyesFloat {
  0%, 100% { transform: translate3d(0, -0.25rem, 0); }
  50% { transform: translate3d(0, 0.25rem, 0); }
}

@keyframes noahTalkEyeGlow {
  0%, 100% { opacity: 0.94; }
  50% { opacity: 1; }
}

@keyframes noahTalkLedDrift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 0 0.34rem, 0 0.75rem; }
}

@media (max-width: 760px) {
  body[data-noah-app-variant="talk"] > .start-screen {
    grid-template-columns: minmax(0, 30rem);
    grid-template-areas:
      "copy"
      "stage"
      "actions";
    align-content: start;
    gap: 0.7rem;
    padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
  }

  body[data-noah-app-variant="talk"] .start-copy {
    flex-direction: column;
    gap: 0.4rem;
  }

  body[data-noah-app-variant="talk"] .start-logo-row h1 {
    font-size: 1.8rem;
  }

  body[data-noah-app-variant="talk"] .brand-mark-image {
    width: 2.8rem;
    height: 2.8rem;
  }

  body[data-noah-app-variant="talk"] .start-companion-stage {
    min-height: clamp(9rem, 31vw, 12rem);
  }

  body[data-noah-app-variant="talk"] .start-companion-stage > .start-robot-face {
    width: min(24rem, 94vw);
    height: clamp(8rem, 30vw, 11rem);
  }

  body[data-noah-app-variant="talk"] .start-robot-face .eye {
    width: clamp(5.5rem, 28vw, 8rem);
    height: calc(clamp(4.3rem, 21.8vw, 6.25rem) * var(--eye-height-scale));
  }

  body[data-noah-app-variant="talk"] .noah-launch-pad {
    max-width: 30rem;
  }

  body[data-noah-app-variant="talk"] .noah-big-button {
    min-height: 3.85rem;
  }

  body[data-noah-app-variant="talk"] .noah-eyes-stage {
    top: 35%;
    width: 98vw;
    height: min(42vh, 24rem);
  }

  body[data-noah-app-variant="talk"] .noah-eye {
    width: clamp(7rem, 41vw, 15.5rem);
    height: clamp(5.5rem, 32vw, 12.1rem);
  }

  body[data-noah-app-variant="talk"] .noah-eye-left {
    left: 1.5%;
  }

  body[data-noah-app-variant="talk"] .noah-eye-right {
    right: 1.5%;
  }
}

@media (max-width: 390px), (max-height: 700px) and (max-width: 760px) {
  body[data-noah-app-variant="talk"] > .start-screen {
    gap: 0.45rem;
    padding-top: max(0.65rem, env(safe-area-inset-top));
  }

  body[data-noah-app-variant="talk"] .start-copy .subtitle {
    display: none !important;
  }

  body[data-noah-app-variant="talk"] .start-companion-stage {
    min-height: 7.4rem;
  }

  body[data-noah-app-variant="talk"] .start-companion-stage > .start-robot-face {
    height: 7.4rem;
  }

  body[data-noah-app-variant="talk"] .noah-big-button {
    min-height: 3.45rem;
  }

  body[data-noah-app-variant="talk"] .noah-wake-button {
    min-height: 3.15rem;
  }

  body[data-noah-app-variant="talk"] .noah-model-profile-button {
    min-height: 2.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-noah-app-variant="talk"] .start-companion-stage > .start-robot-face,
  body[data-noah-app-variant="talk"] .noah-eyes-face,
  body[data-noah-app-variant="talk"] .start-robot-face .eye,
  body[data-noah-app-variant="talk"] .noah-eye,
  body[data-noah-app-variant="talk"] .start-robot-face .eye::before,
  body[data-noah-app-variant="talk"] .noah-eye::before {
    animation: none !important;
  }
}
