/* ═══════════════════════════════════════════════════════
   rogpe.tech — Design System v3.0
   ═══════════════════════════════════════════════════════ */

:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --text: #111424;
  --text-soft: #5a627a;
  --line: #e3e8f2;
  --brand: #6b3ce9;
  --brand-strong: #5325be;
  --brand-soft: #ece6ff;
  --radius: 20px;
  --shadow: 0 18px 42px rgba(17, 24, 43, 0.09);
  --container: 1160px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Google Sans Flex", "Inter", "Segoe UI", sans-serif;
  font-variation-settings: "opsz" 48, "wght" 430;
  color: var(--text);
  background:
    radial-gradient(860px 560px at -8% -12%, #eee8ff 0%, transparent 70%),
    radial-gradient(840px 520px at 104% -8%, #f0edff 0%, transparent 68%),
    var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  margin: 0;
  font-family: "Google Sans Flex", "Inter", sans-serif;
  font-variation-settings: "opsz" 62, "wght" 620;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

p { margin: 0; color: var(--text-soft); }

.container {
  width: min(var(--container), calc(100% - 2.6rem));
  margin-inline: auto;
}

.section { padding: clamp(4rem, 6vw, 7rem) 0; }

.section-surface {
  background: linear-gradient(180deg, #fcfdff 0%, #f6f8fc 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  font-variation-settings: "wght" 670;
  color: var(--brand);
}

.section-head {
  max-width: 780px;
  margin-bottom: 2.4rem;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  margin-bottom: 0.65rem;
}

.mt-cta { margin-top: 1.8rem; display: inline-flex; }

/* ── Skip link ── */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--text); color: #fff; padding: 0.64rem 1rem; border-radius: 10px; }
.skip-link:focus { left: 1rem; top: 1rem; }

/* ══════════════════════════════════════
   HEADER
══════════════════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: 70;
  backdrop-filter: blur(14px);
  background: rgba(244, 246, 251, 0.88);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, background 200ms ease;
}

.site-header.scrolled {
  border-color: var(--line);
  background: rgba(244, 246, 251, 0.97);
}

.header-inner {
  min-height: 76px;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.brand {
  font-size: 1.22rem;
  font-variation-settings: "opsz" 60, "wght" 700;
  color: var(--text);
}

.brand-dot { color: var(--brand); }

.menu { display: flex; align-items: center; gap: 1.2rem; }

.menu a {
  font-size: 0.93rem; color: #4f5670;
  font-variation-settings: "wght" 560;
  transition: color 150ms ease;
}

.menu a:hover, .menu a:focus-visible { color: var(--text); }

.menu-cta {
  border-radius: 999px;
  border: 1px solid #d8cbff;
  background: var(--brand-soft);
  color: var(--brand-strong) !important;
  padding: 0.6rem 1rem;
  transition: background 150ms ease, box-shadow 150ms ease !important;
}

.menu-cta:hover {
  background: #ddd5ff !important;
  box-shadow: 0 4px 14px rgba(107, 60, 233, 0.2);
}

.menu-toggle {
  display: none; border: 0; background: transparent; padding: 0.2rem; cursor: pointer;
}

.menu-toggle span {
  display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--text);
  transition: transform 250ms ease, opacity 200ms ease;
}

/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  justify-content: center; border-radius: 12px; border: 1px solid transparent;
  padding: 0.9rem 1.5rem;
  font-variation-settings: "wght" 590;
  font-family: inherit; font-size: 0.96rem;
  cursor: pointer; text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 10px 28px rgba(107, 60, 233, 0.28);
}

.btn-primary:hover { box-shadow: 0 16px 36px rgba(107, 60, 233, 0.4); }

.btn-secondary {
  color: var(--text); background: #fff;
  border-color: var(--line);
  box-shadow: 0 2px 8px rgba(17,24,43,0.06);
}

.btn-secondary:hover {
  border-color: #c8b8f9;
  box-shadow: 0 6px 20px rgba(107,60,233,0.1);
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.hero {
  position: relative; overflow: clip;
  min-height: 96vh;
  display: grid; align-items: center;
}

.hero-canvas {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
}

.hero-canvas canvas { width: 100% !important; height: 100% !important; }

.hero-inner {
  position: relative; z-index: 3;
  display: grid; justify-items: center; text-align: center;
  padding-top: 2rem; padding-bottom: 4rem;
}

.hero-kicker {
  margin: 0; display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.42rem 0.9rem; border-radius: 999px;
  border: 1px solid rgba(107,60,233,0.2);
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  color: #4e5673; font-size: 0.82rem;
  font-variation-settings: "wght" 560;
  box-shadow: 0 2px 12px rgba(107,60,233,0.08);
}

.kicker-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
  animation: kickerPulse 2.4s ease-in-out infinite;
}

@keyframes kickerPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,0.2); }
  50% { box-shadow: 0 0 0 6px rgba(34,197,94,0.06); }
}

.hero-title {
  margin-top: 1.5rem;
  font-size: clamp(2.6rem, 7.5vw, 6.4rem);
  line-height: 1.04;
  min-height: 2em;
  max-width: 14ch;
}

.rainbow-caret {
  display: inline-block; width: 3px; height: 0.88em;
  margin-left: 0.18rem; border-radius: 20px; vertical-align: -0.08em;
  background: linear-gradient(180deg, #3b82f6, #7c3aed, #ec4899, #f59e0b);
  box-shadow: 0 0 14px rgba(124,58,237,0.5);
  animation: blink 900ms steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.hero-subtitle {
  margin-top: 1.1rem;
  max-width: 62ch;
  font-size: clamp(1rem, 1.5vw, 1.14rem);
  padding: 0.6rem 1.2rem;
  background: rgba(244,246,251,0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.6);
}

.hero-actions {
  margin-top: 1.9rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem;
}

/* ══════════════════════════════════════
   NEURAL KNOWLEDGE GRAPH — Full-viewport
══════════════════════════════════════ */
.orbit-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.orbit-mount {
  position: absolute; inset: 0;
}

.orbit-mount canvas {
  width: 100% !important;
  height: 100% !important;
}

.orbit-labels {
  position: absolute; inset: 0;
  pointer-events: none;
}

/* Word labels for neural graph */
.olabel {
  position: absolute;
  padding: 0.28rem 0.68rem;
  border-radius: 999px;
  border: 1px solid rgba(107,60,233,0.2);
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-variation-settings: "wght" 570;
  color: #3a2470;
  box-shadow: 0 2px 10px rgba(107,60,233,0.1);
  transform: translate(-50%, -50%);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  will-change: left, top, opacity;
  transition: none;
}

.olabel-sector {
  font-size: 0.86rem;
  font-variation-settings: "wght" 660;
  background: rgba(255,255,255,0.96);
  border-color: rgba(107,60,233,0.32);
  color: #2a1870;
  box-shadow: 0 4px 18px rgba(107,60,233,0.18), 0 0 0 1px rgba(107,60,233,0.08);
}

.olabel-concept {
  background: rgba(237,233,255,0.85);
  border-color: rgba(107,60,233,0.14);
  color: #5325be;
  font-size: 0.73rem;
  font-variation-settings: "wght" 540;
}

/* ══════════════════════════════════════
   STATS — Dark dramatic band
══════════════════════════════════════ */
.stats-dark {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #08091a 0%, #160840 50%, #0e0526 100%);
  padding: clamp(3.5rem, 5vw, 5.5rem) 0;
}

.stats-particles {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
}

.stats-particles canvas { width: 100% !important; height: 100% !important; }

.stats-inner {
  position: relative; z-index: 1;
  width: min(var(--container), calc(100% - 2.6rem));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0;
}

.stat-item {
  text-align: center;
  padding: 1.5rem 2rem;
}

.stat-value {
  margin-bottom: 0.5rem;
  line-height: 1;
}

.stat-num {
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-variation-settings: "opsz" 72, "wght" 750;
  background: linear-gradient(135deg, #ffffff, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  letter-spacing: -0.03em;
}

.stat-text {
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  font-variation-settings: "opsz" 72, "wght" 750;
  background: linear-gradient(135deg, #ffffff, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  letter-spacing: -0.03em;
}

.stat-unit {
  font-size: 0.55em;
  font-variation-settings: "wght" 550;
}

.stat-label {
  color: rgba(255,255,255,0.55);
  font-size: 0.88rem;
  font-variation-settings: "wght" 480;
  max-width: 18ch;
  margin: 0 auto;
  line-height: 1.4;
}

.stat-bar {
  margin-top: 1rem;
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}

.stat-fill {
  height: 100%;
  width: var(--pct);
  background: linear-gradient(90deg, var(--brand), #a78bfa);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.stat-item.is-visible .stat-fill { transform: scaleX(1); }

.stat-sep {
  width: 1px; height: 80px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.12), transparent);
}

/* ══════════════════════════════════════
   PRODUTO
══════════════════════════════════════ */
.product-frame {
  position: relative;
  border-radius: 28px;
  border: 1px solid #131624;
  background: #06070b;
  box-shadow: 0 24px 64px rgba(6,8,14,0.55);
  overflow: hidden;
  padding: clamp(1.2rem, 3vw, 2.2rem);
  min-height: 540px;
  display: grid; align-items: center;
}

.product-canvas {
  position: absolute; inset: 0; z-index: 0; opacity: 0.75;
}

.product-canvas canvas { width: 100% !important; height: 100% !important; }

/* Cursor spotlight */
.product-spotlight {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%),
    rgba(107,60,233,0.12) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 300ms ease;
}

.product-frame:hover .product-spotlight { opacity: 1; }

.product-card {
  position: relative; z-index: 2;
  width: min(980px, 100%); margin-inline: auto;
  border-radius: 22px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.28);
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(130,95,235,0.35),
    0 0 60px rgba(74,127,255,0.3),
    0 0 40px rgba(239,74,188,0.18);
  transition: transform 350ms ease, box-shadow 350ms ease;
}

.product-card:hover {
  transform: translateY(-3px) scale(1.005);
  box-shadow:
    0 0 0 1px rgba(130,95,235,0.5),
    0 0 80px rgba(74,127,255,0.42),
    0 0 55px rgba(239,74,188,0.28);
}

.product-card img {
  width: 100%; aspect-ratio: 1600/1000; object-fit: cover;
}

.product-info { padding: 1rem 1.2rem 1.3rem; }
.product-info h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }

/* ══ PRODUCT DASHBOARD MOCKUP ══ */
.agent-card {
  background: #08091a;
  padding: 0;
  display: flex; flex-direction: column;
}

.agent-card .product-info {
  background: rgba(255,255,255,0.03);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 1.4rem 1.8rem 1.6rem;
}
.agent-card .product-info h3 { color: #fff; }
.agent-card .product-info p  { color: rgba(255,255,255,0.5); }

.mockup-dashboard {
  flex: 1;
  display: flex; flex-direction: column;
  background: #09091c;
  overflow: hidden;
  min-height: 440px;
}

/* Chrome bar */
.md-chrome {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  background: #0f1022;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
}
.md-chrome-dots { display: flex; gap: 5px; margin-right: 0.35rem; }
.md-chrome-dots span {
  width: 9px; height: 9px; border-radius: 50%; display: block;
}
.md-chrome-dots span:nth-child(1) { background: #ff5f57; }
.md-chrome-dots span:nth-child(2) { background: #ffbd2e; }
.md-chrome-dots span:nth-child(3) { background: #28c940; }

.md-chrome-tab {
  font-size: 0.62rem; padding: 0.22rem 0.7rem;
  border-radius: 6px; color: rgba(255,255,255,0.35);
  font-variation-settings: "wght" 500;
}
.md-chrome-tab.active {
  background: rgba(107,60,233,0.18);
  color: rgba(255,255,255,0.85);
}
.md-chrome-url {
  margin-left: auto; font-size: 0.6rem;
  color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.04);
  padding: 0.18rem 0.55rem; border-radius: 4px;
}

/* Body split */
.md-body {
  display: flex; flex: 1; overflow: hidden;
}

/* ── Dashboard side ── */
.md-dash {
  display: flex; flex: 1;
  border-right: 1px solid rgba(255,255,255,0.05);
  overflow: hidden;
}

/* Sidebar */
.md-sidebar {
  width: 42px; flex-shrink: 0;
  background: #0b0c1f;
  border-right: 1px solid rgba(255,255,255,0.04);
  display: flex; flex-direction: column;
  align-items: center; gap: 0.3rem;
  padding: 0.75rem 0;
}
.md-sidebar-logo {
  font-size: 0.6rem; font-variation-settings: "wght" 800;
  color: #7c4ef5; letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.md-nav-item {
  width: 28px; height: 28px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.3);
}
.md-nav-item svg { width: 14px; height: 14px; }
.md-nav-active {
  background: rgba(107,60,233,0.22);
  color: #a580ff;
}

/* Content area */
.md-content {
  flex: 1; padding: 0.65rem 0.75rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  overflow: hidden;
}

.md-content-header {
  display: flex; align-items: center;
}
.md-greeting-wrap { flex: 1; display: flex; flex-direction: column; gap: 0.05rem; }
.md-greeting {
  font-size: 0.7rem; font-variation-settings: "wght" 650;
  color: rgba(255,255,255,0.9);
}
.md-subgreeting {
  font-size: 0.57rem; color: rgba(255,255,255,0.3);
}
.md-user-avatar {
  width: 25px; height: 25px; border-radius: 50%;
  background: linear-gradient(135deg,#6b3ce9,#a065ff);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.48rem; font-variation-settings: "wght" 750;
  color: #fff; flex-shrink: 0;
}

/* KPI grid */
.md-kpis {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 0.35rem;
}
.md-kpi {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 9px; padding: 0.45rem 0.5rem;
}
.md-kpi-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.2rem;
}
.md-kpi-lbl {
  font-size: 0.52rem; color: rgba(255,255,255,0.38);
  font-variation-settings: "wght" 500;
}
.md-kpi-badge {
  font-size: 0.5rem; padding: 0.08rem 0.32rem;
  border-radius: 999px;
}
.md-kpi-badge.up { background: rgba(52,211,153,0.15); color: #34d399; }
.md-kpi-val {
  font-size: 0.98rem; font-variation-settings: "wght" 750;
  color: #fff; line-height: 1;
}

/* Chart */
.md-chart-box {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.055);
  border-radius: 9px; padding: 0.45rem 0.6rem;
  flex: 1;
}
.md-chart-title {
  font-size: 0.57rem; color: rgba(255,255,255,0.38);
  margin-bottom: 0.3rem;
}
.md-chart-svg { width: 100%; height: 64px; display: block; }
.md-chart-area { }
.md-chart-line {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: mdChartDraw 1.8s cubic-bezier(0.22,1,0.36,1) 0.4s forwards;
}
@keyframes mdChartDraw { to { stroke-dashoffset: 0; } }
.md-chart-lbl {
  font-size: 6px; fill: rgba(255,255,255,0.25);
  font-family: inherit;
}

/* Activity feed */
.md-activity { display: flex; flex-direction: column; gap: 0.28rem; }
.md-act-row {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.45rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.045);
  border-radius: 7px;
  opacity: 0;
  animation: mdActIn 0.5s cubic-bezier(0.22,1,0.36,1) forwards;
}
@keyframes mdActIn {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}
.md-act-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.md-act-text {
  font-size: 0.57rem; color: rgba(255,255,255,0.6); flex: 1;
}
.md-act-time {
  font-size: 0.52rem; color: rgba(255,255,255,0.22);
}

/* ── Chat panel ── */
.md-chatpanel {
  width: 215px; flex-shrink: 0;
  display: flex; flex-direction: column;
  background: #0b0d21;
}

.md-chat-header {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: #0f112a;
  flex-shrink: 0;
}
.md-agent-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg,#6b3ce9,#4a7fff);
  display: flex; align-items: center; justify-content: center;
}
.md-agent-meta { flex: 1; }
.md-agent-name {
  font-size: 0.62rem; font-variation-settings: "wght" 650;
  color: rgba(255,255,255,0.9);
}
.md-agent-status {
  font-size: 0.53rem; color: rgba(255,255,255,0.35);
  display: flex; align-items: center; gap: 0.22rem;
}
.md-status-dot {
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: #34d399; box-shadow: 0 0 4px #34d399;
  animation: mdStatusPulse 2s ease-in-out infinite;
}
@keyframes mdStatusPulse {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.45; }
}
.md-person-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.5);
  flex-shrink: 0;
}

/* Messages */
.md-messages {
  flex: 1; padding: 0.6rem 0.65rem;
  display: flex; flex-direction: column; gap: 0.45rem;
  overflow: hidden;
}
.md-msg { display: flex; }
.md-msg-user { justify-content: flex-end; }

.md-bubble {
  max-width: 88%;
  padding: 0.42rem 0.6rem;
  border-radius: 11px;
  font-size: 0.59rem; line-height: 1.5;
}
.md-msg-ai .md-bubble {
  background: rgba(107,60,233,0.14);
  border: 1px solid rgba(107,60,233,0.22);
  color: rgba(255,255,255,0.82);
  border-bottom-left-radius: 3px;
}
.md-msg-user .md-bubble {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.65);
  border-bottom-right-radius: 3px;
}
.md-bubble p { margin: 0 0 0.15rem; }
.md-bubble strong { color: #c4a5ff; font-variation-settings: "wght" 680; }

.md-sparkline {
  display: flex; align-items: center; gap: 0.35rem;
  margin-top: 0.3rem;
  background: rgba(107,60,233,0.1);
  padding: 0.25rem 0.4rem; border-radius: 6px;
}
.md-sparkline svg { width: 44px; height: 14px; }
.md-sparkline span {
  font-size: 0.57rem; color: #a78bfa;
  font-variation-settings: "wght" 650;
}

.md-action-chip {
  display: inline-block; margin-top: 0.35rem;
  padding: 0.28rem 0.55rem;
  background: rgba(107,60,233,0.28);
  border: 1px solid rgba(107,60,233,0.45);
  border-radius: 6px; font-size: 0.56rem;
  color: #c4a5ff; cursor: default;
  font-variation-settings: "wght" 620;
}

/* Bubble entrance animation */
.md-bubble-in {
  opacity: 0;
  animation: mdBubbleIn 0.45s cubic-bezier(0.22,1,0.36,1) forwards;
}
@keyframes mdBubbleIn {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Typing dots */
.md-typing-bubble {
  display: flex; align-items: center; gap: 0.25rem;
  padding: 0.55rem 0.75rem;
}
.md-typing-dot {
  display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: rgba(107,60,233,0.55);
  animation: mdTypingBounce 1.2s ease-in-out infinite;
}
.md-typing-dot:nth-child(2) { animation-delay: 0.18s; }
.md-typing-dot:nth-child(3) { animation-delay: 0.36s; }
@keyframes mdTypingBounce {
  0%,60%,100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* Chat input bar */
.md-chat-input {
  display: flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.65rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  background: #0f112a; flex-shrink: 0;
}
.md-input-box {
  flex: 1; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px; padding: 0.28rem 0.5rem;
}
.md-input-placeholder {
  font-size: 0.56rem; color: rgba(255,255,255,0.22);
}
.md-send-btn {
  width: 22px; height: 22px; border-radius: 6px;
  background: #6b3ce9; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: default; flex-shrink: 0;
}

.play-chip {
  position: absolute; right: 1.2rem; bottom: 1.2rem; z-index: 3;
  border: 1px solid rgba(255,255,255,0.3); border-radius: 999px;
  background: rgba(10,13,25,0.82); color: #fff;
  padding: 0.6rem 1rem; font-family: inherit; font-size: 0.88rem;
  cursor: pointer; backdrop-filter: blur(8px);
  transition: background 180ms ease, transform 180ms ease;
}

.play-chip:hover { background: rgba(107,60,233,0.88); transform: scale(1.04); }

/* ══════════════════════════════════════
   ICON RAIL
══════════════════════════════════════ */
.icon-section { overflow: hidden; padding: 1.5rem 0; }

.icon-rail {
  display: flex; flex-wrap: nowrap; gap: 0.9rem;
  width: max-content;
  animation: iconScroll 30s linear infinite;
}

.icon-rail:hover { animation-play-state: paused; }

@keyframes iconScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.icon-rail span {
  width: 80px; height: 80px; min-width: 80px;
  border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255,255,255,0.7);
  color: #4f5875; font-size: 1.7rem;
  display: grid; place-items: center;
  transition: background 200ms ease, transform 200ms ease, border-color 200ms ease;
  cursor: default; backdrop-filter: blur(4px);
}

.icon-rail span:hover {
  background: var(--brand-soft); border-color: #c8b8f9;
  transform: scale(1.1); color: var(--brand);
}

/* ══════════════════════════════════════
   SERVIÇOS — Bento Grid
══════════════════════════════════════ */
.services-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: auto;
  gap: 1rem;
}

/* All service cards base */
.svc-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.6rem;
  overflow: hidden;
  transition: transform 250ms ease, box-shadow 250ms ease, border-color 250ms ease;
  display: flex; flex-direction: column; gap: 0.6rem;
}

.svc-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(107,60,233,0.13), 0 0 0 1px rgba(107,60,233,0.12);
  border-color: rgba(107,60,233,0.22);
}

/* Cursor glow follow */
.svc-glow {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(280px circle at var(--cx, 50%) var(--cy, 50%),
    rgba(107,60,233,0.07) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 250ms ease;
}

.svc-card:hover .svc-glow { opacity: 1; }

/* Featured card spans 2 columns */
.svc-featured {
  grid-column: span 2;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.4rem;
  padding: 2rem;
  background: linear-gradient(135deg, #faf8ff 0%, #f3eeff 100%);
  border-color: rgba(107,60,233,0.15);
}

.svc-featured:hover {
  box-shadow: 0 24px 60px rgba(107,60,233,0.18), 0 0 0 1px rgba(107,60,233,0.18);
}

/* Background glow blob for featured */
.svc-bg {
  position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(107,60,233,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.svc-icon {
  width: 54px; height: 54px; flex-shrink: 0;
  border-radius: 16px;
  display: grid; place-items: center;
  overflow: hidden;
  background: transparent;
}

.svc-icon img, .svc-icon svg { width: 48px; height: 48px; }

.svc-card h3 {
  font-size: 1.08rem; margin: 0;
  font-variation-settings: "opsz" 28, "wght" 650;
}

.svc-card p {
  font-size: 0.9rem; color: var(--text-soft); line-height: 1.6; margin: 0;
}

.svc-body { display: flex; flex-direction: column; gap: 0.5rem; }

.svc-metric {
  margin-top: auto; padding-top: 0.5rem;
  font-size: 0.78rem; color: var(--text-soft);
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
}

.svc-badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff;
  font-size: 0.72rem;
  font-variation-settings: "wght" 640;
  letter-spacing: 0.01em;
}

.svc-arrow {
  margin-left: auto; flex-shrink: 0;
  color: var(--brand); font-size: 1.4rem;
  opacity: 0; transform: translateX(-4px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.svc-featured:hover .svc-arrow { opacity: 1; transform: translateX(0); }

/* Wide card spans full row */
.svc-wide {
  grid-column: span 3;
  flex-direction: row;
  align-items: center;
  gap: 1.4rem;
}

.svc-body-inline {
  display: flex; align-items: center;
  gap: 2rem; flex: 1;
  flex-wrap: wrap;
}

.svc-metric-row { margin-top: 0; padding-top: 0; }

/* ══════════════════════════════════════
   ABSTRACTION — Terminal live
══════════════════════════════════════ */
.abstraction-section { overflow: hidden; }

.abstraction-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: center;
}

.abstraction-copy h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); margin-bottom: 0.7rem; }
.abstraction-copy p { max-width: 44ch; }

.abstraction-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.2rem; }

.atag {
  padding: 0.3rem 0.8rem; border-radius: 999px;
  border: 1px solid #d8cbff;
  background: var(--brand-soft); color: var(--brand-strong);
  font-size: 0.78rem; font-variation-settings: "wght" 570;
}

/* Terminal panel */
.abstraction-visual {
  background: #0d1117;
  border-radius: 20px;
  border: 1px solid #1e2533;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(6,8,14,0.35);
  min-height: 440px;
  display: flex; flex-direction: column;
}

.terminal-header {
  padding: 0.7rem 1rem;
  background: #161b27;
  border-bottom: 1px solid #1e2533;
  display: flex; align-items: center; gap: 0.4rem;
}

.term-dot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}

.term-title {
  margin-left: 0.5rem;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.35);
}

/* Agent status cards */
.agent-cards {
  padding: 1rem;
  display: grid; gap: 0.75rem;
}

.agent-card {
  border-radius: 12px; padding: 1rem;
  border: 1px solid #1e2840;
  background: #111827;
}

.agent-ok { border-color: rgba(34,197,94,0.15); }
.agent-processing { border-color: rgba(251,191,36,0.15); }

.ac-header {
  display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.75rem;
}

.ac-header strong {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem; color: rgba(255,255,255,0.8);
  font-weight: 600;
}

.ac-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}

.pulse-green {
  background: #22c55e;
  animation: dotPulse 2s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.4);
}

.pulse-amber {
  background: #fbbf24;
  animation: dotPulseAmber 1.4s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.3); }
  50% { box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}

@keyframes dotPulseAmber {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.ac-badge {
  margin-left: auto; padding: 0.18rem 0.55rem; border-radius: 999px;
  font-size: 0.67rem; font-variation-settings: "wght" 650;
}

.ac-badge.ok { background: rgba(34,197,94,0.15); color: #4ade80; }
.ac-badge.processing { background: rgba(251,191,36,0.15); color: #fbbf24; }

.ac-body { display: grid; gap: 0.35rem; margin-bottom: 0.75rem; }

.ac-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.78rem;
}

.ac-row span { color: rgba(255,255,255,0.4); }
.ac-row strong { color: rgba(255,255,255,0.85); font-variation-settings: "wght" 600; }

.ac-bar-wrap {
  height: 4px; background: rgba(255,255,255,0.07); border-radius: 999px; overflow: hidden;
}

.ac-bar {
  height: 100%; width: var(--w); background: linear-gradient(90deg, #22c55e, #86efac);
  border-radius: 999px; font-size: 0; /* text as title only */
}

.ac-progress {
  height: 4px; background: rgba(255,255,255,0.07); border-radius: 999px; overflow: hidden;
}

.ac-progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--brand), #a78bfa);
  border-radius: 999px;
  animation: progressLoop 2.4s ease-in-out infinite;
}

@keyframes progressLoop {
  0% { width: 0%; margin-left: 0; }
  50% { width: 70%; margin-left: 0; }
  90% { width: 20%; margin-left: 80%; }
  100% { width: 0%; margin-left: 100%; }
}

/* Terminal log */
.terminal-log {
  flex: 1; padding: 0.75rem 1rem;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.73rem; display: grid;
  gap: 0.3rem; align-content: end;
  border-top: 1px solid #1e2533;
  min-height: 100px;
}

.tlog-line {
  display: flex; gap: 0.75rem; align-items: baseline;
  animation: logIn 300ms ease forwards;
  opacity: 0;
}

@keyframes logIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.tlog-time { color: rgba(255,255,255,0.2); flex-shrink: 0; }
.tlog-ok { color: #4ade80; }
.tlog-info { color: rgba(255,255,255,0.5); }
.tlog-warn { color: #fbbf24; }

/* ══════════════════════════════════════
   MÉTODO — Horizontal timeline
══════════════════════════════════════ */
.method-timeline {
  position: relative;
  padding-top: 1rem;
}

.method-line-track {
  position: absolute;
  top: 36px; /* align with center of step nodes */
  left: 3rem; right: 3rem;
  height: 2px;
  background: rgba(107,60,233,0.1);
  border-radius: 999px;
  overflow: hidden;
}

.method-line-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand), #a78bfa);
  border-radius: 999px;
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.method-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  list-style: none; margin: 0; padding: 0;
}

.method-step {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  padding: 0 1rem;
}

.mstep-node {
  position: relative; z-index: 2;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  display: grid; place-items: center;
  box-shadow: 0 8px 24px rgba(107,60,233,0.35);
  margin-bottom: 1.4rem;
  flex-shrink: 0;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.method-step:hover .mstep-node {
  transform: scale(1.08);
  box-shadow: 0 14px 36px rgba(107,60,233,0.48);
}

.mstep-ring {
  position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid rgba(107,60,233,0.2);
  animation: nodeRingPulse 2.5s ease-in-out infinite;
}

@keyframes nodeRingPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.12); opacity: 0.12; }
}

.mstep-num {
  font-size: 1rem;
  font-variation-settings: "opsz" 32, "wght" 720;
  color: #fff;
  letter-spacing: -0.02em;
}

.mstep-content { max-width: 200px; }

.mstep-content h3 {
  font-size: 1.06rem; margin-bottom: 0.5rem;
}

.mstep-content p { font-size: 0.87rem; line-height: 1.55; }

.mstep-time {
  display: inline-block; margin-top: 0.75rem;
  padding: 0.22rem 0.65rem; border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 0.73rem; font-variation-settings: "wght" 600;
}

/* ══════════════════════════════════════
   FAQ
══════════════════════════════════════ */
.faq-wrap { max-width: 820px; }

.faq-list { display: grid; gap: 0.85rem; }

.faq-item {
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; overflow: clip;
  transition: border-color 220ms ease, box-shadow 220ms ease;
  border-left: 3px solid transparent;
}

.faq-item:has(.faq-trigger[aria-expanded="true"]) {
  border-left-color: var(--brand);
  border-color: rgba(107,60,233,0.2);
  box-shadow: 0 8px 28px rgba(107,60,233,0.08);
}

.faq-trigger {
  width: 100%; border: 0; background: transparent; color: var(--text);
  font: inherit; font-variation-settings: "wght" 580;
  text-align: left; padding: 1.1rem 1.2rem;
  cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}

.faq-trigger span { flex: 1; }

.faq-trigger::after {
  content: "+";
  font-size: 1.35rem; font-variation-settings: "wght" 300;
  color: var(--brand); flex-shrink: 0;
  transition: transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.faq-trigger[aria-expanded="true"]::after { transform: rotate(45deg); }

.faq-content { padding: 0 1.2rem 1.2rem; }

.faq-content p {
  color: var(--text-soft); font-size: 0.93rem; line-height: 1.65;
  padding-top: 0.2rem;
}

/* ══════════════════════════════════════
   CONTACT
══════════════════════════════════════ */
.contact { position: relative; overflow: hidden; }

.contact-glow {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 800px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(107,60,233,0.07) 0%, transparent 65%);
  pointer-events: none;
}

.contact-grid {
  display: grid; grid-template-columns: 1fr 1.1fr;
  gap: 3rem; align-items: start; position: relative;
}

.contact-copy h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 0.65rem; }

.contact-list {
  list-style: none; padding: 0;
  margin: 1.5rem 0 0;
  display: grid; gap: 0.75rem;
}

.contact-list li {
  display: flex; align-items: center; gap: 0.65rem;
  font-size: 0.95rem;
}

.contact-list svg { flex-shrink: 0; color: var(--text-soft); }

.contact-list a {
  color: var(--brand-strong);
  text-decoration: underline; text-underline-offset: 3px;
  transition: color 150ms ease;
}

.contact-list a:hover { color: var(--brand); }

.contact-form {
  background: #fff; border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(17,24,43,0.08);
  padding: 1.8rem;
}

.form-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }

.form-group label {
  color: var(--text); font-size: 0.9rem;
  font-variation-settings: "wght" 580;
}

.form-group:last-of-type { margin-bottom: 1.2rem; }

.contact-form input, .contact-form textarea {
  width: 100%; border: 1.5px solid #e0e5f0; border-radius: 12px;
  background: #fafbff; color: var(--text);
  font: inherit; font-size: 0.93rem; padding: 0.8rem 1rem;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.contact-form input:focus, .contact-form textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(107,60,233,0.1);
}

.contact-form input::placeholder, .contact-form textarea::placeholder {
  color: #b0b8cc;
}

.form-note {
  margin-top: 0.75rem; font-size: 0.83rem; text-align: center;
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--line); background: #fff;
  padding: 2.2rem 0 1.5rem;
}

.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1rem;
}

.footer-grid nav { display: grid; gap: 0.5rem; }

.footer-grid nav a { color: #59617c; font-size: 0.9rem; transition: color 150ms ease; }
.footer-grid nav a:hover { color: var(--text); }

.copyright {
  margin: 1.4rem 0 0; text-align: center;
  font-size: 0.85rem; color: #707793;
}

/* ══════════════════════════════════════
   BACK TO TOP
══════════════════════════════════════ */
.back-to-top {
  position: fixed; left: 1.2rem; bottom: 1.5rem; z-index: 40;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--brand); color: #fff; cursor: pointer;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  font-size: 1.1rem;
}

.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* ══════════════════════════════════════
   WHATSAPP FLOAT
══════════════════════════════════════ */
.whatsapp-float {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 50;
  display: flex; align-items: center; gap: 0;
  text-decoration: none; border-radius: 999px;
  background: #25D366;
  box-shadow: 0 6px 24px rgba(37,211,102,0.38);
  overflow: hidden; max-width: 56px;
  transition: gap 280ms cubic-bezier(0.34,1.56,0.64,1), max-width 280ms cubic-bezier(0.34,1.56,0.64,1), box-shadow 220ms ease, transform 200ms ease;
}

.whatsapp-float:hover, .whatsapp-float:focus-visible {
  gap: 0.5rem; max-width: 280px;
  box-shadow: 0 10px 36px rgba(37,211,102,0.5);
  transform: translateY(-2px);
}

.wafloat-icon { width: 56px; height: 56px; padding: 14px; flex-shrink: 0; }

.wafloat-label {
  color: #fff; font-size: 0.88rem; font-variation-settings: "wght" 580;
  white-space: nowrap; padding-right: 1.2rem;
  opacity: 0; transform: translateX(-8px);
  transition: opacity 200ms ease 80ms, transform 200ms ease 80ms;
  pointer-events: none;
}

.whatsapp-float:hover .wafloat-label,
.whatsapp-float:focus-visible .wafloat-label {
  opacity: 1; transform: translateX(0);
}

.wafloat-pulse {
  position: absolute; inset: 0; border-radius: 999px;
  background: #25D366;
  animation: waPulse 3s ease-out infinite; z-index: -1;
}

@keyframes waPulse {
  0% { transform: scale(1); opacity: 0.5; }
  70% { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* ══════════════════════════════════════
   CHAT — SECTION (page-embedded)
══════════════════════════════════════ */
.chat-section {
  background: #fff;
  border-top: 1px solid var(--line);
}

.chat-container { max-width: 780px; }

.chat-workspace { display: flex; flex-direction: column; gap: 0; }

/* Status dot (shared) */
.status-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #22c55e; flex-shrink: 0;
  animation: statusPulse 2.2s ease-in-out infinite;
}

@keyframes statusPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Message history area */
.page-chat-messages {
  overflow-y: auto; padding: 0;
  display: flex; flex-direction: column; gap: 0.85rem;
  scroll-behavior: smooth;
  max-height: 420px; min-height: 0;
  margin-bottom: 0;
}

.page-chat-messages:not(:empty) {
  padding: 1.5rem 1.5rem 0.8rem;
  border: 1px solid var(--line); border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: #fafbff;
  margin-bottom: -1px;
}

.page-chat-messages::-webkit-scrollbar { width: 4px; }
.page-chat-messages::-webkit-scrollbar-thumb { background: #e0e4ef; border-radius: 4px; }

/* Message bubbles */
.chat-msg {
  display: flex; flex-direction: column;
  max-width: 78%; animation: msgIn 240ms ease forwards;
}

.chat-msg.bot { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; align-items: flex-end; }

@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.chat-bubble {
  padding: 0.75rem 1rem; border-radius: 18px;
  font-size: 0.91rem; line-height: 1.6;
}

.chat-msg.bot .chat-bubble { background: #f0f1f5; color: var(--text); border-bottom-left-radius: 5px; }
.chat-msg.bot .chat-bubble p { color: var(--text); }
.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff; border-bottom-right-radius: 5px;
}

.chat-typing {
  display: flex; align-items: center; gap: 4px;
  padding: 0.75rem 1rem; background: #f0f1f5;
  border-radius: 18px; border-bottom-left-radius: 5px; width: fit-content;
}

.chat-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: #9ca3af;
  animation: typingDot 1.2s ease-in-out infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-4px); opacity: 1; }
}

/* ── Compose card */
.chat-compose-card {
  border: 1.5px solid #dde2f0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(17,24,43,0.07), 0 2px 6px rgba(17,24,43,0.04);
  overflow: hidden;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.page-chat-messages:not(:empty) + .chat-compose-card {
  border-radius: 0 0 20px 20px;
  border-top-color: transparent;
}

.chat-compose-card:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(107,60,233,0.08), 0 8px 32px rgba(17,24,43,0.07);
}

/* Status bar inside compose */
.chat-compose-status {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.2rem;
  border-bottom: 1px solid #f0f2f8;
  font-size: 0.82rem;
  color: var(--text-soft);
  font-variation-settings: "wght" 560;
}

.ccs-online {
  margin-left: auto;
  font-size: 0.75rem; color: #22c55e;
  font-variation-settings: "wght" 590;
}

/* Suggestion chips */
.page-chat-suggestions {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding: 0.9rem 1.2rem 0;
}

.chat-suggestion-btn {
  border: 1px solid #dde2f0; background: #f7f8fc;
  color: var(--text); border-radius: 999px;
  padding: 0.42rem 0.95rem; font-size: 0.8rem;
  font-family: inherit; font-variation-settings: "wght" 540;
  cursor: pointer; transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.chat-suggestion-btn:hover {
  background: var(--brand-soft); border-color: #c8b8f9; color: var(--brand-strong);
  transform: translateY(-1px);
}

/* Textarea form */
.chat-compose-form {
  padding: 0.9rem 1.2rem 0.75rem;
  display: flex; flex-direction: column; gap: 0.6rem;
}

.page-chat-input {
  width: 100%; border: 0; outline: none; resize: none;
  font: inherit; font-size: 0.97rem; color: var(--text);
  background: transparent; line-height: 1.65;
  min-height: 72px; max-height: 180px;
  font-variation-settings: "wght" 440;
}

.page-chat-input::placeholder { color: #b8bfcc; }

.chat-compose-actions {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 0.55rem;
  border-top: 1px solid #f0f2f8;
}

.pch-attach {
  width: 34px; height: 34px; border-radius: 8px;
  display: grid; place-items: center;
  cursor: pointer; color: #9aa0b8; flex-shrink: 0;
  transition: background 150ms ease, color 150ms ease;
}

.pch-attach:hover { background: var(--brand-soft); color: var(--brand); }

.chat-compose-send {
  display: inline-flex; align-items: center; gap: 0.45rem;
  border: 0; border-radius: 10px;
  padding: 0.58rem 1.1rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #fff; font: inherit; font-size: 0.88rem;
  font-variation-settings: "wght" 600;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.chat-compose-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(107,60,233,0.32);
}

/* WhatsApp CTA in chat */
.chat-cta-wa {
  display: inline-flex; align-items: center; gap: 0.45rem;
  margin-top: 0.5rem; padding: 0.6rem 1rem; border-radius: 12px;
  background: #25D366; color: #fff;
  font-size: 0.85rem; font-variation-settings: "wght" 600;
  text-decoration: none; width: fit-content;
  transition: background 150ms ease, transform 150ms ease;
}

.chat-cta-wa:hover { background: #22bf5c; transform: translateY(-1px); }

.pch-note {
  margin-top: 1rem; font-size: 0.78rem; text-align: center; color: #a0a8be;
}

.pch-note a { color: var(--brand); text-underline-offset: 2px; text-decoration: underline; }

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

/* ══════════════════════════════════════
   REVEAL ANIMATIONS
══════════════════════════════════════ */
[data-reveal] {
  opacity: 0; transform: translateY(24px);
  transition: opacity 680ms cubic-bezier(0.22,1,0.36,1), transform 680ms cubic-bezier(0.22,1,0.36,1);
}

[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ══════════════════════════════════════
   MISC
══════════════════════════════════════ */
.noscript {
  margin: 0; text-align: center; padding: 0.8rem;
  background: #f1ebff; color: #362064;
}

.legal-page { min-height: 100vh; display: grid; place-items: center; padding: 2rem 0; }

.legal-content {
  width: min(760px, calc(100% - 2.4rem)); background: #fff; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow);
  padding: clamp(1rem, 2.5vw, 2rem); display: grid; gap: 0.8rem;
}

.legal-content h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.legal-content h2 { margin-top: 0.55rem; font-size: 1.1rem; }
.legal-updated { margin-top: 0.8rem; font-size: 0.85rem; }

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 1080px) {
  .md-chatpanel { width: 185px; }
  .md-kpis { grid-template-columns: repeat(2,1fr); }
  .services-bento { grid-template-columns: repeat(2, 1fr); }
  .svc-featured { grid-column: span 2; }
  .svc-wide { grid-column: span 2; flex-direction: column; }
  .svc-body-inline { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .abstraction-grid { grid-template-columns: 1fr; }
  .method-steps { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
  .method-line-track { display: none; }
}

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .menu {
    position: absolute; top: calc(100% + 0.5rem);
    left: 1rem; right: 1rem; display: none;
    flex-direction: column; align-items: stretch;
    border: 1px solid var(--line); border-radius: 16px;
    background: #fff; box-shadow: var(--shadow); padding: 0.9rem;
  }
  .menu.open { display: flex; }
  .stats-inner { grid-template-columns: 1fr; }
  .stat-sep { width: 60px; height: 1px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-inner { padding-bottom: 2rem; }
}

@media (max-width: 700px) {
  .services-bento { grid-template-columns: 1fr; }
  .svc-featured { flex-direction: column; grid-column: span 1; }
  .svc-wide { grid-column: span 1; }
  .method-steps { grid-template-columns: 1fr; }
  .hero { min-height: 88vh; }
  .olabel-concept { display: none; }
  .whatsapp-float { right: 1rem; bottom: 1.2rem; }
  .back-to-top { left: 1rem; bottom: 1.2rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .md-chatpanel { display: none; }
  .md-kpis { grid-template-columns: repeat(2,1fr); }
  .md-sidebar { display: none; }
  .page-chat { min-height: 480px; }
  .page-chat-messages { padding: 1rem; }
  .page-chat-footer { padding: 0.75rem 1rem 1rem; }
}

/* ══════════════════════════════════════
   MOBILE PEQUENO (≤480px)
══════════════════════════════════════ */
@media (max-width: 480px) {
  .container { padding-inline: 1rem; }
  .hero { min-height: 92dvh; padding-top: 4.5rem; }
  .hero-title { font-size: clamp(2rem, 10vw, 2.8rem); }
  .hero-subtitle { font-size: 0.9rem; padding: 0.7rem 1rem; }
  .hero-cta-group { flex-direction: column; align-items: stretch; }
  .hero-cta-group .btn { text-align: center; }

  .section { padding-block: 3.5rem; }
  .section-header { margin-bottom: 2rem; }

  /* Product frame */
  .product-frame { padding: 0.75rem; min-height: auto; border-radius: 18px; }
  .mockup-dashboard { min-height: 360px; }
  .md-kpis { grid-template-columns: repeat(2,1fr); gap: 0.25rem; }
  .md-kpi-val { font-size: 0.85rem; }
  .md-chart-box { display: none; }

  /* Stats */
  .stats-inner { gap: 2rem; }
  .stat-number { font-size: clamp(2rem, 8vw, 2.8rem); }

  /* Services */
  .services-bento { gap: 0.75rem; }
  .svc-card { padding: 1.2rem 1rem; }

  /* Method */
  .method-steps { gap: 1.5rem; }

  /* Contact */
  .contact-form { gap: 0.75rem; }

  /* Chat section */
  .chat-compose-card { margin-inline: 0; }

  /* Footer */
  .footer-grid { gap: 2rem; }

  /* Float buttons */
  .whatsapp-float { width: 52px; height: 52px; right: 0.9rem; bottom: 1rem; }
  .back-to-top { width: 40px; height: 40px; left: 0.9rem; bottom: 1rem; }
}

/* ══════════════════════════════════════
   ACCESSIBILITY
══════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-canvas, .product-canvas, .orbit-mount, .orbit-wrap, .stats-particles { display: none; }
  [data-reveal] { opacity: 1; transform: none; }
}

:focus-visible { outline: 3px solid #c5b4ff; outline-offset: 2px; }
