@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&display=swap");

/**
 * Core CSS - Design System "A Culpa e das Ovelhas"
 * Variaveis, reset, tipografia, container, animacoes
 * @version 4.2.0 - 2026-02-09
 *
 * Este e o UNICO arquivo que define :root e body base.
 * Todos os outros CSS dependem deste.
 */

/* ========================================
   CSS VARIABLES - Fonte unica de verdade
   ======================================== */
:root {
  /* Design System — GitHub Dark Theme */
  --gh-dark: #0d1117;
  --gh-dark-2: #161b22;
  --gh-border: #30363d;
  --gh-text: #c9d1d9;
  --gh-text-muted: #8b949e;
  --gh-accent: #c46849;
  --gh-accent-light: #d4856d;
  --gh-green: #238636;
  --gh-blue: #58a6ff;
  --gh-purple: #a371f7;

  /* Aliases para compatibilidade com styles.css legado */
  --accent: #c46849;
  --accent-hover: #d4785a;
  --accent-muted: rgba(196, 104, 73, 0.15);
  --accent-gold: #c46849;
  --accent-ember: #c46849;

  /* Escala de cinzas (compatibilidade) */
  --gray-950: #0d1117;
  --gray-900: #161b22;
  --gray-850: #1c2128;
  --gray-800: #30363d;
  --gray-700: #484f58;
  --gray-600: #6e7681;
  --gray-500: #8b949e;
  --gray-400: #8b949e;
  --gray-300: #b1bac4;
  --gray-200: #c9d1d9;
  --gray-100: #e6edf3;
  --gray-050: #f0f6fc;

  /* Aliases semanticos (compatibilidade) */
  --bg-dark: var(--gh-dark);
  --bg-darker: #010409;
  --bg-light: var(--gray-050);
  --text-white: #ffffff;
  --text-light: var(--gh-text);
  --text-gray: var(--gh-text-muted);
  --text-dark: #1f2328;
  --text-muted: var(--gh-text-muted);
  --border-light: rgba(255, 255, 255, 0.1);
  --border-color: var(--gh-border);
  --shadow: rgba(0, 0, 0, 0.3);

  /* Brand (alias do accent) */
  --brand: #c46849;
  --brand-hover: #b35a3d;
  --brand-light: #d4856d;

  /* Espacamentos */
  --container-max: 1280px;
  --container-padding: 24px;
}

/* ========================================
   RESET & BASE
   ======================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--gh-dark);
  color: var(--gh-text);
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: normal;
}

a {
  color: var(--gh-blue);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--gh-accent-light);
}

img {
  max-width: 100%;
  height: auto;
}

/* ========================================
   CONTAINER
   ======================================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ========================================
   ANIMATIONS
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.9s ease forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
.skip-link {
  position: absolute;
  top: -40px;
  left: 16px;
  background: var(--gh-accent);
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  z-index: 200;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
  color: #fff;
}

/* ========================================
   PAGE CONTAINER (sub-paginas)
   ======================================== */
.page-main {
  min-height: 100vh;
  padding-top: 80px;
}

/* ========================================
   LIGHT MODE - Variable overrides
   ======================================== */
body.light-mode {
  --gh-dark: #ffffff;
  --gh-dark-2: #f6f8fa;
  --gh-border: #d0d7de;
  --gh-text: #1f2328;
  --gh-text-muted: #656d76;

  /* Aliases */
  --gray-950: #ffffff;
  --gray-900: #f6f8fa;
  --gray-800: #d0d7de;
  --gray-700: #d0d7de;
  --gray-200: #1f2328;
  --gray-100: #f6f8fa;
  --bg-dark: #ffffff;
  --bg-darker: #f6f8fa;
  --text-white: #1f2328;
  --text-light: #1f2328;
  --text-gray: #656d76;
  --text-dark: #1f2328;
  --border-light: rgba(0, 0, 0, 0.1);
  --shadow: rgba(0, 0, 0, 0.1);

  background: #ffffff;
}

/* Screen-reader only — visually hidden but accessible */
.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;
}

@media (max-width: 768px) {
  .page-main {
    padding-top: 60px;
  }
}
