/* ============================================================================
   Duo Prime · global.css
   Design tokens, reset, tipografia, navegação, rodapé, botões, utilitários.
   Carregado em TODAS as páginas. Editar aqui propaga para o site inteiro.
   ========================================================================== */

/* ----- reset ----- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .6s ease, color .6s ease;
  overflow-x: hidden;
}

/* ----- design tokens (por tema) ----- */
:root, [data-theme="dark"] {
  /* Editorial Frio — navy escuro + texto marfim + acento dourado */
  --bg: #152535;
  --surface: #1a2c3f;
  --text: #EDEAE2;
  --muted: #8a9aae;
  --accent: #C1935F;
  --rule: rgba(237,234,226,0.12);
  --rule-accent: rgba(193,147,95,0.4);

  --max: 1440px;
  --gutter: 6vw;
  --serif: 'Sora', system-ui, -apple-system, sans-serif;
  --sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --nav-h: 80px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

[data-theme="light"] {
  /* Off-White Arquitetônico — marfim quente + texto navy + acento dourado */
  --bg: #EDEAE2;
  --surface: #F4F1EA;
  --text: #152535;
  --muted: #5a6a7e;
  --accent: #B58348;            /* dourado levemente mais profundo p/ AA no marfim */
  --rule: rgba(21,37,53,0.10);
  --rule-accent: rgba(193,147,95,0.55);
}

[data-theme="inversion"] {
  /* Inversão Dramática — navy ainda mais profundo p/ o selo de fechamento */
  --bg: #0A1219;
  --surface: #121E2A;
  --text: #EDEAE2;
  --muted: #6a7a8e;
  --accent: #D4A876;
  --rule: rgba(212,168,118,0.16);
  --rule-accent: rgba(212,168,118,0.55);
}

/* cada seção pinta-se com seus próprios tokens */
section[data-theme],
footer[data-theme],
.section[data-theme] {
  background: var(--bg);
  color: var(--text);
}

::selection { background: var(--accent); color: var(--bg); }

/* ----- acessibilidade ----- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: #152535;
  padding: 12px 20px;
  font-family: var(--sans);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 12px; top: 12px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ----- tipografia ----- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 0;
}
p { margin: 0; line-height: 1.55; }

.eyebrow {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.rule-h {
  width: 32px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
  flex-shrink: 0;
}

/* ----- botões / CTAs ----- */
.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--bg);
  background: var(--accent);
  border: none;
  padding: 18px 28px;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: transform .25s var(--ease);
}
.cta-primary:hover { transform: translateY(-2px); }
.cta-primary .arrow { transition: transform .25s var(--ease); }
.cta-primary:hover .arrow { transform: translateX(6px); }
.cta-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--accent);
  transform: translate(6px, 6px);
  pointer-events: none;
  transition: transform .25s var(--ease);
}
.cta-primary:hover::after { transform: translate(8px, 8px); }

.cta-secondary {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--rule-accent);
  padding: 18px 28px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: border-color .3s ease, color .3s ease;
  cursor: pointer;
}
.cta-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ----- arch grid signature (overlay decorativo) ----- */
.arch-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image: linear-gradient(to right, var(--rule) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  opacity: 0.55;
  mask-image: linear-gradient(to bottom, transparent 0, black 80px, black calc(100% - 80px), transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, black 80px, black calc(100% - 80px), transparent 100%);
}

/* ----- spine (linha viva à esquerda) ----- */
.spine {
  position: fixed;
  top: 0; bottom: 0;
  left: calc(var(--gutter) / 2);
  width: 1px;
  background: var(--rule-accent);
  z-index: 45;
  pointer-events: none;
}
.spine::before {
  content: '';
  position: absolute;
  left: -3px; top: 0;
  width: 7px; height: 80px;
  background: linear-gradient(to bottom, transparent, var(--accent), transparent);
  filter: drop-shadow(0 0 8px var(--accent));
  animation: spinePulse 6s ease-in-out infinite;
}
@keyframes spinePulse {
  0%, 100% { transform: translateY(20vh); opacity: 0; }
  50% { transform: translateY(70vh); opacity: 0.8; }
}

/* ----- navegação (header) ----- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--gutter);
  transition: background-color .4s ease, backdrop-filter .4s ease, border-color .4s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--rule);
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  line-height: 1;
  flex-shrink: 0;
}
.nav__brand-lockup {
  height: 36px;
  width: auto;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}
/* troca o logo conforme o tema do body */
body[data-theme="light"] .nav__brand-lockup--dark,
body:not([data-theme="light"]) .nav__brand-lockup--light { display: none; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: nowrap;
}
.nav__link {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  transition: color .2s ease;
  padding: 4px 0;
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .25s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--text); }

.nav__cta {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  padding: 10px 18px 10px 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color .3s ease, color .3s ease;
}
.nav__cta:hover { background: var(--accent); color: var(--bg); }
.nav__cta .arrow { transition: transform .25s ease; }
.nav__cta:hover .arrow { transform: translateX(4px); }

/* ----- botão hambúrguer (mobile) ----- */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform .3s var(--ease), opacity .2s ease;
}
.nav[data-menu-open="true"] .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav[data-menu-open="true"] .nav__toggle span:nth-child(2) { opacity: 0; }
.nav[data-menu-open="true"] .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----- rodapé ----- */
.footer {
  border-top: 1px solid var(--rule);
  padding: 48px var(--gutter) 36px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4vw;
  align-items: flex-start;
  position: relative;
  z-index: 5;
}
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand-symbol { height: 140px; width: auto; display: block; object-fit: contain; }
.footer__col h4 {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
.footer__col p, .footer__col a {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  text-decoration: none;
  display: block;
}
.footer__col a:hover { color: var(--accent); }

.footer__social { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  color: var(--muted);
  text-decoration: none;
  position: relative;
  transition: color .3s ease, transform .3s var(--ease);
}
.footer__social-link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  opacity: 0;
  transition: transform .35s var(--ease), opacity .25s ease;
  z-index: 0;
}
.footer__social-link svg,
.footer__social-link span { position: relative; z-index: 1; }
.footer__social-link:hover { color: var(--bg); transform: translateY(-2px); }
.footer__social-link:hover::before { transform: scale(1); opacity: 1; }

.footer__legal {
  grid-column: 1 / -1;
  margin-top: 60px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 48px;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 10.5px;
  line-height: 1.75;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--muted) 78%, transparent);
}
.footer__legal-links {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-transform: none;
  letter-spacing: 0.02em;
}
.footer__legal-links a { color: var(--muted); text-decoration: none; transition: color .2s ease; }
.footer__legal-links a:hover { color: var(--accent); }

/* ----- botão fixo de WhatsApp (discreto, na paleta — nunca verde padrão) ----- */
.wa-fab {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  z-index: 48;                 /* abaixo do nav (50), acima do conteúdo */
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  background: color-mix(in srgb, #152535 90%, transparent);
  color: var(--accent);
  border: 1px solid rgba(193, 147, 95, 0.45);
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(10, 18, 25, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .4s ease, transform .4s var(--ease),
              background-color .3s ease, color .3s ease, border-color .3s ease;
  pointer-events: none;
}
.wa-fab.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.wa-fab:hover,
.wa-fab:focus-visible {
  background: var(--accent);
  color: #152535;
  border-color: var(--accent);
  transform: translateY(-2px);
}
.wa-fab svg { flex-shrink: 0; }
@media (max-width: 600px) {
  .wa-fab {
    padding: 0;
    width: 52px; height: 52px;
    justify-content: center;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  .wa-fab__label { display: none; }
}

/* ----- nav responsiva ----- */
@media (max-width: 1180px) {
  .nav__links { gap: 18px; }
  .nav__link { font-size: 12.5px; }
}
@media (max-width: 980px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 24px var(--gutter) 40px;
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--rule);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform .3s var(--ease), opacity .3s ease;
  }
  .nav[data-menu-open="true"] .nav__links {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav__link {
    font-size: 16px;
    padding: 14px 0;
    width: 100%;
    border-bottom: 1px solid var(--rule);
  }
  .nav__cta { margin-top: 20px; padding: 14px 22px; }
}

@media (max-width: 760px) {
  .footer { grid-template-columns: 1fr; gap: 32px; }
}

/* ===== Consentimento de cookies (componente nativo) ===== */
.cc {
  --cc-bg: #172838;
  --cc-text: #EDEAE2;
  --cc-muted: #9fb0c3;
  --cc-accent: #C1935F;
  --cc-line: rgba(193,147,95,.45);
  --cc-hair: rgba(237,234,226,.10);
  font-family: var(--sans);
}
.cc[hidden] { display: none; }

/* camada 1 — banner */
.cc__banner {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: min(960px, calc(100% - 40px));
  z-index: 1000;
  background: var(--cc-bg);
  color: var(--cc-text);
  border: 1px solid var(--cc-hair);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(5,10,16,.5);
  padding: 22px 26px;
  opacity: 0;
  transition: opacity .45s ease, transform .45s var(--ease);
}
.cc__banner.is-in { opacity: 1; transform: translateX(-50%) translateY(0); }
.cc__banner[hidden] { display: none; }
.cc__banner-inner { display: flex; align-items: center; gap: 28px; }
.cc__text { flex: 1; min-width: 0; }
.cc__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.cc__eyebrow {
  display: flex; align-items: center; gap: 10px; margin: 0 0 10px;
  font-family: var(--serif); font-size: 10px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--cc-accent);
}
.cc__rule { width: 24px; height: 1px; background: var(--cc-accent); display: inline-block; }
.cc__copy { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--cc-muted); max-width: 66ch; }
.cc__link { color: var(--cc-accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.cc__link:hover { border-bottom-color: var(--cc-accent); }

/* botões */
.cc__btn {
  font-family: var(--sans); font-size: 13px; font-weight: 500; letter-spacing: 0.02em;
  padding: 11px 18px; border-radius: 8px; cursor: pointer; border: 1px solid transparent;
  background: transparent; color: var(--cc-text); white-space: nowrap;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease, transform .2s ease;
}
.cc__btn:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 2px; }
/* "Aceitar todos" e "Recusar opcionais" compartilham EXATAMENTE o mesmo peso visual */
.cc__btn--equal { border-color: var(--cc-line); color: var(--cc-text); }
.cc__btn--equal:hover { border-color: var(--cc-accent); background: rgba(193,147,95,.12); }
.cc__btn--solid { background: var(--cc-accent); color: #152535; border-color: var(--cc-accent); }
.cc__btn--solid:hover { transform: translateY(-1px); filter: brightness(1.05); }
.cc__btn--ghost { color: var(--cc-muted); padding-left: 6px; padding-right: 6px; }
.cc__btn--ghost:hover { color: var(--cc-accent); }

/* camada 2 — scrim + diálogo */
.cc__scrim {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(8,14,20,.55);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .35s ease;
}
.cc__scrim.is-in { opacity: 1; }
.cc__scrim[hidden] { display: none; }
.cc__dialog {
  position: fixed; z-index: 1001; left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(.98);
  width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 48px); overflow: auto;
  background: var(--cc-bg); color: var(--cc-text);
  border: 1px solid var(--cc-hair); border-radius: 14px;
  box-shadow: 0 30px 90px rgba(5,10,16,.6); padding: 32px;
  opacity: 0; transition: opacity .35s ease, transform .35s var(--ease);
}
.cc__dialog.is-in { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cc__dialog[hidden] { display: none; }
.cc__title { font-family: var(--serif); font-weight: 600; font-size: 24px; letter-spacing: -0.02em; margin: 6px 0 10px; color: var(--cc-text); }
.cc__desc { margin: 0 0 26px; font-size: 13.5px; line-height: 1.6; color: var(--cc-muted); }

.cc__cats { list-style: none; margin: 0 0 28px; padding: 0; }
.cc__cat { padding: 18px 0; border-top: 1px solid var(--cc-hair); }
.cc__cat:last-child { border-bottom: 1px solid var(--cc-hair); }
.cc__cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.cc__cat-name { font-family: var(--serif); font-weight: 500; font-size: 16px; color: var(--cc-text); }
.cc__cat-state { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--cc-accent); }
.cc__cat-desc { margin: 0; font-size: 13px; line-height: 1.55; color: var(--cc-muted); max-width: 54ch; }

.cc__toggle {
  position: relative; width: 42px; height: 24px; flex-shrink: 0; padding: 0;
  border-radius: 999px; border: 1px solid var(--cc-line); background: rgba(237,234,226,.08);
  cursor: pointer; transition: background-color .25s ease, border-color .25s ease;
}
.cc__toggle-dot {
  position: absolute; top: 50%; left: 3px; transform: translateY(-50%);
  width: 16px; height: 16px; border-radius: 50%; background: var(--cc-muted);
  transition: transform .25s var(--ease), background-color .25s ease;
}
.cc__toggle[aria-checked="true"] { background: rgba(193,147,95,.22); border-color: var(--cc-accent); }
.cc__toggle[aria-checked="true"] .cc__toggle-dot { transform: translateY(-50%) translateX(18px); background: var(--cc-accent); }
.cc__toggle:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 2px; }

.cc__dialog-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* botão de reabrir preferências no footer */
.footer__cc-btn {
  background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  font: inherit; font-size: inherit; letter-spacing: 0.02em; text-transform: none;
  color: var(--muted); transition: color .2s ease;
}
.footer__cc-btn:hover { color: var(--accent); }

/* enquanto o consentimento está aberto, não competir com o FAB no mobile */
@media (max-width: 600px) { .cc-active .wa-fab { display: none; } }

/* responsivo do consentimento */
@media (max-width: 860px) {
  .cc__banner { width: calc(100% - 24px); padding: 20px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .cc__banner-inner { flex-direction: column; align-items: stretch; gap: 18px; }
  .cc__actions { flex-direction: column; }
  .cc__actions .cc__btn { width: 100%; }
  .cc__dialog { padding: 24px; }
  .cc__dialog-actions { flex-direction: column-reverse; }
  .cc__dialog-actions .cc__btn { width: 100%; }
}

/* ----- spine + arch-grid em mobile ----- */
@media (max-width: 768px) {
  /* Spine: mais discreta — permanece como assinatura mas subordinada ao conteúdo */
  .spine { opacity: 0.5; }
  .spine::before {
    left: -1.5px;
    width: 4px;
    height: 50px;
    filter: drop-shadow(0 0 5px var(--accent));
  }
  /* Arch-grid: metade das colunas para evitar densidade visual excessiva */
  .arch-grid {
    background-size: calc(100% / 6) 100%;
    opacity: 0.38;
  }
}
@media (max-width: 480px) {
  /* Spine: quase invisível em telas muito pequenas para liberar área de leitura */
  .spine { opacity: 0.3; }
  .spine::before { opacity: 0; animation: none; }
  .arch-grid {
    background-size: calc(100% / 4) 100%;
    opacity: 0.18;
  }
}

/* ----- redução de movimento ----- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
