/* Houdini: permite animar o angulo do conic-gradient (borda de LED) */
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

:root {
  --bg: #0A0A0A;
  --surface: #161618;
  --border: #262629;
  --white: #FFFFFF;
  --text: #EDEEEF;
  --muted: #8B9097;
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Sora', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 56px 20px 80px;
}

.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2.5px;
  color: var(--muted);
  margin-bottom: 16px;
}

/* INTRO */
.intro { text-align: center; margin-bottom: 36px; }
.intro h1 {
  font-size: clamp(28px, 6vw, 40px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--white);
  letter-spacing: -0.5px;
}
.intro .sub {
  margin: 18px auto 0;
  max-width: 480px;
  color: var(--muted);
  font-size: 16px;
}
.intro .sub strong { color: var(--text); font-weight: 600; }

/* SELETOR DE NICHO */
.niche-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.niche-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 99px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.niche-tab:hover { color: var(--text); border-color: #3a3a3f; }
.niche-tab.is-active {
  background: var(--white);
  color: #000;
  border-color: var(--white);
  font-weight: 600;
}

/* CHAT CARD */
.chat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: #000;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}
.chat-head-info { display: flex; flex-direction: column; gap: 2px; }
.chat-name { font-weight: 600; font-size: 15px; color: var(--white); }
.chat-status { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #3FB950; display: inline-block;
}

.chat-body {
  height: 440px;
  overflow-y: auto;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.chat-body::-webkit-scrollbar { width: 6px; }
.chat-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 15px;
  white-space: pre-wrap;
  word-wrap: break-word;
  animation: pop 0.18s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.msg.bot {
  align-self: flex-start;
  background: #1f1f22;
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  color: var(--text);
}
.msg.user {
  align-self: flex-end;
  background: var(--white);
  color: #000;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}

.typing { display: flex; gap: 4px; align-items: center; }
.typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted);
  animation: blink 1.2s infinite ease-in-out both;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.chat-input {
  display: flex;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.chat-input input {
  flex: 1;
  background: #0f0f10;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
}
.chat-input input:focus { border-color: #3a3a3f; }
.chat-input button {
  background: var(--white);
  color: #000;
  border: none;
  border-radius: 10px;
  width: 46px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.chat-input button:hover { transform: translateY(-1px); }
.chat-input button:disabled { opacity: 0.4; cursor: default; transform: none; }

/* CTA */
.cta {
  text-align: center;
  margin-top: 48px;
  padding: 40px 28px;
  border-radius: var(--radius);
  position: relative;
  /* borda de LED viajando ao redor do card (igual ao site da Ksync) */
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    conic-gradient(
      from var(--angle),
      transparent 58%,
      rgba(255,255,255,0.9) 74%,
      rgba(255,255,255,0.3) 83%,
      transparent 90%
    ) border-box;
  border: 1.5px solid transparent;
  animation: led-spin 4.5s linear infinite;
}

@keyframes led-spin { to { --angle: 360deg; } }
.cta h2 {
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.3px;
}
.cta p {
  color: var(--muted);
  max-width: 440px;
  margin: 14px auto 0;
  font-size: 15px;
}
.btn {
  display: inline-block;
  margin-top: 26px;
  background: var(--white);
  color: #000;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 10px;
  box-shadow: 0 0 18px rgba(255,255,255,0.14);
  animation: btn-pulse 2.6s ease-in-out infinite;
  transition: box-shadow 0.25s ease, transform 0.12s ease;
}
.btn:hover { box-shadow: 0 0 34px rgba(255,255,255,0.32); transform: translateY(-1px); animation: none; }
@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 0 14px rgba(255,255,255,0.10); }
  50% { box-shadow: 0 0 26px rgba(255,255,255,0.22); }
}
.cta-foot { margin-top: 22px; font-size: 12px; letter-spacing: 0.5px; }
