/*
  DESIGN SYSTEM — TOKENS GLOBAIS
  sites-empresas / sistema de criação de demos institucionais
  
  Filosofia: anti-AI-slop. Cada site tem personalidade própria.
  Esses tokens são a BASE — cada demo sobrescreve conforme o nicho.
*/

/* ─── TIPOGRAFIA ─────────────────────────────────────────────────────────── */
/* Fontes carregadas via Google Fonts no template HTML */
/* Display: Clash Display — forte, contemporânea, autoridade */
/* Body: Satoshi — leitura limpa, sem ser genérica */
/* Serif accent: Fraunces — elegância, confiança, diferenciação */

:root {
  --font-display: "Clash Display", "Space Grotesk", sans-serif;
  --font-body: "Satoshi", "DM Sans", sans-serif;
  --font-serif: "Fraunces", "Playfair Display", serif;
  --font-mono: "JetBrains Mono", monospace;

  /* Escala tipográfica modular (razão 1.25) */
  --text-xs:   0.64rem;   /* 10px */
  --text-sm:   0.8rem;    /* 13px */
  --text-base: 1rem;      /* 16px */
  --text-md:   1.25rem;   /* 20px */
  --text-lg:   1.563rem;  /* 25px */
  --text-xl:   1.953rem;  /* 31px */
  --text-2xl:  2.441rem;  /* 39px */
  --text-3xl:  3.052rem;  /* 49px */
  --text-4xl:  3.815rem;  /* 61px */
  --text-5xl:  4.768rem;  /* 76px */

  /* Peso */
  --weight-light:   300;
  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semibold:600;
  --weight-bold:    700;
  --weight-black:   800;

  /* Line heights */
  --leading-tight:  1.1;
  --leading-snug:   1.3;
  --leading-normal: 1.5;
  --leading-loose:  1.8;

  /* Letter spacing */
  --tracking-tight:  -0.04em;
  --tracking-snug:   -0.02em;
  --tracking-normal:  0em;
  --tracking-wide:    0.06em;
  --tracking-wider:   0.12em;
  --tracking-widest:  0.2em;
}

/* ─── ESPAÇAMENTO ────────────────────────────────────────────────────────── */
:root {
  --space-1:  0.25rem;   /* 4px  */
  --space-2:  0.5rem;    /* 8px  */
  --space-3:  0.75rem;   /* 12px */
  --space-4:  1rem;      /* 16px */
  --space-5:  1.25rem;   /* 20px */
  --space-6:  1.5rem;    /* 24px */
  --space-8:  2rem;      /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */
  --space-24: 6rem;      /* 96px */
  --space-32: 8rem;      /* 128px */
  --space-40: 10rem;     /* 160px */
}

/* ─── LAYOUT ─────────────────────────────────────────────────────────────── */
:root {
  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1280px;
  --container-2xl: 1440px;

  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* Breakpoints (usar em media queries) */
  /* sm: 640px | md: 768px | lg: 1024px | xl: 1280px */
}

/* ─── PALETA NEUTRA BASE ─────────────────────────────────────────────────── */
/* Cada demo define sua própria paleta em :root — esses são os defaults neutros */
:root {
  --color-bg:       #0c0c0c;
  --color-surface:  #161616;
  --color-border:   #2a2a2a;
  --color-text:     #f0f0f0;
  --color-text-muted: #888888;
  --color-accent:   #e8ff00;    /* Amarelo elétrico — trocar por nicho */
  --color-accent-2: #ff4500;    /* Secundário */
}

/* ─── SOMBRAS ────────────────────────────────────────────────────────────── */
:root {
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.6);
  --shadow-glow: 0 0 40px rgba(232,255,0,0.15);  /* trocar cor por nicho */
}

/* ─── TRANSIÇÕES ─────────────────────────────────────────────────────────── */
:root {
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out:    cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring:    cubic-bezier(0.34, 1.56, 0.64, 1);

  --duration-fast:   150ms;
  --duration-normal: 300ms;
  --duration-slow:   600ms;
  --duration-slower: 1000ms;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
}

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

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ─── UTILITÁRIOS GLOBAIS ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

@media (min-width: 1280px) {
  .container {
    padding-inline: var(--space-12);
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ─── ANIMAÇÕES BASE ─────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

[data-animate] {
  opacity: 0;
  animation: fadeUp var(--duration-slow) var(--ease-out-expo) forwards;
}

[data-animate="fade"] {
  animation-name: fadeIn;
}

[data-animate="scale"] {
  animation-name: scaleIn;
}

/* Delay helpers */
[data-delay="1"] { animation-delay: 100ms; }
[data-delay="2"] { animation-delay: 200ms; }
[data-delay="3"] { animation-delay: 300ms; }
[data-delay="4"] { animation-delay: 400ms; }
[data-delay="5"] { animation-delay: 500ms; }
[data-delay="6"] { animation-delay: 600ms; }
[data-delay="7"] { animation-delay: 700ms; }
[data-delay="8"] { animation-delay: 800ms; }
