/* ============================================================
   CAPITALIZE HUB — DESIGN SYSTEM  (ch-theme.css)
   capitalizehub.com.br · 2026
   Light-cream theme — faithful to brand design
   ============================================================ */

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

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

body {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Tokens ───────────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:            #f0ebe1;
  --bg-card:       #f7f3ec;
  --bg-dark:       #141221;
  --bg-blue:       #4d5bf9;

  /* Text */
  --text:          #141221;
  --text-sub:      #5a5870;
  --text-muted:    #8e8c9a;
  --text-on-dark:  #f0ebe1;
  --text-on-blue:  #ffffff;

  /* Brand */
  --brand:         #4d5bf9;
  --brand-hover:   #3d4be6;

  /* Accents */
  --green:         #2ecc71;
  --green-bg:      #e6f9ee;
  --green-text:    #1a7a42;

  --amber:         #f5a623;
  --amber-bg:      #fef3e0;

  /* Borders */
  --border:        rgba(20, 18, 33, 0.08);
  --border-card:   rgba(20, 18, 33, 0.06);

  /* Spacing */
  --nav-h: 64px;
  --max-w: 1120px;
  --section-py: 100px;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;

  /* Transitions */
  --ease: cubic-bezier(.4,0,.2,1);
  --dur: .25s;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
}

h1 { font-size: clamp(2.8rem, 6vw, 4.2rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.35rem); }

p  { color: var(--text-sub); line-height: 1.7; }

.mono {
  font-family: 'Geist Mono', monospace;
}

.label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Geist Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.label::before {
  content: '';
  width: 24px;
  height: 2px;
  background: currentColor;
  display: block;
}

.label-brand { color: var(--brand); }
.label-brand::before { background: var(--brand); }

/* ── Layout ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

.section {
  padding: var(--section-py) 0;
}

@media (max-width: 768px) {
  :root { --section-py: 64px; }
  .container { padding: 0 20px; }
}

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  cursor: pointer;
}

.navbar-logo svg { width: 24px; height: 24px; }

.navbar-logo span {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.navbar-logo span em {
  font-style: normal;
  font-weight: 400;
  opacity: .5;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a,
.nav-links button {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-sub);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  transition: color var(--dur), background var(--dur);
  font-family: inherit;
}

.nav-links a:hover,
.nav-links button:hover {
  color: var(--text);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 6px;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    gap: 4px;
  }
  .navbar-right .btn-outline,
  .navbar-right .btn-primary { display: none; }
  .navbar-mobile-toggle { display: block; }
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: var(--r-full);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(77, 91, 249, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--text);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--bg-dark);
  color: #fff;
}
.btn-dark:hover {
  background: #1e1c30;
  transform: translateY(-1px);
}

.btn-white-outline {
  background: transparent;
  color: var(--text-on-dark);
  border: 1.5px solid rgba(255,255,255,.2);
}
.btn-white-outline:hover {
  border-color: rgba(255,255,255,.5);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 0.85rem;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.75rem;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(20,18,33,0.06);
}

/* ── Badge ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-family: 'Geist Mono', monospace;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: transparent;
}

.badge-green {
  background: var(--green-bg);
  border-color: rgba(46,204,113,.2);
  color: var(--green-text);
}

.badge-green::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.badge-amber {
  background: var(--amber-bg);
  border-color: rgba(245,166,35,.2);
  color: #9a6b10;
}

/* ── Product Icon ─────────────────────────────────────────── */
.product-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-icon svg {
  width: 100%;
  height: 100%;
}

/* ── Dark section ─────────────────────────────────────────── */
.section-dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.section-dark h2,
.section-dark h3 { color: var(--text-on-dark); }
.section-dark p   { color: rgba(240,235,225,.6); }
.section-dark .label { color: var(--brand); }
.section-dark .label::before { background: var(--brand); }

/* ── Blue section ─────────────────────────────────────────── */
.section-blue {
  background: var(--brand);
  color: var(--text-on-blue);
}

.section-blue h2 { color: #fff; }
.section-blue p  { color: rgba(255,255,255,.7); }

/* ── Video card ───────────────────────────────────────────── */
.video-card {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.video-thumb {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  margin-bottom: 14px;
}

.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}

.video-card:hover .video-thumb img {
  transform: scale(1.05);
}

.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--dur), transform var(--dur);
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}

.video-card:hover .video-play {
  opacity: 1;
}

.video-tag {
  font-family: 'Geist Mono', monospace;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 6px;
}

.video-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--bg-dark);
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-logo span {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-on-dark);
}

.footer-logo span em {
  font-style: normal;
  font-weight: 400;
  opacity: .5;
}

.footer-desc {
  font-size: 0.8rem;
  color: rgba(240,235,225,.45);
  line-height: 1.7;
  max-width: 280px;
}

.footer-col-title {
  font-family: 'Geist Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(240,235,225,.3);
  margin-bottom: 16px;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: rgba(240,235,225,.5);
  text-decoration: none;
  padding: 4px 0;
  transition: color var(--dur);
}
.footer-link:hover { color: var(--text-on-dark); }

.footer-bottom {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-bottom span {
  font-family: 'Geist Mono', monospace;
  font-size: 0.65rem;
  color: rgba(240,235,225,.25);
  letter-spacing: 0.04em;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ── Grids ────────────────────────────────────────────────── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; gap: 24px; }
}

/* ── Utility ──────────────────────────────────────────────── */
.text-center { text-align: center; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }
.mt-md { margin-top: 16px; }
.mt-lg { margin-top: 24px; }
.mt-xl { margin-top: 40px; }
.mb-md { margin-bottom: 16px; }

/* ── Animations ───────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(20,18,33,.12); border-radius: 99px; }

::selection { background: var(--brand); color: #fff; }

/* ── Admin layout ─────────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--bg-dark);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
}

.sidebar-label {
  font-family: 'Geist Mono', monospace;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.2);
  padding: 8px 12px 4px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,.45);
  text-decoration: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: all var(--dur);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sidebar-item:hover { color: rgba(255,255,255,.75); background: rgba(255,255,255,.05); }
.sidebar-item.active { color: #fff; background: rgba(255,255,255,.08); }

.admin-main {
  padding: 32px;
  background: var(--bg);
  overflow-y: auto;
}

@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: -260px; z-index: 999; width: 260px;
    top: 0; height: 100vh;
    transition: left var(--dur) var(--ease);
  }
  .sidebar.open { left: 0; }
}

/* ── Table ────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.table-wrap table { width: 100%; border-collapse: collapse; }

.table-wrap th {
  text-align: left;
  padding: 10px 16px;
  font-family: 'Geist Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.table-wrap td {
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--text-sub);
  border-bottom: 1px solid var(--border);
}

.table-wrap tr:last-child td { border-bottom: none; }
.table-wrap tr:hover td { background: rgba(20,18,33,.02); }

/* ── Input ────────────────────────────────────────────────── */
.input {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  outline: none;
  transition: border-color var(--dur);
}
.input:focus { border-color: var(--brand); }
.input::placeholder { color: var(--text-muted); }

/* ── Tabs ─────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-card);
  padding: 3px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}

.tab {
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--dur);
}

.tab:hover { color: var(--text-sub); }
.tab.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
