/* ==========================================================================
   DAISYSTEMS IMPROVEMENTS v1.0
   Melhorias globais de design para daisystems.com.br
   Carregar APÓS main.css em todas as páginas:
   <link rel="stylesheet" href="/daisystems-improvements.css" />
   ========================================================================== */

/* --------------------------------------------------------------------------
   VARIÁVEIS DE MELHORIA
   Complementa as variáveis de main.css sem sobrescrever paleta existente
-------------------------------------------------------------------------- */
:root {
  /* WhatsApp brand */
  --whatsapp:        #25D366;
  --whatsapp-dark:   #128C7E;
  --whatsapp-shadow: rgba(37, 211, 102, 0.28);

  /* Footer escuro — índigo próximo do primary para coerência */
  --footer-bg:           #1a1a2e;
  --footer-text:         rgba(255, 255, 255, 0.65);
  --footer-heading:      #ffffff;
  --footer-link:         rgba(255, 255, 255, 0.58);
  --footer-link-hover:   #ffffff;
  --footer-border:       rgba(255, 255, 255, 0.09);

  /* Grain overlay */
  --grain-opacity: 0.042;
}


/* ==========================================================================
   1. FOOTER ESCURO
   Separação visual clara entre conteúdo e rodapé.
   Passa WCAG AA: branco (#fff) sobre #1a1a2e = 18.5:1 ratio.
========================================================================== */

.site-footer {
  background: var(--footer-bg);
  border-top: none;
  margin-top: 0;
}

/* Textos do footer — branco com opacidade para hierarquia */
.footer-grid p,
.footer-bottom {
  color: var(--footer-text);
}

/* Headings do footer — destaque */
.footer-grid h2 {
  color: var(--footer-heading);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

/* Links do footer */
.footer-links a {
  color: var(--footer-link);
  transition: color 0.18s ease;
}

.footer-links a:hover {
  color: var(--footer-link-hover);
}

/* Linha divisória inferior do footer */
.footer-bottom {
  border-top: 1px solid var(--footer-border);
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.88rem;
}

/* Logo no footer — inverte para branco sobre fundo escuro.
   Se existir /imagens/logo-nova-branca.webp, preferir essa no HTML
   e remover este filtro. */
.footer-logo {
  filter: brightness(0) invert(1);
  opacity: 0.90;
}

/* Botão do footer — ghost sobre fundo escuro */
.btn-footer {
  background: transparent;
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  box-shadow: none;
}

.btn-footer:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.46);
  transform: translateY(-2px);
  box-shadow: none;
}


/* ==========================================================================
   2. WHATSAPP FLOATING BUTTON — cor oficial da marca
   Verde reconhecível globalmente: usuários agem por memória muscular.
========================================================================== */

.whatsapp-floating {
  background: var(--whatsapp);
  box-shadow: 0 16px 34px var(--whatsapp-shadow);
  transition: background 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.whatsapp-floating:hover {
  background: var(--whatsapp-dark);
  box-shadow: 0 20px 42px rgba(37, 211, 102, 0.38);
  transform: translateY(-2px);
}


/* ==========================================================================
   3. GRAIN OVERLAY NOS HERÓIS
   SVG feTurbulence fractalNoise — textura orgânica invisível ao olho
   mas percebida como "qualidade" pela leitura periférica.
   Opacidade: 4.2% — abaixo do limiar de consciência visual.
========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
}

/* Grain pseudo-element — fica atrás de todo conteúdo (z-index: 0) */
.hero::before {
  content: '';
  position: absolute;
  inset: -2px; /* -2px evita linha de 1px visível nas bordas */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='280' height='280' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 280px 280px;
  opacity: var(--grain-opacity);
  pointer-events: none;
  z-index: 0;
}

/* Conteúdo da hero sempre acima do grain */
.hero .container {
  position: relative;
  z-index: 1;
}

/* Remover overflow:hidden da hero não clicar shadows — compensar */
.hero .hero-visual {
  position: relative;
  z-index: 1;
}


/* ==========================================================================
   4. HIERARQUIA DE BOTÕES — primário domina, secundário recua
   Problema: border rgba(130,10,209,.18) é quase invisível.
   Solução: border-width 1.5px + opacidade 0.32 = claramente "outline".
========================================================================== */

.btn-secondary {
  background: transparent;
  color: var(--primary-dark);
  border: 1.5px solid rgba(130, 10, 209, 0.32);
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(130, 10, 209, 0.06);
  border-color: rgba(130, 10, 209, 0.54);
  transform: translateY(-1px);
  box-shadow: none;
}

/* Botão header — outline sobre fundo claro */
.btn-header {
  border-width: 1.5px;
  border-color: rgba(130, 10, 209, 0.28);
}


/* ==========================================================================
   5. CTA BOX — mais personalidade visual
   Gradiente sutil de roxo no canto traz on-brand sem ser agressivo.
========================================================================== */

.cta-box {
  background: linear-gradient(
    145deg,
    #ffffff 0%,
    #fdf9ff 55%,
    #ede5ff 100%
  );
  border: 1px solid rgba(130, 10, 209, 0.10);
  box-shadow: 0 24px 60px rgba(130, 10, 209, 0.08);
}


/* ==========================================================================
   6. CARDS — hover refinado e imagens consistentes
   Padroniza border-radius 12px em todas as imagens de card.
========================================================================== */

/* Border-radius consistente em imagens */
.service-thumb,
.hero-visual img,
.side-visual img,
.card-panel > img,
.article-content img {
  border-radius: 12px;
  object-fit: cover;
}

/* Hover de card: translateY(-4px) em 0.2s — mais snappy que 0.24s atual */
.service-link:hover .service-card,
.link-button:hover,
.link-button:focus-visible,
.card-panel:hover:has(.service-cta) {
  transform: translateY(-4px) scale(1.005);
  box-shadow: var(--shadow-lg);
  border-color: rgba(130, 10, 209, 0.20);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Single proof — blockquote com borda editorial */
.single-proof blockquote {
  border-left: 3px solid rgba(130, 10, 209, 0.30);
  border-radius: 0 20px 20px 0;
  background: linear-gradient(180deg, #ffffff 0%, #fdf9ff 100%);
}


/* ==========================================================================
   7. STEP NUMBERS — gradiente sutil, mais visual weight
========================================================================== */

.step-number {
  width: 46px;
  height: 46px;
  font-size: 1rem;
  background: linear-gradient(
    135deg,
    rgba(130, 10, 209, 0.13) 0%,
    rgba(130, 10, 209, 0.06) 100%
  );
  border: 1px solid rgba(130, 10, 209, 0.12);
}


/* ==========================================================================
   8. HEADER — backdrop-filter melhorado
   Aumenta blur de 14px para 16px e adiciona saturação para mais vibrância.
========================================================================== */

.site-header {
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  background: rgba(248, 246, 241, 0.86);
}


/* ==========================================================================
   9. ÍCONES DE SEGMENTO — tamanho aumentado para desktop
========================================================================== */

.segmento-icon {
  width: 44px;
  height: 44px;
}


/* ==========================================================================
   10. PÁGINA SOBRE — melhorias específicas
========================================================================== */

/* Bio byline — substitui o inline style:
   Usar: <p class="bio-byline">Dai — Desenvolvedora...</p>
   em vez de: <p style="margin-top:1.5rem;font-size:.875rem;color:var(--muted);">
*/
.bio-byline {
  margin-top: 1.75rem;
  padding: 16px 20px;
  background: rgba(130, 10, 209, 0.04);
  border-radius: 12px;
  border-left: 3px solid rgba(130, 10, 209, 0.25);
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.7;
}

/* Article layout solo — quando há apenas 1 coluna (seção "Quem está por trás").
   Usar: <div class="container article-layout article-layout--solo">
*/
.article-layout--solo {
  grid-template-columns: 1fr;
  max-width: 800px;
  margin-inline: auto;
}

/* Quote card na seção "Como a DaiSystems trabalha" — mais editorial */
.article-block + .quote-card,
.quote-card {
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: linear-gradient(180deg, #fdf9ff 0%, #f8f6f1 100%);
  padding: 28px;
}

.quote-card strong {
  color: var(--primary-dark);
  display: block;
  margin-bottom: 10px;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}


/* ==========================================================================
   11. PÁGINA CONTATO — formulário melhorado
========================================================================== */

/* Form card — gradiente sutil para separar visualmente */
.form-card {
  background: linear-gradient(180deg, #ffffff 0%, #fdf9ff 100%);
}

/* Select com seta custom — remove aparência nativa do navegador */
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%234B5563' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
  padding-right: 44px;
}

/* Focus ring mais visível e on-brand */
input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(130, 10, 209, 0.11);
  outline: none;
}

/* Contact list — strong com cor de destaque */
.contact-list strong {
  color: var(--primary-dark);
  font-size: 1rem;
  margin-bottom: 6px;
}

/* Separador entre itens do contact-list */
.contact-list > div {
  padding: 16px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.contact-list > div:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.contact-list > div:first-child {
  padding-top: 0;
}


/* ==========================================================================
   12. PÁGINA BLOG — melhorias visuais
========================================================================== */

/* Tag de categoria para artigos — adicionar ao HTML quando disponível:
   <span class="blog-tag">Google Meu Negócio</span>
*/
.blog-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(130, 10, 209, 0.08);
  color: var(--primary-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

/* Hero do blog — mais padding no topo */
.hero.hero--inner {
  padding-top: 60px;
}

/* Cards sem imagem no blog — compensar visualmente */
.service-card:not(:has(.service-thumb)) .service-cta {
  margin-top: auto;
}


/* ==========================================================================
   13. SECTIONS — melhor separação entre seções alt
========================================================================== */

/* Section alt com borda superior sutil */
.section-alt {
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}


/* ==========================================================================
   14. CONTRASTE WCAG AA — textos mínimo #555
   Nota: --muted (#4B5563) já passa WCAG AA (7.1:1).
   Este bloco garante que nenhum text helper vá abaixo de #555.
========================================================================== */

.visual-caption {
  color: #555;
  font-size: 0.93rem;
}

.hero-trust {
  color: #555;
}

.nav-dropdown-link small {
  color: #555;
}

.footer-grid p {
  font-size: 0.94rem;
  line-height: 1.72;
}


/* ==========================================================================
   15. FAQ — melhorias visuais
========================================================================== */

/* FAQ items — ícone de toggle mais sofisticado */
.faq-item summary::after {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(130, 10, 209, 0.07);
  font-size: 1.3rem;
  color: var(--primary-dark);
  transition: background 0.18s ease, transform 0.22s ease;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: '–';
  background: rgba(130, 10, 209, 0.12);
  transform: none;
}

.faq-item summary {
  transition: background 0.18s ease;
  border-radius: var(--radius) var(--radius) 0 0;
}

.faq-item summary:hover {
  background: rgba(130, 10, 209, 0.03);
}


/* ==========================================================================
   16. NAV DROPDOWN — sombra mais suave e moderna
========================================================================== */

.nav-dropdown {
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.06),
    0 16px 40px rgba(130, 10, 209, 0.10);
}


/* ==========================================================================
   17. HERO VISUAL — card com gradiente mais suave
========================================================================== */

.hero-visual {
  background: linear-gradient(160deg, #ffffff 0%, #f8f6f1 100%);
  padding: 16px;
}

.hero-visual img {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
}


/* ==========================================================================
   18. SERVICE CARD — h3 legibility
========================================================================== */

.service-card h3 {
  line-height: 1.25;
  letter-spacing: -0.02em;
}

/* Service CTA — arrow com espaçamento */
.service-cta::after {
  content: " →";
  display: inline-block;
  transform: translateX(0);
  transition: transform 0.18s ease;
}

.service-link:hover .service-cta::after {
  transform: translateX(4px);
}


/* ==========================================================================
   19. MOBILE — ajustes específicos
========================================================================== */

@media (max-width: 760px) {
  /* WhatsApp floating — garantir verde no mobile */
  .whatsapp-floating {
    background: var(--whatsapp);
    box-shadow: 0 12px 28px var(--whatsapp-shadow);
  }

  /* Grain levemente menos intenso em OLED */
  .hero::before {
    opacity: calc(var(--grain-opacity) * 0.75);
  }

  /* Hero overflow no mobile — garantir que nada corte */
  .hero {
    overflow: visible;
  }

  .hero::before {
    overflow: hidden;
    border-radius: 0;
  }

  /* Footer mobile — espaçamento */
  .footer-grid h2 {
    margin-top: 8px;
  }

  /* Bio byline — sem margin-top excessiva no mobile */
  .bio-byline {
    margin-top: 1.25rem;
  }
}


/* ==========================================================================
   20. REDUCED MOTION — respeitar preferência do sistema
========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .hero::before {
    display: none; /* grain pode causar motion sickness em alguns usuários */
  }

  .whatsapp-floating,
  .btn,
  .service-card,
  .card-panel {
    transition: none !important;
    transform: none !important;
  }
}


/* ==========================================================================
   21. PRINT — não imprimir elementos decorativos
========================================================================== */

@media print {
  .hero::before,
  .whatsapp-floating {
    display: none;
  }

  .site-footer {
    background: #fff;
    color: #333;
  }

  .footer-logo {
    filter: none;
  }
}

/* ==========================================================================
   22. SEÇÃO SEGMENTOS DE NEGÓCIO (unificada)
   id="segmentos-negocio"
========================================================================== */

#segmentos-negocio {
  background: #F3F0FF;
}

.sn-badge-wrap {
  text-align: center;
  margin-bottom: 28px;
}

.sn-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #6C3FE8;
  border-radius: 999px;
  padding: 6px 18px 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #6C3FE8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sn-titulo {
  font-size: 38px;
  font-weight: 800;
  color: #1A0F3C;
  text-align: center;
  line-height: 1.25;
  margin: 0 0 20px;
}

.sn-titulo em {
  color: #6C3FE8;
  font-style: italic;
}

.sn-subtitulo {
  font-size: 16px;
  color: #4A4A6A;
  text-align: center;
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.sn-beneficios {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.sn-beneficio {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #1A0F3C;
}

.sn-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #6C3FE8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.sn-card {
  display: block;
  background: #fff;
  border: 1px solid #E8E0FF;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 2px 12px rgba(108, 63, 232, 0.07);
  text-decoration: none;
  color: inherit;
  transition: all 0.22s ease;
  cursor: pointer;
}

.sn-card:hover {
  box-shadow: 0 8px 28px rgba(108, 63, 232, 0.16);
  transform: translateY(-3px);
  border-color: #6C3FE8;
}

.sn-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #EDE8FF;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.sn-card-icon svg {
  width: 24px;
  height: 24px;
  stroke: #6C3FE8;
  color: #6C3FE8;
}

.sn-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1A0F3C;
  margin: 0 0 8px;
}

.sn-card p {
  font-size: 14px;
  color: #4A4A6A;
  line-height: 1.6;
  margin: 0 0 16px;
}

.sn-card-cta {
  font-size: 14px;
  font-weight: 700;
  color: #6C3FE8;
}

.sn-card:hover .sn-card-cta {
  text-decoration: underline;
}

.sn-cta-banner {
  background: #820AD1;
  border-radius: 16px;
  padding: 28px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.sn-cta-esq {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sn-cta-wapp {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #5C2FD8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sn-cta-texto .sn-cta-titulo {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}

.sn-cta-texto .sn-cta-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.sn-cta-btn {
  display: inline-block;
  background: #fff;
  color: #6C3FE8;
  font-size: 14px;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 10px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.sn-cta-btn:hover {
  background: #F0EBFF;
  color: #6C3FE8;
}

@media (max-width: 1024px) {
  .sn-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sn-titulo {
    font-size: 28px;
  }

  .sn-beneficios {
    gap: 20px;
  }

  .sn-cta-banner {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
  }

  .sn-cta-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 767px) {
  .sn-grid {
    grid-template-columns: 1fr;
  }

  .sn-titulo {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sn-card,
  .sn-cta-btn {
    transition: none !important;
    transform: none !important;
  }
}

/* --------------------------------------------------------------------------
   IMAGENS ILUSTRATIVAS
   Wrapper + label discreto para imagens de exemplo/mockup
-------------------------------------------------------------------------- */
.img-ilustrativa-wrapper {
  position: relative;
  display: block;
  line-height: 0;
}
.img-ilustrativa-wrapper img {
  display: block;
  width: 100%;
}
.img-ilustrativa-label {
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(0, 0, 0, 0.38);
  padding: 2px 7px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 2;
  font-style: italic;
  letter-spacing: 0.01em;
}
