/* ==========================================================================
   CriaWeb · Redesign v5 (padrão Code Makers, dourado no lugar do vermelho)
   Camada global carregada por último. Não altera rotas, scripts nem chamadas.
   Arquivo editável: não é necessário build para alterar.
   ========================================================================== */

/* ---------- 1. Tokens ----------
   Tipografia: Bricolage Grotesque (títulos) e Geist (texto), ambas já hospedadas
   pelo próprio site em /external. Nenhuma fonte externa é necessária. */
:root {
  --background: 0 0% 4%;
  --foreground: 40 20% 96%;
  --card: 0 0% 7%;
  --card-foreground: 40 20% 96%;
  --popover: 0 0% 8%;
  --popover-foreground: 40 20% 96%;
  --primary: 44 100% 59%;
  --primary-foreground: 0 0% 6%;
  --secondary: 0 0% 11%;
  --secondary-foreground: 40 20% 94%;
  --muted: 0 0% 10%;
  --muted-foreground: 40 4% 62%;
  --accent: 44 100% 70%;
  --accent-foreground: 0 0% 6%;
  --destructive: 0 72% 55%;
  --border: 0 0% 100% / 0.08;
  --input: 0 0% 100% / 0.1;
  --ring: 44 100% 59%;
  --radius: 14px;

  --cw-bg: #070707;
  --cw-surface-1: #0d0d0e;
  --cw-surface-2: #131314;
  --cw-surface-3: #1a1a1c;
  --cw-line: rgb(255 255 255 / 0.08);
  --cw-line-strong: rgb(255 255 255 / 0.14);
  --cw-text: #f4f2ec;
  --cw-muted: #a2a09a;
  --cw-gold: #ffc629;
  --cw-gold-hi: #ffdd6b;
  --cw-gold-lo: #d9980c;
  --cw-gold-grad: linear-gradient(135deg, #ffe38a 0%, #ffc629 55%, #d9980c 100%);
  --cw-gold-soft: rgb(255 198 41 / 0.12);
  --cw-gold-line: rgb(255 198 41 / 0.28);
  --cw-shadow-card: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 18px 40px -22px rgb(0 0 0 / 0.8);
  --cw-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --cw-font-display: "Bricolage Grotesque", "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cw-font-body: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- 2. Base ---------- */
html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  background: var(--cw-bg);
}
body {
  margin: 0;
  min-height: 100%;
  background-color: var(--cw-bg);
  color: var(--cw-text);
  font-family: var(--cw-font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
#root { min-height: 100vh; min-height: 100dvh; width: 100%; min-width: 0; }
img, svg, video, canvas, iframe { max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4, .font-display {
  font-family: var(--cw-font-display);
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--cw-text);
}
h1 { font-weight: 650; }
h2, h3 { font-weight: 600; }
p { color: inherit; }

::selection { background: rgb(255 198 41 / 0.32); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: rgb(255 198 41 / 0.3) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgb(255 198 41 / 0.22); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgb(255 198 41 / 0.42); background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* Atmosfera: brilho dourado discreto no fundo (fixo, sem custo de layout) */
body {
  background-image:
    radial-gradient(1100px 620px at 80% -10%, rgb(255 196 60 / 0.10), transparent 62%),
    radial-gradient(900px 520px at 4% 105%, rgb(255 160 30 / 0.07), transparent 60%);
  background-attachment: fixed;
}

/* ---------- 3. Layout que ocupa o espaço ao lado do menu ---------- */
/* Evita colunas com largura fixa e rolagem horizontal desnecessária */
main, [role="main"] { min-width: 0; max-width: 100%; }
#root > *, #root > * > * { min-width: 0; }
/* Blocos de conteúdo ocupam a largura disponível */
main > section, main > div { max-width: 100%; }

/* ---------- 4. Botões ---------- */
button, [role="button"] { font-family: var(--cw-font-body); }
button:not([disabled]), a[class*="rounded"] {
  transition: transform .25s var(--cw-ease), box-shadow .35s var(--cw-ease),
              background-color .25s var(--cw-ease), color .25s var(--cw-ease),
              border-color .25s var(--cw-ease), opacity .25s var(--cw-ease);
}
button:hover:not([disabled]) { transform: translateY(-1px); }
button:active:not([disabled]) { transform: translateY(0) scale(.985); }
button[disabled], [aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* Primário: CTA branco/claro vira dourado de marca */
button[class~="bg-white"]:not([disabled]),
a[class~="bg-white"] {
  position: relative;
  background: var(--cw-gold-grad) !important;
  color: #0a0a0a !important;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .55), 0 12px 30px -12px rgb(255 185 40 / .55), 0 0 0 1px rgb(255 211 77 / .35);
  font-weight: 650;
  overflow: hidden;
  isolation: isolate;
}
button[class~="bg-white"]:not([disabled]):hover,
a[class~="bg-white"]:hover { box-shadow: inset 0 1px 0 rgb(255 255 255 / .7), 0 18px 40px -12px rgb(255 185 40 / .7), 0 0 0 1px rgb(255 226 120 / .6); }
button[class~="bg-white"]::after, a[class~="bg-white"]::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / .55) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .9s var(--cw-ease);
}
button[class~="bg-white"]:hover::after, a[class~="bg-white"]:hover::after { transform: translateX(120%); }

/* Secundário: vidro com contorno que acende no hover */
[class*="border-white/15"][class*="bg-white/"], [class*="border-white/10"][class*="bg-white/"] {
  background: var(--cw-surface-2) !important;
  border-color: var(--cw-gold-line) !important;
}
[class*="border-white/15"][class*="bg-white/"]:hover { border-color: rgb(255 198 41 / .6) !important; background: rgb(255 198 41 / .07) !important; }

/* ---------- 5. Campos de formulário ---------- */
input, select, textarea {
  font-family: var(--cw-font-body);
  color: var(--cw-text);
  transition: border-color .25s var(--cw-ease), box-shadow .25s var(--cw-ease), background-color .25s var(--cw-ease);
}
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea {
  min-height: 44px;
}
input:focus, select:focus, textarea:focus {
  border-color: rgb(255 198 41 / .7) !important;
  box-shadow: 0 0 0 4px rgb(255 198 41 / .14) !important;
  outline: none;
}
input::placeholder, textarea::placeholder { color: rgb(170 166 156 / .6); }
label { color: var(--cw-text); }
:focus-visible { outline: 2px solid rgb(255 198 41 / .85); outline-offset: 3px; border-radius: 10px; }

/* ---------- 6. Cartões e superfícies ---------- */
[class*="rounded-2xl"][class*="border"],
[class*="rounded-3xl"][class*="border"] {
  box-shadow: var(--cw-shadow-card);
}
[class*="rounded-2xl"][class*="border"][class*="bg-card"],
[class*="rounded-3xl"][class*="border"][class*="bg-card"] {
  background: linear-gradient(180deg, rgb(255 255 255 / .03), rgb(255 255 255 / .01)), var(--cw-surface-1);
}
/* Cartões clicáveis elevam sutilmente */
[class*="rounded-2xl"][class*="border"][class*="cursor-pointer"]:hover,
[class*="rounded-3xl"][class*="border"][class*="cursor-pointer"]:hover {
  border-color: var(--cw-gold-line);
  transform: translateY(-2px);
}
[class*="rounded-2xl"][class*="border"][class*="cursor-pointer"],
[class*="rounded-3xl"][class*="border"][class*="cursor-pointer"] { transition: transform .3s var(--cw-ease), border-color .3s var(--cw-ease); }

/* ---------- 7. Tabelas ---------- */
table { border-collapse: separate; border-spacing: 0; width: 100%; }
thead th, th {
  font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
  color: var(--cw-muted); text-align: left; padding: 12px 14px;
  background: rgb(255 255 255 / .02); border-bottom: 1px solid var(--cw-line);
}
td { padding: 12px 14px; border-bottom: 1px solid var(--cw-line); vertical-align: middle; }
tbody tr { transition: background-color .2s var(--cw-ease); }
tbody tr:hover { background: rgb(255 198 41 / .04); }
/* Tabela sempre rola na horizontal dentro de seu contêiner, nunca na página */
div:has(> table), .overflow-x-auto { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- 8. Modais e diálogos ---------- */
dialog, [role="dialog"], [role="alertdialog"] {
  background: var(--cw-surface-1);
  color: var(--cw-text);
  border: 1px solid var(--cw-gold-line);
  border-radius: 20px;
  box-shadow: 0 30px 90px -20px rgb(0 0 0 / .85), 0 0 0 1px rgb(255 198 41 / .06);
  max-width: calc(100vw - 24px);
}
dialog::backdrop { background: rgb(0 0 0 / .65); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
[data-state="open"][class*="fixed"][class*="inset-0"][class*="bg-black"] { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* ---------- 9. Navegação e menu lateral ---------- */
header, nav[class*="fixed"], aside { -webkit-backdrop-filter: saturate(150%) blur(14px); backdrop-filter: saturate(150%) blur(14px); }
aside { border-color: var(--cw-line) !important; }
[aria-current="page"], [data-active="true"], [class*="is-active"] {
  color: var(--cw-gold-hi) !important;
}
/* Textos de destaque (antes em vermelho/roxo) */
[class*="text-primary"] { color: var(--cw-gold-hi); }
main a:not([class*="button"]):not([class*="btn"]):hover { color: var(--cw-gold-hi); }

/* ---------- 10. Selos e badges ---------- */
.cw-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--cw-gold-line); background: var(--cw-gold-soft);
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--cw-gold-hi);
}
.cw-gold-text { background: var(--cw-gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- 11. Movimento (respeita prefers-reduced-motion) ---------- */
@keyframes cw-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes cw-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes cw-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@media (prefers-reduced-motion: no-preference) {
  main section, [role="main"] > section { animation: cw-rise .7s var(--cw-ease) both; }
  main section:nth-of-type(2) { animation-delay: .07s; }
  main section:nth-of-type(3) { animation-delay: .14s; }
  main section:nth-of-type(4) { animation-delay: .21s; }
  [class*="animate-pulse"] {
    background-image: linear-gradient(100deg, transparent 30%, rgb(255 198 41 / .12) 50%, transparent 70%);
    background-size: 200% 100%; animation: cw-shimmer 1.6s linear infinite;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- 12. Responsividade ---------- */
@media (max-width: 1024px) {
  body { font-size: 14.5px; }
}
@media (max-width: 768px) {
  body { font-size: 14px; }
  h1 { font-size: clamp(28px, 8vw, 40px); }
  h2 { font-size: clamp(22px, 6vw, 30px); }
  dialog, [role="dialog"] { width: calc(100vw - 20px) !important; max-height: calc(100dvh - 20px); overflow: auto; }
  table { font-size: 13px; }
  td, th { padding: 10px 10px; }
  button:not([disabled]) { min-height: 40px; }
}
@media (max-width: 420px) {
  body { font-size: 13.5px; }
}

/* ---------- 13. Área de prospecção (iframe) ---------- */
.cw-p, .cw-makers-panel { width: 100%; max-width: 100%; min-width: 0; }
.cw-p iframe, .cw-makers-panel iframe { display: block; width: 100% !important; max-width: 100%; }
