/* === Hero === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  padding-bottom: 80px;
  position: relative;
}
.hero-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
  width: 100%;
}
@media (max-width: 980px) {
  .hero-wrap { grid-template-columns: 1fr; gap: 48px; }
}

.hero-title { will-change: transform; }

/* React-controlled hero entrance */
.hero-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.2,0.8,0.2,1), transform 0.9s cubic-bezier(0.2,0.8,0.2,1);
}
.hero-reveal.in { opacity: 1; transform: none; }
.hero-h1.hero-reveal { transition-delay: 0.05s; }
.hero-h1 {
  font-family: var(--serif);
  font-size: clamp(48px, 7.5vw, 104px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 24px 0 28px;
  max-width: 14ch;
}
.hero-h1 .reveal-word:nth-child(6) > span,
.hero-h1 em { font-style: italic; color: var(--accent); }

.hero-sub {
  font-size: 18px;
  color: var(--fg-dim);
  max-width: 44ch;
  line-height: 1.5;
  margin-bottom: 28px;
  transition-delay: 0.5s;
}

.hero-meta {
  display: flex;
  gap: 24px;
  color: var(--fg-mute);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--mono);
  transition-delay: 0.7s;
}
.live-dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: oklch(0.78 0.16 145);
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 8px oklch(0.78 0.16 145);
  animation: pulse 2s infinite;
}

/* === Chat card === */
.chat-card {
  background: color-mix(in oklch, var(--bg-2) 80%, transparent);
  border: 1px solid var(--line);
  border-radius: 20px;
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5),
              0 0 0 1px var(--line) inset,
              0 1px 0 color-mix(in oklch, var(--fg) 6%, transparent) inset;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 540px;
  max-height: 70vh;
  position: relative;
  transition-delay: 0.3s;
}
.chat-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, color-mix(in oklch, var(--accent) 40%, transparent), transparent 50%, color-mix(in oklch, var(--accent-2) 30%, transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklch, var(--bg-2) 50%, transparent);
}
.chat-head-l { display: flex; align-items: center; gap: 12px; }
.avatar {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), color-mix(in oklch, var(--accent) 60%, var(--accent-2)));
  display: grid; place-items: center;
  color: var(--bg);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}
.avatar-ring {
  position: absolute; inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0.4;
  animation: spin 8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.chat-name { font-family: var(--serif); font-size: 18px; }
.badge {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  background: var(--accent);
  color: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: 3px;
}
.chat-status { font-size: 10px; color: var(--fg-mute); margin-top: 2px; }
.chat-head-r { font-size: 10px; letter-spacing: 0.16em; color: var(--fg-mute); }

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--fg-mute) transparent;
}
.chat-body::-webkit-scrollbar { width: 4px; }
.chat-body::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

.msg { display: flex; }
.msg-user { justify-content: flex-end; }
.msg-bubble {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  animation: bubbleIn 0.35s cubic-bezier(0.2,0.8,0.2,1);
}
.msg-user .msg-bubble {
  background: var(--accent);
  color: var(--bg);
  border-bottom-right-radius: 4px;
}
.msg-assistant .msg-bubble {
  background: color-mix(in oklch, var(--fg) 8%, transparent);
  border: 1px solid var(--line);
  color: var(--fg);
  border-bottom-left-radius: 4px;
}
.chat-mail {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}
.msg-user .chat-mail { color: var(--bg); }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.ty-dots { display: inline-flex; gap: 4px; padding: 2px 0; }
.ty-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--fg-dim);
  animation: ty 1.2s infinite;
}
.ty-dots span:nth-child(2) { animation-delay: 0.15s; }
.ty-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ty {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.chat-prompts {
  display: flex;
  gap: 8px;
  padding: 0 20px 12px;
  flex-wrap: wrap;
}
.prompt-chip {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg-dim);
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  cursor: none;
  transition: all 0.2s;
}
.prompt-chip:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--fg);
}
.prompt-chip:disabled { opacity: 0.4; }

.chat-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: color-mix(in oklch, var(--bg-2) 60%, transparent);
}
.prompt-caret { color: var(--accent); font-size: 16px; }
.chat-input input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--fg);
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
  cursor: none;
}
.chat-input input::placeholder { color: var(--fg-mute); }
.send-btn {
  background: var(--fg);
  color: var(--bg);
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  cursor: none;
  transition: all 0.2s;
}
.send-btn:disabled { opacity: 0.3; }
.send-btn:not(:disabled):hover { background: var(--accent); transform: scale(1.08); }

.hero-scroll-hint {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center;
  gap: 8px;
  color: var(--fg-mute);
  font-size: 10px;
  letter-spacing: 0.2em;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--fg-mute), transparent);
  animation: scrollLine 2s infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
