@import './tokens.css';

/* ── DM Sans: fontes auto-hospedadas (/public/fonts/) ──────────────────────────── */
  @font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/fonts/dmsans-regular.woff2') format('woff2');
  }
  @font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/fonts/dmsans-semibold.woff2') format('woff2');
  }

  /* global.css — reset, tipografia, utilitários */


*, *::before, *::after {
  box-sizing: border-box;
  border-color: var(--border);
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html, body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* ── Tipografia — sistema global ── */
h1 {
  font-size: 2em;
  line-height: 1.5em;
  font-weight: 700;
  letter-spacing: -0.03em;
}
h2 {
  font-size: 1.5em;
  line-height: 1.5em;
  font-weight: 600;
  letter-spacing: -0.02em;
}
h3 {
  font-size: 1.2em;
  line-height: 1.5em;
  font-weight: 600;
}
h4 {
  font-size: 1em;
  line-height: 1.5em;
  font-weight: 600;
}
p { font-size: 1em; line-height: 1.5em; }

@media (max-width: 768px) {
  h1 { font-size: 8vw; }
  h2 { font-size: 6vw; }
  h3 { font-size: 4.5vw; }
  h4, p { font-size: 4vw; }
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; }
ul { list-style: none; }

::selection {
  background: rgba(16,29,64,0.15);
  color: var(--foreground);
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Utilitários globais ── */
.section-pad {
  padding: 0;
}
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 4em 2em;
}
@media (max-width: 768px) {
  .container { padding: 12vw 3vw; }
}

/* Gradient text */
.text-gradient {
  background: linear-gradient(135deg, #101d40 0%, #1c3060 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Tag pill */
.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(16,29,64,0.08);
  color: var(--primary);
  border: 1px solid rgba(16,29,64,0.18);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  cursor: default;
  white-space: nowrap;
  line-height: 1;
}
.tag-pill.active,
button.tag-pill.active {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}
button.tag-pill { cursor: pointer; }
button.tag-pill:hover:not(.active) {
  background: rgba(16,29,64,0.12);
}

/* Glow dot */
.glow-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(16,29,64,0.25);
  animation: glow-pulse 2s infinite;
}
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(16,29,64,0.25); }
  50% { box-shadow: 0 0 0 6px rgba(16,29,64,0.1); }
}

/* Scroll-x carousel */
.animate-scroll-x {
  display: flex;
  width: max-content;
  animation: scroll-x 30s linear infinite;
}
.animate-scroll-x:hover { animation-play-state: paused; }
@keyframes scroll-x {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Fade-up animation */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { animation: fade-up 0.3s ease-out; }

/* Spinner */
.page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 20rem;
}
.spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Error page */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 1rem;
  text-align: center;
  padding: 2rem;
}
.error-page a {
  display: inline-flex;
  padding: 0.5rem 1.25rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: var(--radius);
  font-weight: 600;
}

/* wp-content styles (WordPress HTML) */
.wp-content { line-height: 1.8; }
.wp-content h2 { font-size: 1.3rem; font-weight: 700; margin-top: 2rem; margin-bottom: 0.75rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
.wp-content h3 { font-size: 1.1rem; font-weight: 600; margin-top: 1.5rem; margin-bottom: 0.5rem; }
.wp-content p  { margin-bottom: 1rem; color: var(--muted-foreground); }
.wp-content ul, .wp-content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.wp-content li { margin-bottom: 0.375rem; color: var(--muted-foreground); }
.wp-content ul { list-style: disc; }
.wp-content ol { list-style: decimal; }
.wp-content strong { color: var(--foreground); font-weight: 600; }
.wp-content a { color: var(--accent); }
.wp-content a:hover { text-decoration: underline; }
.wp-content blockquote { border-left: 3px solid rgba(16,29,64,0.35); margin: 1.5rem 0; padding: 0.75rem 1.25rem; background: var(--surface-2); border-radius: 0 0.5rem 0.5rem 0; color: var(--muted-foreground); font-style: italic; }
.wp-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; font-size: 0.875rem; }
.wp-content th, .wp-content td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; }
.wp-content th { background: var(--surface-2); font-weight: 600; color: var(--foreground); }
.wp-content td { color: var(--muted-foreground); }
.wp-content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }


  /* ── Dark Mode — Framer-inspired: preto puro + hierarquia neutra de cinzas ── */
    [data-theme="dark"] {
      --background:          #000000;
      --surface:             #0c0c0c;
      --surface-2:           #161616;
      --foreground:          #f0f0f0;
      --card:                #111111;
      --card-foreground:     #f0f0f0;
      --primary:             #156df9;
      --primary-glow:        #2e7dfa;
      --primary-foreground:  #ffffff;
      --secondary:           #181818;
      --secondary-foreground:#c8c8c8;
      --muted:               #1c1c1c;
      --muted-foreground:    #898989;
      --accent:              #4a8fff;
      --accent-foreground:   #ffffff;
      --destructive:         #ff4f4f;
      --destructive-foreground: #ffffff;
      --border:              #252525;
      --input:               #181818;
      --ring:                #156df9;
      --shadow-card:         0 4px 24px -4px rgba(0,0,0,0.8);
      --shadow-card-hover:   0 12px 40px -8px rgba(0,0,0,0.92);
      --shadow-primary:      0 8px 24px -4px rgba(21,109,249,0.35);
    }
    [data-theme="dark"] .lang-switcher__dropdown,
    [data-theme="dark"] .lang-portal { background: var(--card); }
  
  /* ── Skeleton Loading ── */
  @keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.45; }
  }
  .skeleton-line {
    height: 1rem;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    margin-bottom: 0.75rem;
  }
  .skeleton-line--sm    { width: 55%; }
  .skeleton-line--md    { width: 78%; }
  .skeleton-line--title { height: 1.5rem; width: 42%; margin-bottom: 1.5rem; }
  .skeleton-block {
    background: var(--surface-2);
    border-radius: var(--radius);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    margin-bottom: 0.75rem;
  }
@media (min-width:1024px){aside.sidebar{height:100%!important}}

  /* ── Barra de Scroll Personalizada ── */
  body::-webkit-scrollbar { width: 10px; }
  body::-webkit-scrollbar-track { background: var(--surface); }
  body::-webkit-scrollbar-thumb {
    background-color: var(--primary);
    border-radius: 10px;
    border: 2px solid var(--surface);
  }
  [data-theme="dark"] body::-webkit-scrollbar-track { background: #000000; }
  [data-theme="dark"] body::-webkit-scrollbar-thumb {
    background-color: #3a3a3a;
    border: 2px solid #000000;
  }
  [data-theme="dark"] body::-webkit-scrollbar-thumb:hover { background-color: #4f4f4f; }
  body { scrollbar-width: thin; scrollbar-color: var(--primary) var(--surface); }
  [data-theme="dark"] body { scrollbar-color: #3a3a3a #000000; }

  /* ── Proteção de imagens (anti-download via CSS) ── */
  img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    user-drag: none;
    -webkit-user-select: none;
    user-select: none;
  }
  
  /* ── Cookie Consent Banner ──────────────────────────────────────────────────── */
  .cookie-consent {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 9000;
    padding: 0 1rem 1.25rem;
    transform: translateY(110%);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
  }
  .cookie-consent--visible { transform: translateY(0); pointer-events: auto; }
  .cookie-consent--hiding  { transform: translateY(110%); pointer-events: none; }

  .cookie-consent__card {
    max-width: 680px; margin: 0 auto;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 -2px 24px rgba(0,0,0,.12);
    overflow: hidden;
  }
  .cookie-consent__progress-track {
    height: 3px; background: var(--border); width: 100%;
  }
  .cookie-consent__progress-bar {
    height: 100%; background: var(--accent); width: 100%;
    transition: width 100ms linear;
  }
  .cookie-consent__body {
    display: flex; align-items: flex-start; gap: 1rem;
    padding: 1rem 1.25rem;
    flex-wrap: wrap;
  }
  .cookie-consent__text {
    flex: 1; font-size: 0.8125rem; color: var(--muted-foreground);
    line-height: 1.6; margin: 0; min-width: 200px;
  }
  .cookie-consent__link {
    color: var(--accent); text-decoration: underline;
    text-underline-offset: 2px;
  }
  .cookie-consent__link:hover { color: var(--accent-hover, var(--accent)); }
  .cookie-consent__actions {
    display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0;
  }
  .cookie-consent__accept {
    padding: 0.4rem 1rem;
    background: var(--accent); color: #fff;
    border: none; border-radius: var(--radius);
    font-size: 0.8125rem; font-weight: 600;
    cursor: pointer; white-space: nowrap;
    transition: opacity 0.15s;
  }
  .cookie-consent__accept:hover { opacity: 0.85; }
  .cookie-consent__close {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid var(--border);
    border-radius: var(--radius); color: var(--muted-foreground);
    cursor: pointer; transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
  }
  .cookie-consent__close:hover { background: var(--border); color: var(--foreground); }

  /* ── Contact Form Extras ────────────────────────────────────────────────────── */
  .form-field-error {
    display: none; font-size: 0.75rem; color: #ef4444;
    margin-top: 0.25rem;
  }
  .form-input--error { border-color: #ef4444 !important; }
  .form-label__optional { color: var(--muted-foreground); font-weight: 400; }
  .contact-form__fields--full { grid-column: 1 / -1; }
  .cf-spinner { animation: cf-spin 0.8s linear infinite; }
  @keyframes cf-spin { to { transform: rotate(360deg); } }

  .contact-form__success {
    text-align: center; padding: 2.5rem 1.5rem;
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 480px; margin: 0 auto;
  }
  .cf-success__icon { margin-bottom: 1rem; }
  .cf-success__title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
  .cf-success__text { font-size: 0.9375rem; color: var(--muted-foreground); line-height: 1.65; }

  /* ── Destaque — degradê dourado em texto (fundos escuros) ──────────────── */
  /* Uso: <span class="destaque">Texto em dourado</span> */
  .destaque {
    background: var(--destaque-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline;
  }

  /* ── Botão Golden — CTA com degradê dourado ────────────────────────────── */
  .btn-golden {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 1rem 1.2rem;
    background: var(--btn-verde-gradient);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: -0.01em;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--btn-verde-shadow);
    -webkit-font-smoothing: antialiased;
  }
  .btn-golden:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(26, 193, 0, 0.45);
    color: #0a0a0a;
  }
  .btn-golden:active {
    transform: translateY(0);
    opacity: 1;
  }
/* ── CSS perosnalizado ────────────────────────────── */
.background-white {background:white}

/* ═══════════════════════════════════════════════════════════════════
   MODAL DE CONTATO GLOBAL — contact-modal.js
   ═══════════════════════════════════════════════════════════════════ */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.contact-modal[hidden] { display: none; }

.contact-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.contact-modal__panel {
  position: relative;
  z-index: 1;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.3);
  animation: modal-in 0.22s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.contact-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted-foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  z-index: 2;
}
.contact-modal__close:hover {
  background: var(--foreground);
  color: var(--background);
}

.contact-modal__body { padding: 2rem 2rem 1.5rem; }

.contact-modal__header { margin-bottom: 1.5rem; }
.contact-modal__header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.375rem;
}
.contact-modal__header p {
  font-size: 0.9rem;
  color: var(--muted-foreground);
}

body.modal-open { overflow: hidden; }

@media (max-width: 540px) {
  .contact-modal { padding: 0; align-items: flex-end; }
  .contact-modal__panel { border-radius: 16px 16px 0 0; max-height: 92vh; }
  .contact-modal__body { padding: 1.5rem 1rem 1rem; }
}
