/* Criate · Converse com a IA. Paleta e tipografia da landing da Criate, superfícies em vidro. */
:root {
  --bg-0: #050506;
  --bg-2: #111114;
  --bg-3: #18181C;
  --line-1: rgba(255, 255, 255, .06);
  --line-2: rgba(255, 255, 255, .10);
  --line-3: rgba(255, 255, 255, .16);
  --tx-1: #F5F5F7;
  --tx-2: #A7A7AF;
  --tx-3: #8A8A93;
  --tx-on-brand: #0B0B0C;
  --brand-1: #FF6A2A;
  --brand-2: #E54312;
  --brand-hi: #FF8A55;
  --grad-brand: linear-gradient(135deg, #FF6A2A 0%, #E54312 100%);
  --grad-brand-text: linear-gradient(180deg, #FF9A68 0%, #FF6A2A 55%, #EE4E18 100%);
  --cool-1: #5B6CFF;
  --cool-2: #8B5CF6;
  --ok: #34D399;
  --err: #FF4D6A;
  --focus: #FFB48C;
  --panel: rgba(22, 22, 26, .55);
  --panel-forte: rgba(16, 16, 20, .78);
  --glass-border: rgba(255, 255, 255, .12);
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, .10), inset 0 0 0 1px rgba(255, 255, 255, .04);
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  --font-display: "Sora", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --raio: 20px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg-0);
  color: var(--tx-1);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 12px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- fundo vivo ---------- */
.fundo { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.luz { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; animation: respirar 24s ease-in-out infinite; }
.l1 { width: 60vmax; height: 60vmax; left: -20vmax; top: -25vmax; background: radial-gradient(circle, rgba(255, 106, 42, .35), transparent 65%); }
.l2 { width: 55vmax; height: 55vmax; right: -22vmax; top: 10vh; background: radial-gradient(circle, rgba(139, 92, 246, .28), transparent 65%); animation-delay: -8s; }
.l3 { width: 50vmax; height: 50vmax; left: 20vw; bottom: -30vmax; background: radial-gradient(circle, rgba(91, 108, 255, .22), transparent 65%); animation-delay: -16s; }
@keyframes respirar { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(3vmax, 2vmax) scale(1.08); } }

/* ---------- topo e hero ---------- */
.topo { max-width: 1120px; margin: 0 auto; padding: 20px 16px; }
.logo { height: 32px; width: auto; display: block; }

.hero { max-width: 940px; margin: 0 auto; padding: 6vh 16px 56px; text-align: center; }
.selo {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; padding: 6px 14px;
  border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel);
  backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%);
  color: var(--tx-2); font-size: 14px;
}
.ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(52, 211, 153, .18); }
h1 {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; line-height: 1.08;
  font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.6rem); margin: 0 0 20px; text-wrap: balance;
}
h1 em { font-style: normal; background: var(--grad-brand-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { color: var(--tx-2); font-size: clamp(1.02rem, .95rem + .35vw, 1.25rem); max-width: 640px; margin: 0 auto 34px; text-wrap: pretty; }

.acoes { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 12px; text-align: left; border: 0;
  padding: 16px 24px; border-radius: 18px; min-height: 60px;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:active { transform: scale(.98); }
.btn span { display: flex; flex-direction: column; line-height: 1.2; }
.btn strong { font-weight: 600; font-size: 17px; }
.btn small { font-size: 13px; opacity: .78; margin-top: 2px; }
.btn-voz { background: var(--grad-brand); color: var(--tx-on-brand); box-shadow: 0 10px 40px rgba(255, 106, 42, .35), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-voz:hover { box-shadow: 0 14px 50px rgba(255, 106, 42, .5), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-voz svg { width: 26px; height: 26px; stroke-width: 2; }
.btn-texto {
  background: var(--panel); color: var(--tx-1); border: 1px solid var(--glass-border); box-shadow: var(--glass-edge);
  backdrop-filter: blur(24px) saturate(175%); -webkit-backdrop-filter: blur(24px) saturate(175%);
}
.btn-texto:hover { background: rgba(40, 40, 46, .6); }
.btn.pequeno { min-height: 48px; padding: 12px 18px; }
.btn.pequeno strong { font-size: 15px; }

.confianca { list-style: none; padding: 0; margin: 26px 0 10px; display: flex; gap: 8px 18px; justify-content: center; flex-wrap: wrap; color: var(--tx-2); font-size: 14px; }
.confianca li::before { content: "✓"; color: var(--ok); margin-right: 6px; }
.aviso { color: var(--tx-3); font-size: 12.5px; max-width: 520px; margin: 0 auto; }
.aviso a, .rodape a { color: var(--tx-2); }

/* ---------- o que faz ---------- */
.faz { max-width: 1120px; margin: 0 auto; padding: 24px 16px 64px; }
.faz h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem); text-align: center; margin: 0 0 22px; letter-spacing: -.01em; }
.cartoes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.cartoes li {
  padding: 18px 18px 20px; border-radius: var(--raio); background: var(--panel); border: 1px solid var(--glass-border);
  box-shadow: var(--glass-edge); backdrop-filter: blur(22px) saturate(170%); -webkit-backdrop-filter: blur(22px) saturate(170%);
  display: flex; flex-direction: column; gap: 6px;
}
.cartoes b { font-weight: 600; }
.cartoes span { color: var(--tx-2); font-size: 14.5px; }
.rodape { max-width: 1120px; margin: 0 auto; padding: 24px 16px 40px; color: var(--tx-3); font-size: 13px; border-top: 1px solid var(--line-1); }

/* ---------- diálogos ---------- */
.dialogo {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column;
  background: rgba(5, 5, 6, .72); backdrop-filter: blur(28px) saturate(180%); -webkit-backdrop-filter: blur(28px) saturate(180%);
  padding: max(14px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  animation: entrar .22s ease-out;
}
.dialogo[hidden] { display: none; }
@keyframes entrar { from { opacity: 0; } to { opacity: 1; } }
.dlg-topo { display: flex; align-items: center; justify-content: space-between; max-width: 720px; width: 100%; margin: 0 auto; min-height: 44px; }
.dlg-nome { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--tx-2); }
.dlg-nome img { height: 20px; width: auto; }
.dlg-estado { font-size: 14px; color: var(--tx-2); padding: 5px 12px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line-2); }
.dlg-estado.vivo::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 7px; vertical-align: 1px; }

.palco { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; min-height: 0; }
.orbe { --nivel: 0; position: relative; width: min(58vw, 260px); aspect-ratio: 1; display: grid; place-items: center; }
.anel { position: absolute; inset: -14px; width: calc(100% + 28px); height: calc(100% + 28px); transform: rotate(-90deg); }
.anel circle { fill: none; stroke-width: 1.5; }
.anel .trilho { stroke: var(--line-1); }
.anel .progresso { stroke: rgba(255, 255, 255, .28); stroke-dasharray: 351.86; stroke-dashoffset: 351.86; transition: stroke-dashoffset 1s linear; }
.esfera {
  width: 100%; height: 100%; border-radius: 50%; position: relative; overflow: hidden;
  transform: scale(calc(.86 + var(--nivel) * .22));
  transition: transform .09s linear, background .6s ease, box-shadow .6s ease;
  background: radial-gradient(circle at 35% 30%, #9aa0ff 0%, #6b5cf6 38%, #2b1f6b 72%, #120d2a 100%);
  box-shadow: 0 0 calc(40px + var(--nivel) * 80px) rgba(110, 100, 255, calc(.25 + var(--nivel) * .4)), inset 0 -20px 60px rgba(0, 0, 0, .45);
}
.brilho { position: absolute; inset: 8% 18% auto 14%; height: 34%; border-radius: 50%; background: radial-gradient(ellipse at center, rgba(255, 255, 255, .45), transparent 70%); filter: blur(6px); }
.orbe[data-estado="conectando"] .esfera { animation: pulsar 1.6s ease-in-out infinite; filter: saturate(.5); }
.orbe[data-estado="falando"] .esfera {
  background: radial-gradient(circle at 35% 30%, #ffc49e 0%, #ff7a3a 36%, #d23d0e 70%, #4a1404 100%);
  box-shadow: 0 0 calc(50px + var(--nivel) * 100px) rgba(255, 106, 42, calc(.3 + var(--nivel) * .45)), inset 0 -20px 60px rgba(0, 0, 0, .35);
}
.orbe[data-estado="mudo"] .esfera { filter: grayscale(.85) brightness(.7); }
@keyframes pulsar { 0%, 100% { transform: scale(.84); opacity: .75; } 50% { transform: scale(.9); opacity: 1; } }

.legenda { min-height: 3.2em; max-width: 560px; margin: 0; text-align: center; color: var(--tx-2); font-size: 17px; line-height: 1.45; text-wrap: balance; }
.legenda .quem { color: var(--tx-3); font-size: 13px; display: block; margin-bottom: 2px; }

.dlg-controles { display: flex; gap: 14px; justify-content: center; padding: 8px 0 4px; }
.ctrl {
  display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; color: var(--tx-2); font-size: 13px;
}
.ctrl svg { width: 60px; height: 60px; padding: 18px; border-radius: 50%; background: var(--panel); border: 1px solid var(--glass-border); box-shadow: var(--glass-edge); color: var(--tx-1); }
.ctrl .risco { opacity: 0; }
.ctrl[aria-pressed="true"] svg { background: rgba(255, 255, 255, .9); color: #111; }
.ctrl[aria-pressed="true"] .risco { opacity: 1; }
.ctrl-fim svg { background: var(--err); border-color: transparent; color: #fff; }

.dlg-fim { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 16px; background: rgba(5, 5, 6, .86); }
.dlg-fim[hidden] { display: none; }
.dlg-fim h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; margin: 0 0 10px; }
.dlg-fim p { color: var(--tx-2); max-width: 440px; margin: 0 0 24px; }
.fim-acoes { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; align-items: center; }
.link { background: none; border: 0; color: var(--tx-3); text-decoration: underline; padding: 10px; }

/* ---------- cartão da reunião ---------- */
.cartao-reuniao {
  max-width: 440px; width: 100%; margin: 0 auto 14px; padding: 16px; border-radius: var(--raio);
  background: var(--panel-forte); border: 1px solid var(--line-brand, rgba(255, 106, 42, .42)); box-shadow: var(--shadow), var(--glass-edge);
  animation: subir .3s ease-out;
}
.cartao-reuniao[hidden] { display: none; }
@keyframes subir { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.cartao-reuniao h4 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.cartao-reuniao .dica { margin: 0 0 12px; color: var(--tx-2); font-size: 14px; }
.cartao-reuniao label { display: block; font-size: 12.5px; color: var(--tx-3); margin: 8px 0 4px; }
.cartao-reuniao input {
  width: 100%; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-3); color: var(--tx-1); font: inherit; font-size: 16px;
}
.cartao-reuniao .linha { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cartao-reuniao .btn { width: 100%; justify-content: center; margin-top: 14px; min-height: 48px; }
.cartao-reuniao .ok { display: flex; gap: 10px; align-items: flex-start; }
.cartao-reuniao .ok svg { color: var(--ok); width: 26px; height: 26px; }
.cartao-reuniao .erro { color: var(--err); font-size: 13.5px; margin: 8px 0 0; }

/* ---------- chat ---------- */
.dialogo-chat .mensagens { list-style: none; margin: 0 auto; padding: 16px 0; width: 100%; max-width: 720px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 82%; padding: 11px 14px; border-radius: 18px; font-size: 16px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.ia { align-self: flex-start; background: var(--panel); border: 1px solid var(--glass-border); border-bottom-left-radius: 6px; }
.msg.voce { align-self: flex-end; background: rgba(255, 106, 42, .16); border: 1px solid rgba(255, 106, 42, .28); border-bottom-right-radius: 6px; }
.msg.digitando { color: var(--tx-3); }
.msg.digitando i { display: inline-block; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: currentColor; animation: pontinhos 1.2s infinite; }
.msg.digitando i:nth-child(2) { animation-delay: .15s; } .msg.digitando i:nth-child(3) { animation-delay: .3s; }
@keyframes pontinhos { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.msg-cartao { align-self: stretch; }
.msg-cartao .cartao-reuniao { margin: 4px 0; max-width: 460px; }
.escrever { display: flex; gap: 8px; max-width: 720px; width: 100%; margin: 0 auto; }
.escrever input {
  flex: 1; min-width: 0; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--glass-border); background: var(--panel); color: var(--tx-1); font: inherit; font-size: 16px;
}
.escrever button { width: 52px; border-radius: 16px; border: 0; background: var(--grad-brand); color: var(--tx-on-brand); display: grid; place-items: center; }
.escrever button svg { stroke-width: 2.2; }
.fechar { background: var(--panel); border: 1px solid var(--line-2); border-radius: 50%; width: 40px; height: 40px; display: grid; place-items: center; }
.fechar svg { width: 18px; height: 18px; }

@media (max-width: 560px) {
  .hero { padding-top: 3vh; }
  .acoes { flex-direction: column; align-items: stretch; max-width: 400px; margin: 0 auto; }
  .acoes .btn { justify-content: center; }
}
@media (min-width: 760px) {
  .hero { padding-top: 10vh; }
  .dialogo-chat { padding-left: 24px; padding-right: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .luz, .orbe .esfera { animation: none !important; }
}
