/* ==========================================================================
   ChatBook — landing page. Design tokens + componentes. Autocontido.
   Display: Bricolage Grotesque · Corpo: Plus Jakarta Sans · Dados: JetBrains Mono
   ========================================================================== */

:root {
  --ink: #080e20;
  --ink2: #0c1a3d;
  --blue: #2e90fa;
  --blue2: #1a6fe0;
  --sky: #56ccf2;
  --green: #22c55e;

  --paper: #ffffff;
  --mist: #f4f7fc;
  --line: #e6ebf4;
  --text: #0c1424;
  --muted: #5b6478;
  --muted-d: #9db0d6;

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --wrap: 1140px;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(8, 14, 32, 0.06), 0 24px 60px -28px rgba(8, 14, 32, 0.22);
  --shadow-lg: 0 40px 90px -40px rgba(8, 14, 32, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.025em; line-height: 1.05; font-weight: 700; }
.mono { font-family: var(--mono); letter-spacing: 0.02em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ── Marca ─────────────────────────────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(150deg, var(--blue), var(--blue2));
  box-shadow: 0 6px 16px -6px rgba(46, 144, 250, 0.7);
}
.logo svg { width: 20px; height: 20px; }
.logo.sm { width: 30px; height: 30px; border-radius: 9px; }
.logo.sm svg { width: 17px; height: 17px; }
.wordmark { font-family: var(--display); font-weight: 500; font-size: 1.2rem; letter-spacing: -0.02em; }
.wordmark strong { font-weight: 800; color: var(--blue); }

/* ── Botões ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
  padding: 13px 22px; border-radius: 12px; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-sm { padding: 9px 16px; font-size: 0.88rem; border-radius: 10px; }
.btn-primary { background: linear-gradient(150deg, var(--blue), var(--blue2)); color: #fff; box-shadow: 0 10px 26px -10px rgba(46, 144, 250, 0.8); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -12px rgba(46, 144, 250, 0.9); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--mist); border-color: #cfe0fb; }

.eyebrow {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--blue);
  margin-bottom: 14px;
}

/* ── Nav ───────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.62); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav.scrolled { background: rgba(255, 255, 255, 0.88); border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.nav .wordmark { color: var(--text); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--muted); font-size: 0.92rem; font-weight: 500; transition: color 0.2s ease; }
.nav-links a:hover { color: var(--text); }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #e8f0ff 0%, #f4f7fc 44%, #ffffff 100%);
  color: var(--text); padding: 70px 0 120px;
}
/* aurora base (usada no CTA escuro) */
.aurora {
  position: absolute; inset: -20% -10% auto -10%; height: 640px; pointer-events: none;
  background:
    radial-gradient(38% 55% at 78% 20%, rgba(86, 204, 242, 0.35), transparent 70%),
    radial-gradient(42% 60% at 20% 10%, rgba(46, 144, 250, 0.45), transparent 70%),
    radial-gradient(30% 45% at 60% 55%, rgba(124, 92, 255, 0.28), transparent 70%);
  filter: blur(20px); opacity: 0.9; animation: drift 16s ease-in-out infinite alternate;
}
.aurora.soft { opacity: 0.6; height: 100%; inset: 0; }
/* no herói claro, a aurora é um glow azul suave */
.hero .aurora {
  background:
    radial-gradient(40% 52% at 82% 2%, rgba(46, 144, 250, 0.22), transparent 70%),
    radial-gradient(34% 46% at 10% 0%, rgba(86, 204, 242, 0.20), transparent 72%);
  filter: blur(6px); opacity: 1;
}
.grid-glow {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.6;
  background-image: linear-gradient(rgba(12,20,36,0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(12,20,36,0.045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(62% 52% at 50% 0%, #000, transparent 80%);
}
@keyframes drift { to { transform: translate3d(0, 26px, 0) scale(1.05); } }

.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero-copy h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); margin-bottom: 20px; }
.hero-copy h1 em { font-style: normal; color: transparent; background: linear-gradient(100deg, var(--blue), var(--blue2)); -webkit-background-clip: text; background-clip: text; }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 34ch; margin-bottom: 30px; }
.lede .hl { color: var(--blue2); font-weight: 700; }
.lede strong { color: var(--text); font-weight: 700; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta { display: flex; align-items: center; gap: 14px; margin-top: 30px; color: var(--muted); font-size: 0.9rem; }
.hero-meta b { color: var(--text); font-family: var(--display); }
.hero-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--muted); opacity: 0.45; }

/* Signature: phone + mini agenda */
.demo { position: relative; }
.phone {
  background: var(--paper); color: var(--text); border-radius: 26px;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255, 255, 255, 0.5);
  overflow: hidden; max-width: 380px; margin-left: auto;
}
.phone-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: linear-gradient(150deg, #0e2350, #0b1a3d); color: #fff; }
.phone-name { font-weight: 700; font-size: 0.92rem; }
.phone-status { font-size: 0.72rem; color: #8fd39f; }
.chat { padding: 16px; display: flex; flex-direction: column; gap: 10px; background: #eef2f8; min-height: 300px; }
.bubble {
  max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: 0.9rem; position: relative;
  opacity: 0; transform: translateY(10px) scale(0.98); transition: opacity 0.4s ease, transform 0.4s ease;
}
.bubble.show { opacity: 1; transform: none; }
.bubble.in { align-self: flex-end; background: #d9fdd3; border-bottom-right-radius: 4px; }
.bubble.bot { align-self: flex-start; background: #fff; border-bottom-left-radius: 4px; box-shadow: 0 1px 1px rgba(8,14,32,0.06); }
.bubble b { color: var(--blue2); }
.bubble time { display: block; text-align: right; font-size: 0.62rem; color: #8a94a6; margin-top: 3px; font-family: var(--mono); }
.typing { align-self: flex-start; display: none; gap: 4px; background: #fff; padding: 12px 14px; border-radius: 14px; border-bottom-left-radius: 4px; box-shadow: 0 1px 1px rgba(8,14,32,0.06); }
.typing.show { display: inline-flex; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #b7c0d0; animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; } .typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.mini-agenda {
  position: absolute; left: -18px; bottom: -34px; width: 236px;
  background: var(--paper); color: var(--text); border-radius: 16px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); padding: 14px;
}
.mini-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mini-head .mono { font-size: 0.62rem; color: var(--muted); letter-spacing: 0.12em; }
.live { display: inline-flex; align-items: center; gap: 5px; font-size: 0.66rem; font-weight: 600; color: var(--blue); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: ping 1.6s ease-in-out infinite; }
@keyframes ping { 0%, 100% { box-shadow: 0 0 0 0 rgba(46, 144, 250, 0.5); } 50% { box-shadow: 0 0 0 6px rgba(46, 144, 250, 0); } }
.mini-rows { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.mini-rows li { display: flex; align-items: center; gap: 8px; padding: 6px 4px; font-size: 0.8rem; border-radius: 8px; }
.mini-rows .t { color: var(--muted); font-size: 0.72rem; width: 34px; }
.mini-rows li.done { opacity: 0.45; }
.mini-rows li.now { color: var(--blue); font-weight: 700; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; }
.mini-rows li.now .t { color: var(--blue); }
.mini-rows li.slot { background: rgba(46,144,250,0.08); opacity: 0; transform: translateX(8px); transition: opacity 0.5s ease, transform 0.5s ease; }
.mini-rows li.slot.show { opacity: 1; transform: none; }
.mini-rows li.slot b { color: var(--blue2); }
.mini-rows .chk { width: 15px; height: 15px; margin-left: auto; color: var(--green); }

/* ── Trust bar ─────────────────────────────────────────────────────────── */
.trust { background: var(--mist); color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 20px 24px; font-size: 0.9rem; font-weight: 500; }
.trust .mono { font-size: 0.68rem; letter-spacing: 0.18em; color: var(--blue); }
.trust .sep { opacity: 0.35; }

/* ── Sections ──────────────────────────────────────────────────────────── */
.section { padding: 100px 0; }
.section.alt { background: var(--mist); }
.section-head { max-width: 620px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin-bottom: 12px; }
.section-lede { color: var(--muted); font-size: 1.08rem; }

/* ── Bento ─────────────────────────────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tile {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.tile:hover { transform: translateY(-3px); border-color: #cfe0fb; box-shadow: 0 30px 60px -30px rgba(46,144,250,0.35); }
.tile-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; color: var(--blue); background: rgba(46, 144, 250, 0.1); margin-bottom: 18px; }
.tile-ic svg { width: 24px; height: 24px; }
.tile h3 { font-size: 1.18rem; margin-bottom: 8px; letter-spacing: -0.02em; }
.tile p { color: var(--muted); font-size: 0.96rem; }
.tile-lg { grid-column: span 1; grid-row: span 2; background: linear-gradient(180deg, #0e2350, #0a1636); color: #fff; border-color: transparent; }
.tile-lg .tile-ic { background: rgba(255,255,255,0.1); color: var(--sky); }
.tile-lg p { color: #c6d3ee; }
.tile-wide { grid-column: span 2; display: flex; gap: 20px; align-items: flex-start; }
.tile-wide .tile-ic { flex-shrink: 0; margin-bottom: 0; }

/* ── Steps ─────────────────────────────────────────────────────────────── */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.steps li { position: relative; padding: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.step-n { display: inline-block; font-size: 0.9rem; color: var(--blue); font-weight: 700; padding: 4px 10px; border: 1px solid #cfe0fb; border-radius: 8px; margin-bottom: 16px; }
.steps h3 { font-size: 1.15rem; margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: 0.96rem; }

/* ── Painel ────────────────────────────────────────────────────────────── */
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.panel-grid h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 12px; }
.checks { list-style: none; margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.checks li { position: relative; padding-left: 30px; color: var(--text); font-weight: 500; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 6px;
  background: rgba(46,144,250,0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232e90fa' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat;
}
.panel-mock { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 20px; }
.pm-head { margin-bottom: 14px; }
.pm-head .mono { font-size: 0.66rem; letter-spacing: 0.16em; color: var(--muted); }
.pm-row { display: grid; grid-template-columns: 46px 18px 1fr; align-items: center; }
.pm-row .t { color: var(--muted); font-size: 0.74rem; padding-top: 12px; align-self: start; }
.pm-dot { justify-self: center; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--blue); background: #fff; margin-top: 14px; position: relative; }
.pm-dot::after { content: ""; position: absolute; left: 50%; top: 12px; width: 2px; height: 40px; background: var(--line); transform: translateX(-50%); }
.pm-dot.done { border-color: var(--muted); background: var(--muted); }
.pm-card { margin: 8px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.pm-card.done { opacity: 0.55; }
.pm-card b { display: block; font-size: 0.92rem; }
.pm-card small { color: var(--muted); font-size: 0.8rem; }
.pm-now { display: flex; align-items: center; gap: 8px; padding: 4px 0 4px 64px; }
.pm-now .mono { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--blue); }
.pm-now::after { content: ""; flex: 1; height: 2px; background: rgba(46,144,250,0.5); border-radius: 2px; }

/* ── Stats ─────────────────────────────────────────────────────────────── */
.stats { background: var(--ink); color: #fff; padding: 72px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
.stat-v { font-family: var(--display); font-size: clamp(2.6rem, 6vw, 4rem); font-weight: 800; background: linear-gradient(120deg, #fff, var(--sky)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-l { color: var(--muted-d); font-size: 0.95rem; max-width: 26ch; margin: 8px auto 0; }

/* ── CTA ───────────────────────────────────────────────────────────────── */
.cta { position: relative; overflow: hidden; background: radial-gradient(110% 120% at 50% 0%, #12244f, var(--ink) 60%); color: #fff; padding: 110px 0; text-align: center; }
.cta-inner { position: relative; max-width: 620px; margin: 0 auto; }
.cta-inner h2 { font-size: clamp(2rem, 4.5vw, 3.1rem); margin-bottom: 14px; }
.cta-inner p { color: #c6d3ee; font-size: 1.1rem; margin-bottom: 26px; }
.cta-form { display: flex; gap: 10px; max-width: 460px; margin: 0 auto; }
.cta-form input { flex: 1; padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.06); color: #fff; font-family: var(--sans); font-size: 0.95rem; }
.cta-form input::placeholder { color: #93a3c4; }
.cta-form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(46,144,250,0.25); }
.cta-fine { font-size: 0.82rem; color: var(--muted-d); margin-top: 14px; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.foot { background: #050a18; color: var(--muted-d); padding: 40px 0; }
.foot-inner { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
.foot .wordmark { color: #fff; }
.foot p { font-size: 0.9rem; max-width: 40ch; }
.foot .mono { font-size: 0.72rem; }

/* ── Reveal on scroll ──────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ── Responsivo ────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .hero-grid, .panel-grid { grid-template-columns: 1fr; gap: 40px; }
  .demo { max-width: 380px; margin: 30px auto 60px; }
  .phone { margin: 0 auto; }
  .mini-agenda { left: auto; right: -6px; bottom: -40px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile-lg { grid-row: span 1; grid-column: span 2; }
  .tile-wide { grid-column: span 2; }
  .steps, .stats-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .section { padding: 72px 0; }
  .bento { grid-template-columns: 1fr; }
  .tile-lg, .tile-wide { grid-column: span 1; }
  .tile-wide { flex-direction: column; }
  .cta-form { flex-direction: column; }
  .hero-meta { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .bubble, .mini-rows li.slot { opacity: 1 !important; transform: none !important; }
  .typing { display: none !important; }
}
