:root {
  --bg: #24384d;
  --bg-mid: #2e4863;
  --bg-sky: #4a6f94;
  --bg-glass: rgba(255, 255, 255, 0.1);
  --bg-glass-strong: rgba(24, 40, 58, 0.56);
  --bg-code: rgba(18, 32, 47, 0.68);
  --bg-code-bar: rgba(255, 255, 255, 0.08);
  --ink: #ffffff;
  --ink-2: rgba(242, 247, 252, 0.88);
  --muted: rgba(214, 228, 242, 0.72);
  --wire: rgba(255, 255, 255, 0.34);
  --wire-strong: rgba(255, 255, 255, 0.6);
  --gold: #f6d690;
  --gold-bright: #ffe6ab;
  --gold-soft: rgba(246, 214, 144, 0.16);
  --gold-border: rgba(246, 214, 144, 0.55);
  --coral: #e8a290;
  --coral-soft: rgba(232, 162, 144, 0.24);
  --ok: #86efac;
  --err: #fda4af;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.62;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

code,
pre,
textarea,
.line-gutter {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   SCROLL PROGRESS BAR & KEYFRAME CHOREOGRAPHY
   ========================================================================== */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  z-index: 120;
  pointer-events: none;
  background: linear-gradient(90deg, var(--gold), var(--coral), #ffffff);
}

@keyframes heroKenBurns {
  0% {
    transform: scale(1) translate3d(0, 0, 0);
  }
  100% {
    transform: scale(1.065) translate3d(-0.8%, -0.6%, 0);
  }
}

@keyframes hudFadeUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatGentle {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes beaconPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.96;
  }
  50% {
    transform: scale(1.38);
    opacity: 0.55;
  }
}

@keyframes drawLine {
  from {
    stroke-dashoffset: 320;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes drawSignature {
  from {
    stroke-dashoffset: 900;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes dashOrbit {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -40;
  }
}

@keyframes mosaicBreath {
  0%,
  100% {
    opacity: 0.94;
  }
  50% {
    opacity: 0.45;
  }
}

@keyframes codeTabIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slowSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   FLOATING STICKY ARCHITECTURAL NAVBAR (NO SHADOW, WHITE HAIRLINES)
   ========================================================================== */

.floating-nav {
  position: fixed;
  top: 14px;
  left: 50%;
  width: min(820px, calc(100% - 28px));
  height: 48px;
  z-index: 95;
  display: grid;
  grid-template-columns: 58px 1fr 88px;
  border: 1px solid var(--wire-strong);
  background: rgba(24, 40, 58, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translate(-50%, -18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.floating-nav.is-shown {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.fn-brand,
.fn-gh {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.fn-brand {
  border-right: 1px solid var(--wire-strong);
}

.fn-gh {
  border-left: 1px solid var(--wire-strong);
}

.fn-brand:hover,
.fn-gh:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--gold);
  text-decoration: none;
}

.fn-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 0 14px;
  overflow-x: auto;
}

.fn-links a {
  position: relative;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 4px 0;
}

.fn-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1.5px;
  background: #ffffff;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.fn-links a:hover,
.fn-links a.hud-nav-active {
  color: #ffffff;
  text-decoration: none;
}

.fn-links a:hover::after,
.fn-links a.hud-nav-active::after {
  transform: scaleX(1);
}

.fn-links a.hud-nav-active {
  font-weight: 700;
}

/* ==========================================================================
   FINE-ART ARCHITECTURAL HERO (Melayu Siak / Lancang Kuning / Istana Siak)
   ========================================================================== */

.siak-hero {
  position: relative;
  min-height: 100svh;
  padding: 22px 26px 42px;
  background: var(--bg);
  display: flex;
  align-items: stretch;
  color: #ffffff;
  overflow: hidden;
}

.siak-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--bg) url("./hero-siak.jpg") center center / cover no-repeat;
  animation: heroKenBurns 26s ease-in-out infinite alternate;
  will-change: transform;
}

.siak-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(16, 31, 44, 0.3) 0%, rgba(16, 31, 44, 0.02) 26%, rgba(16, 31, 44, 0.08) 68%, rgba(36, 56, 77, 0.56) 100%);
  pointer-events: none;
}

.siak-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 92px;
  z-index: 1;
  background: linear-gradient(180deg, rgba(36, 56, 77, 0) 0%, rgba(36, 56, 77, 0.65) 56%, var(--bg) 100%);
  pointer-events: none;
}

.hud-frame {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.64);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Subpage Full-Bleed Painted Horizon Banner */
.subpage-banner {
  position: relative;
  min-height: 225px;
  padding: 18px 26px 0;
  overflow: hidden;
  background: var(--bg);
}

.subpage-banner-bg {
  position: absolute;
  inset: -18px 0;
  z-index: 0;
  background-position: center 42%;
  background-size: cover;
  background-repeat: no-repeat;
  transform: translate3d(0, var(--py, 0px), 0) scale(1.06);
  will-change: transform;
}

.subpage-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(24, 40, 58, 0.42) 0%,
    rgba(36, 56, 77, 0.2) 52%,
    rgba(36, 56, 77, 0.86) 92%,
    var(--bg) 100%
  );
  pointer-events: none;
}

.hud-frame-banner {
  min-height: 178px;
  border-color: rgba(255, 255, 255, 0.68);
  background: linear-gradient(180deg, rgba(24, 40, 58, 0.16), rgba(24, 40, 58, 0.04));
}

.subpage-banner-caption {
  padding: 16px 20px 66px;
  display: flex;
  justify-content: flex-end;
}

.banner-pill {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #ffffff;
  padding: 5px 11px;
  background: rgba(24, 40, 58, 0.42);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.56);
}

/* Top Integrated HUD Bar */
.hud-topbar {
  display: grid;
  grid-template-columns: 150px 1fr 150px;
  height: 54px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(18, 34, 48, 0.24);
  backdrop-filter: blur(8px);
}

.hud-brand-cell,
.hud-right-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.hud-brand-cell {
  border-right: 1px solid rgba(255, 255, 255, 0.58);
}

.hud-right-cell {
  border-left: 1px solid rgba(255, 255, 255, 0.58);
}

.hud-brand-cell:hover,
.hud-right-cell:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  text-decoration: none;
}

.hud-nav-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 0 16px;
  overflow-x: auto;
}

.hud-nav-cell a {
  position: relative;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.84rem;
  font-weight: 500;
  white-space: nowrap;
  padding: 4px 0;
  transition: color 0.18s ease;
}

.hud-nav-cell a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1.5px;
  background: #ffffff;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s ease;
}

.hud-nav-cell a:hover,
.hud-nav-cell a.hud-nav-active {
  color: #ffffff;
  text-decoration: none;
}

.hud-nav-cell a:hover::after,
.hud-nav-cell a.hud-nav-active::after {
  transform: scaleX(1);
}

.hud-nav-cell a.hud-nav-active {
  font-weight: 700;
}

.hud-mobile-nav {
  display: none;
  gap: 16px;
  overflow-x: auto;
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(18, 34, 48, 0.45);
  font-size: 0.82rem;
}

.hud-mobile-nav a {
  color: rgba(255, 255, 255, 0.86);
  white-space: nowrap;
  font-weight: 500;
}

.hud-mobile-nav a.hud-nav-active {
  color: #ffffff;
  font-weight: 700;
  text-decoration: underline;
}

/* White Diamond Intersection Nodes */
.hud-node {
  position: absolute;
  width: 6px;
  height: 6px;
  background: #ffffff;
  transform: rotate(45deg);
  pointer-events: none;
  z-index: 4;
}

.hud-node-br { bottom: -3.5px; right: -3.5px; }
.hud-node-bl { bottom: -3.5px; left: -3.5px; }
.hud-node-tl { top: -3.5px; left: -3.5px; }
.hud-node-tr { top: -3.5px; right: -3.5px; }

/* Center Atmospheric Hero Stage */
.hud-stage {
  position: relative;
  flex: 1;
  min-height: 410px;
  padding: 28px 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hud-headline {
  margin: 4px 0 0;
  text-align: center;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.8rem, 6vw, 5.15rem);
  line-height: 0.94;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.hud-headline span {
  display: block;
  transition: opacity 0.24s ease, transform 0.24s ease;
  animation: hudFadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hud-headline span:nth-child(2) {
  animation-delay: 0.14s;
}

.hud-headline span.is-switching,
.hud-manifesto.is-switching {
  opacity: 0;
  transform: translateY(8px);
}

/* Floating Frosted Glass Callouts + SVG Elbows */
.hud-callout {
  position: absolute;
  display: flex;
  align-items: flex-start;
  pointer-events: auto;
  animation: hudFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both, floatGentle 6.4s ease-in-out 1.15s infinite;
}

.hud-callout-left {
  top: 40%;
  left: 3.5%;
}

.hud-callout-right {
  top: 25%;
  right: 3.5%;
  flex-direction: column;
  align-items: flex-start;
  animation: hudFadeUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both, floatGentle 7.2s ease-in-out 2.3s infinite;
}

.callout-card {
  width: 198px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.56);
  color: #ffffff;
  transition: border-color 0.22s ease, background-color 0.22s ease;
}

.callout-card:hover {
  border-color: #ffffff;
  background: rgba(24, 40, 58, 0.44);
}

.callout-title {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 4px;
}

.callout-sub {
  font-size: 0.71rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 10px;
}

.callout-badges {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cb-dark,
.cb-plus,
.cb-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  font-weight: 700;
}

.cb-dark {
  background: #182736;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.56);
}

.cb-plus {
  background: rgba(255, 255, 255, 0.94);
  color: #182736;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.cb-plus:hover {
  background: #ffffff;
  transform: rotate(90deg);
  text-decoration: none;
}

.cb-chip {
  background: rgba(24, 39, 54, 0.48);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.56);
}

.callout-elbow-left {
  width: 110px;
  height: 72px;
  margin-top: 14px;
  flex-shrink: 0;
}

.callout-elbow-right {
  width: 120px;
  height: 72px;
  margin-left: -96px;
  margin-top: 0;
}

.callout-elbow path,
.istana-elbow path {
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: drawLine 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.55s forwards;
}

.beacon-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: beaconPulse 2.6s ease-in-out infinite;
}

/* Lower 3-Column Architectural Grid */
.hud-bottom {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  border-top: 1px solid rgba(255, 255, 255, 0.58);
  min-height: 215px;
  background: linear-gradient(180deg, rgba(16, 31, 44, 0.16) 0%, rgba(24, 40, 58, 0.44) 100%);
}

.hud-center-orb,
.finale-orb {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: #ffffff;
  color: #182736;
  border: 1px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.2s ease, color 0.2s ease;
}

.hud-center-orb {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
}

.hud-center-orb:hover {
  transform: translateX(-50%) scale(1.1) translateY(-2px);
  background: var(--gold);
  color: #182736;
  text-decoration: none;
}

.hud-cell {
  position: relative;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hud-cell-left {
  border-right: 1px solid rgba(255, 255, 255, 0.58);
}

.hud-cell-right {
  border-left: 1px solid rgba(255, 255, 255, 0.58);
  background-image: radial-gradient(rgba(255, 255, 255, 0.26) 1px, transparent 1px);
  background-size: 11px 11px;
}

.hud-cell-center {
  position: relative;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 18px;
  overflow: hidden;
}

.hud-orbit-arc {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 340px;
  height: 145px;
  pointer-events: none;
}

.hud-orbit-arc path {
  animation: dashOrbit 4s linear infinite;
}

.hud-manifesto {
  position: relative;
  z-index: 2;
  margin: 0;
  max-width: 44ch;
  text-align: center;
  font-size: 0.77rem;
  line-height: 1.48;
  color: rgba(255, 255, 255, 0.94);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.hud-cell-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.73rem;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 10px;
}

.hud-step-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.92);
  font-family: inherit;
  font-size: 0.73rem;
  font-weight: 600;
  padding: 2px 4px;
  cursor: pointer;
}

.hud-step-btn:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* 10x5 Wireframe Grid + Hatched Pucuk Rebung Mosaic */
.hud-mosaic-grid {
  position: relative;
  width: 301px;
  max-width: 100%;
  height: 151px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 30px 30px;
}

.mosaic-block {
  position: absolute;
  width: 30px;
  height: 30px;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.96),
    rgba(255, 255, 255, 0.96) 2px,
    rgba(255, 255, 255, 0.45) 2px,
    rgba(255, 255, 255, 0.45) 4px
  );
  border: 1px solid rgba(255, 255, 255, 0.85);
  animation: mosaicBreath 4.2s ease-in-out infinite;
}

.m-a { left: 60px; top: 30px; animation-delay: 0s; }
.m-b { left: 90px; top: 30px; animation-delay: 0.45s; }
.m-c { left: 60px; top: 60px; animation-delay: 0.9s; }
.m-d { left: 120px; top: 60px; animation-delay: 1.35s; }
.m-e { left: 90px; top: 90px; animation-delay: 1.8s; }
.m-f { left: 120px; top: 90px; animation-delay: 2.25s; }

.hud-sig-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 8px 6px 4px;
}

.hud-sig-caption {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 6px;
  text-align: center;
}

.sig-svg {
  width: 210px;
  height: 62px;
}

.sig-svg .sig-stroke {
  stroke-dasharray: 820;
  stroke-dashoffset: 820;
  animation: drawSignature 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.sig-svg .sig-underline {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: drawSignature 0.9s ease-out 0.75s forwards;
}

html.js-motion .reveal .sig-svg .sig-stroke,
html.js-motion .reveal .sig-svg .sig-underline {
  animation: none;
}

html.js-motion .reveal.is-visible .sig-svg .sig-stroke {
  animation: drawSignature 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

html.js-motion .reveal.is-visible .sig-svg .sig-underline {
  animation: drawSignature 0.9s ease-out 0.75s forwards;
}

/* ==========================================================================
   HERO-HARMONIZED NAVY · CERULEAN · CORAL WIREFRAME CANVAS (NO SHADOW)
   ========================================================================== */

.siak-sunlit {
  position: relative;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 72% 42% at 15% 6%, rgba(118, 160, 204, 0.42), transparent 64%),
    radial-gradient(ellipse 68% 40% at 86% 24%, rgba(232, 162, 144, 0.34), transparent 60%),
    radial-gradient(ellipse 60% 38% at 18% 66%, rgba(246, 214, 144, 0.22), transparent 62%),
    radial-gradient(ellipse 70% 42% at 82% 92%, rgba(110, 152, 196, 0.32), transparent 62%),
    radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 24px 24px;
  color: var(--ink);
}

.subpage-main {
  padding-top: 0;
  padding-bottom: 72px;
}

/* Scroll-Reveal Utility */
html.js-motion .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.68s cubic-bezier(0.22, 1, 0.36, 1), transform 0.68s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

html.js-motion .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Pointer Spotlight Glass Card Helper */
.spotlight-card {
  position: relative;
  overflow: hidden;
}

.spotlight-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(440px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.12), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.spotlight-card > :not(.hud-node) {
  position: relative;
  z-index: 1;
}

/* Crisp Sharp Wireframe Buttons (Zero Shadow) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 0;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--wire-strong);
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary {
  background: #ffffff;
  color: #182736;
  border-color: #ffffff;
}

.btn-primary:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #182736;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: var(--wire-strong);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #ffffff;
  color: #ffffff;
}

.btn-light-glass {
  background: rgba(24, 40, 58, 0.38);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
}

.btn-light-glass:hover {
  background: #ffffff;
  color: #182736;
}

.copy-mini {
  border: 1px solid var(--wire);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.copy-mini:hover {
  border-color: #ffffff;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.16);
  text-decoration: none;
}

/* Sections */
.section {
  padding: 72px 0;
}

.section-ruled {
  border-top: 1px solid var(--wire);
}

/* Gallery Wireframe Container (Section 01 — Strict 1px White Border, Zero Shadow) */
.gallery-wireframe {
  position: relative;
  border: 1px solid var(--wire-strong);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.1), rgba(24, 40, 58, 0.42));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0 28px 28px;
}

.wireframe-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin: 0 -28px 28px;
  padding: 10px 28px;
  border-bottom: 1px solid var(--wire-strong);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  background: rgba(255, 255, 255, 0.06);
}

.sandbox-stage-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
  margin-bottom: 26px;
}

.gallery-label {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 10px;
}

.gallery-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.85rem, 3.1vw, 2.5rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin: 0 0 12px;
}

.gallery-desc {
  margin: 0 0 16px;
  font-size: 0.96rem;
  color: var(--ink-2);
}

.gallery-desc code {
  background: rgba(255, 255, 255, 0.12);
  color: var(--gold);
  border: 1px solid var(--wire);
  padding: 2px 6px;
  font-size: 0.85em;
}

.install-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--code-bg, var(--bg-code));
  border: 1px solid var(--wire);
  padding: 8px 10px 8px 14px;
}

.install-inline code {
  font-size: 0.77rem;
  color: var(--ink-2);
  overflow-x: auto;
  white-space: nowrap;
}

/* Framed Painterly Vignette inside Section 01 */
.art-vignette {
  position: relative;
  height: 224px;
  border: 1px solid var(--wire-strong);
  overflow: hidden;
  background: var(--bg-mid);
}

.art-vignette-img {
  position: absolute;
  inset: -18px;
  background-position: center center;
  background-size: cover;
  transform: translate3d(0, var(--py, 0px), 0) scale(1.08);
  transition: transform 0.35s ease-out;
}

.art-vignette:hover .art-vignette-img {
  transform: translate3d(0, var(--py, 0px), 0) scale(1.13);
}

.art-vignette-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  padding: 9px 13px;
  background: rgba(24, 40, 58, 0.56);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #ffffff;
}

.art-vignette-badge strong {
  display: block;
  font-size: 0.78rem;
  color: #ffffff;
  line-height: 1.2;
}

.art-vignette-badge span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: var(--gold);
}

.vignette-compass {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 66px;
  height: 66px;
  z-index: 2;
  pointer-events: none;
}

.astro-ring-outer,
.svg-spin-slow {
  transform-box: fill-box;
  transform-origin: center;
  animation: slowSpin 34s linear infinite;
}

.svg-flow-path {
  animation: dashOrbit 2.4s linear infinite;
}

.svg-float-a {
  animation: floatGentle 4.6s ease-in-out infinite;
}

.svg-float-b {
  animation: floatGentle 5.2s ease-in-out 0.8s infinite;
}

.svg-beacon {
  transform-box: fill-box;
  transform-origin: center;
  animation: beaconPulse 2.4s ease-in-out infinite;
}

/* Wireframe Interactive Code Sandbox */
.hero-sandbox {
  background: var(--bg-glass-strong);
  border: 1px solid var(--wire-strong);
}

.sandbox-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-code-bar);
  border-bottom: 1px solid var(--wire);
}

.sandbox-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sc-tab {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.83rem;
  font-weight: 600;
  padding: 6px 13px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.sc-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.sc-tab.active {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: var(--wire-strong);
}

.sandbox-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-run-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid #ffffff;
  background: #ffffff;
  color: #182736;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.81rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn-run-mini:hover {
  transform: translateY(-1px);
  background: var(--gold);
  border-color: var(--gold);
}

.sandbox-pre {
  margin: 0;
  padding: 20px 24px;
  background: var(--bg-code);
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.66;
  overflow-x: auto;
}

.showcase-pre.tab-enter {
  animation: codeTabIn 0.24s ease-out both;
}

.sandbox-output {
  border-top: 1px solid var(--wire);
  background: rgba(24, 40, 58, 0.56);
  padding: 13px 24px;
}

.sandbox-out-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
}

.sandbox-output pre {
  margin: 0;
  font-size: 0.83rem;
  line-height: 1.55;
  color: var(--ok);
  white-space: pre-wrap;
}

/* Luminous Sky-Twilight Syntax Tokens */
.hl-decl  { color: #f6d690; font-weight: 600; }
.hl-kw    { color: #f7b7a3; font-weight: 600; }
.hl-const { color: #fdba74; }
.hl-type  { color: #93d5ff; font-weight: 600; }
.hl-fn    { color: #e0f2fe; }
.hl-str   { color: #86efac; }
.hl-num   { color: #fde68a; }
.hl-op    { color: #e2e8f0; }
.hl-cmt   { color: rgba(203, 219, 236, 0.65); font-style: italic; }

/* ==========================================================================
   SECTION 02: TENUN SONGKET ATMOSPHERIC BACKDROP + 3 ANIMATED SVG PILLARS
   ========================================================================== */

.tenun-section {
  background-color: var(--bg);
  background-image:
    linear-gradient(180deg, rgba(36, 56, 77, 0.8) 0%, rgba(56, 84, 112, 0.6) 50%, rgba(36, 56, 77, 0.84) 100%),
    url("./scene-tenun-siak.jpg");
  background-size: cover;
  background-position: center center;
}

.feature-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pillar-card {
  padding: 24px 24px 26px;
  border: 1px solid var(--wire-strong);
  background: rgba(24, 40, 58, 0.48);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 0.22s ease, transform 0.22s ease, background-color 0.22s ease;
}

.pillar-card:hover {
  border-color: #ffffff;
  background: rgba(24, 40, 58, 0.66);
  transform: translateY(-4px);
}

.pillar-svg {
  display: block;
  width: 100%;
  height: 76px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--wire);
}

.pillar-card h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px;
}

.pillar-card p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--ink-2);
}

.pillar-card code {
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.12);
  color: var(--gold);
  border: 1px solid var(--wire);
  padding: 1px 6px;
}

/* ==========================================================================
   SECTION 03: CREATOR + FRAMED ISTANA SIAK FINE-ART PAINTING
   ========================================================================== */

.creator-section {
  background:
    radial-gradient(ellipse 68% 55% at 22% 45%, rgba(232, 162, 144, 0.2), transparent 65%),
    radial-gradient(ellipse 60% 55% at 80% 45%, rgba(118, 160, 204, 0.25), transparent 65%);
}

.creator-gallery-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  align-items: center;
  margin-bottom: 34px;
}

.istana-showcase {
  position: relative;
  border: 1px solid var(--wire-strong);
  background: rgba(24, 40, 58, 0.44);
  backdrop-filter: blur(12px);
}

.istana-frame-head {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.71rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  border-bottom: 1px solid var(--wire);
}

.istana-painting-wrap {
  position: relative;
  height: 350px;
  overflow: hidden;
  background: var(--bg-mid);
}

.istana-painting {
  position: absolute;
  inset: -20px;
  background-position: center center;
  background-size: cover;
  transform: translate3d(0, var(--py, 0px), 0) scale(1.08);
  transition: transform 0.4s ease-out;
}

.istana-showcase:hover .istana-painting {
  transform: translate3d(0, var(--py, 0px), 0) scale(1.12);
}

.istana-callout {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.istana-elbow {
  width: 78px;
  height: 48px;
}

.istana-callout-card {
  padding: 10px 14px;
  background: rgba(24, 40, 58, 0.56);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.istana-callout-card strong {
  display: block;
  font-size: 0.8rem;
  color: #ffffff;
}

.istana-callout-card span {
  font-size: 0.71rem;
  color: var(--gold);
  font-weight: 600;
}

.creator-kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 10px;
}

.creator-bio h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.75rem, 2.8vw, 2.35rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 16px;
}

.creator-bio p {
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 0.96rem;
}

.creator-bio code {
  background: rgba(255, 255, 255, 0.12);
  color: var(--gold);
  border: 1px solid var(--wire);
  padding: 2px 6px;
  font-size: 0.85em;
}

.creator-sig-wrap {
  margin: 14px 0 8px;
}

.creator-meta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* 4-Column Architectural Spec Strip */
.spec-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--wire-strong);
  background: rgba(24, 40, 58, 0.44);
  backdrop-filter: blur(14px);
}

.spec-strip-cell {
  padding: 18px 20px;
  border-right: 1px solid var(--wire);
}

.spec-strip-cell:last-child {
  border-right: none;
}

.spec-k {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.71rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 5px;
}

.spec-v {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
}

.spec-v code {
  background: rgba(255, 255, 255, 0.12);
  color: var(--gold);
  border: 1px solid var(--wire);
  padding: 1px 5px;
  font-size: 0.86em;
}

/* ==========================================================================
   SECTION 04: DOCUMENTATION INDEX
   ========================================================================== */

.section-intro {
  max-width: 680px;
  margin-bottom: 30px;
}

.section-intro h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.7rem, 2.8vw, 2.25rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.16;
  margin: 0 0 10px;
}

.section-intro p {
  margin: 0;
  font-size: 1rem;
  color: var(--ink-2);
}

.section-intro code {
  background: rgba(255, 255, 255, 0.12);
  color: var(--gold);
  border: 1px solid var(--wire);
  padding: 2px 6px;
  font-size: 0.86em;
}

.chapter-index {
  border: 1px solid var(--wire-strong);
  background: rgba(24, 40, 58, 0.44);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.chapter-index-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 19px 24px;
  border-bottom: 1px solid var(--wire);
  color: var(--ink);
  transition: background-color 0.2s ease, padding-left 0.22s ease;
}

.chapter-index-row:last-child {
  border-bottom: none;
}

.chapter-index-row:hover {
  background: rgba(255, 255, 255, 0.08);
  padding-left: 30px;
  text-decoration: none;
}

.ch-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--gold);
}

.ch-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ch-body strong {
  font-size: 1.02rem;
  font-weight: 700;
  color: #ffffff;
}

.ch-body span {
  font-size: 0.88rem;
  color: var(--muted);
}

.ch-arrow {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--gold);
  transition: transform 0.2s ease;
}

.chapter-index-row:hover .ch-arrow {
  transform: translateX(5px);
}

/* ==========================================================================
   SECTION 05: FULL-BLEED PAINTED FINALE (LANCANG KUNING SUNGAI SIAK)
   ========================================================================== */

.painted-finale {
  position: relative;
  padding: 78px 0;
  overflow: hidden;
  border-top: 1px solid var(--wire);
  background: var(--bg);
}

.painted-finale-bg {
  position: absolute;
  inset: -24px 0;
  z-index: 0;
  background: url("./scene-sungai-siak.jpg") center center / cover no-repeat;
  transform: translate3d(0, var(--py, 0px), 0) scale(1.08);
  will-change: transform;
}

.painted-finale::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(36, 56, 77, 0.92) 0%,
    rgba(24, 40, 58, 0.22) 30%,
    rgba(24, 40, 58, 0.28) 72%,
    rgba(36, 56, 77, 0.92) 100%
  );
  pointer-events: none;
}

.finale-hud-frame {
  position: relative;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.72);
  padding: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(24, 40, 58, 0.14);
}

.finale-glass {
  max-width: 640px;
  padding: 28px 30px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(24, 40, 58, 0.44);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #ffffff;
}

.finale-kicker {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 8px;
}

.finale-glass h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.65rem, 2.8vw, 2.25rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 10px;
  color: #ffffff;
}

.finale-glass p {
  margin: 0 0 18px;
  color: var(--ink-2);
  font-size: 0.96rem;
}

.cta-band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.finale-orb:hover {
  transform: scale(1.1) translateY(-2px);
  background: var(--gold);
  border-color: var(--gold);
  color: #182736;
  text-decoration: none;
}

/* ==========================================================================
   SUBPAGES HERO CARD, SIDEBAR, TABLES & ATMOSPHERIC STUDIO IDE
   ========================================================================== */

.subpage-hero-card {
  position: relative;
  z-index: 4;
  margin-top: -52px;
  margin-bottom: 36px;
  border: 1px solid var(--wire-strong);
  background: rgba(24, 40, 58, 0.66);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 32px 34px;
}

.subpage-hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.subpage-astrolabe svg {
  width: 96px;
  height: 96px;
  display: block;
}

.page-kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 8px;
}

.kicker-coord {
  color: var(--muted);
}

.subpage-hero-card h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.9rem, 3.1vw, 2.75rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 12px;
}

.subpage-hero-card h1 code {
  background: rgba(255, 255, 255, 0.12);
  color: var(--gold);
  border: 1px solid var(--wire-strong);
  padding: 2px 8px;
  font-size: 0.82em;
}

.page-lead {
  margin: 0;
  font-size: 1.02rem;
  color: var(--ink-2);
  max-width: 68ch;
}

.page-lead code {
  background: rgba(255, 255, 255, 0.12);
  color: var(--gold);
  border: 1px solid var(--wire);
  padding: 2px 6px;
  font-size: 0.88em;
}

.doc-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 32px;
  align-items: start;
}

.doc-sidebar {
  position: sticky;
  top: 82px;
  border: 1px solid var(--wire-strong);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(16px);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.doc-sidebar-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--gold);
  padding: 6px 10px;
}

.doc-sidebar-sep {
  height: 1px;
  background: var(--wire);
  margin: 8px 0;
}

.doc-toc-link {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 8px 10px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-2);
}

.doc-toc-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  text-decoration: none;
}

.doc-toc-link code {
  color: inherit;
  font-size: 0.84em;
}

.toc-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
}

.doc-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.doc-chapter {
  border: 1px solid var(--wire-strong);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(14px);
  padding: 28px;
  transition: border-color 0.22s ease;
}

.doc-chapter:hover {
  border-color: #ffffff;
}

.doc-chapter h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}

.doc-chapter h2 code {
  font-size: 0.85em;
  color: var(--gold);
}

.doc-ringkas {
  margin: 0 0 16px;
  color: var(--muted);
  font-weight: 500;
}

.doc-prose p {
  margin: 0 0 12px;
  font-size: 0.96rem;
  color: var(--ink-2);
}

.doc-prose code,
.ph-cell code {
  background: rgba(255, 255, 255, 0.12);
  color: var(--gold);
  border: 1px solid var(--wire);
  padding: 2px 6px;
  font-size: 0.86em;
}

.doc-code-box {
  margin-top: 18px;
  border: 1px solid var(--wire-strong);
  overflow: hidden;
  background: var(--bg-code);
}

.doc-code-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background: var(--bg-code-bar);
  border-bottom: 1px solid var(--wire);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  color: var(--ink-2);
}

.doc-code-box pre.grd-code,
.ebnf-pre {
  margin: 0;
  padding: 16px 18px;
  background: var(--bg-code);
  color: var(--ink);
  font-size: 0.83rem;
  line-height: 1.62;
  overflow-x: auto;
}

.doc-out-box {
  border-top: 1px solid var(--wire);
  background: rgba(24, 40, 58, 0.56);
  padding: 12px 18px;
}

.doc-out-label {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ok);
  margin-bottom: 4px;
}

.doc-out-box pre {
  margin: 0;
  font-size: 0.81rem;
  color: var(--ink-2);
  white-space: pre-wrap;
}

.stdlib-symbols {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.stdlib-symbols code {
  font-size: 0.78rem;
  padding: 3px 9px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--wire);
  color: var(--gold);
}

/* Tables & Search */
.phonology-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.spec-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ph-cell {
  border: 1px solid var(--wire-strong);
  background: var(--bg-glass-strong);
  backdrop-filter: blur(14px);
  padding: 22px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.ph-cell:hover {
  border-color: #ffffff;
  transform: translateY(-2px);
}

.ph-cell h3 {
  font-family: "Playfair Display", Georgia, serif;
  margin: 6px 0 8px;
  font-size: 1.12rem;
  font-weight: 700;
  color: #ffffff;
}

.ph-cell p {
  margin: 0;
  font-size: 0.91rem;
  color: var(--ink-2);
}

.search-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 28px 0 16px;
}

#kw-search {
  flex: 1;
  max-width: 480px;
  padding: 10px 14px;
  border: 1px solid var(--wire-strong);
  background: var(--bg-code);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
}

#kw-search::placeholder {
  color: var(--muted);
}

#kw-search:focus {
  outline: none;
  border-color: #ffffff;
}

.kw-count {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
}

.table-wrap {
  border: 1px solid var(--wire-strong);
  overflow-x: auto;
  background: var(--bg-glass-strong);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--wire);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.08);
}

.data-table th {
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.data-table code {
  font-size: 0.85em;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--wire);
  padding: 2px 6px;
  color: var(--gold);
}

/* ==========================================================================
   ATMOSPHERIC WIREFRAME STUDIO IDE (ZERO SHADOW)
   ========================================================================== */

.studio {
  border: 1px solid var(--wire-strong);
  overflow: hidden;
  background: var(--bg-code);
}

.studio-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-code-bar);
  border-bottom: 1px solid var(--wire);
}

.toolbar-left,
.toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.toolbar-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold);
}

#example-select {
  background: rgba(24, 40, 58, 0.85);
  color: #ffffff;
  border: 1px solid var(--wire-strong);
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 500;
}

#example-select option {
  background: #1c3045;
  color: #ffffff;
}

.s-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--wire);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.s-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #ffffff;
  color: var(--gold);
}

.s-btn-run {
  background: #ffffff;
  color: #182736;
  border-color: #ffffff;
  font-weight: 700;
}

.s-btn-run:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #182736;
}

.studio-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: 460px;
}

.editor-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--wire);
  min-width: 0;
  background: var(--bg-code);
}

.panel-bar {
  display: flex;
  justify-content: space-between;
  padding: 7px 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--wire);
}

.editor-wrap {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 420px;
  max-height: 560px;
  overflow: hidden;
  background: var(--bg-code);
}

.line-gutter {
  width: 46px;
  flex-shrink: 0;
  padding: 16px 10px 16px 4px;
  text-align: right;
  font-size: 13.5px;
  line-height: 22px;
  color: rgba(214, 228, 242, 0.45);
  background: rgba(255, 255, 255, 0.03);
  border-right: 1px solid var(--wire);
  overflow: hidden;
  user-select: none;
}

.line-gutter .ln {
  display: block;
  height: 22px;
}

.line-gutter .ln-err {
  color: var(--err);
  font-weight: 700;
}

.editor-layers {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: var(--bg-code);
}

.editor-highlight,
#code-editor {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 16px;
  font-size: 13.5px;
  line-height: 22px;
  letter-spacing: 0;
  tab-size: 4;
  white-space: pre;
  overflow: auto;
  border: none;
  outline: none;
}

.editor-highlight {
  pointer-events: none;
  color: var(--ink);
}

#code-editor {
  resize: none;
  background: transparent;
  color: transparent;
  caret-color: var(--gold);
}

#code-editor::selection {
  background: rgba(246, 214, 144, 0.25);
  color: transparent;
}

.output-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(24, 40, 58, 0.62);
}

.output-tabs {
  display: flex;
  background: var(--bg-code-bar);
  border-bottom: 1px solid var(--wire);
}

.out-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 8px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.out-tab:hover {
  color: #ffffff;
}

.out-tab.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-bottom-color: var(--gold);
}

.sub-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
  font-size: 0.76rem;
  color: var(--muted);
  border-bottom: 1px solid var(--wire);
  background: rgba(255, 255, 255, 0.04);
}

.output-body {
  flex: 1;
  margin: 0;
  padding: 16px;
  font-size: 0.83rem;
  line-height: 1.6;
  color: var(--ink);
  overflow: auto;
  max-height: 515px;
  white-space: pre-wrap;
  word-break: break-word;
}

.studio-status {
  display: flex;
  justify-content: space-between;
  padding: 8px 16px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.76rem;
  background: var(--bg-code-bar);
  border-top: 1px solid var(--wire);
  color: var(--muted);
}

.st-ok {
  color: var(--ok);
  font-weight: 600;
}

.st-err {
  color: var(--err);
  font-weight: 600;
}

/* Guestbook */
.guestbook-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 28px;
}

.guest-form {
  border: 1px solid var(--wire-strong);
  background: var(--bg-glass-strong);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.guest-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #ffffff;
}

.guest-form input,
.guest-form textarea {
  padding: 9px 12px;
  border: 1px solid var(--wire-strong);
  background: var(--bg-code);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
}

.guest-form input:focus,
.guest-form textarea:focus {
  outline: none;
  border-color: #ffffff;
}

.gf-status {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--ok);
}

.guest-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.guest-row {
  border: 1px solid var(--wire-strong);
  background: var(--bg-glass-strong);
  padding: 16px 18px;
}

.guest-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.guest-meta strong {
  color: #ffffff;
}

.guest-meta span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: var(--gold);
}

.guest-row p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-2);
}

/* Unified White Wireframe Footer (Zero Shadow) */
.footer {
  background: var(--bg);
  padding: 12px 0 38px;
  font-size: 0.88rem;
  color: var(--muted);
}

.footer-frame {
  position: relative;
  border: 1px solid var(--wire-strong);
  background: rgba(24, 40, 58, 0.56);
  backdrop-filter: blur(12px);
  padding: 26px 28px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-inner strong {
  color: #ffffff;
}

.footer-sub {
  margin-top: 5px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--ink-2);
  font-weight: 500;
}

.footer-links a:hover {
  color: #ffffff;
}

/* ==========================================================================
   ACCESSIBILITY & RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .siak-hero-bg,
  .hud-headline span,
  .hud-callout,
  .callout-elbow path,
  .istana-elbow path,
  .beacon-dot,
  .hud-orbit-arc path,
  .mosaic-block,
  .sig-svg .sig-stroke,
  .sig-svg .sig-underline,
  .showcase-pre.tab-enter,
  .astro-ring-outer,
  .svg-spin-slow,
  .svg-flow-path,
  .svg-float-a,
  .svg-float-b,
  .svg-beacon {
    animation: none !important;
    stroke-dashoffset: 0 !important;
  }

  .art-parallax {
    transform: none !important;
  }

  html.js-motion .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

@media (max-width: 1040px) {
  .hud-callout,
  .hud-orbit-arc {
    display: none;
  }
  .hud-topbar {
    grid-template-columns: 76px 1fr 90px;
  }
  .hud-bottom {
    grid-template-columns: 1fr;
  }
  .hud-cell-left,
  .hud-cell-right {
    display: none;
  }
  .spec-strip {
    grid-template-columns: 1fr 1fr;
  }
  .spec-strip-cell {
    border-bottom: 1px solid var(--wire);
  }
}

@media (max-width: 960px) {
  .siak-hero {
    padding: 12px 12px 28px;
  }
  .subpage-banner {
    padding: 12px 12px 0;
  }
  .hud-nav-cell {
    display: none;
  }
  .hud-topbar {
    grid-template-columns: 1fr auto;
  }
  .hud-brand-cell {
    justify-content: flex-start;
    padding-left: 14px;
    border-right: none;
  }
  .hud-right-cell {
    padding: 0 18px;
  }
  .hud-mobile-nav {
    display: flex;
  }
  .sandbox-stage-grid,
  .feature-columns,
  .creator-gallery-grid,
  .spec-strip,
  .doc-layout,
  .studio-split,
  .guestbook-grid,
  .phonology-grid,
  .spec-summary-grid,
  .subpage-hero-grid {
    grid-template-columns: 1fr;
  }
  .spec-strip-cell {
    border-right: none;
    border-bottom: 1px solid var(--wire);
  }
  .spec-strip-cell:last-child {
    border-bottom: none;
  }
  .subpage-astrolabe {
    display: none;
  }
  .finale-hud-frame {
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
  }
  .doc-sidebar {
    position: static;
  }
  .editor-panel {
    border-right: none;
    border-bottom: 1px solid var(--wire);
  }
  .chapter-index-row {
    grid-template-columns: 40px 1fr;
  }
  .ch-arrow {
    display: none;
  }
}

@media (max-width: 760px) {
  .floating-nav {
    grid-template-columns: 46px 1fr 72px;
    width: calc(100% - 16px);
    top: 10px;
    height: 44px;
  }
  .fn-links {
    justify-content: flex-start;
    gap: 14px;
  }
}
