/* ============================================================
   By Jonas Ferreira — Sistema de Design Premium
   Estética Editorial · Pensamento Neurodivergente
   ============================================================ */

/* --- TOKENS --- */
:root {
  --white:   #F8F6F2;
  --black:   #111111;
  --gold:    #B89B5E;
  --gold-lt: #D4C08A;
  --mist:    #D9D9D9;
  --mist-dk: #BDBDBD;
  --ink:     #2A2A2A;
  --smoke:   #6B6B6B;
  --paper:   #EFEDE8;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Jost', system-ui, sans-serif;

  --radius-sm: 3px;
  --radius:    6px;
  --radius-lg: 12px;

  --shadow-lift: 0 4px 24px rgba(0,0,0,0.07);
  --shadow-card: 0 1px 4px rgba(0,0,0,0.06), 0 4px 20px rgba(0,0,0,0.05);

  --transition: 0.2s ease;
  --max-width: 1200px;
}

/* --- RESET --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* --- TIPOGRAFIA --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.9rem); }
h4 { font-size: 1.1rem; }

.display-italic { font-style: italic; color: var(--gold); }

/* --- LAYOUT --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; }
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }

/* --- HEADER --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 246, 242, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--mist);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  height: 72px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.logo-mark {
  height: 44px;
  width: auto;
  object-fit: contain;
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.logo-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--black);
}
.logo-sub {
  font-size: 0.65rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--smoke);
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--black);
  background: var(--paper);
}
.nav-admin { color: var(--gold) !important; }
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary {
  background: var(--black);
  color: var(--white);
  border: 1px solid var(--black);
}
.btn-primary:hover {
  background: var(--ink);
  border-color: var(--ink);
}
.btn-gold {
  background: var(--gold);
  color: var(--white);
  border: 1px solid var(--gold);
}
.btn-gold:hover { background: var(--gold-lt); border-color: var(--gold-lt); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--mist);
}
.btn-ghost:hover { border-color: var(--mist-dk); background: var(--paper); }
.btn-sm { font-size: 0.75rem; padding: 0.45rem 1rem; }
.btn-lg { font-size: 0.9rem; padding: 0.85rem 2rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- DIVIDER GOLD --- */
.divider-gold {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.divider-gold::before, .divider-gold::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gold);
  opacity: 0.4;
}

/* --- CARDS --- */
.card {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.card-gold-accent { border-top: 3px solid var(--gold); }

/* --- FORMS --- */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.25rem; }
.form-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--smoke);
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--black);
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 155, 94, 0.15);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-hint { font-size: 0.78rem; color: var(--smoke); }
.form-error { font-size: 0.78rem; color: #c0392b; }

/* Rating stars / slider */
.rating-group { display: flex; flex-direction: column; gap: 0.5rem; }
.rating-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--mist);
  outline: none;
}
.rating-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  cursor: pointer;
}
.rating-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--smoke);
}

/* --- PERSONA BADGE --- */
.persona-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  background: var(--paper);
  border: 1px solid var(--mist);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
  transition: background var(--transition);
}
.persona-badge:hover { background: var(--mist); }
.persona-icon { font-style: normal; color: var(--gold); }
.persona-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- ALERT MESSAGES --- */
.alert {
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 1rem;
  border-left: 3px solid transparent;
}
.alert-success { background: #f0faf0; border-color: #2ecc71; color: #1a5c38; }
.alert-error   { background: #fdf0f0; border-color: #e74c3c; color: #7a1a1a; }
.alert-info    { background: #f0f4fa; border-color: var(--gold); color: var(--ink); }

/* --- HERO --- */
.hero {
  padding: 6rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(184,155,94,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}
.hero-eyebrow::before, .hero-eyebrow::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
}
.hero-title { margin-bottom: 1.25rem; }
.hero-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--smoke);
  max-width: 640px;
  margin: 0 auto 2.5rem;
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* --- FORUM --- */
.forum-grid { display: grid; gap: 1rem; }
.forum-category {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
}
.forum-category:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-card);
  transform: translateX(4px);
}
.forum-category-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border-radius: var(--radius);
  font-size: 1.5rem;
  border: 1px solid var(--mist);
  flex-shrink: 0;
}
.forum-category-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}
.forum-category-desc { font-size: 0.85rem; color: var(--smoke); }
.forum-category-meta { font-size: 0.75rem; color: var(--mist-dk); text-align: right; }

/* --- POST LIST --- */
.post-list { display: flex; flex-direction: column; gap: 0.75rem; }
.post-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.post-item:hover { border-color: var(--mist-dk); background: var(--paper); }
.post-item.pinned { border-left: 3px solid var(--gold); }
.post-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--black);
  margin-bottom: 0.25rem;
}
.post-meta { font-size: 0.78rem; color: var(--smoke); }
.post-stats { font-size: 0.75rem; color: var(--mist-dk); text-align: right; white-space: nowrap; }

/* --- AUTH PAGES --- */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: var(--white);
}
.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lift);
}
.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}
.auth-logo img { height: 60px; margin: 0 auto 0.75rem; }
.auth-logo h1 { font-size: 1.4rem; margin-bottom: 0.25rem; }
.auth-logo p { font-size: 0.8rem; color: var(--smoke); }

/* --- DASHBOARD --- */
.dashboard { padding: 3rem 0; }
.dashboard-grid { display: grid; grid-template-columns: 280px 1fr; gap: 2rem; align-items: start; }
.sidebar { position: sticky; top: 88px; }
.sidebar-profile {
  background: var(--white);
  border: 1px solid var(--mist);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1rem;
}
.sidebar-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1rem;
  color: var(--gold);
}
.sidebar-name { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 0.25rem; }
.sidebar-persona { font-size: 0.75rem; color: var(--gold); letter-spacing: 0.08em; text-transform: uppercase; }
.sidebar-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--smoke);
  transition: all var(--transition);
}
.sidebar-link:hover, .sidebar-link.active {
  background: var(--paper);
  color: var(--black);
}

/* --- NEUROMAP FORM --- */
.neuromap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.neuromap-full { grid-column: 1 / -1; }
.rating-display {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gold);
  min-width: 1.5rem;
}

/* --- FOOTER --- */
.site-footer {
  background: var(--black);
  color: var(--white);
  margin-top: 6rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}
.footer-logo { height: 64px; margin-bottom: 1rem; filter: invert(1) brightness(0.85); }
.footer-manifesto {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
}
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.footer-links a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}
.footer-seal {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold);
  opacity: 0.7;
}

/* --- NAV TOGGLE (mobile) --- */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  height: 28px;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  height: 1.5px;
  background: var(--black);
  border-radius: 2px;
  transition: all var(--transition);
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .dashboard-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .neuromap-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header-nav { display: none; }
  .nav-toggle { display: flex; }
  .logo-text { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero { padding: 4rem 0 3rem; }
  .forum-category { grid-template-columns: 44px 1fr; }
  .forum-category-meta { display: none; }
}

/* --- MOBILE NAV OPEN --- */
body.nav-open .header-nav {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--mist);
  padding: 1rem;
  gap: 0.25rem;
  z-index: 99;
  box-shadow: var(--shadow-lift);
}
body.nav-open .nav-link { font-size: 1rem; padding: 0.75rem 1rem; }

/* --- ANIMATIONS --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.5s ease both; }
.fade-up-2 { animation: fadeUp 0.5s 0.1s ease both; }
.fade-up-3 { animation: fadeUp 0.5s 0.2s ease both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
