/* Binky — CSS compartilhado entre todas as paginas.
   Regras base: variaveis, reset, skip-link, nav, footer, botoes, foco.
   Overrides especificos de pagina ficam no <style> de cada HTML. */

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--text-body);
  background: color-mix(in oklch, var(--binky-paper) 42%, #fff);
  -webkit-font-smoothing: antialiased;
  min-width: 320px;
  overflow-x: clip;
}

a { color: var(--text-title); text-decoration: none; }

a:hover { color: var(--binky-coral-deep); }

img { display: block; max-width: 100%; }

ul { list-style: none; }

button { cursor: pointer; font-family: inherit; }

#page { max-width: 1760px; margin: 0 auto; }

#page p, #page li { text-wrap: pretty; }

#page h1 { line-height: .88; }

#page h2 { line-height: .98; }

#page button, #page a {
  transition: color 160ms var(--ease-standard),
              background 160ms var(--ease-standard),
              opacity 160ms var(--ease-standard);
}

#page button:active, #page a:active { transform: translateY(1px); }

#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 72px;
}

/* Faixa full-bleed: o fundo da testeira vai de borda a borda da tela,
   mas logo e nav seguem alinhados ao grid de 1760px do #page. */
#site-header::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc((100vw - 100%) / -2);
  right: calc((100vw - 100%) / -2);
  background: #fff;
  border-bottom: 1px solid var(--border-hairline);
  z-index: -1;
}

#site-header .logo img { display: block; width: 116px; }

#site-header nav { display: flex; gap: 40px; margin-left: auto; margin-right: 40px; }

#site-header nav a:hover { color: var(--binky-ink); }

#site-header nav a.active {
  color: var(--binky-ink);
  font-weight: 500;
  border-bottom-color: var(--binky-coral);
}

#site-header .header-email:hover { color: var(--binky-coral-deep); }

#menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 10px 0;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  align-items: flex-end;
  margin-left: auto;
}

#mobile-menu {
  display: none;
  position: sticky;
  top: 76px;
  z-index: 99;
  background: var(--binky-ink);
  padding: 24px 24px 32px;
}

#mobile-menu a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.15);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
  min-height: 44px;
}

#mobile-menu a:hover { color: var(--binky-yellow); }

#site-footer .footer-cta em {
  font-family: var(--font-serif-italic);
  font-style: italic;
  font-weight: 400;
  color: var(--binky-coral);
}

#site-footer .footer-cta-row {
  display: flex;
  gap: 24px;
  align-items: center;
  margin-top: 40px;
}

#site-footer .footer-cta-btn:hover { filter: brightness(0.85); color: #fff; }

#site-footer .footer-cta-note { font-size: 18px; color: rgba(255,255,255,0.7); }

#site-footer .footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 88px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,.15);
}

#site-footer .footer-col-title {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--binky-gray-300);
  margin-bottom: 18px;
}

#site-footer .footer-col ul { margin: 0; padding: 0; }

#site-footer .footer-col a:hover { color: var(--binky-gray-400); }

#site-footer .footer-contact {
  display: flex;
  gap: 48px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,.15);
  align-items: flex-start;
}

#site-footer .footer-contact-email a { color: #fff; }

#site-footer .footer-contact-email a:hover { color: var(--binky-gray-300); }

#site-footer .footer-bottom a { color: var(--binky-gray-300); border-bottom: 1px solid rgba(255,255,255,.3); }

#site-footer .footer-bottom a:hover { color: #fff; }

#site-footer .footer-sociais {
  display: flex;
  gap: 24px;
  margin-left: auto;
  align-items: center;
}

#site-footer .footer-sociais a:hover { color: var(--binky-gray-400); }

#site-footer .footer-sociais img { width: 64px; display: block; margin-left: 16px; }

/* Faixa full-bleed do footer, mesmo esquema da testeira */
#site-footer { position: relative; }
#site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc((100vw - 100%) / -2);
  right: calc((100vw - 100%) / -2);
  background: var(--binky-ink);
  z-index: -1;
}

.nav-cta:hover { background: var(--binky-ink); color: white !important; }

.newsletter-form { display: flex; gap: 0; max-width: 420px; }

.newsletter-form input[type="email"]::placeholder { color: var(--binky-gray-400); }

.newsletter-form button {
  background: var(--binky-coral-aa, #C82938); /* AA 5.5:1 com texto branco */
  color: #fff;
  border: none;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  white-space: nowrap;
}

.newsletter-form button:hover { filter: brightness(0.85); }

/* ===== Dropdown Servicos (nav) ===== */
#site-header .nav-drop { position: relative; display: inline-flex; align-items: center; }
#site-header .nav-drop-toggle {
  background: none;
  border: none;
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 400;
  border-bottom: 2px solid transparent;
  padding: 0 0 3px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 160ms, border-color 160ms;
}
#site-header .nav-drop-toggle::after { content: "\25BE"; font-size: 11px; line-height: 1; }
#site-header .nav-drop-toggle:hover,
#site-header .nav-drop:hover .nav-drop-toggle { color: var(--binky-ink); }
#site-header .nav-drop-toggle.active {
  color: var(--binky-ink);
  font-weight: 500;
  border-bottom-color: var(--binky-coral);
}
#site-header .nav-drop-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -24px;
  min-width: 264px;
  background: #fff;
  border: 1px solid var(--border-hairline);
  border-top: 2px solid var(--binky-coral);
  padding: 10px 0;
  z-index: 120;
}
#site-header .nav-drop-menu.open { display: block; }
#site-header .nav-drop-menu a {
  display: block;
  padding: 12px 24px;
  font-size: 15px;
  color: var(--binky-graphite);
  border-bottom: none;
  min-height: 0;
}
#site-header .nav-drop-menu a:hover { color: var(--binky-coral-deep); background: var(--binky-paper); }
#site-header .nav-drop-menu a.active { color: var(--binky-ink); font-weight: 600; }

/* ===== Mobile menu groups ===== */
#mobile-menu .mobile-group {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--binky-yellow);
  margin: 28px 0 10px;
}
#mobile-menu .mobile-group:first-child { margin-top: 0; }

/* ===== Breadcrumbs ===== */
.breadcrumbs {
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumbs a {
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-hairline);
  padding-bottom: 1px;
}
.breadcrumbs a:hover { color: var(--binky-coral-deep); border-bottom-color: var(--binky-coral); }
.breadcrumbs [aria-current] { color: var(--binky-ink); }
.breadcrumbs .sep { margin: 0 8px; color: var(--binky-gray-400); }

/* ===== Case: servico relacionado + pager ===== */
.case-servico {
  padding: 96px 72px;
  border-top: 1px solid var(--border-hairline);
  background: var(--binky-paper);
}
.case-servico h2 {
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--binky-ink);
  max-width: 980px;
  margin: 0 0 20px;
}
.case-servico p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-body);
  max-width: 640px;
  margin: 0 0 32px;
}
.case-servico-link {
  font-size: 18px;
  font-weight: 600;
  color: var(--binky-coral-deep);
  border-bottom: 2px solid var(--binky-coral);
  padding-bottom: 3px;
}
.case-servico-link:hover { color: var(--binky-ink); border-bottom-color: var(--binky-ink); }

.case-pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: center;
  padding: 40px 72px;
  border-top: 1px solid var(--border-hairline);
}
.case-pager-item { display: block; }
.case-pager-next { text-align: right; justify-self: end; }
.case-pager-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.case-pager-name { display: block; font-size: 18px; font-weight: 600; color: var(--binky-ink); }
.case-pager-item:hover .case-pager-name { color: var(--binky-coral-deep); }
.case-pager-count { font-size: 15px; color: var(--text-muted); }

@media (max-width: 768px) {
  .case-servico { padding: 64px 24px; }
  .case-servico h2 { font-size: 32px; }
  .case-pager { grid-template-columns: 1fr; gap: 24px; padding: 32px 24px; }
  .case-pager-next { text-align: left; justify-self: start; }
}

/* ===== Cases relacionados (paginas de servico) ===== */
.case-related {
  margin-top: 28px;
  font-size: 15px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: baseline;
}
.case-related a {
  color: var(--binky-graphite);
  border-bottom: 1px solid var(--border-hairline);
  padding-bottom: 1px;
}
.case-related a:hover { color: var(--binky-coral-deep); border-bottom-color: var(--binky-coral); }

/* ===== Veja tambem ===== */
.veja-tambem {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-hairline);
  border: 1px solid var(--border-hairline);
}
.vt-card {
  display: block;
  background: #fff;
  padding: 32px 28px;
  transition: background 160ms;
}
.vt-card:hover { background: var(--binky-coral-soft); }
.vt-title { display: block; font-size: 22px; font-weight: 700; color: var(--binky-ink); margin-bottom: 10px; letter-spacing: -0.02em; }
.vt-card:hover .vt-title { color: var(--binky-coral-deep); }
.vt-desc { display: block; font-size: 15px; line-height: 1.55; color: var(--text-muted); }
@media (max-width: 768px) {
  .veja-tambem { grid-template-columns: 1fr; }
}

#site-header .header-email { margin-left: 24px; }

/* ===== Faixa de foto full-bleed (páginas de serviço) ===== */
.page-photo {
  height: 440px;
  overflow: hidden;
  background: var(--binky-gray-200);
}
.page-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 768px) {
  .page-photo { height: 280px; }
}

/* ===== A11y (item 40) ===== */
:root { --binky-coral-text: #C82938; } /* coral para texto pequeno sobre fundo claro (AA: 5.5 branco, 4.8 paper, 4.5 coral-soft) */

input:focus-visible,
textarea:focus-visible,
select:focus-visible,
button:focus-visible {
  outline: 2px solid var(--binky-coral-deep);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Scroll reveal compartilhado (js/reveal.js) ===== */
/* Só esconde quando o script rodou (html.reveal-on): sem JS, tudo visível */
.reveal-on .reveal {
  opacity: 0;
  transform: translateY(24px);
}
.reveal-on .reveal.entered {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 600ms cubic-bezier(0.2, 0, 0.2, 1),
              transform 600ms cubic-bezier(0.2, 0, 0.2, 1);
}
.reveal-on .stagger {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms cubic-bezier(0.2, 0, 0.2, 1),
              transform 500ms cubic-bezier(0.2, 0, 0.2, 1);
}
.reveal-on .reveal.entered .stagger:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 60ms; }
.reveal-on .reveal.entered .stagger:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 140ms; }
.reveal-on .reveal.entered .stagger:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 220ms; }
.reveal-on .reveal.entered .stagger:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 300ms; }
.reveal-on .reveal.entered .stagger:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 380ms; }
.reveal-on .reveal.entered .stagger:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 460ms; }
.reveal-on .reveal.entered .stagger:nth-child(7) { opacity: 1; transform: translateY(0); transition-delay: 540ms; }
.reveal-on .reveal.entered .stagger:nth-child(8) { opacity: 1; transform: translateY(0); transition-delay: 620ms; }
@media (prefers-reduced-motion: reduce) {
  .reveal-on .reveal,
  .reveal-on .stagger { opacity: 1; transform: none; }
}

/* ===== Moldura deslocada — fotos soltas (motivo de marca) ===== */
.photo-frame {
  position: relative;
  display: block;
  margin: 0 var(--frame-offset, 12px) var(--frame-offset, 12px) 0;
}
.photo-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translate(var(--frame-offset, 12px), var(--frame-offset, 12px));
  border: var(--frame-width, 5px) solid var(--binky-coral, #E86E64);
  pointer-events: none;
  z-index: -1;
}
.photo-frame img { display: block; width: 100%; }
.photo-frame--ink::after { border-color: var(--binky-ink, #29292A); }
@media (max-width: 640px) {
  .photo-frame::after { transform: translate(8px, 8px); border-width: 4px; }
}

/* URLs longas em corpo de artigo nunca estouram a tela */
.artigo-body a { overflow-wrap: anywhere; }

/* ===== Viewports estreitos (ate 320px sem rolagem horizontal) ===== */
@media (max-width: 480px) {
  #site-footer .footer-sociais { flex-wrap: wrap; margin-left: 0; row-gap: 12px; }
  .newsletter-form { flex-wrap: wrap; gap: 8px; max-width: 100%; }
  .newsletter-form input[type="email"] { min-width: 0; flex: 1 1 100%; box-sizing: border-box; }
  .newsletter-form button { flex: 0 1 auto; }
}
@media (max-width: 380px) {
  /* CTAs de hero e bandas: nunca mais largos que a tela */
  .btn-solid, .btn-solid-ia, .btn-solid-sinais, .btn-din-cta,
  .footer-cta-btn, .cta-btn, .cta-meio a {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
    white-space: normal;
    padding-left: 20px;
    padding-right: 20px;
  }
  .hero-cta-wrap, .hero-cta, .din-cta-row, .footer-cta-row { flex-wrap: wrap; max-width: 100%; }
  .din-cta-contact { white-space: normal; word-break: break-word; }
  .resultado-texto { max-width: 100%; }
}

/* Subtítulos de categoria no menu (T06) */
.nav-cat { display: block; font-size: 12px; font-weight: 400; color: var(--text-muted, #6b6b6c); letter-spacing: 0.01em; margin-top: 2px; }
#site-footer .nav-cat { display: none; }

/* ---- Regras compartilhadas consolidadas (T14) ---- */
.skip-link:focus{top:0}
#site-header .header-email { font-size: 16px; font-weight: 500; color: var(--binky-ink); border-bottom: 2px solid var(--binky-coral); padding-bottom: 3px; }
#mobile-menu a.active { color: var(--binky-yellow); }
#mobile-menu .mobile-contact { margin-top: 20px; font-size: 16px; color: var(--binky-gray-400); }
#site-footer .footer-cta { font-size: 96px; line-height: 0.88; letter-spacing: -0.04em; font-weight: 700; max-width: 1000px; }
#site-footer .footer-col li { margin-bottom: 10px; }
#site-footer .footer-col a { font-size: 16px; color: #fff; }
#site-footer .footer-newsletter { margin-top: 56px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,.15); }
.newsletter-form input[type="email"] { flex: 1; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-right: none; padding: 12px 16px; font-size: 16px; font-family: var(--font-sans); color: #fff; outline: none; }
#site-footer .footer-contact-bio { flex: 1; max-width: 420px; font-size: 16px; line-height: 1.7; color: rgba(255,255,255,0.7); }
#site-footer .footer-contact-email { font-size: 16px; line-height: 1.7; color: #fff; }
#site-footer .footer-contact-addr { font-size: 16px; line-height: 1.7; color: rgba(255,255,255,0.7); }
#site-footer .footer-sociais a { font-size: 16px; color: #fff; border-bottom: 2px solid var(--binky-coral); padding-bottom: 2px; }
#site-footer .footer-bottom { display: flex; justify-content: space-between; margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.15); font-size: 14px; color: var(--binky-gray-300); }

/* ---- Ficha de escopo por serviço (T06) ---- */
.ficha-escopo { margin: 0 72px; padding: 56px 0; border-top: 1px solid var(--border-hairline); }
.ficha-escopo dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px 56px; margin-top: 28px; }
.ficha-escopo dt { font-weight: 700; font-size: 16px; color: var(--binky-ink); margin-bottom: 8px; }
.ficha-escopo dd { font-size: 16px; line-height: 1.7; color: var(--binky-gray-700, #3f3f41); }
@media (max-width: 768px) {
  .ficha-escopo { margin: 0 24px; padding: 40px 0; }
  .ficha-escopo dl { grid-template-columns: 1fr; gap: 28px; }
}
