/* ════════════════════════════════════════════════
   RIZOM THEME SYSTEM — rizom-theme.css
   Importar em todas as páginas com:
     <link rel="stylesheet" href="/rizom-theme.css">   (raiz)
     <link rel="stylesheet" href="../rizom-theme.css"> (subpastas)
════════════════════════════════════════════════ */

/* ── TOKENS LIGHT (padrão) ── */
:root {
  /* Marca */
  --blue:         #1A6EFF;
  --iris:         #4F8EF7;
  --accent-soft:  #E8F0FF;

  /* Backgrounds */
  --bg:           #FAFBFF;
  --bg2:          #F0F4FF;
  --surface:      #FFFFFF;
  --surface2:     #F5F8FF;

  /* Bordas */
  --border:       rgba(26,110,255,0.12);
  --border2:      rgba(26,110,255,0.22);

  /* Tipografia */
  --text:         #0D1426;
  --text2:        #3A4A6A;
  --muted:        #7A8AAA;

  /* Nav */
  --nav-bg:       rgba(250,251,255,0.92);
  --nav-border:   rgba(26,110,255,0.12);

  /* Sombras */
  --shadow:       0 4px 24px rgba(26,110,255,0.08);
  --shadow-lg:    0 16px 56px rgba(26,110,255,0.13);

  /* Semânticos */
  --ok:           #059669;
  --ok-bg:        rgba(5,150,105,0.08);
  --warn:         #D97706;
  --warn-bg:      rgba(217,119,6,0.08);
  --danger:       #DC2626;
  --danger-bg:    rgba(220,38,38,0.07);

  /* Tipografia */
  --font-heading: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'DM Mono', monospace;
}

/* ── TOKENS DARK ── */
[data-theme="dark"] {
  --blue:         #1A6EFF;
  --iris:         #4F8EF7;
  --accent-soft:  rgba(79,142,247,0.12);

  --bg:           #0D0F14;
  --bg2:          #111827;
  --surface:      #161D2E;
  --surface2:     #1A2540;

  --border:       rgba(79,142,247,0.12);
  --border2:      rgba(79,142,247,0.22);

  --text:         #F0F4FF;
  --text2:        #A8B8D8;
  --muted:        #5A6A8A;

  --nav-bg:       rgba(13,15,20,0.92);
  --nav-border:   rgba(79,142,247,0.10);

  --shadow:       0 4px 24px rgba(0,0,0,0.28);
  --shadow-lg:    0 16px 56px rgba(0,0,0,0.40);

  --ok:           #0FBA81;
  --ok-bg:        rgba(15,186,129,0.10);
  --warn:         #F59E0B;
  --warn-bg:      rgba(245,158,11,0.10);
  --danger:       #EF4444;
  --danger-bg:    rgba(239,68,68,0.10);
}

/* ── BODY BASE ── */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

/* ── NAV UNIFICADA ── */
.rizom-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  height: 64px;
  padding: 0 clamp(16px, 5vw, 80px);
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.3s, border-color 0.3s;
}
.rizom-nav__logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.rizom-nav__wordmark {
  font-family: var(--font-heading);
  font-weight: 800; font-size: 18px;
  letter-spacing: -0.4px;
  color: var(--text);
  transition: color 0.3s;
}
.rizom-nav__wordmark span { color: var(--blue); }
.rizom-nav__links {
  display: flex; align-items: center; gap: 28px;
  list-style: none; margin: 0; padding: 0;
}
.rizom-nav__links a {
  font-size: 13px; font-weight: 500;
  color: var(--text2); text-decoration: none;
  transition: color 0.2s;
}
.rizom-nav__links a:hover { color: var(--blue); }
.rizom-nav__actions {
  display: flex; align-items: center; gap: 10px;
}
.rizom-nav__cta {
  background: var(--blue); color: #fff;
  font-family: var(--font-body);
  font-size: 12px; font-weight: 600;
  padding: 8px 16px; border-radius: 7px;
  text-decoration: none;
  transition: opacity 0.2s;
}
.rizom-nav__cta:hover { opacity: 0.88; }

/* ── SWITCH PILL TOGGLE ── */
.rizom-theme-toggle {
  width: 50px; height: 26px;
  background: var(--accent-soft);
  border: 1px solid var(--border2);
  border-radius: 13px;
  position: relative; cursor: pointer;
  flex-shrink: 0; padding: 0;
  transition: background 0.3s, border-color 0.3s;
}
.rizom-theme-toggle__knob {
  position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: var(--blue);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; line-height: 1;
  box-shadow: 0 1px 4px rgba(26,110,255,0.35);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1), background 0.3s, box-shadow 0.3s;
  user-select: none;
}
[data-theme="dark"] .rizom-theme-toggle__knob {
  transform: translateX(26px);
  background: var(--iris);
  box-shadow: 0 1px 4px rgba(79,142,247,0.35);
}

/* ── HAMBÚRGUER MOBILE ── */
.rizom-nav__hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.rizom-nav__hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text2); border-radius: 1px;
  transition: all 0.2s;
}

/* ── MOBILE ─────────────────────────── */
@media (max-width: 768px) {
  .rizom-nav__links,
  .rizom-nav__cta { display: none; }

  .rizom-nav__hamburger { display: flex; }

  .rizom-nav.is-open .rizom-nav__links {
    display: flex; flex-direction: column;
    position: fixed; top: 64px; left: 0; right: 0;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    padding: 20px clamp(16px, 5vw, 32px);
    gap: 20px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  .rizom-nav.is-open .rizom-nav__links a {
    font-size: 16px;
  }
  .rizom-nav.is-open .rizom-nav__hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .rizom-nav.is-open .rizom-nav__hamburger span:nth-child(2) {
    opacity: 0;
  }
  .rizom-nav.is-open .rizom-nav__hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}
