/*
 * AIZZTECH site navigation for the standalone static Rencana pages.
 * Mirrors the React `Header` component at `components/Layout.tsx` so the
 * nav looks identical regardless of which page (React or static) you're on.
 *
 * The brand assumes the colour-scheme of the React app *when scrolled*:
 * dark navy background with light text. That's appropriate here because
 * these are interior pages, not the home hero.
 */

.aizz-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: #020617; /* slate-950 */
  padding: 14px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.aizz-nav-inner {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.aizz-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.aizz-nav-brand-icon {
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  display: inline-flex;
}
.aizz-nav-brand-icon img {
  height: 16px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}
.aizz-nav-brand-full {
  height: 20px;
  width: auto;
  filter: brightness(0) invert(1);
}

.aizz-nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.aizz-nav-link {
  color: #cbd5e1; /* slate-300 */
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
  white-space: nowrap;
}
.aizz-nav-link:hover { color: #3b82f6; }
.aizz-nav-link.active { color: #2563eb; }
.aizz-nav-link .dot { color: #3b82f6; }

.aizz-cta {
  background: #ffffff;
  color: #0f172a;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}
.aizz-cta:hover {
  background: #f1f5f9;
  transform: scale(1.04);
}

/* ---- Rencana dropdown built with <details>/<summary> (no JS) ---- */
.aizz-rencana { position: relative; }

.aizz-rencana > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 500;
  user-select: none;
  transition: color 0.15s ease;
  white-space: nowrap;
}
.aizz-rencana > summary::-webkit-details-marker { display: none; }
.aizz-rencana > summary::marker { content: ""; }
.aizz-rencana > summary:hover { color: #3b82f6; }
.aizz-rencana[open] > summary { color: #3b82f6; }
.aizz-rencana > summary .dot { color: #3b82f6; }

.aizz-rencana > summary .chev {
  width: 14px;
  height: 14px;
  display: inline-block;
  transition: transform 0.2s ease;
}
.aizz-rencana[open] > summary .chev { transform: rotate(180deg); }

.aizz-rencana-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: 288px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.18);
  animation: aizzFadeIn 0.15s ease-out;
}
@keyframes aizzFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.aizz-rencana-panel-header { padding: 8px 12px 4px; }
.aizz-rencana-panel-header .label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #2563eb;
}
.aizz-rencana-panel-header .desc {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.aizz-rencana-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}
.aizz-rencana-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}
.aizz-rencana-item:hover { background: #f8fafc; }
.aizz-rencana-item.active { background: #eff6ff; }

.aizz-rencana-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #eff6ff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.15s ease;
}
.aizz-rencana-item:hover .aizz-rencana-icon {
  background: #2563eb;
  color: #ffffff;
}
.aizz-rencana-item.active .aizz-rencana-icon {
  background: #2563eb;
  color: #ffffff;
}
.aizz-rencana-icon svg { width: 15px; height: 15px; }

.aizz-rencana-text { flex: 1; min-width: 0; }
.aizz-rencana-text .name {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}
.aizz-rencana-text .descr {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  margin-top: 1px;
}

/* Push page content below the fixed nav. Loaded after each page's inline
   <style> block so this overrides any `body { padding: 0 }` in there. */
body { padding-top: 64px !important; }

/* ---- Cursor-following gradient background -------------------------------
 * Shared across every Rencana page. A fixed gradient layer is painted via
 * `html::before` and sits behind the body content. Two CSS variables —
 * `--cursor-x` / `--cursor-y` — control the focal point of the blue & violet
 * radial highlights. They're updated by /rencana/_assets/cursor-bg.js on
 * mousemove (with rAF easing) so the glow drifts toward the cursor. Each
 * page's inline <style> block declares its own `--bg` token (light or dark
 * via prefers-color-scheme), so the gradient adapts automatically. */
:root {
  --cursor-x: 50%;
  --cursor-y: 30%;
}
html { background: transparent; }
html::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg, #0b1120);
  background-image:
    radial-gradient(720px circle at var(--cursor-x) var(--cursor-y),
      rgba(59, 130, 246, 0.28),
      rgba(59, 130, 246, 0.08) 30%,
      transparent 60%),
    radial-gradient(900px circle at calc(100% - var(--cursor-x)) calc(100% - var(--cursor-y)),
      rgba(124, 58, 237, 0.22),
      transparent 55%),
    radial-gradient(1200px circle at 50% 110%,
      rgba(37, 99, 235, 0.12),
      transparent 60%);
}
/* Override each page's solid `html, body { background: var(--bg) }` so the
   gradient layer underneath is visible. This stylesheet is loaded after the
   inline <style>, so equal-specificity rules here win without !important. */
html, body { background: transparent; }
@media (prefers-reduced-motion: reduce) {
  :root { --cursor-x: 50%; --cursor-y: 30%; }
}

/* Small-screen behaviour: hide secondary links, keep brand + Rencana + CTA */
@media (max-width: 768px) {
  .aizz-nav-links { gap: 14px; }
  .aizz-nav-link { display: none; }
  .aizz-cta { padding: 6px 14px; font-size: 13px; }
  .aizz-rencana-panel {
    right: -8px;
    width: 260px;
  }
}
