/* ==================================================================
 * site-nav.css — the one stylesheet that owns the site navigation.
 *
 * Loaded LAST on every page (index, about, blog, solutions) so it is
 * authoritative for the nav. It does three jobs:
 *
 *   1. Utility shim — index.html/about.html pull in the Tailwind CDN,
 *      the blog and solutions pages do not. The nav markup is identical
 *      everywhere, so the handful of Tailwind utilities it relies on are
 *      re-declared here, scoped to the nav subtree, with Tailwind\'s own
 *      values. On Tailwind pages these are a no-op duplicate; on the
 *      others they are what makes the nav render at all.
 *   2. Layout locks — reserve a fixed width per nav item so switching
 *      ID/EN cannot reflow the bar (labels differ in length), and dock
 *      the Get Free Audit CTA to the right edge.
 *   3. The floating in-page section nav shared by about, solutions and
 *      the blog articles.
 * ================================================================== */


/* ------------------------------------------------------------------
 * 1a. The nav element\'s own utilities (fixed top-0 z-50 w-full)
 * ------------------------------------------------------------------ */
nav.nav-glass {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  /* Tailwind\'s Preflight puts line-height:1.5 on <html> and everything in
     the nav inherits it. The blog/solutions pages have no Preflight, so
     without this their pills and links come out a few pixels shorter than
     the homepage\'s. */
  line-height: 1.5;
}

/* Pages whose first section was not designed to sit under an overlay nav
   (blog + solutions) reserve the nav\'s height instead. nav-shared.js keeps
   --svt-fixed-nav-h in sync with the real rendered height. */
body.svt-nav-offset {
  padding-top: var(--svt-fixed-nav-h, 98px);
}


/* ------------------------------------------------------------------
 * 1b. Tailwind utility shim, scoped to the nav subtree.
 *     Base utilities first, then hover, then dark — same cascade order
 *     Tailwind itself emits, so the ties resolve the same way.
 * ------------------------------------------------------------------ */
/* Preflight\'s button reset. Wrapped in :where() so it carries zero
   specificity, exactly like Preflight — .nav-menu-toggle and
   .nav-mobile-theme must still be able to set their own border and
   padding. Without this the UA\'s 2px button border made the language
   pills 5px wider and taller than on the homepage. */
:where(nav.nav-glass button) {
  font-family: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
  border: 0;
  background-color: transparent;
  background-image: none;
  text-transform: none;
  cursor: pointer;
}

nav.nav-glass .flex { display: flex; }
nav.nav-glass .hidden { display: none; }
nav.nav-glass .flex-col { flex-direction: column; }
nav.nav-glass .items-center { align-items: center; }
nav.nav-glass .justify-between { justify-content: space-between; }
nav.nav-glass .justify-center { justify-content: center; }
nav.nav-glass .mx-auto { margin-left: auto; margin-right: auto; }
nav.nav-glass .ml-auto { margin-left: auto; }
nav.nav-glass .max-w-\[1280px\] { max-width: 1280px; }
nav.nav-glass .max-w-\[1400px\] { max-width: 1400px; }

nav.nav-glass .px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
nav.nav-glass .py-3 { padding-top: .75rem; padding-bottom: .75rem; }
nav.nav-glass .py-2\.5 { padding-top: .625rem; padding-bottom: .625rem; }
nav.nav-glass .px-3 { padding-left: .75rem; padding-right: .75rem; }
nav.nav-glass .py-2 { padding-top: .5rem; padding-bottom: .5rem; }
nav.nav-glass .p-1 { padding: .25rem; }
nav.nav-glass .pl-6 { padding-left: 1.5rem; }

nav.nav-glass .gap-2 { gap: .5rem; }
nav.nav-glass .gap-3 { gap: .75rem; }
nav.nav-glass .gap-4 { gap: 1rem; }
nav.nav-glass .gap-7 { gap: 1.75rem; }
nav.nav-glass .gap-8 { gap: 2rem; }

nav.nav-glass .h-2 { height: .5rem; }
nav.nav-glass .w-2 { width: .5rem; }
nav.nav-glass .h-9 { height: 2.25rem; }
nav.nav-glass .w-9 { width: 2.25rem; }

nav.nav-glass .rounded-full { border-radius: 9999px; }
/* Tailwind gets border-style from Preflight; supply it here as well so the
   dividers and pills also draw on the non-Tailwind pages. */
nav.nav-glass .border { border-width: 1px; border-style: solid; }
nav.nav-glass .border-l { border-left-width: 1px; border-left-style: solid; }
nav.nav-glass .border-slate-300 { border-color: #cbd5e1; }

nav.nav-glass .bg-slate-100 { background-color: #f1f5f9; }
nav.nav-glass .bg-slate-900 { background-color: #0f172a; }
nav.nav-glass .bg-amber-500 { background-color: #f59e0b; }

nav.nav-glass .text-white { color: #fff; }
nav.nav-glass .text-slate-500 { color: #64748b; }
nav.nav-glass .text-slate-600 { color: #475569; }

nav.nav-glass .text-\[9px\] { font-size: 9px; }
nav.nav-glass .text-\[10px\] { font-size: 10px; }
nav.nav-glass .text-\[11px\] { font-size: 11px; }
nav.nav-glass .font-bold { font-weight: 700; }
nav.nav-glass .uppercase { text-transform: uppercase; }
nav.nav-glass .tracking-widest { letter-spacing: .1em; }
nav.nav-glass .tracking-\[\.14em\] { letter-spacing: .14em; }
nav.nav-glass .font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    \'Liberation Mono\', \'Courier New\', monospace;
}
nav.nav-glass .font-space { font-family: \'Space Grotesk\', sans-serif; }

nav.nav-glass .shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1);
}

nav.nav-glass .transition {
  transition-property: color, background-color, border-color, text-decoration-color,
    fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
  transition-timing-function: cubic-bezier(.4, 0, .2, 1);
  transition-duration: .15s;
}
nav.nav-glass .transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(.4, 0, .2, 1);
  transition-duration: .15s;
}
nav.nav-glass.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(.4, 0, .2, 1);
  transition-duration: .15s;
}
nav.nav-glass.duration-300 { transition-duration: .3s; }

nav.nav-glass .animate-pulse { animation: svt-nav-pulse 2s cubic-bezier(.4, 0, .6, 1) infinite; }
@keyframes svt-nav-pulse { 50% { opacity: .5; } }

/* Brand logogram tilt on hover (Tailwind\'s group-hover utilities). */
nav.nav-glass .group:hover .group-hover\:rotate-\[8deg\] { transform: rotate(8deg); }
nav.nav-glass .group:hover .group-hover\:scale-\[1\.04\] { transform: scale(1.04); }
nav.nav-glass .group:hover .group-hover\:rotate-\[8deg\].group-hover\:scale-\[1\.04\] {
  transform: rotate(8deg) scale(1.04);
}

/* Hover variants */
nav.nav-glass .hover\:text-amber-600:hover { color: #d97706; }
nav.nav-glass .hover\:text-amber-500:hover { color: #f59e0b; }
nav.nav-glass .hover\:bg-amber-500:hover { background-color: #f59e0b; }
nav.nav-glass .hover\:text-black:hover { color: #000; }

/* Responsive variants — desktop bar above 1280px, MENU button below. */
@media (min-width: 1280px) {
  nav.nav-glass .xl\:flex { display: flex; }
  nav.nav-glass .xl\:hidden { display: none; }
}

/* Dark variants */
html.dark nav.nav-glass .dark\:text-slate-400 { color: #94a3b8; }
html.dark nav.nav-glass .dark\:text-slate-300 { color: #cbd5e1; }
html.dark nav.nav-glass .dark\:text-black { color: #000; }
html.dark nav.nav-glass .dark\:border-slate-700 { border-color: #334155; }
html.dark nav.nav-glass .dark\:bg-slate-900 { background-color: #0f172a; }
html.dark nav.nav-glass .dark\:bg-slate-800 { background-color: #1e293b; }
html.dark nav.nav-glass .dark\:bg-white { background-color: #fff; }
html.dark nav.nav-glass .dark\:bg-black { background-color: #000; }
html.dark nav.nav-glass .dark\:hover\:text-white:hover { color: #fff; }
html.dark nav.nav-glass .dark\:hover\:bg-amber-500:hover { background-color: #f59e0b; }


/* ------------------------------------------------------------------
 * 2a. Theme toggle icons.
 *     Driven by explicit classes rather than Tailwind\'s dark:hidden /
 *     hidden dark:block pair, so the moon/sun swap is identical on the
 *     pages that have no Tailwind.
 * ------------------------------------------------------------------ */
.nav-theme-sun { display: none; }
.nav-theme-moon { display: inline-block; }
html.dark .nav-theme-moon { display: none; }
html.dark .nav-theme-sun { display: inline-block; }


/* ------------------------------------------------------------------
 * 2b. Width locks.
 *     ID and EN labels differ in length ("Solusi" / "Services",
 *     "Tentang" / "About"), so without a reserved width every language
 *     switch reflowed the whole bar and the menu appeared to jump.
 *     Each item reserves the width of its longest label in either
 *     language and centres the text inside it, so switching ID/EN only
 *     swaps the glyphs — nothing moves.
 * ------------------------------------------------------------------ */
nav.nav-glass .nav-link {
  display: inline-block;
  text-align: center;
}
nav.nav-glass .nav-link[data-nav-key=\'architecture\'] { min-width: 104px; }
nav.nav-glass .nav-link[data-nav-key=\'clients\']      { min-width: 63px; }
nav.nav-glass .nav-link[data-nav-key=\'industries\']   { min-width: 88px; }
nav.nav-glass .nav-link[data-nav-key=\'services\']     { min-width: 71px; }
nav.nav-glass .nav-link[data-nav-key=\'products\']     { min-width: 71px; }
nav.nav-glass .nav-link[data-nav-key=\'why\']          { min-width: 66px; }
nav.nav-glass .nav-link[data-nav-key=\'articles\']     { min-width: 71px; }
nav.nav-glass .nav-link[data-nav-key=\'about\']        { min-width: 63px; }

/* The language pills swap between equal-length labels, but pin them anyway
   so the active-state styling below cannot nudge them. */
nav.nav-glass #language-toggle .lang-btn { min-width: 42px; text-align: center; }

/* Active language, previously unstyled — you could not tell which was on. */
nav.nav-glass .lang-btn { color: #64748b; }
nav.nav-glass .lang-btn:hover { color: #0f172a; }
nav.nav-glass .lang-btn.active {
  background: #0f172a;
  color: #fff;
}
html.dark nav.nav-glass .lang-btn { color: #94a3b8; }
html.dark nav.nav-glass .lang-btn:hover { color: #fff; }
html.dark nav.nav-glass .lang-btn.active {
  background: #f59e0b;
  color: #0f172a;
}


/* ------------------------------------------------------------------
 * 2c. Get Free Audit — docked at the right edge, slides out on hover.
 *     Taken out of flow so it no longer squeezes the rest of the bar;
 *     what is left is a rounded stub with the pulsing dot, and hover or
 *     keyboard focus slides the full pill into view.
 * ------------------------------------------------------------------ */
nav.nav-glass .nav-audit {
  position: absolute;
  top: 50%;
  right: 0;
  z-index: 2;
  flex: 0 0 auto;
  white-space: nowrap;
  border-radius: 999px 0 0 999px;
  padding-left: 20px;
  padding-right: 24px;
  transform: translate(calc(100% - 46px), -50%);
  transition: transform .34s cubic-bezier(.22, .61, .36, 1),
              box-shadow .34s ease,
              background-color .15s ease,
              color .15s ease;
}
nav.nav-glass .nav-audit:hover,
nav.nav-glass .nav-audit:focus-visible {
  transform: translate(0, -50%);
  box-shadow: 0 14px 30px -8px rgba(15, 23, 42, .45);
}
html.dark nav.nav-glass .nav-audit:hover,
html.dark nav.nav-glass .nav-audit:focus-visible {
  box-shadow: 0 14px 30px -8px rgba(0, 0, 0, .7);
}
/* The dot sits in the sliver that stays visible while tucked. */
nav.nav-glass .nav-audit .nav-audit-dot {
  flex: 0 0 auto;
  margin-right: 2px;
}


/* ------------------------------------------------------------------
 * 3. Floating in-page section nav.
 *    Shared by about.html, the solutions pages and the blog articles.
 *    .about-floating-nav is kept as an alias so about.css\'s original
 *    rules and this one describe the same component.
 * ------------------------------------------------------------------ */
.svt-floating-nav {
  position: fixed;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  padding: 10px 8px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(14px);
  border: 1px solid #e2e8f0;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .14);
  scrollbar-width: none;
}
.svt-floating-nav::-webkit-scrollbar { display: none; }

.svt-floating-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-family: \'JetBrains Mono\', monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #64748b;
  white-space: nowrap;
  text-decoration: none;
  transition: color .2s ease, background .2s ease;
}
.svt-floating-nav a:hover { color: #d97706; background: rgba(217, 119, 6, .08); }
.svt-floating-nav a.active { color: #fff; background: #0f172a; }

/* Optional leading index, set with data-step on the link. */
.svt-floating-nav a[data-step]::before {
  content: attr(data-step);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #cbd5e1;
}
.svt-floating-nav a:hover[data-step]::before { color: #d97706; }
.svt-floating-nav a.active[data-step]::before { color: #f59e0b; }

html.dark .svt-floating-nav {
  background: rgba(11, 16, 32, .85);
  border-color: rgba(148, 163, 184, .18);
}
html.dark .svt-floating-nav a { color: #94a3b8; }
html.dark .svt-floating-nav a:hover { color: #f59e0b; background: rgba(245, 158, 11, .1); }
html.dark .svt-floating-nav a.active { background: #f59e0b; color: #0f172a; }
html.dark .svt-floating-nav a[data-step]::before { color: #475569; }
html.dark .svt-floating-nav a.active[data-step]::before { color: #7c2d12; }

/* While the rail is floating it sits on top of the right-hand edge of the
   1280px content column, clipping cards and images. Reserve the rail\'s
   measured width (nav-shared.js sets --svt-rail-w and the .svt-has-rail flag)
   on BOTH sides: reserving it only on the right lets .blog-shell\'s `margin:
   auto` dump all the slack into the left margin, which reads as a page that
   has slid off-centre. Equal gutters keep the column centred in the viewport
   and still clear the rail. */
@media (min-width: 1400px) {
  body.svt-has-rail .blog-shell {
    margin-left: auto;
    margin-right: auto;
    max-width: min(1280px, calc(100% - 2 * (var(--svt-rail-w, 190px) + 58px)));
  }
  /* The article cover sits outside .blog-shell and has its own narrower cap. */
  body.svt-has-rail .article-cover {
    margin-left: auto;
    margin-right: auto;
    max-width: min(1180px, calc(100% - 2 * (var(--svt-rail-w, 190px) + 58px)));
  }
}

/* Below 1400px a floating rail would squeeze the centred content column too
   hard (the rail plus its mirrored gutter eats ~460px), so it
   drops into normal flow above the content as a horizontal chip strip that
   scrolls sideways. The articles used to have a static sidebar TOC here;
   this keeps them navigable instead of losing in-page nav on a phone. */
@media (max-width: 1399px) {
  .svt-floating-nav {
    position: static;
    transform: none;
    flex-direction: row;
    max-width: 1280px;
    max-height: none;
    margin: 0 auto 4px;
    padding: 10px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 16px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: none;
    -webkit-overflow-scrolling: touch;
  }
  .svt-floating-nav a { flex: 0 0 auto; }

  /* On the solutions pages specifically, keep it sticky under the fixed
     site nav instead of scrolling away — nav-shared.js keeps
     --svt-fixed-nav-h in sync with the real nav height. */
  body.sol-poster .svt-floating-nav {
    position: sticky;
    top: var(--svt-fixed-nav-h, 98px);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 20px -16px rgba(15, 23, 42, .35);
    z-index: 35;
  }
}
@media (max-width: 1399px) {
  /* Line the strip up with the page gutter its section content uses. */
  .article-layout .svt-floating-nav,
  .svt-floating-nav { width: calc(100% - 48px); }
}
@media (max-width: 600px) {
  .svt-floating-nav { width: calc(100% - 32px); }
}


/* ------------------------------------------------------------------
 * 4. Anchor landing offset.
 *    The nav overlays the page, so in-page targets need to clear it.
 * ------------------------------------------------------------------ */
.article-content section[id],
.sol-section[id],
.sol-hero[id],
.about-hero[id],
.about-section[id] {
  scroll-margin-top: calc(var(--svt-fixed-nav-h, 98px) + 24px);
}


/* === Nav CTA Stack (Get Free + Inquiry Now stacked) === */
.nav-cta-stack {
  position: static;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: stretch;
  flex-shrink: 0;
}
.nav-get-free,
.nav-inquiry-now {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 999px;
  font-family: ui-monospace, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 7px 16px;
  line-height: 1;
  text-decoration: none;
  transition: background-color .15s, color .15s;
}
.nav-get-free {
  background: #0f172a;
  color: #fff;
}
.nav-get-free:hover {
  background: #f59e0b;
  color: #000;
}
html.dark .nav-get-free {
  background: #fff;
  color: #0f172a;
}
html.dark .nav-get-free:hover {
  background: #f59e0b;
  color: #000;
}
.nav-get-free .nav-audit-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  animation: pulse 2s cubic-bezier(.4,0,.6,1) infinite;
  flex-shrink: 0;
}
html.dark .nav-get-free .nav-audit-dot {
  background: #0f172a;
}
html.dark .nav-get-free:hover .nav-audit-dot {
  background: #0f172a;
}
.nav-inquiry-now {
  background: #f59e0b;
  color: #000;
}
.nav-inquiry-now:hover {
  background: #16a34a;
  color: #fff;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* Override per-key min-widths */
nav.nav-glass .nav-link[data-nav-key] { min-width: 0; }

.footer-address-text {
  display: block;
  font-size: 11px;
  color: inherit;
  opacity: 1;
  margin-top: 3px;
  line-height: 1.4;
}

/* back-to-top button */
#back-to-top {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #f59e0b;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  box-shadow: 0 4px 14px rgba(245,158,11,.45);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .25s, transform .25s, background .15s;
  pointer-events: none;
}
#back-to-top.btt-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#back-to-top:hover { background: #d97706; }

@media (max-width: 1279px) {
  .nav-cta-stack { display: none; }
}
.rubrik-meta-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex: 1;
  cursor: pointer;
}
.rubrik-meta-link:hover .rubrik-title {
  color: #f59e0b;
  text-decoration: underline;
}
/* The homepage header pushes the desktop links right with ml-auto, but they are hidden below xl,
   so the MENU toggle needs its own push to the right edge. */
nav.nav-glass .nav-menu-toggle { margin-left: auto; }
