:root {
  /* Curvas de movimento: saída rápida e chegada suave (entrar, abrir, responder ao toque). */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --bg-page: #f2f1ee;
  --bg-surface: #ffffff;
  --bg-warm: #fff9f5;
  --bg-dark: #111113;
  --ink: #141414;
  --ink-muted: #66645e;
  --orange: #ff5824;
  --orange-deep: #c63700;
  --orange-soft: #ffe4d6;
  --border: rgba(20, 20, 20, 0.08);
  --radius-card: 24px;
  --radius-pill: 999px;

  --studio-terracotta: #c83a04;
  --studio-peach: #fbece7;
  --studio-border-active: #d97757;

  --font-sans: 'Hanken Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Aliases convenientes */
  --sans: var(--font-sans);
  --mono: var(--font-mono);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
  /* Sem o bloco cinza que o celular pinta ao tocar: o toque já tem resposta própria (:active). */
  -webkit-tap-highlight-color: transparent;
}

/* Toque sem atraso e sem selecionar o texto do botão ao segurar o dedo. */
button,
a,
[role='button'],
[role='tab'] {
  touch-action: manipulation;
}

button,
[role='button'],
[role='tab'] {
  -webkit-user-select: none;
  user-select: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

main#lp-main {
  display: block;
  width: 100%;
  padding-bottom: 56px;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote {
  margin: 0;
}

img,
video {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Barrinha flutuante compacta de preview de marca */
.brand-preview-dock {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 9999;
  max-width: calc(100vw - 24px);
  background: rgba(17, 17, 19, 0.92);
  color: #f6f4f0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(20, 20, 20, 0.2), 0 0 0 1px rgba(255, 88, 36, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 6px 8px;
  font-family: var(--font-sans);
  font-size: 10.5px;
  transition: transform 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.brand-preview-dock.is-collapsed {
  padding: 4px 8px;
  border-radius: var(--radius-pill);
}

.brand-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.brand-preview-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.brand-preview-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 6px rgba(255, 88, 36, 0.8);
  flex-shrink: 0;
}

.brand-preview-label {
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.84);
  white-space: nowrap;
}

.brand-preview-active-domain {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: #ffb195;
  background: rgba(255, 88, 36, 0.14);
  border: 1px solid rgba(255, 88, 36, 0.26);
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

.brand-preview-toggle {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-radius: var(--radius-pill);
  padding: 2px 7px;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.brand-preview-toggle:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}

.brand-preview-dock.is-collapsed .brand-preview-pills {
  display: none;
}

.brand-preview-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.brand-preview-pill {
  appearance: none;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-pill);
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 160ms var(--ease-out);
}

.brand-preview-pill:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 88, 36, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
}

.brand-preview-pill[data-domain]:hover::after,
.brand-preview-pill[data-domain]:focus-visible::after {
  content: attr(data-domain);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #141414;
  color: #ffd3c2;
  border: 1px solid rgba(255, 88, 36, 0.4);
  border-radius: 6px;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}

.brand-preview-pill.is-active {
  background: var(--orange);
  border-color: var(--orange);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(255, 88, 36, 0.35);
}

@media (max-width: 640px) {
  .brand-preview-dock {
    right: 10px;
    left: auto;
    bottom: 8px;
    max-width: calc(100vw - 20px);
    padding: 5px 8px;
  }

  .brand-preview-dock.is-collapsed {
    padding: 4px 8px;
  }

  .brand-preview-dock.is-collapsed .brand-preview-active-domain {
    display: none;
  }

  .brand-preview-pills {
    gap: 4px;
  }

  .brand-preview-pill {
    padding: 3px 7px;
    font-size: 10px;
  }
}

/* No celular o :hover fica preso depois do toque: o botão não pode ficar "levantado". */
@media (hover: none) {
  .brand-preview-pill:hover {
    transform: none;
  }
}

/* Cursor do "Agente IA": passeia sozinho pelas telas de exemplo (sections/agent-cursor.js). */
.sec-studio-pricing .sp-app-window,
.sec-hero-scanner .hc-window {
  position: relative;
}

.ac-cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  pointer-events: none;
  color: var(--orange, #ff5824);
  opacity: 0;
  transform: translate3d(40px, 40px, 0);
  transition-property: transform, opacity;
  transition-timing-function: cubic-bezier(0.65, 0, 0.35, 1), ease;
  will-change: transform;
  filter: drop-shadow(0 4px 10px rgba(20, 20, 20, 0.22));
}

.ac-cursor.is-on {
  opacity: 1;
}

.ac-arrow {
  display: block;
  flex-shrink: 0;
  margin-left: -5px;
  margin-top: -2px;
  transition: transform 110ms var(--ease-out, ease);
  transform-origin: 5px 2px;
}

.ac-cursor.is-click .ac-arrow {
  transform: scale(0.8);
}

/* Onda do clique, saindo da ponta da seta. */
.ac-cursor::before {
  content: '';
  position: absolute;
  left: -14px;
  top: -14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--orange, #ff5824);
  opacity: 0;
  transform: scale(0.3);
}

.ac-cursor.is-click::before {
  animation: ac-ripple 520ms var(--ease-out, ease-out);
}

@keyframes ac-ripple {
  0% {
    opacity: 0.9;
    transform: scale(0.3);
  }
  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

.ac-tag {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 16px;
  margin-left: 2px;
  padding: 5px 10px 6px;
  border-radius: 4px 12px 12px 12px;
  background: var(--orange, #ff5824);
  color: #ffffff;
  white-space: nowrap;
  line-height: 1.2;
}

.ac-name {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ac-say {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.92;
}

.ac-say:empty {
  display: none;
}

/* Legenda sendo digitada pelo agente: quebra de linha como no texto final, com o cursor piscando. */
.ac-typing {
  white-space: pre-line;
}

.ac-typing::after {
  content: '';
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 1px;
  vertical-align: text-bottom;
  background: var(--orange, #ff5824);
  animation: ac-caret 0.8s steps(1) infinite;
}

@keyframes ac-caret {
  50% {
    opacity: 0;
  }
}

.ac-cursor.is-flip {
  flex-direction: row-reverse;
}

.ac-cursor.is-flip .ac-tag {
  position: absolute;
  right: 12px;
  top: 0;
  margin: 16px 0 0;
  border-radius: 12px 4px 12px 12px;
}

/* ------------------------------------------------------------------------------------------
 * Palco escuro: a página é escura e as telas do produto (prévia do topo, painel, janela) são
 * ilhas claras flutuando nela, como objetos. Os tokens viram escuros aqui e voltam a ser claros
 * dentro de cada ilha (.lp-island e as janelas listadas abaixo).
 * ---------------------------------------------------------------------------------------- */
:root {
  --bg-page: #0c0b0a;
  --bg-surface: #161412;
  --bg-warm: #1c1815;
  --ink: #f4f1ec;
  --ink-muted: #a8a299;
  --border: rgba(255, 255, 255, 0.09);
  --orange-soft: rgba(255, 88, 36, 0.16);
  --studio-peach: rgba(255, 88, 36, 0.14);
  --studio-terracotta: #ff7a45;
  --studio-border-active: #ff7a45;
  color-scheme: dark;
}

.lp-island,
.sec-hero-scanner .hs-card,
.sec-studio-pricing .sp-modal {
  --bg-page: #f2f1ee;
  --bg-surface: #ffffff;
  --bg-warm: #fff9f5;
  --ink: #141414;
  --ink-muted: #66645e;
  --border: rgba(20, 20, 20, 0.08);
  --orange-soft: #ffe4d6;
  --studio-peach: #fbece7;
  --studio-terracotta: #c83a04;
  --studio-border-active: #d97757;
  color-scheme: light;
  color: var(--ink);
}

/* Fundo animado do topo (sections/stage-bg.js): fica atrás de tudo dentro da seção. */
.has-stage {
  isolation: isolate;
  background: radial-gradient(70% 45% at 50% 0%, rgba(255, 88, 36, 0.32), transparent 70%), var(--bg-page) !important;
}

.lp-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
  pointer-events: none;
}

/* ------------------------------------------------------------------------------------------
 * Tipografia no estilo Raycast: Inter, títulos 500 a 600 sem negrito pesado, texto corrido
 * em cinza translúcido, mono só para código. A hierarquia vem do tamanho e da cor.
 * ---------------------------------------------------------------------------------------- */
:root {
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --text-body: rgba(255, 255, 255, 0.58);
  --text-soft: #8a8b8c;
}

body {
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  font-optical-sizing: auto;
  letter-spacing: 0.01em;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* O menu fixo fica dentro do topo: o topo precisa ficar acima das seções seguintes, senão elas
   passam por cima do menu ao rolar (o fundo animado cria um contexto de empilhamento). */
.has-stage {
  position: relative;
  z-index: 50;
}

/* ------------------------------------------------------------------------------------------
 * Títulos mais marcantes: Geist (display) com peso 600, tracking bem fechado e escala maior.
 * O texto corrido continua em Inter.
 * ---------------------------------------------------------------------------------------- */
:root {
  --font-display: 'Geist', 'Inter', system-ui, sans-serif;
}
