/* ==========================================================================
   Harritec Soluções Digitais — estilos complementares ao Tailwind
   Componentes reutilizáveis: botões, chat animado, mockups, animações.
   ========================================================================== */

:root {
  --brand-50: #eff5ff;
  --brand-100: #dce8ff;
  --brand-300: #8db5ff;
  --brand-600: #1d6bf3;
  --brand-700: #1556d1;
  --ink: #0b1b3a;
  --ink-950: #071229;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
  --bubble-client: #d9fdd3;
  --header-h: 4.25rem;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Manrope', ui-sans-serif, system-ui, 'Segoe UI', Roboto, sans-serif;
  background: #fff;
  color: var(--ink);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Foco visível e consistente (WCAG 2.4.7) */
:focus-visible {
  outline: 3px solid var(--brand-600);
  outline-offset: 3px;
  border-radius: 6px;
}
.on-dark :focus-visible,
.on-dark:focus-visible {
  outline-color: var(--brand-300);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .75rem 1rem;
  border-radius: .5rem;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

/* --------------------------------------------------------------------------
   Botões
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 3rem;
  padding: .75rem 1.375rem;
  border-radius: .75rem;
  font-weight: 700;
  font-size: .9375rem;
  line-height: 1.25;
  text-align: center;
  transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s, transform .2s;
}
.btn svg { width: 1.125rem; height: 1.125rem; flex: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand-600);
  color: #fff;
  box-shadow: 0 1px 2px rgba(11,27,58,.1), 0 8px 20px -10px rgba(29,107,243,.65);
}
.btn-primary:hover { background: var(--brand-700); }

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--slate-200);
}
.btn-secondary:hover { border-color: #cbd5e1; background: #f8fafc; }

.btn-light {
  background: #fff;
  color: var(--ink);
}
.btn-light:hover { background: var(--brand-50); }

.btn-outline-light {
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
}
.btn-outline-light:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5); }

.btn-sm { min-height: 2.5rem; padding: .5rem 1rem; font-size: .875rem; border-radius: .625rem; }

/* Link de texto com seta */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
  font-weight: 700;
  color: var(--brand-700);
}
.link-arrow svg { width: 1rem; height: 1rem; transition: transform .2s; }
.link-arrow:hover svg { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  transition: box-shadow .25s, background-color .25s, border-color .25s;
}
.site-header.is-scrolled {
  background: rgba(255,255,255,.92);
  border-color: var(--slate-200);
  box-shadow: 0 6px 24px -18px rgba(11,27,58,.35);
}
.nav-link {
  position: relative;
  padding: .5rem .125rem;
  font-size: .875rem;
  font-weight: 600;
  color: #334155;
  transition: color .2s;
}
.nav-link:hover,
.nav-link[aria-current="true"] { color: var(--brand-700); }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: .125rem;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-600);
  transform: scaleX(0);
  transition: transform .25s;
}
.nav-link[aria-current="true"]::after { transform: scaleX(1); }

.mobile-menu {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s ease;
}
.mobile-menu > div { overflow: hidden; }
.mobile-menu.is-open { grid-template-rows: 1fr; }
.mobile-menu:not(.is-open) { visibility: hidden; transition: grid-template-rows .3s ease, visibility 0s .3s; }

/* --------------------------------------------------------------------------
   Fundos decorativos discretos
   -------------------------------------------------------------------------- */
.bg-grid {
  background-image:
    linear-gradient(to right, rgba(11,27,58,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11,27,58,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 40%, transparent 100%);
}
.glow {
  background: radial-gradient(closest-side, rgba(29,107,243,.16), transparent);
  filter: blur(8px);
}
.bg-grid-dark {
  background-image:
    linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 30%, transparent 100%);
}

/* Imagens de fundo das seções claras (a seção precisa de "relative isolate overflow-hidden") */
.bg-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-blend-mode: multiply;
  opacity: .5;
}
.bg-art-pontos { background-color: #f1f5ff; background-image: url('../img/bg-pontos.webp'); }
.bg-art-ondas { background-color: #eef3fd; background-image: url('../img/bg-ondas.webp'); }
.bg-art-flip { transform: scaleX(-1); }
.bg-art-planos {
  background-color: #f1f5ff;
  background-image: linear-gradient(to bottom, rgba(255,255,255,0) 35%, rgba(188,211,255,.7)), url('../img/bg-pontos.webp');
  background-size: cover, cover;
}
@media (max-width: 640px) {
  .bg-art-pontos { background-image: url('../img/bg-pontos-960.webp'); }
  .bg-art-ondas { background-image: url('../img/bg-ondas-960.webp'); }
  .bg-art-planos {
    background-image: linear-gradient(to bottom, rgba(255,255,255,0) 35%, rgba(188,211,255,.7)), url('../img/bg-pontos-960.webp');
  }
}

/* --------------------------------------------------------------------------
   Planos e serviços: painel translúcido com o plano principal em destaque
   -------------------------------------------------------------------------- */
.pricing { font-family: 'Poppins', 'Manrope', ui-sans-serif, system-ui, sans-serif; }
.pricing-panel {
  display: grid;
  border-radius: 1.75rem;
  background: rgba(255,255,255,.66);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.9), 0 40px 70px -45px rgba(11,27,58,.45);
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 1.75rem;
}
.plan-label { font-size: .8125rem; font-weight: 500; color: #56688a; }
.plan-price {
  margin-top: .25rem;
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.plan-price small { margin-left: .25rem; font-size: 1rem; font-weight: 400; letter-spacing: 0; color: #56688a; }
.plan-note { margin-top: .375rem; font-size: .875rem; line-height: 1.5; color: #475569; }
.plan-kind {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.5rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--brand-700);
}
.plan-kind svg { width: 1.25rem; height: 1.25rem; flex: none; }
.plan-name { margin-top: .25rem; font-size: 1.5rem; font-weight: 500; line-height: 1.3; letter-spacing: -.01em; }
.plan-desc { margin-top: .625rem; font-size: .9375rem; line-height: 1.6; color: #475569; }
.plan-list { display: grid; gap: .75rem; margin-top: 1.5rem; font-size: .9375rem; line-height: 1.45; color: #334155; }
.plan-list li { position: relative; padding-left: 2rem; }
.plan-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .0625rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: var(--brand-100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%231556D1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 10.4 2.7 2.7L14.2 7'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.plan-list .is-highlight { font-weight: 600; color: var(--ink); }
.plan-actions { display: grid; gap: .75rem; margin-top: auto; padding-top: 2.25rem; }
.pricing .btn { border-radius: 999px; font-weight: 600; }
.btn-muted { background: #56688a; color: #fff; }
.btn-muted:hover { background: var(--ink); }

.plan-featured {
  margin-inline: .75rem;
  padding-top: 4rem;
  border-radius: 1.5rem;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 34px 60px -28px rgba(11,27,58,.75);
}
.plan-featured .plan-label,
.plan-featured .plan-price small { color: #a9b8d4; }
.plan-featured .plan-note,
.plan-featured .plan-desc { color: #cbd5e6; }
.plan-featured .plan-kind { color: var(--brand-300); }
.plan-featured .btn-primary { box-shadow: none; }
.plan-featured .plan-list { color: #fff; }
.plan-featured .plan-list li::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10' cy='10' r='8.5'/%3E%3Cpath d='m6.4 10.4 2.5 2.5 4.9-5.6'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.plan-badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  padding: .375rem .875rem;
  border-radius: 999px;
  background: rgba(141,181,255,.16);
  color: var(--brand-300);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
@media (min-width: 1024px) {
  .pricing-panel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .plan { padding: 2.75rem 2.25rem; }
  .plan-head { min-height: 9.25rem; }
  .plan-featured { margin: -1.75rem 0; padding-top: 4.5rem; padding-bottom: 3.5rem; }
}

/* --------------------------------------------------------------------------
   Chat animado (sem mockup de celular)
   -------------------------------------------------------------------------- */
.chat {
  position: relative;
  border: 1px solid var(--slate-200);
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 2px 4px rgba(11,27,58,.04), 0 30px 60px -30px rgba(11,27,58,.35);
  overflow: hidden;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .875rem 1rem;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
}
.chat-avatar {
  display: grid;
  place-items: center;
  width: 2.375rem;
  height: 2.375rem;
  flex: none;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-700);
}
.chat-avatar svg { width: 1.25rem; height: 1.25rem; }
.chat-status { display: inline-flex; align-items: center; gap: .375rem; }
.chat-status::before {
  content: '';
  width: .5rem; height: .5rem;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34,197,94,.18);
}
.chat-body {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: .5rem;
  height: var(--chat-h, 27rem);
  padding: 1rem;
  overflow: hidden;
  background-color: #f6f7fb;
  background-image: radial-gradient(rgba(11,27,58,.06) 1px, transparent 1px);
  background-size: 16px 16px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 2.5rem);
  mask-image: linear-gradient(to bottom, transparent 0, #000 2.5rem);
}
.chat-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: opacity .5s ease;
}
.chat-list.is-fading { opacity: 0; }

.msg {
  position: relative;
  max-width: 82%;
  padding: .5rem .75rem .375rem;
  border-radius: 1rem;
  font-size: .9rem;
  line-height: 1.45;
  color: #111b21;
  box-shadow: 0 1px .5px rgba(11,27,58,.12);
  animation: msg-in .38s cubic-bezier(.2,.8,.2,1) both;
}
.msg-agent { align-self: flex-start; background: #fff; border-top-left-radius: .25rem; }
.msg-client { align-self: flex-end; background: var(--bubble-client); border-top-right-radius: .25rem; }
.msg-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .25rem;
  margin-top: .125rem;
  font-size: .6875rem;
  color: #667781;
}
.msg-meta svg { width: .95rem; height: .95rem; color: #53bdeb; }

.msg-chips { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: .5rem; }
.chip {
  padding: .3rem .625rem;
  border: 1px solid var(--brand-100);
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: .78rem;
  font-weight: 700;
  transition: background-color .3s, color .3s, border-color .3s;
}
.chip.is-picked { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

.msg-card {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin-top: .5rem;
  padding: .5rem .625rem;
  border: 1px solid #e7ecf3;
  border-radius: .75rem;
  background: #f8fafc;
  font-size: .8rem;
}
.msg-card svg { width: 1.25rem; height: 1.25rem; flex: none; color: #16a34a; }
.msg-card strong { display: block; font-size: .8125rem; color: var(--ink); }

.typing {
  align-self: flex-start;
  display: inline-flex;
  gap: .25rem;
  padding: .75rem .875rem;
  border-radius: 1rem;
  border-top-left-radius: .25rem;
  background: #fff;
  box-shadow: 0 1px .5px rgba(11,27,58,.12);
  animation: msg-in .3s ease both;
}
.typing span {
  width: .45rem; height: .45rem;
  border-radius: 999px;
  background: #94a3b8;
  animation: typing 1.2s infinite ease-in-out;
}
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }

/* Variante compacta (seção WhatsApp) */
.chat-sm { --chat-h: 22rem; }
.chat-sm .msg { font-size: .85rem; }

/* Selo "agendamento registrado" que acompanha a demo da Hero */
.toast {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .625rem .875rem;
  border: 1px solid var(--slate-200);
  border-radius: .875rem;
  background: #fff;
  box-shadow: 0 18px 40px -20px rgba(11,27,58,.45);
  font-size: .8125rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .45s ease, transform .45s ease;
}
.toast.is-visible { opacity: 1; transform: none; }
.toast-icon {
  display: grid; place-items: center;
  width: 2rem; height: 2rem; flex: none;
  border-radius: .625rem;
  background: var(--brand-50);
  color: var(--brand-700);
}
.toast-icon svg { width: 1.125rem; height: 1.125rem; }

/* Linha de etapas sincronizada com o chat (seção WhatsApp) */
.flow-step {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .75rem .875rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: .875rem;
  color: #cbd5e1;
  transition: background-color .35s, border-color .35s, color .35s;
}
.flow-step .flow-dot {
  display: grid; place-items: center;
  width: 2rem; height: 2rem; flex: none;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  font-size: .8125rem; font-weight: 800;
  transition: background-color .35s, border-color .35s, color .35s;
}
.flow-step.is-active,
.flow-step.is-done { color: #fff; }
.flow-step.is-active { background: rgba(29,107,243,.16); border-color: rgba(141,181,255,.45); }
.flow-step.is-active .flow-dot,
.flow-step.is-done .flow-dot { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

@keyframes msg-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: .45; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* --------------------------------------------------------------------------
   Imagens de produto e mockups (apenas na seção de projetos)
   -------------------------------------------------------------------------- */
.shot {
  border: 1px solid var(--slate-200);
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 2px 4px rgba(11,27,58,.04), 0 40px 80px -40px rgba(11,27,58,.35);
  overflow: hidden;
}
.shot img { display: block; width: 100%; height: auto; }

/* No celular, o dashboard mantém tamanho legível e rola na horizontal */
@media (max-width: 639px) {
  .shot-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .shot-scroll img { width: 46rem; max-width: none; }
  .chat { --chat-h: 23rem; }
  .chat-sm { --chat-h: 21rem; }
}

.mock-stage {
  position: relative;
  padding-bottom: 1.5rem;
  padding-right: 11%;
}
.mock-monitor {
  border-radius: .875rem;
  padding: .55rem .55rem 0;
  background: #1e293b;
  box-shadow: 0 30px 60px -30px rgba(11,27,58,.55);
}
.mock-monitor .screen {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: .375rem .375rem 0 0;
  background: #fff;
}
.mock-monitor .chin {
  height: 1.1rem;
  border-radius: 0 0 .875rem .875rem;
  margin: 0 -.55rem;
  background: #273449;
}
.mock-stand {
  width: 18%;
  height: 1.6rem;
  margin: 0 auto;
  background: linear-gradient(#cbd5e1, #e2e8f0);
  clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
}
.mock-base {
  width: 30%;
  height: .4rem;
  margin: 0 auto;
  border-radius: 999px;
  background: #cbd5e1;
}
.mock-phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 25%;
  min-width: 6.5rem;
  padding: .35rem;
  border-radius: 1.5rem;
  background: #0f172a;
  box-shadow: 0 30px 50px -20px rgba(11,27,58,.6), 0 0 0 1px rgba(255,255,255,.06) inset;
}
.mock-phone .screen {
  position: relative;
  aspect-ratio: 390 / 844;
  overflow: hidden;
  border-radius: 1.2rem;
  background: #fff;
}
.mock-phone .screen::before {
  content: '';
  position: absolute;
  top: .35rem; left: 50%;
  z-index: 1;
  width: 30%; height: .55rem;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #0f172a;
}
.mock-monitor img,
.mock-phone img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* --------------------------------------------------------------------------
   Revelação ao rolar (somente com JS e sem preferência por menos movimento)
   -------------------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1);
  transition-delay: var(--d, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Botão flutuante do WhatsApp */
.wa-float {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  background: #25d366;
  color: #fff;
  box-shadow: 0 12px 30px -10px rgba(18,140,126,.7);
  transition: transform .2s, box-shadow .2s;
}
.wa-float:hover { transform: translateY(-2px); }
.wa-float svg { width: 1.75rem; height: 1.75rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
