/* Rebo: landing page.
   Narrativa de cor: a página começa de noite (abertura e história, "enquanto você dorme"), amanhece na
   história presa na rolagem e segue de dia (explicação); a chamada final volta para a noite.
   Mascote: peças em <svg class="rb-sprite"> reaproveitadas com <use> (geradas por brand/rebo/build.py).
   Cor diz quem fala: branco = cliente, esmeralda = Rebo, âmbar = você (atendimento humano). */

:root {
  --night-0: #03130e;
  --night-1: #062019;
  --night-2: #0a2c22;
  --night-line: rgba(167, 243, 208, 0.14);
  --night-ink: #eafff6;
  --night-muted: #9cc9b5;

  --day-0: #f3fbf7;
  --day-1: #ffffff;
  --ink: #0c2c22;
  --muted: #4d6b5e;
  --line: #d8ebe1;
  --surface-2: #f5faf7;

  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-300: #6ee7b7;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-800: #065f46;
  --emerald-900: #064e3b;
  --mint: #a7f3d0;

  --amber-bg: #fff7e6;
  --amber-line: #f3d99a;
  --amber-ink: #b45309;
  --amber: #f59e0b;

  --grad: linear-gradient(135deg, #34d399 0%, #10b981 55%, #059669 100%);
  /* Verde escuro: texto branco em cima passa no contraste AA. */
  --grad-ai: linear-gradient(160deg, #05805d 0%, #065f46 100%);
  --ring: rgba(16, 185, 129, 0.3);

  --shadow-sm: 0 1px 2px rgba(6, 78, 59, 0.06), 0 2px 8px rgba(6, 78, 59, 0.05);
  --shadow-md: 0 8px 30px rgba(6, 78, 59, 0.1);
  --shadow-lg: 0 1px 2px rgba(6, 78, 59, 0.05), 0 12px 28px -8px rgba(6, 78, 59, 0.14),
    0 44px 90px -24px rgba(6, 78, 59, 0.28);

  --font-display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --gutter: 1rem;
  --wrap: 78rem;
  --header-h: 4.25rem;
  --section-y: clamp(5rem, 3rem + 7vw, 10rem);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
}

@media (min-width: 640px) { :root { --gutter: 1.5rem; } }
@media (min-width: 1024px) { :root { --gutter: 2.25rem; } }

/* ───────── Base ───────── */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
/* Telas grandes: a página inteira cresce junto (até 2560 px), em vez de virar uma coluna perdida. */
@media (min-width: 1600px) {
  html { font-size: clamp(16px, calc(0.3125vw + 11px), 21px); }
  :root { --wrap: 84rem; }
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--night-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
/* Granulado leve sobre tudo: tira o aspecto "chapado" do digital. */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

p, h1, h2, h3, figure, blockquote { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { flex-shrink: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--emerald-500); outline-offset: 3px; }

.rb-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
@media (max-width: 639px) { .hide-sm { display: none; } }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: 0.75rem 1rem; border-radius: 10px;
  background: var(--emerald-400); color: var(--night-0); font-weight: 700; text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus { top: 1rem; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.night { background: var(--night-0); color: var(--night-ink); }
.day { background: var(--day-0); color: var(--ink); }

/* Entrada da abertura: escondida só até o main.js começar a animação (ou 2,5 s, se ele não carregar). */
.js:not(.ready) [data-intro] { visibility: hidden; }
/* Máscara das palavras animadas (SplitText): folga em cima e embaixo para não cortar acentos e o "g"/"p",
   compensada na margem para a linha não mudar de altura. */
.w-mask { padding: 0.12em 0.04em 0.16em; margin: -0.12em -0.04em -0.16em; }

/* ───────── Mascote ───────── */
.rebo { display: block; width: 100%; height: auto; overflow: visible; --led: #6ee7b7; }
.rebo[data-led='human'] { --led: #f59e0b; }
.rb-shadow { fill: #0b9467; opacity: 0.22; }
.night .rb-shadow { fill: #10b981; opacity: 0.3; }
.rb-stem { fill: #0b9467; }
.rb-led { fill: var(--led); transition: fill 0.45s; }
.rb-ring { fill: none; stroke: var(--led); stroke-width: 3.5; opacity: 0.35; transition: stroke 0.45s; }
.rb-glint { fill: #ffffff; opacity: 0.7; }

.speech {
  position: absolute; z-index: 3; margin: 0;
  padding: 0.7rem 1.05rem; border-radius: 20px 20px 20px 6px;
  background: #ffffff; color: var(--ink);
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2;
  font-size: clamp(0.95rem, 0.88rem + 0.35vw, 1.25rem);
  box-shadow: 0 16px 36px -14px rgba(0, 0, 0, 0.5); white-space: nowrap;
}
.day .speech { box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
/* Balão à esquerda do Rebo: a ponta fica embaixo à direita, apontando para ele. */
.speech--left { border-radius: 20px 20px 6px 20px; }

/* ───────── Botões ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.75rem 1.25rem;
  border: 0; border-radius: 14px;
  font: 600 1rem/1.2 var(--font-ui); letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition-property: transform, background-color, box-shadow, color;
  transition-duration: 0.18s; transition-timing-function: var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn--sm { min-height: 2.5rem; padding: 0.5rem 1rem; font-size: 0.9375rem; border-radius: 12px; }
.btn--lg { min-height: 3.5rem; padding: 1rem 1.5rem; font-size: 1.0625rem; border-radius: 16px; }
.btn--bright {
  color: var(--night-0); background: var(--grad);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 12px 32px -10px rgba(52, 211, 153, 0.6);
}
.btn--bright:hover { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 18px 44px -10px rgba(52, 211, 153, 0.8); }
.btn--line { background: transparent; }
.night .btn--line { color: var(--night-ink); box-shadow: inset 0 0 0 1.5px rgba(234, 255, 246, 0.28); }
.night .btn--line:hover { box-shadow: inset 0 0 0 1.5px var(--mint); }
.day .btn--line { color: var(--emerald-800); background: rgba(255, 255, 255, 0.75); box-shadow: inset 0 0 0 1.5px var(--line), var(--shadow-sm); }
.day .btn--line:hover { background: #ffffff; box-shadow: inset 0 0 0 1.5px var(--emerald-300), var(--shadow-sm); }
.btn--you { color: var(--amber-ink); background: var(--amber-bg); box-shadow: inset 0 0 0 1.5px var(--amber-line); }
.btn--you:hover { background: #ffefcc; }

/* ───────── Cabeçalho ───────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  color: var(--night-ink); transition: color 0.35s;
}
.site-header::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: rgba(3, 19, 14, 0.6);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  transition: opacity 0.35s, background-color 0.35s;
}
.site-header.is-scrolled::before { opacity: 1; }
.site-header[data-theme='day'] { color: var(--ink); }
.site-header[data-theme='day']::before { background: rgba(255, 255, 255, 0.8); box-shadow: 0 1px 0 var(--line); }

.header-inner { display: flex; align-items: center; gap: 1rem; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: inherit; text-decoration: none; border-radius: 10px; }
.rebo--logo { width: 2.15rem; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; line-height: 1; letter-spacing: -0.05em; }
.site-nav { display: none; }
.header-cta { margin-left: auto; }
@media (min-width: 960px) {
  .site-nav { display: flex; gap: 0.25rem; margin-left: auto; }
  .site-nav a {
    padding: 0.5rem 0.85rem; border-radius: 10px;
    font-size: 0.9375rem; font-weight: 600; text-decoration: none; opacity: 0.8;
    transition-property: opacity, background-color; transition-duration: 0.18s;
  }
  .site-nav a:hover { opacity: 1; background: rgba(167, 243, 208, 0.1); }
  .site-header[data-theme='day'] .site-nav a:hover { background: var(--emerald-50); }
  .header-cta { margin-left: 0.75rem; }
}

/* ───────── Abertura ───────── */
.hero {
  position: relative; isolation: isolate; overflow: clip;
  padding: calc(var(--header-h) + 1.25rem) 0 clamp(3.5rem, 2rem + 4vw, 6rem);
}
@media (min-width: 1024px) {
  .hero { min-height: 100svh; display: flex; align-items: center; padding-bottom: 4rem; }
  .hero > .wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); }
}
.hero-sky {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(44rem 34rem at 74% 46%, rgba(16, 185, 129, 0.2), transparent 62%),
    radial-gradient(30rem 22rem at 8% 96%, rgba(52, 211, 153, 0.08), transparent 60%);
}
.hero-sky::before {
  content: ''; position: absolute; inset: 0; opacity: 0.55;
  background-image: radial-gradient(rgba(167, 243, 208, 0.24) 1px, transparent 1.6px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(62% 72% at 72% 46%, #000 0%, transparent 76%);
  mask-image: radial-gradient(62% 72% at 72% 46%, #000 0%, transparent 76%);
}

.hero-grid { display: grid; gap: 1.25rem; align-items: center; }
.hero-stage { order: -1; position: relative; justify-self: center; width: min(64vw, 17.5rem); margin-top: 1.25rem; }
.hero-title {
  max-width: 11ch;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.85rem, 1rem + 6.4vw, 7.5rem); line-height: 0.92; letter-spacing: -0.045em;
}
.hero-lede {
  margin-top: 1.4rem; max-width: 34rem;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.3125rem); line-height: 1.55; color: var(--night-muted);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.9rem; }
.hero-note { display: flex; align-items: center; gap: 0.55rem; margin-top: 1.2rem; font-size: 0.9375rem; color: var(--night-muted); }
.tick {
  width: 1.25rem; height: 1.25rem; border-radius: 50%; flex-shrink: 0;
  background: var(--emerald-400) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4L18 8' fill='none' stroke='%2303130e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 72% no-repeat;
}
.speech--hero { top: -0.75rem; left: -14%; }

.rebo-hit {
  display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: 40px; -webkit-tap-highlight-color: transparent;
}
.rebo-hit:focus-visible { outline: 2px solid var(--mint); outline-offset: 6px; }
.burst {
  position: absolute; z-index: 4; width: 1.6rem; height: 1.6rem; border-radius: 50%; pointer-events: none;
  background: var(--emerald-400) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4L18 8' fill='none' stroke='%2303130e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 70% no-repeat;
}

@media (max-width: 479px) {
  .hero-actions .btn { flex: 1 1 100%; }
}
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: 2.5rem; }
  .hero-stage { order: 0; width: 100%; max-width: 38rem; justify-self: end; margin-top: 0; }
  .speech--hero { top: 2%; left: -12%; }
}

/* ───────── Faixa de perguntas ───────── */
.marquee {
  display: flex; flex-direction: column; gap: 0.75rem; overflow: hidden;
  padding: 1.5rem 0 2.75rem; border-top: 1px solid var(--night-line);
}
.marquee-row { display: flex; width: max-content; animation: marquee 50s linear infinite; }
.marquee-row--back { animation-duration: 58s; animation-direction: reverse; }
.motion .marquee-row { animation: none; }
.marquee-track { display: flex; flex-shrink: 0; gap: 0.75rem; margin: 0; padding: 0 0.375rem; list-style: none; }
.marquee-track li {
  display: inline-flex; align-items: center; gap: 0.55rem; white-space: nowrap;
  padding: 0.6rem 1.05rem 0.6rem 0.8rem; border-radius: 999px;
  background: var(--night-1); border: 1px solid var(--night-line); color: var(--night-ink);
  font-size: 0.9375rem;
}
.marquee-track li::before {
  content: ''; width: 1rem; height: 0.75rem; flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 12'%3E%3Cpath d='M1.2 6.6 4.4 9.7 10.8 2.4M7.2 9.1l.6.6 6.4-7.3' fill='none' stroke='%236ee7b7' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ───────── História: uma noite no WhatsApp ───────── */
.story { position: relative; isolation: isolate; overflow: clip; padding: var(--section-y) 0; transition: color 0.5s; }
@media (min-width: 1024px) {
  .story { min-height: 100svh; display: flex; align-items: center; padding: calc(var(--header-h) + 2rem) 0 3rem; }
  .story > .wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); }
}
/* Virada da noite para o dia em duas camadas (opacidades vêm do main.js): primeiro um crepúsculo esmeralda,
   depois a manhã clara de cima a baixo, com o sol nascendo atrás da caixa. O texto troca para escuro no meio. */
.story::before {
  content: ''; position: absolute; inset: 0; z-index: -2; pointer-events: none; opacity: var(--twilight, 0);
  background:
    radial-gradient(60rem 34rem at 76% 112%, rgba(52, 211, 153, 0.55), transparent 70%),
    linear-gradient(180deg, #052e23 0%, #0a4f3b 55%, #10704f 100%);
}
.story-dawn {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: var(--dawn, 0);
  background:
    radial-gradient(56rem 30rem at 76% 108%, rgba(253, 230, 138, 0.5), transparent 66%),
    linear-gradient(180deg, #c9f1df 0%, #e2f8ee 48%, var(--day-0) 100%);
}
.story-grid { display: grid; gap: 2.5rem; align-items: center; }
.story-clock {
  margin: 1.5rem 0 0.75rem;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(4.5rem, 2rem + 9vw, 10.5rem); line-height: 0.9; letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums; color: var(--emerald-300);
  transition: color 0.5s;
}
.story-steps { display: grid; margin: 0; padding: 0; list-style: none; }
.story-steps li {
  grid-area: 1 / 1; max-width: 27rem;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.5rem); line-height: 1.35;
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.4s, transform 0.45s var(--ease-out);
}
.story-steps li.is-active { opacity: 1; transform: none; }
/* O corte do corpo do Rebo fica em y=208 de 320 no SVG: a caixa começa exatamente nessa altura (208/340 da largura). */
.story-demo { --peek-w: 8.5rem; position: relative; padding-top: calc(var(--peek-w) * 0.6118); }
.rebo--peek { position: absolute; top: 0; right: 1.5rem; z-index: 2; width: var(--peek-w); pointer-events: none; }
.story .inbox { position: relative; z-index: 1; }
@media (min-width: 1024px) { .story-demo { --peek-w: 11.5rem; } .rebo--peek { right: 3rem; } }
.story.is-dawn { color: var(--ink); }
.story.is-dawn .story-clock { color: var(--emerald-700); }
@media (min-width: 1024px) {
  .story-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; }
}

/* ───────── Caixa de conversas ───────── */
.inbox {
  --row-h: 4.375rem;
  display: grid; grid-template-rows: auto 1fr auto;
  overflow: hidden; border-radius: 28px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97); color: var(--ink);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(167, 243, 208, 0.08);
}
.inbox-head { grid-row: 1; display: flex; align-items: center; gap: 0.625rem; padding: 1rem 1.125rem 0.875rem 1.25rem; border-bottom: 1px solid var(--line); }
.inbox-title { font-weight: 700; font-size: 1.0625rem; letter-spacing: -0.01em; }
.status-pill {
  margin-left: auto; display: inline-flex; align-items: center; gap: 0.4375rem;
  padding: 0.375rem 0.75rem; border-radius: 999px; border: 1px solid var(--line); background: #ffffff;
  font-size: 0.8125rem; font-weight: 600; color: var(--emerald-700);
}
.status-dot {
  width: 0.5625rem; height: 0.5625rem; border-radius: 50%; flex-shrink: 0;
  background: var(--emerald-500); box-shadow: 0 0 0 0 var(--ring); animation: pulse 1.8s infinite;
}
.inbox-list { grid-area: 2 / 1; list-style: none; margin: 0; padding: 0.375rem 0.5rem; }
/* Começo da noite, antes da primeira mensagem (só com JavaScript; sem ele, a lista aparece respondida). */
.inbox-empty {
  grid-area: 2 / 1; align-self: center; justify-self: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.625rem;
  font-size: 0.9375rem; font-weight: 600; color: var(--muted);
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.inbox-empty svg { color: #b9d3c6; }
.js .story.is-empty .inbox-empty { opacity: 1; transform: none; }
.convo { position: relative; display: flex; align-items: center; gap: 0.75rem; height: var(--row-h); padding: 0 0.75rem; border-radius: 18px; }
.avatar {
  width: 2.75rem; height: 2.75rem; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.875rem; color: #ffffff; letter-spacing: 0.01em;
  background: linear-gradient(135deg, hsl(var(--hue, 160) 62% 50%), hsl(var(--hue, 160) 64% 36%));
  box-shadow: var(--shadow-sm);
}
.avatar--sm { width: 2.375rem; height: 2.375rem; border-radius: 12px; font-size: 0.8125rem; }
.convo-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1875rem; }
.convo-top, .convo-bottom { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-width: 0; }
.convo-name { font-weight: 600; font-size: 0.9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convo-time { flex-shrink: 0; font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; transition: color 0.2s; }
.convo-preview { flex: 1; min-width: 0; display: grid; font-size: 0.875rem; color: var(--muted); }
.convo-preview > span {
  grid-area: 1 / 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition-property: opacity, transform; transition-duration: 0.28s; transition-timing-function: var(--ease-out);
}
.p-q, .p-t { opacity: 0; transform: translateY(6px); }
.p-t { display: flex; align-items: center; gap: 0.375rem; color: var(--emerald-700); font-weight: 600; }
.dcheck {
  display: inline-block; width: 1rem; height: 0.75rem; margin-right: 0.3125rem; vertical-align: -1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 12'%3E%3Cpath d='M1.2 6.6 4.4 9.7 10.8 2.4M7.2 9.1l.6.6 6.4-7.3' fill='none' stroke='%23059669' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.dots { display: inline-flex; align-items: center; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: typing 1.2s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
.convo-badge {
  flex-shrink: 0; min-width: 1.25rem; height: 1.25rem; padding: 0 0.375rem; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--emerald-700); color: #ffffff; font-size: 0.6875rem; font-weight: 700; font-variant-numeric: tabular-nums;
  opacity: 0; transform: scale(0.5);
  transition-property: opacity, transform; transition-duration: 0.25s; transition-timing-function: var(--ease-out);
}
/* Estados controlados pelo main.js. Sem JavaScript, tudo aparece respondido. */
.js .story .convo { transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out); }
.js .convo[data-state='hidden'] { opacity: 0; transform: translateY(14px); }
.js .convo[data-state='new'] .p-q,
.js .convo[data-state='typing'] .p-t { opacity: 1; transform: none; }
.js .convo[data-state='new'] .p-a,
.js .convo[data-state='typing'] .p-a { opacity: 0; transform: translateY(-6px); }
.js .convo[data-state='new'] .convo-badge,
.js .convo[data-state='typing'] .convo-badge { opacity: 1; transform: none; }
.js .convo[data-state='new'] .convo-name { font-weight: 700; }
.js .convo[data-state='new'] .p-q { color: var(--ink); }
.js .convo[data-state='new'] .convo-time,
.js .convo[data-state='typing'] .convo-time { color: var(--emerald-700); font-weight: 600; }

.inbox-foot {
  grid-row: 3; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.875rem 1.25rem; border-top: 1px solid var(--line); background: var(--surface-2);
}
.inbox-foot-label { font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.inbox-left {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 800; font-size: 1.75rem; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--emerald-700); transition: color 0.3s;
}
.inbox-left-check {
  width: 1.375rem; height: 1.375rem; border-radius: 50%;
  background: var(--emerald-600) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4L18 8' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 70% no-repeat;
  transition-property: opacity, transform; transition-duration: 0.35s; transition-timing-function: var(--ease-out);
}
.inbox-left.is-pending { color: var(--amber-ink); }
.inbox-left.is-pending .inbox-left-check { opacity: 0; transform: scale(0.4); }

/* ───────── Seções de dia ───────── */
.section { padding-block: var(--section-y); }
.section--band { background: #ffffff; border-block: 1px solid var(--line); }
.section-title {
  max-width: 18ch;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.1rem, 1.2rem + 3.4vw, 4.25rem); line-height: 1; letter-spacing: -0.04em;
}
.section-lede { margin-top: 1rem; max-width: 36rem; font-size: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem); color: var(--muted); text-wrap: pretty; }
.section-intro { margin-bottom: 2.25rem; }

.split { display: grid; gap: 2.5rem; }
.split-copy > .btn { margin-top: 1.5rem; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4.5rem; align-items: center; }
  .split--top { align-items: start; }
  .split-copy--sticky { position: sticky; top: calc(var(--header-h) + 2rem); }
}

/* Três passos */
.steps { list-style: none; margin: 2.75rem 0 0; padding: 0; display: grid; gap: 3.25rem; }
.step { display: flex; flex-direction: column-reverse; gap: 1.5rem; }
.step-visual { display: flex; align-items: flex-end; }
.step-body { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 1rem; row-gap: 0.375rem; align-items: baseline; }
.step-num {
  grid-row: span 2; min-width: 2.25rem;
  font-family: var(--font-display); font-weight: 800; font-size: 3rem; line-height: 0.9; letter-spacing: -0.04em; color: var(--emerald-700);
}
.step-title { font-size: 1.1875rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.step-text { max-width: 30rem; font-size: 1rem; color: var(--muted); text-wrap: pretty; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; margin-top: 3.75rem; }
  .step { flex-direction: column; gap: 2rem; }
  .step-visual { min-height: 13.5rem; }
  .step-body { grid-template-columns: minmax(0, 1fr); }
  .step-num { grid-row: auto; display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
  .step-num::after { content: ''; flex: 1; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--emerald-300), rgba(110, 231, 183, 0)); }
}
.qr { position: relative; width: 10.5rem; aspect-ratio: 1; padding: 0.875rem; border-radius: 22px; border: 1px solid var(--line); background: #ffffff; box-shadow: var(--shadow-lg); }
.qr-code { display: block; width: 100%; height: 100%; fill: var(--ink); }
.qr-logo { position: absolute; left: 50%; top: 50%; width: 2.9rem; padding: 0.3rem; transform: translate(-50%, -50%); border-radius: 12px; background: #ffffff; overflow: visible; }
.qr-scan { position: absolute; left: 0.5rem; right: 0.5rem; top: 64%; height: 2px; border-radius: 2px; background: var(--grad); box-shadow: 0 0 12px 2px rgba(16, 185, 129, 0.55); }
.mini-field { width: min(100%, 22rem); display: flex; flex-direction: column; gap: 0.5rem; }
.mini-label { font-size: 0.8125rem; font-weight: 600; }
.mini-input { padding: 0.875rem 1rem; border-radius: 14px; border: 1.5px solid var(--emerald-500); background: #ffffff; box-shadow: 0 0 0 4px var(--ring), var(--shadow-md); font-size: 0.875rem; line-height: 1.55; }
.caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: var(--emerald-600); animation: caret 1.1s steps(1) infinite; }
.mini-toggle { width: min(100%, 21rem); display: flex; align-items: center; gap: 0.85rem; padding: 0.9rem 1.1rem; border-radius: 16px; border: 1.5px solid #b9ead4; background: var(--emerald-50); box-shadow: var(--shadow-md); }
.rebo--chip { width: 2.6rem; }
.mini-toggle-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.mini-toggle-text b { font-size: 0.9375rem; }
.mini-toggle-text small { font-size: 0.8125rem; color: var(--muted); }
.switch { position: relative; width: 52px; height: 30px; flex-shrink: 0; border-radius: 999px; background: var(--emerald-500); }
.knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #ffffff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); transform: translateX(22px); }

/* Ensine o Rebo */
.teach { position: relative; }
.tabs { display: flex; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding: 0.375rem var(--gutter); }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0; min-height: 2.75rem; padding: 0.5rem 1rem; border-radius: 999px;
  border: 1.5px solid var(--line); background: #ffffff; font-size: 0.9375rem; font-weight: 600; cursor: pointer;
  transition-property: background-color, color, border-color, box-shadow, transform; transition-duration: 0.18s; transition-timing-function: var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.tab:hover { border-color: var(--emerald-300); }
.tab:active { transform: scale(0.97); }
.tab[aria-selected='true'] { color: #ffffff; background: var(--emerald-800); border-color: var(--emerald-800); box-shadow: 0 8px 18px -8px rgba(6, 95, 70, 0.6); }
.teach-panel { display: grid; gap: 1.25rem; margin-top: 1.25rem; }
.note-label { display: block; margin-bottom: 0.5rem; font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.note-text { padding: 1rem 1.125rem; border-radius: 16px; border: 1.5px solid var(--line); background: #ffffff; box-shadow: var(--shadow-sm); font-size: 0.9375rem; line-height: 1.7; }
.rebo--teach { position: absolute; z-index: 2; right: 0.25rem; bottom: -1.75rem; width: 4rem; }
@media (min-width: 960px) {
  .teach-panel { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.5rem; align-items: center; margin-top: 2rem; }
  .rebo--teach { right: -2.25rem; bottom: -3.25rem; width: 7rem; }
}

/* Destaques: o mesmo marcador no texto e na resposta mostra de onde veio cada informação. */
mark {
  color: inherit; margin: 0 -0.08em; padding: 0.05em 0.08em; border-radius: 4px;
  background-repeat: no-repeat; background-size: 100% 2px, 100% 100%; background-position: 0 100%, 0 0;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.note-text mark { color: var(--emerald-900); background-color: transparent; background-image: linear-gradient(var(--emerald-400), var(--emerald-400)), linear-gradient(var(--emerald-100), var(--emerald-100)); }
.bubble--out mark { background-color: transparent; background-image: linear-gradient(var(--emerald-300), var(--emerald-300)), linear-gradient(rgba(110, 231, 183, 0.22), rgba(110, 231, 183, 0.22)); }

/* Conversa */
.chat { display: flex; flex-direction: column; overflow: hidden; border-radius: 26px; border: 1px solid var(--line); background: #ffffff; box-shadow: var(--shadow-lg); }
.chat-head { display: flex; align-items: center; gap: 0.75rem; min-height: 4rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.95); }
.chat-id { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.chat-id b { font-size: 0.9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-id small { font-size: 0.75rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 0.4375rem; padding: 0.375rem 0.75rem; border: 0; border-radius: 999px; font: 600 0.75rem/1.2 var(--font-ui); white-space: nowrap; }
.pill--ai { color: var(--emerald-700); background: var(--emerald-50); }
.pill--human { position: relative; min-height: 2rem; cursor: pointer; color: var(--amber-ink); background: var(--amber-bg); transition-property: color, background-color; transition-duration: 0.15s; -webkit-tap-highlight-color: transparent; }
.pill--human::before { content: ''; position: absolute; inset: -6px -4px; }
.pill--human .status-dot { background: var(--amber); animation: none; }
.pill-idle { display: inline-flex; align-items: center; gap: 0.4375rem; }
.pill-action { display: none; }
.pill--human:hover, .pill--human:focus-visible { color: var(--emerald-800); background: var(--emerald-50); }
.pill--human:hover .pill-idle, .pill--human:focus-visible .pill-idle { display: none; }
.pill--human:hover .pill-action, .pill--human:focus-visible .pill-action { display: inline; }
@media (hover: none) {
  .pill--human .pill-idle { display: none; }
  .pill--human .pill-action { display: inline; }
}
.chat-log { flex: 1; display: flex; flex-direction: column; gap: 0.625rem; padding: 1.25rem 1rem 1.5rem; background: linear-gradient(180deg, var(--day-0), #fbfefc); }
.bubble { max-width: 86%; padding: 0.625rem 0.875rem; border-radius: 18px; font-size: 0.9375rem; line-height: 1.45; box-shadow: var(--shadow-sm); text-wrap: pretty; overflow-wrap: anywhere; }
.bubble-who { display: block; margin-bottom: 0.125rem; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.01em; opacity: 0.85; }
.bubble--in { align-self: flex-start; background: #ffffff; border: 1px solid var(--line); border-bottom-left-radius: 6px; color: var(--ink); }
.bubble--out { align-self: flex-end; color: #ffffff; background: var(--grad-ai); border-bottom-right-radius: 6px; }
.bubble--you { align-self: flex-end; color: var(--ink); background: var(--amber-bg); border: 1px solid var(--amber-line); border-bottom-right-radius: 6px; }
.bubble--you .bubble-who { color: var(--amber-ink); opacity: 1; }
.chat-note { align-self: center; padding: 0.25rem 0.75rem; border-radius: 999px; background: rgba(12, 44, 34, 0.06); color: var(--muted); font-size: 0.75rem; font-weight: 600; text-align: center; }
.chat-log .is-new { animation: bubbleIn 0.4s var(--ease-out) both; }
.reply { display: grid; justify-items: end; }
.reply > .bubble { grid-area: 1 / 1; }
.bubble--typing { align-self: start; padding: 0.75rem 0.9rem; opacity: 0; }
.bubble--typing .dots i { width: 6px; height: 6px; }
.teach-panel.is-playing .bubble--in { animation: bubbleIn 0.4s var(--ease-out) both; }
.teach-panel.is-playing .bubble--typing { animation: typingShow 1.3s 0.45s both; }
.teach-panel.is-playing .reply > .bubble--out:not(.bubble--typing) { animation: bubbleIn 0.45s 1.7s var(--ease-out) both; }
.teach-panel.is-playing .chat mark { animation: markIn 0.55s 2.2s var(--ease-out) both; }
.teach-panel.is-playing .note mark { animation: markIn 0.55s 2.45s var(--ease-out) both; }

/* Você assume */
.legend { list-style: none; margin: 1.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: 0.875rem; font-weight: 600; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 0.5rem; }
.legend-dot { width: 0.875rem; height: 0.875rem; border-radius: 5px; }
.legend-dot--in { background: #ffffff; box-shadow: inset 0 0 0 1.5px #b9d3c6; }
.legend-dot--ai { background: var(--grad-ai); }
.legend-dot--you { background: var(--amber-bg); box-shadow: inset 0 0 0 1.5px var(--amber); }
.takeover-stage { position: relative; width: min(52%, 13rem); margin-top: 2.25rem; }
.speech--small { top: -0.5rem; left: 78%; font-size: 1rem; }
.chat--takeover .chat-log { min-height: 19rem; }
.chat-compose { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 0.875rem 1rem; border-top: 1px solid var(--line); background: #ffffff; }
.compose-hint { flex: 1 1 14rem; font-size: 0.8125rem; line-height: 1.45; color: var(--muted); }
.hint-touch { display: none; }
@media (hover: none) {
  .hint-hover { display: none; }
  .hint-touch { display: inline; }
}

/* Recursos: as expressões do Rebo fazem o papel de ícone */
.features { list-style: none; margin: 0; padding: 0; display: grid; }
.feature { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); column-gap: 1.1rem; row-gap: 0.25rem; align-items: start; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.rebo--feature { grid-row: span 2; width: 3.5rem; }
.feature-title { font-size: 1.125rem; font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; }
.feature-text { font-size: 0.9375rem; color: var(--muted); text-wrap: pretty; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem; } }
@media (min-width: 1100px) { .features { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Dúvidas em formato de conversa */
.faq { position: relative; display: flex; flex-direction: column; gap: 0.875rem; padding-top: 1rem; }
.rebo--faq { position: absolute; top: -3.75rem; right: 0.25rem; width: 4rem; }
.speech--faq { display: none; }
@media (min-width: 960px) {
  .rebo--faq { top: -0.75rem; right: 4%; width: 7.5rem; }
  .speech--faq { display: block; top: 0.5rem; right: calc(4% + 8rem); font-size: 1rem; }
}
.qa-q { display: block; list-style: none; cursor: pointer; border-radius: 18px; -webkit-tap-highlight-color: transparent; }
.qa-q::-webkit-details-marker { display: none; }
.qa-q .bubble { display: inline-flex; align-items: center; gap: 0.875rem; max-width: 92%; font-weight: 600; transition-property: border-color, transform; transition-duration: 0.16s; transition-timing-function: var(--ease-out); }
.qa-q:hover .bubble { border-color: var(--emerald-300); }
.qa-q:active .bubble { transform: scale(0.985); }
.qa-q:focus-visible { outline: none; }
.qa-q:focus-visible .bubble { outline: 2px solid var(--emerald-700); outline-offset: 3px; }
.qa-icon {
  width: 1.375rem; height: 1.375rem; flex-shrink: 0; border-radius: 50%; background: var(--emerald-50);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 7v10M7 12h10' fill='none' stroke='%23047857' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 70%; background-position: center; background-repeat: no-repeat;
  transition: transform 0.25s var(--ease-out);
}
.qa[open] .qa-icon { transform: rotate(45deg); }
.qa[open] .qa-q .bubble { border-color: var(--emerald-300); }
.qa-a { display: flex; justify-content: flex-end; margin-top: 0.5rem; }
.qa-a .bubble { max-width: 88%; animation: bubbleIn 0.32s var(--ease-out) both; }
.qa-a.is-typing .bubble { animation: none; opacity: 0; }
.qa-a.is-typing::before {
  content: ''; width: 3.25rem; height: 2.4rem; border-radius: 18px 18px 6px 18px; background-color: #05805d;
  background-image: radial-gradient(circle, #ffffff 2.4px, transparent 3px), radial-gradient(circle, #ffffff 2.4px, transparent 3px), radial-gradient(circle, #ffffff 2.4px, transparent 3px);
  background-size: 12px 12px; background-repeat: no-repeat; background-position: 8px 50%, 20px 50%, 32px 50%;
}

/* ───────── Chamada final ───────── */
/* Ocupa a tela com o rodapé: no fim da página o cabeçalho fica sobre ela (tema noite). */
.cta-final {
  position: relative; isolation: isolate; overflow: hidden; padding-top: var(--section-y);
  min-height: calc(100svh - 6rem); display: flex; flex-direction: column; justify-content: flex-end;
}
.cta-final::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(46rem 30rem at 78% 100%, rgba(16, 185, 129, 0.24), transparent 62%), radial-gradient(30rem 20rem at 0% 0%, rgba(52, 211, 153, 0.08), transparent 60%);
}
.cta-inner { display: grid; gap: 1rem; align-items: end; }
.cta-copy { padding-bottom: 1rem; }
.cta-title { max-width: 14ch; font-size: clamp(2.4rem, 1.2rem + 4.6vw, 5.75rem); line-height: 0.96; }
.cta-text { margin-top: 1.1rem; max-width: 30rem; font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.25rem); color: var(--night-muted); text-wrap: pretty; }
.cta-copy .btn { margin-top: 2rem; }
.cta-stage { position: relative; justify-self: center; width: min(78vw, 26rem); margin-bottom: -14%; }
.speech--cta { top: -9%; left: -2%; }
@media (min-width: 960px) {
  /* O texto fica no meio da altura; o Rebo continua saindo da borda de baixo. */
  .cta-inner { flex: 1; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 3rem; }
  .cta-copy { align-self: center; padding-bottom: 2rem; }
  .cta-stage { width: 100%; max-width: 32rem; margin-bottom: -10%; }
  .speech--cta { top: 4%; left: -6%; }
}

/* ───────── Rodapé ───────── */
.site-footer { padding: 2.25rem 0 calc(2.25rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--night-line); color: var(--night-muted); position: relative; z-index: 1; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; }
.brand--footer { color: var(--night-ink); }
.footer-text { font-size: 0.9375rem; }
.footer-copy { width: 100%; font-size: 0.875rem; color: #7fbfa3; }
@media (min-width: 640px) { .footer-copy { width: auto; margin-left: auto; } }

/* ───────── Animações ───────── */
@keyframes bubbleIn { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes typingShow { 0% { opacity: 0; transform: translateY(6px) scale(0.96); } 15%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes markIn { from { background-size: 0% 2px, 0% 100%; } to { background-size: 100% 2px, 100% 100%; } }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.45; } 30% { transform: translateY(-3px); opacity: 1; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--ring); } 70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }
@keyframes caret { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }
}
