/* ============================================================
   Chit-O · Public UI — GLOBAL ONLY
   Navbar · Off-canvas · Bottom tabs · Footer · Buttons · Utilities
   CSS spesifik per-halaman ada di masing-masing page file.
   ============================================================ */

/* ---------- RESET ringan terhadap Bootstrap ---------- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.65;
  overflow-x: hidden;
}

a { text-decoration: none; }
a.btn, .btn { box-shadow: none !important; }

main { min-height: 60vh; }


/* ============================================================
   NAVBAR
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: calc(var(--nav-h) + var(--safe-top));
  padding-top: var(--safe-top);
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    background var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    backdrop-filter var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
  will-change: transform;
}
.site-nav.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom-color: var(--border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22);
}
[data-theme="light"] .site-nav.scrolled {
  box-shadow: 0 4px 24px rgba(15, 18, 32, 0.08);
}
.site-nav.nav-hidden { transform: translateY(-100%); }

.nav-inner {
  max-width: var(--container);
  height: var(--nav-h);
  margin-inline: auto;
  padding-inline: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.03em;
  color: var(--text);
}
.brand-logo { height: 34px; width: auto; }
.brand-mark {
  position: relative;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--brand-gradient);
  box-shadow: 0 4px 16px rgba(0, 102, 255, 0.4);
  display: inline-block;
}
.brand-dot {
  position: absolute;
  inset: 8px;
  background: var(--bg);
  border-radius: 4px;
}
.brand-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}
.nav-link {
  padding: 8px 14px;
  border-radius: 99px;
  color: var(--text-soft);
  font-size: 14.5px;
  font-weight: 500;
  transition: color var(--dur), background var(--dur);
  position: relative;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.active {
  color: var(--text);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 4px;
  width: 0; height: 2px;
  border-radius: 2px;
  background: var(--brand-gradient);
  transform: translateX(-50%);
  transition: width var(--dur) var(--ease);
  pointer-events: none;
  opacity: 0.9;
}
.nav-link:hover::after { width: calc(100% - 28px); }
.nav-link.active::after { display: none; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 99px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  font-size: 17px;
}
.icon-btn:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}

[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="light"] .theme-icon-dark { display: none; }

.hamburger {
  width: 40px; height: 40px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 0;
}
.hamburger span {
  display: block;
  width: 16px; height: 1.6px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

@media (min-width: 992px) {
  .nav-links { display: flex; }
  .hamburger { display: none; }
}


/* ============================================================
   OFF-CANVAS
   ============================================================ */
.offcanvas-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 12, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
  z-index: 110;
}
body.oc-open .offcanvas-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.offcanvas-panel {
  position: fixed;
  top: 0; right: 0;
  width: min(86vw, 400px);
  height: 100dvh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  transform: translateX(105%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 120;
  display: flex;
  flex-direction: column;
  padding: calc(20px + var(--safe-top)) 24px calc(20px + var(--safe-bottom));
  overflow-y: auto;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
}
body.oc-open .offcanvas-panel { transform: translateX(0); }

.oc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.oc-close { border-color: var(--border); }
.oc-nav { flex: 1; }

.oc-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 24px 4px 10px;
  opacity: 0;
  transform: translateX(12px);
  animation: ocIn 0.4s var(--ease) forwards;
  animation-delay: calc(var(--i) * 0.04s + 0.1s);
}
.oc-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 14px;
  color: var(--text-soft);
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  opacity: 0;
  transform: translateX(16px);
  animation: ocIn 0.45s var(--ease) forwards;
  animation-delay: calc(var(--i) * 0.04s + 0.12s);
  transition: background var(--dur), color var(--dur);
}
.oc-link i.bi-arrow-up-right {
  font-size: 13px;
  opacity: 0.4;
  transition: opacity var(--dur), transform var(--dur);
}
.oc-link:hover {
  background: var(--surface-2);
  color: var(--text);
}
.oc-link:hover i.bi-arrow-up-right {
  opacity: 1;
  transform: translate(2px, -2px);
  color: var(--accent);
}
.oc-link.active {
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(0, 212, 255, 0.25);
}
.oc-link i.bi { margin-right: 8px; opacity: 0.6; font-size: 15px; }

@keyframes ocIn {
  to { opacity: 1; transform: translateX(0); }
}

.oc-socials {
  display: flex;
  gap: 10px;
  padding: 24px 4px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}
.oc-socials a {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 16px;
  transition: all var(--dur);
}
.oc-socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.oc-foot {
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.theme-btn-lg {
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all var(--dur);
}
.theme-btn-lg:hover { border-color: var(--accent); }
.oc-copy {
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}

body.oc-open { overflow: hidden; }


/* ============================================================
   BOTTOM TABS
   ============================================================ */
.bottom-tabs {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(12px + var(--safe-bottom));
  height: 60px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 6px;
  z-index: 90;
  box-shadow: var(--shadow-lg);
}
.tab {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: transparent;
  border: 0;
  cursor: pointer;
  border-radius: 16px;
  transition: color var(--dur);
}
.tab i { font-size: 19px; }
.tab:hover, .tab.active { color: var(--accent); }
.tab.active i { filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.6)); }

@media (min-width: 992px) { .bottom-tabs { display: none; } }
@media (max-width: 991.98px) {
  main { padding-bottom: calc(84px + var(--safe-bottom)); }
}


/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  margin-top: 80px;
  padding: 64px 20px 0;
}
.footer-inner {
  max-width: var(--container);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 48px;
}
.foot-brand .brand { margin-bottom: 16px; font-size: 20px; }
.foot-tagline {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 20px;
  max-width: 300px;
  line-height: 1.6;
}
.foot-contact {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-soft);
}
.foot-contact li { display: flex; align-items: center; gap: 10px; }
.foot-contact i { color: var(--accent); font-size: 14px; }
.foot-contact a { color: var(--text-soft); }
.foot-contact a:hover { color: var(--accent); }

.foot-socials { display: flex; gap: 8px; }
.foot-socials a {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 15px;
  transition: all var(--dur);
}
.foot-socials a:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.foot-links h4, .foot-cta h4 {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  margin: 0 0 16px;
}
.foot-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.foot-links a {
  color: var(--text-muted);
  font-size: 14px;
  transition: color var(--dur);
}
.foot-links a:hover { color: var(--accent); }

.foot-cta p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 18px;
  line-height: 1.6;
}

.foot-bottom {
  max-width: var(--container);
  margin-inline: auto;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dim);
}

@media (max-width: 991.98px) {
  .site-footer { display: none; }
}


/* ============================================================
   BUTTONS (shared)
   ============================================================ */
.btn-gradient {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  background: var(--brand-gradient);
  color: #fff !important;
  font-weight: 600;
  font-size: 14.5px;
  border: 0;
  cursor: pointer;
  transition: transform var(--dur), filter var(--dur), box-shadow var(--dur);
  box-shadow: 0 8px 24px rgba(0, 102, 255, 0.28);
}
.btn-gradient:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 12px 32px rgba(0, 102, 255, 0.4);
  color: #fff;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  background: transparent;
  color: var(--text) !important;
  border: 1px solid var(--border-strong);
  font-weight: 500;
  font-size: 14.5px;
  cursor: pointer;
  transition: all var(--dur);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent) !important;
  background: var(--accent-soft);
}


/* ============================================================
   SECTION & PAGE UTILITIES (shared)
   ============================================================ */
.section {
  max-width: var(--container);
  margin-inline: auto;
  padding: 80px 20px;
}
.section-sm { padding: 60px 20px; }

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.section-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  margin: 0 0 14px;
}
.section-desc {
  color: var(--text-muted);
  font-size: 15.5px;
  margin: 0;
  line-height: 1.7;
}

.page {
  padding-top: calc(var(--nav-h) + var(--safe-top) + 60px);
  padding-bottom: 80px;
  max-width: 900px;
  margin: 0 auto;
  padding-inline: 20px;
}
.page-header { margin-bottom: 40px; }
.page-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 12px;
  letter-spacing: -0.03em;
}
.page-lede {
  color: var(--text-muted);
  font-size: 17px;
  margin: 0;
}

@media (max-width: 991.98px) {
  .page { padding-top: calc(var(--nav-h) + var(--safe-top) + 32px); }
}


/* ============================================================
   404 (fallback error page)
   ============================================================ */
.err-404 {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.err-404::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 212, 255, 0.12), transparent 60%);
  pointer-events: none;
}
.err-404 h1 {
  font-size: clamp(5rem, 18vw, 10rem);
  line-height: 1;
  margin: 0;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  letter-spacing: -0.05em;
}
.err-404 p { color: var(--text-muted); margin: 8px 0 28px; position: relative; }


/* ============================================================
   UTILITIES
   ============================================================ */
.stack-2 { display: flex; flex-direction: column; gap: 12px; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }
