:root {
  --brand: #3E2874;
  --brand-dark: #241748;
  --accent: #C22420;
  --accent-light: #FF6259;
}

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: #1f2430;
}

.font-display {
  font-family: 'Poppins', system-ui, sans-serif;
}

/* Sticky nav transition */
#navbar {
  transition: background-color .3s ease, box-shadow .3s ease, padding .3s ease;
}
#navbar.scrolled {
  background-color: rgba(255,255,255,0.96);
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  backdrop-filter: blur(8px);
}
#navbar.scrolled nav a,
#navbar.scrolled #menu-btn {
  color: var(--brand-dark);
}
#navbar.scrolled nav a:hover {
  color: var(--accent);
}

/* Logo hover chip: soft light glow on dark hero, soft accent tint once scrolled */
.logo-link:hover {
  background-color: rgba(255,255,255,0.14);
}
#navbar.scrolled .logo-link:hover {
  background-color: rgba(194,36,32,0.1);
}

.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: width .25s ease;
}
.nav-link:hover::after { width: 100%; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Card hover lift */
.card-lift {
  transition: transform .25s ease, box-shadow .25s ease;
}
.card-lift:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -12px rgba(0,0,0,0.18);
}

/* Gallery item */
.gallery-item {
  cursor: zoom-in;
  overflow: hidden;
}
.gallery-item:focus-visible {
  outline: 3px solid var(--accent-light);
  outline-offset: 2px;
}
.gallery-item img {
  transition: transform .5s ease;
}
.gallery-item:hover img {
  transform: scale(1.08);
}

/* Lightbox */
#lightbox {
  transition: opacity .25s ease;
}
#lightbox.hidden-lb {
  opacity: 0;
  pointer-events: none;
}


/* Hero gradient overlay */
.hero-overlay {
  background: linear-gradient(115deg, rgba(36,23,72,0.92) 0%, rgba(36,23,72,0.78) 40%, rgba(36,23,72,0.55) 100%);
}

::selection {
  background: var(--accent);
  color: white;
}

/* PRODUK — precision-engineering catalog: dark variant of the brand purple
   (no new hue), a faint blueprint grid nodding to CAD/spec drawings, and
   HUD corner brackets echoing the CMM measurement gear shown in Fasilitas. */
.produk-section {
  background: radial-gradient(130% 90% at 12% 0%, #201148 0%, #120a2c 45%, #08050f 100%);
}

.produk-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: .05;
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
          mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
  pointer-events: none;
}

.badge-tech {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  appearance: none;
  font: inherit;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.04);
  padding: .4rem 1rem;
  font-size: .75rem;
  font-weight: 600;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.badge-tech:hover {
  border-color: rgba(255,255,255,.32);
  color: #fff;
}
.badge-tech:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: 2px;
}
.badge-tech.is-active {
  border-color: var(--accent-light);
  background: rgba(255,98,89,.14);
  color: #fff;
}

.produk-card.is-filtered-out { display: none; }

/* Rolling track: continuous auto-scroll (JS), pauses on hover/touch, drag to browse on desktop */
.produk-track {
  position: relative;
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: .5rem 1.5rem 1.75rem;
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
@media (min-width: 1024px) {
  .produk-track { padding-left: 2.5rem; padding-right: 2.5rem; }
}
.produk-track::-webkit-scrollbar { display: none; }
.produk-track.is-dragging { cursor: grabbing; }

.produk-fade {
  position: absolute;
  top: 0;
  bottom: 28px;
  width: 40px;
  pointer-events: none;
  z-index: 2;
}
@media (min-width: 640px) {
  .produk-fade { width: 72px; }
}
.produk-fade-left { left: 0; background: linear-gradient(90deg, #08050f, transparent); }
.produk-fade-right { right: 0; background: linear-gradient(270deg, #08050f, transparent); }

.produk-card {
  flex: 0 0 auto;
  width: 168px;
}
@media (min-width: 640px) {
  .produk-card { width: 220px; }
}

.produk-card-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
  border: 1px solid rgba(255,255,255,.12);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease;
}
@media (min-width: 640px) {
  .produk-card-frame { padding: 1.75rem; }
}
.produk-card-frame:hover,
.produk-card-frame:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255,98,89,.55);
  box-shadow: 0 0 0 1px rgba(255,98,89,.25), 0 24px 40px -18px rgba(0,0,0,.65);
}
.produk-card-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.4));
  -webkit-user-drag: none;
  user-select: none;
}

.produk-card-index {
  position: absolute;
  top: 10px;
  left: 12px;
  font-family: ui-monospace, Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: .65rem;
  font-weight: 600;
  color: rgba(255,255,255,.62);
}

.produk-card-corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,.2);
  transition: border-color .35s ease;
}
.produk-card-frame:hover .produk-card-corner,
.produk-card-frame:focus-visible .produk-card-corner {
  border-color: rgba(255,98,89,.75);
}
.produk-card-corner-tl { top: 8px; left: 8px; border-right: none; border-bottom: none; border-top-left-radius: 4px; }
.produk-card-corner-tr { top: 8px; right: 8px; border-left: none; border-bottom: none; border-top-right-radius: 4px; }
.produk-card-corner-bl { bottom: 8px; left: 8px; border-right: none; border-top: none; border-bottom-left-radius: 4px; }
.produk-card-corner-br { bottom: 8px; right: 8px; border-left: none; border-top: none; border-bottom-right-radius: 4px; }

.produk-card-tag {
  margin-top: .75rem;
  font-family: ui-monospace, Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: .6875rem;
  letter-spacing: .04em;
  color: rgba(255,255,255,.6);
  text-align: center;
}
