/* ============================================================
   styles/design-system.css
   Responsabilidade: variáveis globais, reset, tipografia base.
   É o único lugar para mudar cores, fontes e espaçamentos.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* ─── Variáveis — Tema Claro (default) ──────────────────────── */
:root {
  /* Cores principais */
  --brand-primary:         #248AF6;
  --brand-primary-hover:   #096ED9;
  --brand-primary-pressed: #0B5EB8;
  --brand-secondary:       #00BB61;
  --brand-accent:          #FFB125;
  --brand-primary-rgb:     36, 138, 246;

  /* Gradiente navy (banner/CTA) */
  --banner-gradient-1: #101B41;
  --banner-gradient-2: #15214B;
  --banner-gradient-3: #183267;
  --banner-gradient-4: #1C4D93;

  /* Escala de cinza */
  --gray-0:   #FFFFFF;
  --gray-50:  #F7F9FB;
  --gray-100: #F2F5F8;
  --gray-200: #E4EAF1;
  --gray-300: #D1D7DE;
  --gray-400: #8C95A1;
  --gray-600: #4C5561;
  --gray-700: #343C46;
  --gray-800: #1F2530;
  --gray-900: #101B41;

  /* Semânticas — Light */
  --color-bg:        #FFFFFF;
  --color-surface:   #FFFFFF;
  --color-surface-2: #F6F8F9;
  --color-border:    #E9EDF2;
  --color-text:      #171717;
  --color-muted:     #6B6B6B;
  --color-success:   #00BB61;
  --color-warning:   #FFB125;
  --color-error:     #DA2D26;

  /* Azul suave (tints da marca) */
  --brand-soft:        rgba(36, 138, 246, .08);
  --brand-soft-strong: rgba(36, 138, 246, .15);
  --brand-border-soft: #E0EDFF;
  --color-hero-bg:     #F3F8FE;

  /* Tipografia */
  --font-display: 'Poppins', Arial, sans-serif;
  --font-body:    'Poppins', Arial, sans-serif;

  /* Espaçamento */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  40px;
  --space-2xl: 64px;
  --space-3xl: 96px;

  /* Raios */
  --radius-sm:  6px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Sombras */
  --shadow-sm: 0 0 5px 1px rgba(0,0,0,.05);
  --shadow-md: 0 2px 12px rgba(25,25,26,.04), 0 6px 20px rgba(25,25,26,.06);
  --shadow-lg: 0 0 20px rgba(0,0,0,.08), 0 12px 40px rgba(16,27,65,.10);
  --shadow-brand: 0 6px 20px rgba(var(--brand-primary-rgb), .28);

  /* Transições */
  --ease:        cubic-bezier(.4,0,.2,1);
  --ease-spring: cubic-bezier(.22,1,.36,1);
  --duration-fast: 150ms;
  --duration-med:  250ms;
  --duration-slow: 500ms;

  /* Layout */
  --max-width: 1320px;
  --header-h:  64px;
}

/* ─── Variáveis — Tema Escuro (navy) ────────────────────────── */
[data-theme="dark"] {
  --gray-0:   #0B1120;
  --gray-50:  #0F1730;
  --gray-100: #16203C;
  --gray-200: #22304F;
  --gray-300: #33436B;
  --gray-400: #6D7A99;
  --gray-600: #9AA6C2;
  --gray-700: #C4CDE0;
  --gray-800: #E2E8F4;
  --gray-900: #F2F5FB;

  --color-bg:        #0B1120;
  --color-surface:   #101931;
  --color-surface-2: #16203C;
  --color-border:    #22304F;
  --color-text:      #E2E8F4;
  --color-muted:     #8B96B3;

  --brand-soft:        rgba(36, 138, 246, .14);
  --brand-soft-strong: rgba(36, 138, 246, .24);
  --brand-border-soft: #2B4166;
  --color-hero-bg:     #0D1428;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.3);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.4);
  --shadow-brand: 0 6px 20px rgba(var(--brand-primary-rgb), .35);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 18px;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  transition: background var(--duration-med) var(--ease),
              color var(--duration-med) var(--ease);
}

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

a { color: inherit; text-decoration: none; }

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  background: none;
}

/* ─── Tipografia ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--color-text);
}

h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 1.05rem; font-weight: 600; }

p { color: var(--color-muted); line-height: 1.7; }

/* ─── Utilitários ───────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.text-center { text-align: center; }
.text-muted  { color: var(--color-muted); }
.sr-only     { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ─── Botões ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 11px 22px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--duration-fast) var(--ease);
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--brand-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-brand);
}
.btn-primary:active {
  background: var(--brand-primary-pressed);
  transform: translateY(0);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
}
.btn-secondary:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--color-surface);
}

.btn-accent {
  background: var(--brand-accent);
  color: #1F2530;
}
.btn-accent:hover { background: #F5A00E; transform: translateY(-1px); }

/* Botão terciário (fundo azul-claro, texto azul — padrão Files Editor) */
.btn-tertiary {
  background: var(--brand-soft);
  color: var(--brand-primary);
}
.btn-tertiary:hover { background: var(--brand-soft-strong); }

.btn-lg { padding: 14px 28px; font-size: 0.95rem; }

/* ─── Badge / Pill ───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.badge-blue   { background: #E0EDFF; color: #0B5EB8; }
.badge-green  { background: #ECFDF5; color: #057A55; }
.badge-orange { background: #FFF3E0; color: #B45309; }
.badge-red    { background: #FEF2F2; color: #DC2626; }

[data-theme="dark"] .badge-blue   { background: rgba(36,138,246,.2);  color: #7DBBFB; }
[data-theme="dark"] .badge-green  { background: rgba(5,122,85,.2);   color: #34D399; }
[data-theme="dark"] .badge-orange { background: rgba(180,83,9,.2);   color: #FCD34D; }
[data-theme="dark"] .badge-red    { background: rgba(220,38,38,.2);  color: #FCA5A5; }

/* ─── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration-slow) var(--ease),
              border-color var(--duration-slow) var(--ease),
              transform var(--duration-slow) var(--ease-spring);
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-border-soft);
  transform: translateY(-3px);
}

/* ─── Slots de anúncio ───────────────────────────────────────── */
.ad-slot {
  width: 100%;
  min-height: 90px;
  background: var(--color-surface-2);
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 0.75rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  overflow: hidden;
  position: relative;
}

/* ─── Animações ──────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Pulso suave — botão "voltar ao topo" (padrão Files Editor) */
@keyframes pulseSoft {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

/* Flutuação sutil — ícones de destaque */
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* ─── Reveal-on-scroll (progressivo: só anima com JS ativo) ──── */
.reveal-ready {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease-spring), transform .7s var(--ease-spring);
}
.reveal-ready.reveal-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-ready { opacity: 1; transform: none; transition: none; }
}

/* ─── Botão "voltar ao topo" ─────────────────────────────────── */
.scroll-top-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 500;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  background: var(--brand-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-brand);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: transform .94s var(--ease-spring), opacity .5s linear, visibility .5s linear;
}
.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  animation: pulseSoft 2.6s var(--ease) infinite;
}
.scroll-top-btn:hover {
  background: var(--brand-primary-hover);
  animation-play-state: paused;
}

/* ─── Responsivo ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --space-lg: 16px; }
  .scroll-top-btn { right: 16px; bottom: 16px; }
}
