/* =================================================================
   EnemLab — Design System (Quizlet-inspired) — páginas públicas
   ================================================================= */

/* ── CSS Variables ─────────────────────────────────────────────── */
:root {
  /* Primária */
  --brand-primary:   #4257b2;
  --brand-secondary: #6b4fbb;
  --brand-accent:    #ffcd1f;

  /* Backgrounds */
  --bg-page:       #f6f7fb;
  --bg-card:       #ffffff;
  --bg-card-hover: #f0f2fd;

  /* Texto */
  --text-primary:   #1a1a2e;
  --text-secondary: #586380;
  --text-muted:     #939bb4;
  --text-on-brand:  #ffffff;

  /* Matérias */
  --bio: #23b26d;
  --mat: #4257b2;
  --qui: #e65c41;
  --fis: #a855f7;

  /* Status */
  --success: #23b26d;
  --warning: #ffcd1f;
  --danger:  #e65c41;
  --info:    #4257b2;

  /* Bordas e sombras */
  --border:    #e1e4f0;
  --shadow-sm: 0 1px 4px rgba(66,87,178,0.08);
  --shadow-md: 0 4px 16px rgba(66,87,178,0.12);
  --shadow-lg: 0 8px 32px rgba(66,87,178,0.16);

  /* Raios */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-pill: 999px;
}

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

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

body {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-page);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
}

a { color: var(--brand-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

.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;
}

/* ═══════════════════════════════════════════════════════════════ */
/*  NAVBAR                                                         */
/* ═══════════════════════════════════════════════════════════════ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #fff;
  border-bottom: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.navbar__container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Logo */
.navbar__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.navbar__logo:hover { text-decoration: none; }

/* ícone emoji herdado — ocultado no redesign */
.navbar__logo-icon { display: none; }

.navbar__logo-text {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--brand-primary);
  letter-spacing: -0.5px;
  line-height: 1;
}

/* "Lab" com destaque em amarelo */
.navbar__logo-accent {
  color: var(--text-primary);
  background: var(--brand-accent);
  padding: 1px 5px 2px;
  border-radius: 5px;
}

/* Nav links (desktop) */
.navbar__nav { margin-left: auto; }

.navbar__nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.navbar__nav-link {
  display: block;
  padding: 6px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.navbar__nav-link:hover {
  color: var(--brand-primary);
  background: var(--bg-card-hover);
  text-decoration: none;
}
.navbar__nav-link--active {
  color: var(--brand-primary);
  font-weight: 600;
}

/* Ações */
.navbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 20px;
}

/* Hamburger */
.navbar__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.navbar__hamburger:hover { background: var(--bg-page); }

.navbar__hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.navbar__hamburger.is-active .navbar__hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.navbar__hamburger.is-active .navbar__hamburger-line:nth-child(2) { opacity: 0; }
.navbar__hamburger.is-active .navbar__hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Overlay */
.navbar__overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,26,46,0.45);
  z-index: 150;
}
.navbar__overlay--active { display: block; }

/* ═══════════════════════════════════════════════════════════════ */
/*  BOTÕES                                                         */
/* ═══════════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
  white-space: nowrap;
  line-height: 1;
  transition: background 0.15s, color 0.15s, border-color 0.15s,
              box-shadow 0.15s, transform 0.1s;
}
.btn:hover { text-decoration: none; }

.btn--primary {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}
.btn--primary:hover {
  background: #3346a0;
  border-color: #3346a0;
  color: #fff;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn--outline,
.btn--secondary {
  background: transparent;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}
.btn--outline:hover,
.btn--secondary:hover {
  background: var(--bg-card-hover);
  color: var(--brand-primary);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn--ghost:hover {
  color: var(--brand-primary);
  border-color: var(--brand-primary);
  background: var(--bg-card-hover);
}

.btn--accent {
  background: var(--brand-accent);
  color: var(--text-primary);
  border-color: var(--brand-accent);
  font-weight: 800;
}
.btn--accent:hover {
  background: #f0be00;
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
.btn--lg { padding: 0.875rem 2rem; font-size: 1rem; }

/* ═══════════════════════════════════════════════════════════════ */
/*  INPUTS GLOBAIS                                                 */
/* ═══════════════════════════════════════════════════════════════ */

.input {
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  width: 100%;
  background: #fff;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder { color: var(--text-muted); }
.input:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(66,87,178,0.15);
}

/* ═══════════════════════════════════════════════════════════════ */
/*  CARDS GLOBAIS                                                  */
/* ═══════════════════════════════════════════════════════════════ */

.card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); }

/* ═══════════════════════════════════════════════════════════════ */
/*  SITE MAIN                                                      */
/* ═══════════════════════════════════════════════════════════════ */

.site-main { flex: 1; }

/* ═══════════════════════════════════════════════════════════════ */
/*  FOOTER                                                         */
/* ═══════════════════════════════════════════════════════════════ */

.site-footer {
  background: #fff;
  border-top: 1.5px solid var(--border);
  margin-top: auto;
}

.site-footer__container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 24px 20px;
  display: flex;
  align-items: flex-start;
  gap: 48px;
  flex-wrap: wrap;
}

.site-footer__logo {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--brand-primary);
  margin-bottom: 10px;
}
.site-footer__logo:hover { text-decoration: none; }
.site-footer__logo-icon { display: none; }
.site-footer__logo-text { color: var(--brand-primary); }

.site-footer__tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 240px;
  line-height: 1.5;
}

.site-footer__nav        { margin-left: auto; }
.site-footer__nav-list   { display: flex; flex-wrap: wrap; gap: 6px 24px; }

.site-footer__nav-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}
.site-footer__nav-link:hover {
  color: var(--brand-primary);
  text-decoration: none;
}

.site-footer__bottom {
  border-top: 1px solid var(--border);
  padding: 14px 24px;
  text-align: center;
}

.site-footer__copy {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════ */
/*  BADGES GLOBAIS                                                 */
/* ═══════════════════════════════════════════════════════════════ */

.badge-pub {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
}
.badge-bio { background: #d4f5e5; color: #166640; }
.badge-mat { background: #dde3f8; color: #2a3d8f; }
.badge-qui { background: #fde8e3; color: #8f2a14; }
.badge-fis { background: #f0e3fd; color: #6b2a8f; }

/* ═══════════════════════════════════════════════════════════════ */
/*  RESPONSIVO                                                     */
/* ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  .navbar__hamburger { display: flex; }
  .navbar__actions   { display: none; }

  .navbar__nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: min(300px, 80vw);
    height: 100vh;
    background: #fff;
    z-index: 300;
    padding: 80px 16px 40px;
    box-shadow: var(--shadow-lg);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 0;
    overflow-y: auto;
  }
  .navbar__nav--open { left: 0; }

  .navbar__nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .navbar__nav-link {
    font-size: 1rem;
    padding: 12px 14px;
    border-radius: var(--radius-md);
  }
  .navbar__container { gap: 12px; }
}

@media (min-width: 769px) {
  .navbar__actions { display: flex; }
}

@media (max-width: 600px) {
  .site-footer__container {
    flex-direction: column;
    gap: 20px;
  }
  .site-footer__nav { margin-left: 0; }
}
