﻿/* =========================================================
   COMPONENTS.CSS — Refatorado
   Botões · Cards (filete) · KPI · Stepper · Audience · Listas
   Case / Section helpers · Carousel controls · FAQ · Utilitários
   ========================================================= */

/* ========== Botões ========== */
.btn{
  --btn-py: 12px; --btn-px: 24px;
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: var(--btn-py) var(--btn-px);
  border:none; border-radius: var(--radius-md);
  font-weight:600; font-size:1rem; cursor:pointer;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, filter .2s ease;
  text-decoration:none;
}
.btn:focus-visible{
  outline:2px solid color-mix(in srgb, var(--brand-primary) 70%, transparent);
  outline-offset:2px;
}
.btn:disabled{ opacity:.6; cursor:not-allowed; transform:none; }

.btn.btn-sm{ --btn-py: 8px; --btn-px: 14px; font-size:.95rem; }
.btn.btn-lg{ --btn-py: 14px; --btn-px: 28px; font-size:1.05rem; }

.btn-primary{ background: var(--brand-primary); color:#fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover{ transform: translateY(-2px); box-shadow: var(--shadow-lg); filter:none; background:#0f3a66; }
.btn-primary:active{ transform: translateY(0); box-shadow: var(--shadow-sm); }

.btn-outline{ border:2px solid var(--brand-primary); background:transparent; color: var(--brand-primary); }
.btn-outline:hover{ background: var(--brand-primary); color:#fff; transform: translateY(-2px); }
.btn-outline:active{ transform: translateY(0); }

/* ícone-only */
.btn-icon{ --btn-py: 10px; --btn-px: 10px; width:40px; height:40px; padding:0; border-radius:999px; }

/* ========== Badge / Chips simples ========== */
.badge{display:inline-block;border-radius:999px;padding:4px 10px;background:var(--brand-accent);color:#382800;font-weight:700}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 0;padding:0;list-style:none}
.chips li{border:1px solid var(--neutral-200);border-radius:999px;padding:4px 10px;font-size:.85rem;background:#fff}

/* ========== Card base ========== */
.card{ background:#fff; border:1px solid var(--neutral-200); border-radius: var(--radius-lg); padding:20px; box-shadow: var(--shadow-sm); }

/* =========================================================
   Card Top Accent — filete suave + animação no hover/focus
   (aplica a TODOS os cards)
   ========================================================= */
:root{
  --card-accent-h: 4px;
  --card-accent: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
  --card-accent-soft: linear-gradient(90deg, rgba(23,74,126,.16), rgba(0,166,178,.16));
}

/* alvos (adicione mais classes, se precisar) */
.card,
.feature-card,
.service-card,
.section-card,
.audience-card,
.plan-card,
.case-panel,
.case-detail,
.kpi-item{
  position:relative;
  overflow:hidden; /* corta o filete nas bordas arredondadas */
}

/* linha suave sempre visível */
.card::after,
.feature-card::after,
.service-card::after,
.section-card::after,
.audience-card::after,
.plan-card::after,
.case-panel::after,
.case-detail::after,
.kpi-item::after{
  content:""; position:absolute; top:0; left:0; right:0;
  height: calc(var(--card-accent-h) - 1px);
  background: var(--card-accent-soft);
  border-top-left-radius: inherit; border-top-right-radius: inherit;
  pointer-events:none; z-index:0;
}

/* filete “forte” animado */
.card::before,
.feature-card::before,
.service-card::before,
.section-card::before,
.audience-card::before,
.plan-card::before,
.case-panel::before,
.case-detail::before,
.kpi-item::before{
  content:""; position:absolute; top:0; left:0; right:0;
  height: var(--card-accent-h);
  background: var(--card-accent);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .35s ease;
  border-top-left-radius: inherit; border-top-right-radius: inherit;
  pointer-events:none; z-index:1;
}
.card:hover::before,
.feature-card:hover::before,
.service-card:hover::before,
.section-card:hover::before,
.audience-card:hover::before,
.plan-card:hover::before,
.case-panel:hover::before,
.case-detail:hover::before,
.kpi-item:hover::before,
.card:focus-within::before,
.feature-card:focus-within::before,
.service-card:focus-within::before,
.section-card:focus-within::before,
.audience-card:focus-within::before,
.plan-card:focus-within::before,
.case-panel:focus-within::before,
.case-detail:focus-within::before,
.kpi-item:focus-within::before{ transform: scaleX(1); }

/* Touch: já mostra o filete forte (sem depender de :hover) */
@media (hover:none){
  .card::before,
  .feature-card::before,
  .service-card::before,
  .section-card::before,
  .audience-card::before,
  .plan-card::before,
  .case-panel::before,
  .case-detail::before,
  .kpi-item::before{ transform: scaleX(1); }
}

/* elevação opcional */
.card--lift{ transition: transform .25s ease, box-shadow .25s ease; }
.card--lift:hover{ transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,.1); }

/* ========== Feature card (visual) ========== */
.feature-card{
  background:#fff;border:1px solid var(--neutral-200);border-radius:16px;padding:20px;
  box-shadow:0 2px 6px rgba(0,0,0,.04); transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover{ transform: translateY(-2px); box-shadow:0 8px 22px rgba(0,0,0,.08); }
.feature-card__icon{
  width:44px;height:44px;border-radius:12px;
  background:linear-gradient(135deg, rgba(23,74,126,.15), rgba(0,166,178,.15));
  display:flex;align-items:center;justify-content:center;margin-bottom:10px;color:var(--brand-primary)
}
.feature-card h3{margin:0 0 6px}
.feature-card p{margin:0 0 10px;color:var(--neutral-700)}
.feature-card__link{font-weight:600}

/* ========== KPI ========== */
.kpi-row{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin:24px 0; }
.kpi-item{ background:#fff; border:1px solid var(--neutral-200); border-radius:14px; padding:16px; text-align:center; }
.kpi-value{ display:block; font-weight:800; font-size:1.6rem; color: var(--brand-primary); }
.kpi-label{ display:block; color: var(--neutral-700); }
@media (max-width:1024px){ .kpi-row{ grid-template-columns:1fr 1fr } }
@media (max-width:640px){ .kpi-row{ grid-template-columns:1fr } }

/* ========== Stepper (Como trabalhamos) ========== */
.stepper{ counter-reset: step; list-style:none; padding:0; margin:0; display:grid; gap:10px; }
.stepper li{
  position:relative; padding:12px 12px 12px 46px;
  border:1px solid var(--neutral-200); border-radius:12px; background:#fff;
}
.stepper li::before{
  counter-increment: step; content: counter(step);
  position:absolute; left:12px; top:12px; width:24px; height:24px; border-radius:999px;
  display:grid; place-items:center; font-weight:700; color:#fff; background: var(--brand-secondary);
}

/* ========== Audience cards ========== */
.audience-cards{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.audience-card{ background:#fff; border:1px solid var(--neutral-200); border-radius:14px; padding:16px; }
@media (max-width:1024px){ .audience-cards{ grid-template-columns:1fr 1fr } }
@media (max-width:640px){ .audience-cards{ grid-template-columns:1fr } }

/* ========== Listas e Prosa ========== */
.checklist{ margin:12px 0 0; padding-left:18px }
.checklist li{ margin:6px 0 }

.icon-list{ list-style:none; padding:0; margin:0; display:grid; gap:8px }
.icon-list .icon{
  width:14px; height:14px; display:inline-block; border-radius:3px; margin-right:8px;
  background: linear-gradient(135deg, rgba(23,74,126,.9), rgba(0,166,178,.9));
}
.icon-bullets{ list-style:none; padding:0; margin:0; display:grid; gap:8px }
.icon-bullets li{ position:relative; padding-left:28px }
.icon-bullets li::before{
  content:""; position:absolute; left:0; top:4px; width:18px; height:18px; border-radius:6px;
  background: linear-gradient(135deg, rgba(23,74,126,.9), rgba(0,166,178,.9));
  -webkit-mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23fff" d="M9.5 16.2 5.8 12.5l1.4-1.4 2.3 2.3 6.3-6.3 1.4 1.4-7.7 7.7z"/></svg>') center/14px 14px no-repeat;
          mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="%23fff" d="M9.5 16.2 5.8 12.5l1.4-1.4 2.3 2.3 6.3-6.3 1.4 1.4-7.7 7.7z"/></svg>') center/14px 14px no-repeat;
}
.prose{ max-width:72ch }

/* ========== CTA final (sobre) ========== */
.about-cta{ margin:36px 0 }
.about-cta__inner{
  border:1px solid var(--neutral-200); border-radius:16px; padding:24px; text-align:center;
  background: linear-gradient(180deg, rgba(23,74,126,.05), rgba(0,166,178,.05));
}

/* ========== Case — auxiliares ========== */
.case-meta{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 0;padding:0;list-style:none}
.case-meta li{border:1px solid var(--neutral-200);border-radius:999px;padding:4px 10px;font-size:.85rem}

.case-detail{ border:1px solid var(--neutral-200); border-radius: var(--radius-xl); padding:24px; background: var(--surface-soft); }
.case-detail__header{ display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; }
.case-detail__title{ margin:0; }
.meta-chips{ display:flex; gap:8px; flex-wrap:wrap }
.meta-chips .chip{ border:1px solid var(--neutral-200); border-radius:999px; padding:6px 10px; font-size:.85rem; background:#fff; }

.case-detail__grid{ display:grid; gap:24px; grid-template-columns:1.2fr 1fr; align-items:start; }
.case-panel{ background:#fff; border:1px solid var(--neutral-200); border-radius:16px; padding:16px; box-shadow: var(--shadow-sm); position:sticky; top:88px; }
.case-figure{ border:1px solid var(--neutral-200); border-radius:12px; overflow:hidden; margin-bottom:12px; box-shadow: var(--shadow-sm); }
.case-figure img{ display:block; width:100%; height:auto; }

.feature-card__image{ display:block; border-radius:12px; overflow:hidden; }
.feature-card__image img{ display:block; width:100%; height: var(--case-card-thumb-h); object-fit:cover; object-position:center; }

.case-detail aside img{ width:100%; max-height: var(--case-detail-img-h); object-fit:contain; border:1px solid var(--neutral-200); border-radius:12px; }
.case-detail .note{ color: var(--neutral-700); font-size:.9rem; margin:.5rem 0 0 }
.callout{ border-left:4px solid var(--brand-primary); padding-left:12px; margin:8px 0 }
.case-cta{ display:flex; gap:12px; flex-wrap:wrap; margin-top:12px; }
.case-cta .btn{ box-shadow: var(--shadow-sm) }

@media (max-width:1024px){
  .case-detail__grid{ grid-template-columns:1fr }
  .case-panel{ position:static }
}

/* ========== Section cards ========== */
.section-card{ background:#fff; border:1px solid var(--neutral-200); border-radius:16px; padding:16px; box-shadow: var(--shadow-sm); }
.section-card + .section-card{ margin-top:16px }
.section-card h3{ margin-top:0 }

/* ========== Comparativo ========== */
.compare{ margin:36px 0; overflow-x:auto; }
.compare-grid{ display:grid; gap:16px; grid-template-columns: 1.2fr 1fr 1fr 1fr; }
.plan-card{ background:#fff; border:1px solid var(--neutral-200); border-radius:16px; padding:16px; text-align:center; box-shadow:0 2px 6px rgba(0,0,0,.04); }
.plan-card h3{ margin:0 0 4px }
.plan-card .badge{ display:inline-block; margin:6px 0 10px }
.plan-features{ list-style:none; margin:0; padding:0; display:grid; gap:8px; text-align:left }
.plan-cta{ margin-top:12px }

/* Responsivo para planos */
@media (max-width: 1024px) {
  .compare-grid{ grid-template-columns: 1fr 1fr; } /* 2 colunas em tablets */
}

@media (max-width: 768px) {
  .compare-grid{ grid-template-columns: 1fr; } /* 1 coluna em mobile */
  .compare{ overflow-x: visible; } /* remove scroll horizontal */
}

/* ========== FAQ ========== */
.faq{ margin:36px 0 }
.faq details{ border:1px solid var(--neutral-200); border-radius:12px; padding:12px; background:#fff; margin-bottom:10px; }
.faq summary{ cursor:pointer; font-weight:600 }
.faq p{ margin:8px 0 0 }

/* ========== Carousel (controles/dots) ========== */
.carousel__controls{
  position:absolute; inset:auto 0 0 0; display:flex; gap:12px; align-items:center; justify-content:center;
  padding:20px; background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(0,0,0,.08) 60%, rgba(0,0,0,.16) 100%);
}
.carousel__prev, .carousel__next, .carousel__toggle{
  border:none; border-radius:50%; width:48px; height:48px; cursor:pointer;
  background:#fff; box-shadow: var(--shadow-sm);
  display:flex; align-items:center; justify-content:center; transition: transform .2s ease, box-shadow .2s ease;
}
.carousel__prev:hover, .carousel__next:hover, .carousel__toggle:hover{ transform: scale(1.1); box-shadow: var(--shadow-lg); }
.carousel__dots{ display:flex; gap:12px; margin:0 16px; }
.carousel__dots button{
  width:12px; height:12px; border-radius:50%;
  border:2px solid rgba(0,0,0,.25); background:#fff; cursor:pointer; transition: all .2s ease;
}
.carousel__dots button[aria-selected="true"]{ background: var(--brand-primary); border-color: var(--brand-primary); }

/* ========== Utilitários ========== */
.about-section{ margin:32px 0 }
.about-section > h2{ margin-bottom:12px }
[id]{ scroll-margin-top:96px } /* âncoras com header fixo */

/* ==== Fix: ícones SVG no footer (agora sem colapsar o texto) ==== */
.footer-item{
  display:flex;
  align-items:flex-start;
  gap:12px;
  line-height:1.45;             /* texto com altura normal */
}
.footer-item svg{
  width:20px; height:20px; display:block;
  flex:0 0 auto;
  line-height:0;                /* só o ícone zera a linha */
  margin-top:2px;               /* alinha com a 1ª linha do texto */
}
/* links longos (e-mail/endereço) quebram bem */
.footer-list a{ overflow-wrap:anywhere; word-break:break-word; line-height:1.45; }

.service-card__icon, .feature-card__icon { flex:0 0 auto; }  /* não cresce */
.feature-card__icon svg { width:22px; height:22px; display:block; }
.service-card__icon svg { width:24px; height:24px; display:block; }
.footer-item svg         { width:20px; height:20px; display:block; flex:0 0 auto; }
.service-card__icon svg { width:24px; height:24px; display:block; }