:root {
  color-scheme: light;
  --background: #f8fafc;
  --foreground: #1e293b;
  --card: #ffffff;
  --primary: #2563eb;
  --muted-foreground: #64748b;
  --border: #e2e8f0;
  --warning-bg: #fffbeb;
  --warning-fg: #92400e;
  --radius: 0.75rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); font-weight: 500; text-decoration: none; }
a:hover { text-decoration: underline; }

.ob-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(8px);
}
.ob-header__inner {
  max-width: 64rem;
  height: 3.5rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ob-header img { height: 2rem; width: auto; }

.ob-progress { max-width: 64rem; margin: 0 auto; padding: 0.75rem 1rem 0; }
.ob-progress__bars { display: flex; gap: 0.25rem; }
.ob-progress__bar { height: 4px; flex: 1; border-radius: 999px; background: var(--border); transition: background 0.3s; }
.ob-progress__bar.is-on { background: var(--primary); }
.ob-progress__label { margin: 0.375rem 0 0; text-align: right; font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground); }

.ob-main { max-width: 64rem; margin: 0 auto; padding: 0.75rem 1rem 1.5rem; }
.ob-footer { max-width: 64rem; margin: 0 auto; padding: 0 1rem 1.5rem; text-align: center; font-size: 0.75rem; line-height: 1.6; color: var(--muted-foreground); }

.ob-title { max-width: 42rem; margin: 0 auto 0.75rem; text-align: center; }
.ob-title h1 { margin: 0; font-size: 1.25rem; font-weight: 700; }
.ob-title p { margin: 0.5rem 0 0; font-size: 0.875rem; line-height: 1.4; color: var(--muted-foreground); }

.ob-card {
  max-width: 32rem;
  margin: 0 auto;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.ob-embed { width: 100%; min-height: 360px; border: 0; display: block; }
.ob-embed-missing {
  padding: 1rem;
  border-radius: 0.5rem;
  background: var(--warning-bg);
  color: var(--warning-fg);
  font-size: 0.875rem;
  line-height: 1.5;
}

.ob-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 1.5rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.ob-btn:hover { background: #1d4ed8; text-decoration: none; }
.ob-btn--block { width: 100%; }

/* Boas-vindas */
.ob-welcome { max-width: 56rem; margin: 0 auto; display: grid; gap: 1.5rem; align-items: center; }
.ob-welcome__text { display: flex; flex-direction: column; gap: 1rem; }
.ob-chip {
  align-self: flex-start;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #e2e8f0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
}
.ob-welcome h1 { margin: 0; font-size: 2.25rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.ob-welcome p { margin: 0; max-width: 42rem; font-size: 1rem; line-height: 1.6; color: var(--muted-foreground); }
.ob-welcome .ob-btn { align-self: stretch; }

/* Celular */
.phone-wrap { display: flex; justify-content: center; padding: 0.5rem 0; }
.phone {
  position: relative;
  width: 230px;
  height: 460px;
  overflow: hidden;
  border-radius: 38px;
  background: #1c1c1e;
  box-shadow: 0 0 0 1.5px #3a3a3c, 0 30px 60px rgba(0, 0, 0, 0.45), 0 10px 20px rgba(0, 0, 0, 0.3);
  animation: phoneFloat 4s ease-in-out infinite;
}
.phone__screen { position: absolute; inset: 3px; display: flex; flex-direction: column; overflow: hidden; border-radius: 35px; background: #fff; }
.phone__island { display: flex; justify-content: center; padding: 12px 0 4px; background: #0d6158; }
.phone__island span { width: 82px; height: 22px; border-radius: 999px; background: #1c1c1e; }
.phone__head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #0d6158; }
.phone__avatar { width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, 0.15); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 700; }
.phone__name { margin: 0; font-size: 11px; font-weight: 600; line-height: 1.2; color: #fff; }
.phone__status { margin: 0; font-size: 9px; line-height: 1; color: rgba(255, 255, 255, 0.7); }
.phone__chat { flex: 1; overflow: hidden; padding: 8px 10px; background: #e8ded6; display: flex; flex-direction: column; gap: 6px; }
.msg { display: flex; animation: msgIn 0.25s ease-out forwards; }
.msg--client { justify-content: flex-end; }
.msg__bubble { max-width: 82%; padding: 6px 10px; border-radius: 10px; background: #fff; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08); font-size: 10px; line-height: 1.35; color: #202124; }
.msg--client .msg__bubble { background: #d9fdd3; border-top-right-radius: 3px; }
.msg--clara .msg__bubble { border-top-left-radius: 3px; }
.typing { display: flex; gap: 2px; align-items: center; padding: 3px 0; }
.typing i { display: block; width: 6px; height: 6px; border-radius: 50%; background: #8696a0; animation: dotBounce 1.2s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; }
.typing i:nth-child(3) { animation-delay: 0.4s; }
.phone__input { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: #f0f2f5; border-top: 1px solid rgba(0, 0, 0, 0.05); }
.phone__input div { flex: 1; padding: 4px 12px; border-radius: 999px; background: #fff; font-size: 9px; color: #8696a0; }
.phone__home { display: flex; justify-content: center; padding: 4px 0 8px; background: #fff; }
.phone__home span { width: 64px; height: 4px; border-radius: 999px; background: #1c1c1e; }

@keyframes phoneFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes dotBounce { 0%, 80%, 100% { transform: translateY(0); opacity: 0.4; } 40% { transform: translateY(-4px); opacity: 1; } }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* Final */
.finale {
  position: relative;
  max-width: 64rem;
  min-height: 520px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 28px;
  background: #2448cf;
  box-shadow: 0 30px 80px -28px rgba(24, 48, 145, 0.65);
}
.finale__bg { position: absolute; inset: 0; background: radial-gradient(120% 95% at 50% 34%, #5b83ff 0%, #315ae8 47%, #1b38b9 100%); }
.finale__glow { position: absolute; left: 50%; top: 42%; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, 0.48) 0%, rgba(255, 255, 255, 0) 65%); filter: blur(2px); animation: finale-glow 2.6s ease-in-out infinite; }
.finale__ring { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.5); }
.finale__ring--1 { animation: finale-ring 1.3s ease-out 0.24s both; }
.finale__ring--2 { animation: finale-ring 1.3s ease-out 0.48s both; }
.finale__confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.finale__confetti span { position: absolute; left: 50%; top: 42%; animation: finale-confetti 1.25s cubic-bezier(0.15, 0.7, 0.25, 1) both; }
.finale__content { position: relative; z-index: 10; min-height: 520px; padding: 3rem 1.5rem; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.finale__badge { width: 112px; height: 112px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 22px 60px rgba(15, 30, 90, 0.45), 0 0 0 13px rgba(255, 255, 255, 0.18); animation: finale-pop 0.58s cubic-bezier(0.2, 1.5, 0.4, 1) 0.16s both; }
.finale__check { stroke-dasharray: 26; stroke-dashoffset: 26; animation: finale-draw 0.42s ease-out 0.48s both; }
.finale h1 { margin: 2.25rem 0 0; color: #fff; font-size: 2.25rem; font-weight: 800; letter-spacing: -0.035em; text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2); opacity: 0; animation: finale-rise 0.52s ease-out 0.68s both; }
.finale p { margin: 1rem 0 0; max-width: 42rem; color: rgba(239, 246, 255, 0.9); font-size: 1rem; font-weight: 500; line-height: 1.6; opacity: 0; animation: finale-rise 0.52s ease-out 0.9s both; }
.finale__action { margin-top: 2.25rem; width: 100%; max-width: 24rem; opacity: 0; animation: finale-rise 0.52s ease-out 1.1s both; }
.finale .ob-btn { background: #fff; color: #1d4ed8; box-shadow: 0 12px 30px -10px rgba(9, 30, 110, 0.55); }
.finale .ob-btn:hover { background: #eff6ff; color: #1e40af; }
.finale__flash { position: absolute; inset: 0; z-index: 20; background: #fff; pointer-events: none; animation: finale-flash 0.45s ease-out both; }

@keyframes finale-flash { 0% { opacity: 0.82; } 100% { opacity: 0; } }
@keyframes finale-pop { 0% { transform: scale(0); opacity: 0; } 65% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes finale-draw { to { stroke-dashoffset: 0; } }
@keyframes finale-rise { 0% { opacity: 0; transform: translateY(18px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes finale-ring { 0% { width: 130px; height: 130px; opacity: 0.65; } 100% { width: 600px; height: 600px; opacity: 0; } }
@keyframes finale-glow { 0%, 100% { opacity: 0.48; transform: translate(-50%, -50%) scale(0.96); } 50% { opacity: 0.9; transform: translate(-50%, -50%) scale(1.05); } }
@keyframes finale-confetti { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(0deg) scale(0.7); } 8% { opacity: 1; } 100% { opacity: 0.92; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) rotate(var(--rot)) scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .phone, .finale *, .typing i { animation-duration: 0.001ms !important; animation-delay: 0ms !important; }
  .finale__confetti, .finale__ring, .finale__flash { display: none; }
}

@media (min-width: 640px) {
  .ob-header__inner { height: 4rem; padding: 0 1.5rem; }
  .ob-header img { height: 2.25rem; }
  .ob-progress, .ob-main, .ob-footer { padding-left: 1.5rem; padding-right: 1.5rem; }
  .ob-progress { padding-top: 1.25rem; }
  .ob-progress__label { margin-top: 0.5rem; }
  .ob-main { padding-top: 2rem; padding-bottom: 2rem; }
  .ob-title { margin-bottom: 2rem; }
  .ob-title h1 { font-size: 1.875rem; }
  .ob-title p { margin-top: 0.75rem; font-size: 1rem; line-height: 1.6; }
  .ob-card { padding: 1.5rem; }
  .ob-welcome h1 { font-size: 3rem; }
  .ob-welcome p { font-size: 1.125rem; }
  .ob-welcome .ob-btn { align-self: flex-start; }
  .finale { min-height: 570px; }
  .finale__content { min-height: 570px; padding: 3rem; }
  .finale h1 { font-size: 3rem; }
  .finale p { font-size: 1.25rem; }
}

@media (min-width: 1024px) {
  .ob-welcome { grid-template-columns: 1.1fr 0.9fr; }
}
