/* ==========================================================================
   Locus — FoilWrap-inspired cinematic theme
   Custom classes & globals. Tailwind utilities come from the Play CDN.
   ========================================================================== */

:root {
  --bg: #0a0a0a;
  --brand: #bbcf1d;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: #f5f5f5;
  font-family: "Inter", sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-heading {
  font-family: "Orbitron", sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

::selection {
  background: rgba(187, 207, 29, 0.30);
  color: #ffffff;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(187, 207, 29, 0.3); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(187, 207, 29, 0.6); }
html { scrollbar-width: thin; scrollbar-color: rgba(187,207,29,0.3) transparent; }

/* --- Cinematic vignette --- */
.cinematic-vignette {
  background: radial-gradient(ellipse at center, transparent 40%, #0a0a0a 100%);
}

/* --- Glass panel --- */
.glass-panel {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Section radial backgrounds (#8cb314 -> #1f3603) --- */
.bg-radial-green {
  background:
    radial-gradient(circle at 50% 0%, rgba(140, 179, 20, 0.22) 0%, rgba(31, 54, 3, 0.12) 42%, #0a0a0a 78%);
}
.bg-radial-green-center {
  background:
    radial-gradient(circle at 50% 50%, rgba(140, 179, 20, 0.16) 0%, rgba(31, 54, 3, 0.10) 45%, #0a0a0a 80%);
}

/* --- Scroll progress bar --- */
#scroll-progress {
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.1s linear;
}

/* --- Floating nav scroll state --- */
#main-nav { transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
#main-nav.nav-scrolled .nav-pill {
  max-width: 1100px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: rgba(187, 207, 29, 0.35);
}

/* --- Nav link hover quirk --- */
.nav-link {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
}
.nav-link:hover {
  transform: scale(1.15);
  letter-spacing: 0.2em;
  color: #ffffff;
}

/* --- Services dropdown (extra-wide desktop panel) --- */
.has-dropdown .dropdown-panel {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.has-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
@media (min-width: 768px) {
  .dropdown-panel { width: 750px; }
}

/* --- Reveal on scroll --- */
.reveal-on-scroll {
  opacity: 0;
  transform: translate3d(0, 40px, 0);
  transition:
    opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
/* Safety: if JS is disabled, never leave content stuck invisible. */
.no-js .reveal-on-scroll {
  opacity: 1;
  transform: none;
}

/* --- Neon glow helpers --- */
.neon-glow { box-shadow: 0 0 30px rgba(187, 207, 29, 0.45), 0 0 60px rgba(187, 207, 29, 0.15); }
.neon-border { border-color: var(--brand); box-shadow: 0 0 22px rgba(187, 207, 29, 0.35); }
.text-glow { text-shadow: 0 0 24px rgba(187, 207, 29, 0.55); }

/* --- Flying plane on submit hover --- */
.submit-btn iconify-icon { transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
.submit-btn:hover iconify-icon { transform: translate(6px, -6px) rotate(8deg); }

/* ==========================================================================
   Docs prose theming (markdown content can't take Tailwind classes)
   ========================================================================== */
.docs-shell { padding: 9rem 0 4rem; }
.docs { display: grid; grid-template-columns: 250px 1fr; gap: 3rem; align-items: start; }
.docs-sidebar { position: sticky; top: 7rem; }
.docs-sidebar h4 {
  font-family: "Orbitron", sans-serif;
  color: var(--brand);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  margin: 1.4rem 0 0.6rem;
}
.docs-sidebar a {
  display: block;
  color: #9a9a9a;
  padding: 0.35rem 0;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}
.docs-sidebar a:hover { color: #fff; padding-left: 4px; }
.docs-sidebar a.active { color: var(--brand); font-weight: 500; }

.docs-content { min-width: 0; color: #d6d6d6; line-height: 1.75; overflow-wrap: anywhere; }
/* Long base58 / hashes in inline code shouldn't blow out the layout. */
.docs-content :not(pre) > code { overflow-wrap: anywhere; word-break: break-word; }
.docs-content h1 {
  font-family: "Orbitron", sans-serif;
  font-size: 2.2rem; margin: 0 0 1rem; color: #fff;
}
.docs-content h2 {
  font-family: "Orbitron", sans-serif;
  margin-top: 2.4rem; padding-top: 1.2rem; color: #fff;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.docs-content h3 { color: #fff; margin-top: 1.6rem; }
.docs-content a { color: var(--brand); }
.docs-content code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 0.1rem 0.4rem; border-radius: 6px; font-size: 0.85em;
}
.docs-content pre {
  background: #050505 !important;
  border: 1px solid rgba(187,207,29,0.18);
  border-radius: 14px; padding: 1.1rem 1.2rem; overflow-x: auto; font-size: 0.85rem;
}
.docs-content pre code { background: none; border: none; padding: 0; }
/* Wide tables scroll inside their own box instead of widening the page on mobile. */
.docs-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.2rem 0; font-size: 0.9rem; }
.docs-content th, .docs-content td { border: 1px solid rgba(255,255,255,0.1); padding: 0.55rem 0.8rem; text-align: left; }
.docs-content th { background: rgba(187,207,29,0.08); color: #fff; }
.docs-content blockquote {
  border-left: 3px solid var(--brand);
  margin: 1.2rem 0; padding: 0.6rem 1rem; color: #b5b5b5;
  background: rgba(255,255,255,0.03); border-radius: 0 10px 10px 0;
}

@media (max-width: 860px) {
  .docs { grid-template-columns: 1fr; gap: 1.5rem; }
  .docs-sidebar { position: static; top: 0; }
}
