/* semantic-typing-geo-demo — 1111 左侧「语义资产」浅色高级演示（仅 .semantic-typing 内 .semantic-demo） */

:root {
  --sgd-ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --sgd-ease-power4: cubic-bezier(0.22, 1, 0.36, 1);
  --sgd-glass-edge: rgba(15, 23, 42, 0.08);
}

/* ========== 视口：无外层「舞台」——仅承载 .semantic-browser，不占额外灰底/光晕层 ========== */
.semantic-typing__viewport:has(.semantic-demo) {
  position: relative;
  isolation: isolate;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
  min-height: 0 !important;
}

.semantic-typing__viewport:has(.semantic-demo)::before,
.semantic-typing__viewport:has(.semantic-demo)::after {
  content: none !important;
  display: none !important;
}

.semantic-typing.semantic-typing--chat:has(.semantic-demo) {
  background: transparent;
  box-shadow: none;
}

.semantic-demo {
  position: relative;
  width: 100%;
  overflow: visible;
  z-index: 20;
  transform: translateZ(0);
}

.semantic-demo__cursor-root {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
  overflow: visible;
}

.virtual-cursor {
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  margin-left: -3px;
  margin-top: -3px;
  pointer-events: none;
  opacity: 0;
  z-index: 9999;
  will-change: transform, opacity;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: 2px 2px;
  filter: drop-shadow(0 2px 3px rgba(15, 23, 42, 0.2)) drop-shadow(0 0 10px rgba(59, 130, 246, 0.25));
}

.virtual-cursor::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 72%);
  opacity: 0.85;
  z-index: -1;
  pointer-events: none;
}

.virtual-cursor svg {
  display: block;
  width: 100%;
  height: 100%;
}

.virtual-cursor__ripple {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  border: 2px solid rgba(59, 130, 246, 0.75);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 0, 0) scale(0.35);
  will-change: transform, opacity;
}

.virtual-cursor__flash {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.45), transparent 62%);
  opacity: 0;
  pointer-events: none;
}

/* ========== Browser shell：浅色磨砂玻璃 ========== */
.semantic-browser {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 252, 0.88) 50%, rgba(241, 245, 249, 0.94) 100%);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--sgd-glass-edge);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.85) inset,
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 28px 56px -24px rgba(15, 23, 42, 0.14),
    0 0 80px -40px rgba(59, 130, 246, 0.18);
  transform: translateZ(0);
  will-change: transform;
}

/* 外壳（红区）：无过渡/扫光；动效仅在 .browser-content（绿区） */
.semantic-browser.semantic-browser--shell-static .browser-chrome,
.semantic-browser.semantic-browser--shell-static .browser-tabs,
.semantic-browser.semantic-browser--shell-static .browser-bar,
.semantic-browser.semantic-browser--shell-static .browser-url,
.semantic-browser.semantic-browser--shell-static .browser-go,
.semantic-browser.semantic-browser--shell-static .browser-progress,
.semantic-browser.semantic-browser--shell-static .browser-tab {
  transition: none !important;
  animation: none !important;
}

.semantic-browser.semantic-browser--shell-static .browser-url--typing::after {
  display: none !important;
  animation: none !important;
  content: none !important;
}

.semantic-browser::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 50;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.65) 0%, transparent 42%, transparent 58%, rgba(99, 102, 241, 0.04) 100%);
  mix-blend-mode: normal;
}

.semantic-browser::after {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 38%;
  border-radius: 0 0 50% 50%;
  pointer-events: none;
  z-index: 49;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, transparent 100%);
}

.browser-chrome {
  flex-shrink: 0;
  position: relative;
  z-index: 3;
  background: rgba(241, 245, 249, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.browser-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem 0;
}

.browser-tab {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  padding: 0.38rem 0.65rem 0.45rem;
  border-radius: 0.55rem 0.55rem 0 0;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  transition: color 0.35s var(--sgd-ease-power4), box-shadow 0.35s var(--sgd-ease-power4), border-color 0.35s var(--sgd-ease-power4),
    background 0.35s var(--sgd-ease-power4);
}

.browser-tab:hover {
  color: #475569;
  border-color: rgba(99, 102, 241, 0.2);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.08);
}

.browser-tab.is-active {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: 0 -1px 0 rgba(99, 102, 241, 0.12) inset;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.65rem 0.5rem;
}

.browser-dots {
  display: flex;
  gap: 0.35rem;
}

.browser-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.25);
}
.browser-dot--r {
  background: linear-gradient(180deg, #fb7185, #f43f5e);
}
.browser-dot--y {
  background: linear-gradient(180deg, #fcd34d, #f59e0b);
}
.browser-dot--g {
  background: linear-gradient(180deg, #6ee7b7, #10b981);
}

.browser-url-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.browser-url {
  position: relative;
  font-size: 0.62rem;
  color: #334155;
  padding: 0.38rem 0.55rem;
  border-radius: 0.45rem;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06) inset,
    0 1px 0 rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.4s var(--sgd-ease-power4), box-shadow 0.4s var(--sgd-ease-power4);
}

.browser-url--focused {
  border-color: rgba(74, 144, 226, 0.75);
  box-shadow:
    0 0 0 1px rgba(74, 144, 226, 0.25),
    0 1px 3px rgba(15, 23, 42, 0.08) inset;
}

.browser-url--typing {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.06) inset,
    0 0 0 1px rgba(99, 102, 241, 0.22),
    0 0 20px rgba(59, 130, 246, 0.18);
}

.browser-url--typing::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(59, 130, 246, 0.12) 42%,
    rgba(139, 92, 246, 0.08) 58%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: sgd-url-shimmer 1.6s var(--sgd-ease-power4) infinite;
  pointer-events: none;
  border-radius: inherit;
}

@keyframes sgd-url-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.browser-progress {
  height: 2px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.95);
  overflow: hidden;
}

.browser-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4a90e2, #6366f1, #22d3ee);
  transform: translateZ(0);
  will-change: width;
  box-shadow: 0 0 8px rgba(74, 144, 226, 0.35);
}

/* 对齐 2222.html「访问」按钮 */
.browser-go {
  flex-shrink: 0;
  margin: 0;
  padding: 0.32rem 0.65rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(74, 144, 226, 0.35);
  background: linear-gradient(180deg, #5b9eed, #4a90e2);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: default;
  pointer-events: auto;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
  transition: transform 0.2s var(--sgd-ease-power4), box-shadow 0.2s var(--sgd-ease-power4);
}

.browser-go:hover {
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.35);
}

.browser-content {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: clamp(20rem, 56vh, 36rem);
  overflow: hidden;
  background: #f5f5f7;
  perspective: 1400px;
}

.ai-screen,
.review-screen,
.home-screen {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 16px, 0) scale(0.96) perspective(1200px) rotateX(2deg);
  filter: blur(10px);
  clip-path: inset(2% 3% 2% 3% round 0.5rem);
  will-change: opacity, transform, filter, clip-path;
}

/* —— AI Chat —— */
.ai-chat {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 45%, #f1f5f9 100%);
}

.ai-chat::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 18%, black, transparent 72%);
  pointer-events: none;
  animation: sgd-ai-grid 22s linear infinite;
  z-index: 0;
}

.ai-chat::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.5) 50%, transparent 65%);
  background-size: 200% 100%;
  animation: sgd-ai-scan 9s var(--sgd-ease-power4) infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes sgd-ai-grid {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-32px, -24px, 0);
  }
}

@keyframes sgd-ai-scan {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

.chat-thread {
  position: relative;
  z-index: 2;
  flex: 1;
  padding: 0.75rem 0.65rem 0.55rem;
  min-height: 0;
}

.chat-row {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 0.72rem;
  align-items: flex-end;
}

.chat-row--user {
  flex-direction: row-reverse;
}

.chat-row--user:not(.is-hidden) {
  animation: sgd-user-row-in 0.75s var(--sgd-ease-out-expo) both;
}

@keyframes sgd-user-row-in {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

.chat-avatar {
  flex-shrink: 0;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.52rem;
  font-weight: 800;
  transform: translateZ(0);
}

.chat-avatar--user {
  color: #f8fafc;
  background: linear-gradient(145deg, #475569, #334155);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.chat-avatar--ai {
  color: #ffffff;
  background: linear-gradient(145deg, #6366f1, #4f46e5);
  border: 1px solid rgba(199, 210, 254, 0.5);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.25);
  animation: sgd-ai-avatar-pulse 3.2s var(--sgd-ease-power4) infinite;
}

@keyframes sgd-ai-avatar-pulse {
  0%,
  100% {
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.22);
  }
  50% {
    box-shadow: 0 0 20px rgba(129, 140, 248, 0.38);
  }
}

.chat-col {
  min-width: 0;
  max-width: calc(100% - 2.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.chat-row--user .chat-col {
  align-items: flex-end;
}

.chat-label {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
}

.chat-label--ai {
  color: #6366f1;
}

.user-bubble,
.ai-bubble {
  border-radius: 1.05rem;
  padding: 0.55rem 0.72rem;
  max-width: 100%;
  transform: translateZ(0);
}

.user-bubble {
  color: #ffffff;
  background: linear-gradient(135deg, #4a90e2, #6366f1);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 8px 24px rgba(74, 144, 226, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.ai-bubble {
  position: relative;
  color: #1e293b;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow:
    0 4px 24px rgba(15, 23, 42, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
  animation: sgd-ai-bubble-in 0.85s var(--sgd-ease-out-expo) 0.15s both;
}

@keyframes sgd-ai-bubble-in {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
    filter: blur(10px);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

.ai-bubble::before {
  content: "";
  position: absolute;
  width: 2.5rem;
  height: 2.5rem;
  left: -0.35rem;
  top: -0.35rem;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, #93c5fd, #c4b5fd);
  opacity: 0.35;
  filter: blur(14px);
  z-index: -1;
  pointer-events: none;
}

.streaming-content {
  display: inline;
  font-size: 0.78rem;
  line-height: 1.62;
  word-break: break-word;
  position: relative;
}

.streaming-content::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.15em;
  height: 0.35em;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.12), transparent);
  background-size: 220% 100%;
  animation: sgd-stream-shimmer 2.4s var(--sgd-ease-power4) infinite;
  opacity: 0.55;
  pointer-events: none;
}

@keyframes sgd-stream-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

.streaming-content .kw {
  color: #5b21b6;
  font-weight: 600;
}

.type-cursor {
  display: inline-block;
  margin-left: 2px;
  width: 2px;
  height: 1em;
  vertical-align: -0.12em;
  border-radius: 1px;
  background: linear-gradient(180deg, #4a90e2, #6366f1);
  color: transparent;
  font-size: 0;
  overflow: hidden;
  box-shadow: 0 0 6px rgba(74, 144, 226, 0.45);
  animation: sgd-cursor 0.92s step-end infinite;
}

.type-cursor.is-off {
  visibility: hidden;
  width: 0;
  margin: 0;
  overflow: hidden;
}

@keyframes sgd-cursor {
  0%,
  48% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

.citation-list {
  margin-top: 0.62rem;
  padding-top: 0.52rem;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.citation-list.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.citation-title {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.42rem;
}

.citation-cards {
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

button.citation-card {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.5rem 0.58rem;
  border-radius: 0.72rem;
  border: 1px solid transparent;
  font: inherit;
  font-size: inherit;
  line-height: inherit;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  color: #1e293b;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  pointer-events: auto;
  overflow: hidden;
  transform: translate3d(0, 0, 0);
  will-change: transform, box-shadow;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.45s var(--sgd-ease-out-expo), box-shadow 0.45s var(--sgd-ease-out-expo), border-color 0.35s var(--sgd-ease-power4);
}

button.citation-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.65), rgba(59, 130, 246, 0.4), rgba(34, 211, 238, 0.35));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.85;
  z-index: 0;
}

button.citation-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.07) 48%, transparent 92%);
  transform: translateX(-100%);
  animation: sgd-cite-scan 3.8s var(--sgd-ease-power4) infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes sgd-cite-scan {
  0% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.citation-card__icon {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(226, 232, 240, 0.95), rgba(199, 210, 254, 0.65));
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  color: #4f46e5;
}

.citation-card__icon svg {
  display: block;
  width: 0.72rem;
  height: 0.72rem;
}

.citation-card__body {
  position: relative;
  z-index: 2;
  min-width: 0;
  flex: 1;
}

.citation-domain {
  display: block;
  font-size: 0.64rem;
  font-weight: 700;
  color: #2563eb;
}

.citation-url {
  display: block;
  margin-top: 0.14rem;
  font-size: 0.58rem;
  color: #64748b;
  word-break: break-all;
}

button.citation-card:hover {
  transform: translate3d(0, -2px, 0);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.2),
    0 12px 32px -12px rgba(59, 130, 246, 0.2);
}

/* Composer */
.ai-composer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding: 0.5rem 0.65rem 0.62rem;
  background: linear-gradient(180deg, transparent, rgba(248, 250, 252, 0.98) 28%);
  border-top: 1px solid rgba(226, 232, 240, 0.95);
}

.ai-composer__inner {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.ai-composer__label {
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.ai-composer-input {
  width: 100%;
  box-sizing: border-box;
  resize: none;
  min-height: 2.45rem;
  max-height: 4.6rem;
  padding: 0.48rem 0.55rem;
  border-radius: 0.62rem;
  border: 2px solid rgba(226, 232, 240, 0.98);
  background: #ffffff;
  color: #0f172a;
  font-size: 0.72rem;
  line-height: 1.45;
  outline: none;
  caret-color: #4a90e2;
  transition: border-color 0.35s var(--sgd-ease-power4), box-shadow 0.35s var(--sgd-ease-power4);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) inset;
}

.ai-composer-input:focus {
  border-color: rgba(74, 144, 226, 0.65);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04) inset,
    0 0 0 1px rgba(74, 144, 226, 0.2),
    0 0 20px rgba(74, 144, 226, 0.12);
}

.ai-composer-input::placeholder {
  color: #94a3b8;
}

.ai-composer-hint {
  font-size: 0.5rem;
  color: #64748b;
  opacity: 0;
}

.ai-composer-sent {
  font-size: 0.5rem;
  color: #64748b;
  opacity: 0;
}

.chat-row--user.is-hidden {
  visibility: hidden;
  opacity: 0;
  height: 0;
  margin: 0;
  overflow: hidden;
  pointer-events: none;
}

/* —— Review —— */
.review-screen {
  padding: 0;
  background: #f5f5f7;
}

.review-screen__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.review-mesh {
  position: absolute;
  inset: -24%;
  background:
    radial-gradient(ellipse 82% 52% at 18% 22%, rgba(99, 102, 241, 0.1), transparent 56%),
    radial-gradient(ellipse 62% 48% at 88% 28%, rgba(56, 189, 248, 0.08), transparent 52%),
    radial-gradient(ellipse 55% 42% at 48% 100%, rgba(167, 139, 250, 0.06), transparent 48%);
  animation: sgd-mesh 18s var(--sgd-ease-power4) infinite alternate;
  transform: translateZ(0);
}

@keyframes sgd-mesh {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  100% {
    transform: translate3d(-3.5%, 2.5%, 0) scale(1.07);
  }
}

.review-noise {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}

.review-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.18) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 78% 68% at 50% 32%, black 0%, transparent 74%);
  pointer-events: none;
  animation: sgd-review-grid 20s linear infinite;
}

@keyframes sgd-review-grid {
  to {
    transform: translate3d(-20px, -20px, 0);
  }
}

.review-orb {
  position: absolute;
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  right: -2.5rem;
  top: 14%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12), transparent 68%);
  filter: blur(3px);
  animation: sgd-float 9s var(--sgd-ease-power4) infinite;
  pointer-events: none;
}

@keyframes sgd-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-10px, 14px, 0);
  }
}

.review-navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.52rem 0.65rem;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.review-brand {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.42rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.review-nav-links {
  display: flex;
  gap: 0.48rem;
  flex-wrap: wrap;
  align-items: center;
}

.review-link {
  font-size: 0.54rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

button.home-trigger {
  position: relative;
  z-index: 50;
  cursor: pointer;
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4a90e2;
  padding: 0.35rem 0.62rem;
  border-radius: 0.42rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(74, 144, 226, 0.35);
  pointer-events: auto;
  overflow: hidden;
  transition: border-color 0.35s var(--sgd-ease-power4), box-shadow 0.35s var(--sgd-ease-power4), transform 0.35s var(--sgd-ease-power4);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

button.home-trigger::after {
  content: "";
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0.24rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(196, 181, 253, 0.95), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s var(--sgd-ease-out-expo);
}

button.home-trigger:hover {
  border-color: rgba(167, 139, 250, 0.65);
  box-shadow: 0 0 32px rgba(139, 92, 246, 0.35);
  transform: translateY(-1px);
}

button.home-trigger:hover::after {
  transform: scaleX(1);
}

.review-inner {
  position: relative;
  z-index: 2;
  padding: 0.72rem 0.65rem 1.05rem;
}

.review-hero {
  margin-bottom: 0.65rem;
}

.review-hero h2 {
  margin: 0 0 0.32rem;
  font-size: clamp(0.92rem, 2.6vw, 1.12rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  background: linear-gradient(135deg, #0f172a 0%, #334155 45%, #2563eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.review-hero p {
  margin: 0;
  font-size: 0.62rem;
  color: #64748b;
  line-height: 1.55;
  max-width: 24rem;
}

.review-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
  margin-bottom: 0.58rem;
}

.review-stat {
  border-radius: 0.72rem;
  padding: 0.48rem 0.38rem;
  text-align: center;
  position: relative;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 232, 240, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  transform: translateZ(0);
  transition: transform 0.45s var(--sgd-ease-out-expo), box-shadow 0.45s var(--sgd-ease-out-expo);
}

.review-stat::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), transparent 55%);
  pointer-events: none;
  opacity: 0.9;
}

.review-stat:hover {
  transform: translate3d(0, -4px, 0);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08), 0 0 24px rgba(99, 102, 241, 0.1);
}

.review-stat-val {
  position: relative;
  z-index: 1;
  display: block;
  font-size: clamp(0.64rem, 1.8vw, 0.82rem);
  font-weight: 800;
  background: linear-gradient(90deg, #2563eb, #6366f1, #0891b2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.review-stat-lbl {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 0.14rem;
  font-size: 0.48rem;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.review-metrics {
  font-size: 0.52rem;
  color: #64748b;
  margin-bottom: 0.48rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.review-chart {
  position: relative;
  border-radius: 0.72rem;
  padding: 0.52rem;
  margin-bottom: 0.58rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(226, 232, 240, 0.98);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.review-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.review-chart path.line--glow {
  fill: none;
  stroke-linecap: round;
  opacity: 0.45;
  filter: blur(5px);
}

.review-chart path.line {
  fill: none;
  stroke-width: 2.35;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.65));
}

.review-testimonials {
  border-radius: 0.72rem;
  padding: 0.52rem 0.58rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(226, 232, 240, 0.95);
  backdrop-filter: blur(12px);
}

.review-testimonials h3 {
  margin: 0 0 0.38rem;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #64748b;
}

.review-card {
  border-radius: 0.55rem;
  padding: 0.45rem 0.52rem;
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.review-card-stars {
  color: #fbbf24;
  font-size: 0.65rem;
  margin-bottom: 0.24rem;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.35));
}

.review-card p {
  margin: 0;
  font-size: 0.6rem;
  color: #475569;
  line-height: 1.5;
}

/* —— Home Hero —— */
.home-screen {
  padding: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 55%, #f1f5f9 100%);
}

.home-screen__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.home-particles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 10% 20%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(2px 2px at 30% 65%, rgba(147, 197, 253, 0.35), transparent),
    radial-gradient(2px 2px at 72% 30%, rgba(196, 181, 253, 0.3), transparent),
    radial-gradient(2px 2px at 88% 78%, rgba(255, 255, 255, 0.25), transparent),
    radial-gradient(circle at 12% 22%, rgba(99, 102, 241, 0.18) 0, transparent 42%),
    radial-gradient(circle at 88% 18%, rgba(56, 189, 248, 0.12) 0, transparent 40%),
    radial-gradient(circle at 50% 88%, rgba(167, 139, 250, 0.1) 0, transparent 42%);
  animation: sgd-home-parallax 16s var(--sgd-ease-power4) infinite alternate;
}

@keyframes sgd-home-parallax {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-12px, -8px, 0);
  }
}

.home-hero {
  position: relative;
  z-index: 2;
  min-height: 100%;
  padding: 1.5rem 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.65rem;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 38%, black 15%, transparent 72%);
  pointer-events: none;
}

.home-title,
.home-subtitle,
.home-cta {
  position: relative;
  z-index: 2;
  transform: translateZ(0);
  will-change: transform, opacity, filter;
}

.home-title {
  margin: 0;
  font-size: clamp(1.05rem, 3.4vw, 1.38rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  max-width: 18ch;
  background: linear-gradient(135deg, #0f172a 0%, #334155 35%, #2563eb 72%, #6366f1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-subtitle {
  margin: 0;
  font-size: 0.7rem;
  color: #64748b;
  line-height: 1.58;
  max-width: 28ch;
}

.home-cta {
  margin-top: 0.32rem;
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  padding: 0.52rem 0.95rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(74, 144, 226, 0.4);
  background: linear-gradient(135deg, #5b9eed, #4a90e2);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.1),
    0 8px 24px rgba(74, 144, 226, 0.25);
  transition: transform 0.35s var(--sgd-ease-out-expo), box-shadow 0.35s var(--sgd-ease-out-expo);
}

.home-cta:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(74, 144, 226, 0.35),
    0 12px 32px rgba(74, 144, 226, 0.28);
}

@media (prefers-reduced-motion: reduce) {
  .type-cursor {
    animation: none;
    opacity: 0.55;
  }
  .review-mesh,
  .review-orb,
  .review-grid,
  .home-particles,
  .ai-chat::before,
  .ai-chat::after,
  .streaming-content::after,
  button.citation-card::after,
  .browser-url--typing::after {
    animation: none;
  }
  .chat-row--user:not(.is-hidden),
  .ai-bubble {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
}
