/* =========================================================
   HEXA TEKNOLOGI KREASINDO — design system
   Tech-futuristic: grid lines, mono labels, glow accents
   ========================================================= */

:root {
  --accent: #84CC16;
  --accent-glow: rgba(132, 204, 22, 0.35);
  --accent-soft: rgba(132, 204, 22, 0.12);

  /* Core palette */
  --ink-0: #FFFFFF;
  --ink-50: #F6F7F5;
  --ink-100: #ECEEEA;
  --ink-200: #DCDFD8;
  --ink-300: #B4B8B0;
  --ink-400: #6E7269;
  --ink-500: #3A3D38;
  --ink-700: #1A1D19;
  --ink-800: #111411;
  --ink-900: #0A0D0B;

  /* Sectional theme tokens (overridden per section) */
  --bg: var(--ink-0);
  --bg-alt: var(--ink-50);
  --fg: var(--ink-900);
  --fg-mute: var(--ink-400);
  --rule: rgba(10, 13, 11, 0.10);
  --rule-strong: rgba(10, 13, 11, 0.20);

  /* Type */
  --font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Spacing & layout */
  --container: 1360px;
  --gutter: 28px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-snap: cubic-bezier(0.7, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg: var(--ink-900);
  --bg-alt: var(--ink-800);
  --fg: var(--ink-0);
  --fg-mute: var(--ink-300);
  --rule: rgba(255, 255, 255, 0.10);
  --rule-strong: rgba(255, 255, 255, 0.22);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-display);
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  overflow-x: hidden;
  cursor: none;
}
@media (max-width: 900px) {
  body { cursor: auto; }
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent); color: #0A0D0B; }

/* ---------- Container ---------- */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Section frame ---------- */
.section {
  position: relative;
  background: var(--bg);
  color: var(--fg);
  border-top: 1px solid var(--rule);
  overflow: hidden;
}
.section[data-theme="dark"] {
  background: var(--ink-900);
  color: var(--ink-0);
  --bg: var(--ink-900);
  --fg: var(--ink-0);
  --rule: rgba(255, 255, 255, 0.10);
  --rule-strong: rgba(255, 255, 255, 0.22);
  --fg-mute: var(--ink-300);
}

/* Background layer (grid / hex / dot / none) */
.section .bg-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 80%);
}
[data-pattern="grid"] .bg-layer {
  background-image:
    linear-gradient(to right, var(--rule) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule) 1px, transparent 1px);
  background-size: 56px 56px;
  animation: grid-pan 28s linear infinite;
}
[data-pattern="dot"] .bg-layer {
  background-image: radial-gradient(circle, var(--rule-strong) 1px, transparent 1.5px);
  background-size: 28px 28px;
}
[data-pattern="hex"] .bg-layer {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='84' height='96' viewBox='0 0 84 96'><g fill='none' stroke='currentColor' stroke-width='1' opacity='0.18'><path d='M21 0 L63 0 L84 36 L63 72 L21 72 L0 36 Z'/><path d='M63 72 L84 96'/><path d='M21 72 L0 96'/></g></svg>");
  background-size: 84px 96px;
  color: var(--fg);
  animation: grid-pan 36s linear infinite reverse;
}
[data-pattern="none"] .bg-layer { display: none; }

@keyframes grid-pan {
  0% { background-position: 0 0; }
  100% { background-position: 56px 56px; }
}

.section > .wrap { position: relative; z-index: 2; padding-block: clamp(80px, 10vw, 140px); }

/* ---------- Common type ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-mute);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--accent);
  display: inline-block;
  border-radius: 1px;
  box-shadow: 0 0 12px var(--accent-glow);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.h-display {
  font-size: clamp(48px, 7.6vw, 128px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
}
.h-display em {
  font-style: normal;
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 400;
}
.h-display .outline {
  -webkit-text-stroke: 1.5px currentColor;
  color: transparent;
  font-style: italic;
  font-weight: 400;
}
.h-display .outline-accent {
  -webkit-text-stroke: 2px var(--accent);
  color: transparent;
  font-style: italic;
  font-weight: 400;
  text-shadow: 0 0 24px var(--accent-glow);
}
.h-section {
  font-size: clamp(36px, 4.8vw, 72px);
  line-height: 1;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
}
.h-card {
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-weight: 500;
  margin: 0;
}

.lede {
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.55;
  color: var(--fg-mute);
  max-width: 56ch;
  text-wrap: pretty;
}

.mono { font-family: var(--font-mono); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 22px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: transparent;
  color: var(--fg);
  transition: all 280ms var(--ease);
  position: relative;
  overflow: hidden;
}
.btn .arrow {
  width: 18px; height: 18px;
  transition: transform 280ms var(--ease);
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:hover .arrow { transform: translateX(4px) rotate(-45deg); }

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #061309;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn.primary:hover {
  color: #061309;
  box-shadow: 0 0 30px 0 var(--accent-glow);
  transform: translateY(-1px);
}
.btn.primary .dot {
  width: 6px; height: 6px;
  background: #061309;
  border-radius: 50%;
}

/* ---------- Header / Nav ---------- */
.nav-shell {
  position: fixed;
  top: 14px;
  left: 0; right: 0;
  z-index: 100;
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 22px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(10, 13, 11, 0.62);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-radius: 999px;
  color: #fff;
  transition: background 200ms var(--ease);
}
.nav .brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.nav .brand .glyph {
  width: 26px; height: 26px;
  display: grid; place-items: center;
}
.nav .brand .glyph svg { overflow: visible; }
.nav .brand .glyph path { transition: all 600ms var(--ease); }
.nav:hover .brand .glyph path.spin { transform-origin: 14px 14px; }
.nav-links {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  position: relative;
  text-transform: uppercase;
  color: rgba(255,255,255,0.78);
  transition: color 200ms var(--ease);
}
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-links a.active::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  z-index: -1;
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 4px;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}
.nav .cta {
  margin-left: 8px;
  height: 40px;
  padding: 0 18px;
  background: var(--accent);
  color: #061309;
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: none;
  font-weight: 500;
}
.nav .cta:hover { box-shadow: 0 0 24px var(--accent-glow); }
.nav .menu-btn {
  display: none;
  height: 40px; width: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: none;
  color: #fff;
  align-items: center; justify-content: center;
}

@media (max-width: 900px) {
  .nav-links, .nav .cta { display: none; }
  .nav .menu-btn { display: inline-flex; }
}

/* ---------- Mobile menu sheet ---------- */
.menu-sheet {
  position: fixed;
  inset: 0;
  background: var(--ink-900);
  color: #fff;
  z-index: 200;
  display: none;
  flex-direction: column;
  padding: 28px var(--gutter);
}
.menu-sheet.open { display: flex; }
.menu-sheet .top { display: flex; justify-content: space-between; align-items: center; }
.menu-sheet nav {
  margin-top: 60px;
  display: flex; flex-direction: column; gap: 12px;
  font-family: var(--font-display);
  font-size: 44px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.menu-sheet nav a { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
.menu-sheet nav a .num { font-family: var(--font-mono); font-size: 12px; color: var(--fg-mute); margin-right: 14px; }

/* ---------- Footer ---------- */
.footer {
  background: var(--ink-900);
  color: #fff;
  padding: 80px 0 40px;
  position: relative;
  overflow: hidden;
}
.footer .colossus {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 13vw, 200px);
  line-height: 0.85;
  letter-spacing: -0.04em;
  margin: 30px 0 50px;
  white-space: nowrap;
  max-width: 100%;
  -webkit-text-stroke: 1.5px rgba(255,255,255,0.4);
  color: transparent;
  position: relative;
}
.footer .colossus .h { color: var(--accent); -webkit-text-stroke: 1.5px var(--accent); }
.footer .grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  border-top: 1px solid rgba(255,255,255,0.12);
  border-bottom: 1px solid rgba(255,255,255,0.12);
  padding: 40px 0;
}
.footer h4 {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.5);
  margin: 0 0 18px;
  font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { color: rgba(255,255,255,0.85); transition: color 200ms var(--ease); }
.footer ul a:hover { color: var(--accent); }
.footer .legal {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  padding-top: 28px;
}
@media (max-width: 900px) {
  .footer .grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Custom cursor ---------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 18px; height: 18px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition: width 240ms var(--ease), height 240ms var(--ease), background 200ms var(--ease);
  transform: translate(-50%, -50%);
}
.cursor.dot {
  background: var(--accent);
  width: 6px; height: 6px;
}
.cursor.big {
  width: 60px; height: 60px;
  background: var(--accent);
  mix-blend-mode: difference;
}
@media (max-width: 900px) {
  .cursor { display: none; }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }

.reveal-line {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}
.reveal-line > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 900ms var(--ease);
}
.reveal-line.in > span { transform: translateY(0); }

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}
.stagger.in > * { opacity: 1; transform: translateY(0); }
.stagger.in > *:nth-child(1) { transition-delay: 60ms; }
.stagger.in > *:nth-child(2) { transition-delay: 140ms; }
.stagger.in > *:nth-child(3) { transition-delay: 220ms; }
.stagger.in > *:nth-child(4) { transition-delay: 300ms; }
.stagger.in > *:nth-child(5) { transition-delay: 380ms; }
.stagger.in > *:nth-child(6) { transition-delay: 460ms; }

/* ---------- Marquee ---------- */
.marquee {
  display: flex;
  overflow: hidden;
  border-block: 1px solid var(--rule);
  background: var(--bg);
}
.marquee-track {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 60px;
  padding: 22px 30px;
  animation: marquee 36s linear infinite;
  white-space: nowrap;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 60px;
}
.marquee-item .star {
  width: 20px; height: 20px;
  color: var(--accent);
}
.marquee-item.outline {
  -webkit-text-stroke: 1.5px currentColor;
  color: transparent;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---------- Page header (inner pages) ---------- */
.page-head {
  background: var(--ink-900);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 200px 0 100px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.page-head .bg-layer {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
}
.page-head .crumbs {
  display: flex; gap: 12px; align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 30px;
}
.page-head .crumbs .sep { color: var(--accent); }
.page-head .meta {
  display: flex;
  gap: 60px;
  margin-top: 60px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 40px;
  flex-wrap: wrap;
}
.page-head .meta > div { min-width: 140px; }
.page-head .meta .label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
}
.page-head .meta .val {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.page-head .meta .val .accent { color: var(--accent); }

/* ---------- Hex glyph (subtle accent) ---------- */
.hex-mark {
  width: 16px; height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

/* ---------- Tweaks panel base override (we handle our own) ---------- */
.tweak-fab {
  position: fixed; bottom: 22px; right: 22px;
  z-index: 90;
}

/* ---------- Helpers ---------- */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.between { justify-content: space-between; }
.gap-12 { gap: 12px; } .gap-20 { gap: 20px; } .gap-32 { gap: 32px; }
.center { align-items: center; }
.text-mute { color: var(--fg-mute); }
.divider { height: 1px; background: var(--rule); margin: 40px 0; }
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.tag .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* Numbers (ticker) */
.ticker {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* Magnetic targets */
.magnet { transition: transform 320ms var(--ease); }

/* Scanline subtle effect on dark sections */
.scan-overlay {
  pointer-events: none;
  position: absolute; inset: 0; z-index: 1;
  background: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent 3px,
    rgba(255,255,255,0.015) 3px,
    rgba(255,255,255,0.015) 4px
  );
  mix-blend-mode: overlay;
}
