:root {
  --bg: #0b0b0b;
  --text: #f1f1f1;
  --muted: #b3b3b3;
  --primary: #ffffff;
  --primary-900: #888888;
  --card: #151515;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Dune Rise', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, Noto Sans;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Enforce Dune Rise across common text elements */
html, body, h1, h2, h3, h4, h5, h6, p, small, a, button, input, textarea, select, label {
  font-family: 'Dune Rise', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, Noto Sans !important;
}

main { flex: 1 0 auto; }

/* WebGL canvas fixed background */
#webgl-canvas-container {
  position: fixed;
  inset: 0;
  z-index: 0;
}
#webgl-canvas-container spline-viewer {
  display: block;
  width: 100vw;
  height: 100vh;
}

.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(6px);
  background: transparent; /* selaras dengan landing: lebih minimal dan tembus pandang */
  border-bottom: none;
  z-index: 5;
}
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center; /* nav di tengah secara default */
  padding: 14px 16px;
  height: 56px;
}
.header-inner .brand { margin-right: auto; }
.header-inner .nav { margin: 0 auto; }
.brand {
  font-weight: 700;
  letter-spacing: 0.08em;
}
.nav { display: flex; gap: 22px; align-items: center; }
.nav a {
  color: var(--text);
  text-decoration: none;
  opacity: 0.75; /* sentuhan landing: sedikit redup default */
  text-transform: uppercase;
  letter-spacing: 0.14em; /* sentuhan landing: jarak huruf lebih longgar */
  font-weight: 400;
  font-family: 'Dune Rise', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell;
  padding: 6px 0; /* sentuhan landing: lebih ringkas */
  border-bottom: 1px solid transparent; /* underline halus */
  transition: opacity 200ms ease, border-color 200ms ease;
}
.nav a:hover { opacity: 1; border-bottom-color: rgba(255,255,255,0.5); }

.btn { border: 1px solid #3e3e3e; padding: 10px 18px; border-radius: 999px; }
.btn-sm { padding: 8px 14px; }
.btn-primary { background: transparent; color: var(--text); border-color: #6a6a6a; font-weight: 400; font-family: 'Dune Rise', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell; text-transform: uppercase; letter-spacing: 0.12em; }
.btn-primary:hover { border-color: #8a8a8a; }
.btn-secondary { background: transparent; color: var(--text); border-color: transparent; text-decoration: underline; }

.hero { min-height: 78vh; display: grid; align-items: center; position: relative; z-index: 1; }
.hero-content { max-width: 800px; }
.hero h1 { font-size: clamp(40px, 7vw, 68px); line-height: 1.03; margin: 0 0 18px; font-weight: 800; }
.hero p { color: var(--muted); margin: 0 0 26px; font-weight: 300; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Animated Enter CTA */
.btn-enter {
  border: 1px solid #5a5a5a;
  color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 400;
  font-family: 'Dune Rise', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.cta-enter {
  position: relative;
  overflow: hidden;
  animation: floatY 4.5s ease-in-out infinite;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.cta-enter::after {
  content: "";
  position: absolute;
  top: 0; left: -120%; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
  width: 220%;
  transform: translateX(0);
  animation: shine 3.6s ease-in-out infinite;
}
.cta-enter:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
  border-color: #8a8a8a;
}

@keyframes floatY {
  0% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}
@keyframes shine {
  0% { transform: translateX(0); opacity: 0.0; }
  30% { opacity: 0.7; }
  60% { opacity: 0.0; }
  100% { transform: translateX(120%); opacity: 0.0; }
}

/* Landing Mode — emulate minimal portfolio style without changing base font */
.landing-mode .site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background: transparent;
  border-bottom: none;
}
.landing-mode .header-inner {
  justify-content: center;
  padding: 18px 16px;
}
.landing-mode .brand {
  display: none;
}
.landing-mode .nav {
  gap: 28px;
}
.landing-mode .nav a {
  opacity: 0.75;
  letter-spacing: 0.14em;
  font-weight: 400;
  font-family: 'Dune Rise', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.landing-mode .nav a:hover {
  opacity: 1;
  border-bottom-color: rgba(255,255,255,0.5);
}
.landing-mode .hero {
  min-height: 100vh;
}
.landing-mode .hero-content {
  max-width: 700px;
  text-align: center;
  margin-inline: auto;
}
.landing-mode .hero h1 {
  font-size: clamp(40px, 7.2vw, 72px);
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 0 0 12px;
}
.landing-mode .hero p {
  font-size: 17px;
  margin: 0 auto;
}
.landing-mode .actions {
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px; /* spasi proporsional antara tombol dan headline */
  margin-top: 36vh; /* turunkan tombol lebih ke bawah layar */
}
.landing-mode .btn-enter {
  background: transparent;
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 6px;
}
.landing-mode .cta-enter {
  animation-duration: 5s; /* sedikit lebih lambat, lebih elegan */
}

/* Option Boxes on Features — styled like ENTER CTA */
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; position: relative; z-index: 1; max-width: none; margin-inline: 0; justify-items: start; }
@media (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features-grid { grid-template-columns: 1fr; } }

.option-box {
  display: block;
  padding: 18px 22px;
  border: 1px solid #5a5a5a;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  color: var(--text);
  text-decoration: none;
  font-family: 'Dune Rise', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  animation: floatY 4.5s ease-in-out infinite;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, opacity 220ms ease;
}
.option-box::after {
  content: "";
  position: absolute;
  top: 0; left: -120%; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
  width: 220%;
  transform: translateX(0);
  animation: shine 3.6s ease-in-out infinite;
}
.option-box:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 6px 24px rgba(0,0,0,0.35); border-color: #8a8a8a; }
.option-box h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: 0.12em; }
.option-box p { margin: 0; color: var(--muted); font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell; text-transform: none; letter-spacing: 0.02em; }

.features { padding: 52px 0; position: relative; z-index: 1; }
.features h2, .about h2, .contact h2 { font-size: 30px; margin: 0 0 20px; letter-spacing: 0.02em; }
/* Features heading and subheading styling to match reference image */
.features .section-title {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 24px;
  margin-bottom: 4px;
}
.features .section-desc {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card { background: var(--card); border: 1px solid #242424; border-radius: 12px; padding: 18px; }
.card h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: 0.02em; }
.card p { margin: 0; color: var(--muted); font-weight: 300; }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

/* Audio toggle — posisikan di kanan header */
.audio-toggle { margin-left: auto; }
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  /* Mobile refinements */
  .header-inner { height: 64px; padding: 10px 12px; }
  .nav { gap: 12px; }
  .nav a { letter-spacing: 0.08em; font-size: 12px; padding: 4px 0; }
  .audio-toggle { position: absolute; right: 12px; bottom: 8px; top: auto; transform: none; font-size: 11px; padding: 6px 10px; letter-spacing: 0.08em; }
  .features .section-title { font-size: 20px; letter-spacing: 0.14em; }
  .features .section-desc { font-size: 11px; letter-spacing: 0.10em; margin-bottom: 14px; }
  .features-grid { grid-template-columns: 1fr; gap: 12px; max-width: none; width: 100%; margin-inline: 0; }
  .option-box { padding: 16px 16px; }
  .option-box h3 { font-size: 16px; letter-spacing: 0.10em; }

  /* Mobile dropdown nav */
  .mobile-menu-toggle {
    display: inline-block;
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    padding: 6px 10px;
    font-size: 12px;
    letter-spacing: 0.08em;
    border: 1px solid #3e3e3e;
    border-radius: 999px;
    background: transparent;
    color: var(--text);
  }
  /* Hamburger styling */
  .mobile-menu-toggle.hamburger { width: 32px; height: 28px; padding: 4px 6px; border-radius: 8px; border-color: #3e3e3e; }
  .mobile-menu-toggle.hamburger .bar { display: block; width: 20px; height: 2px; background: var(--text); margin: 4px 0; transition: transform 160ms ease, opacity 160ms ease; }
  body.menu-open .mobile-menu-toggle.hamburger .bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  body.menu-open .mobile-menu-toggle.hamburger .bar:nth-child(2) { opacity: 0; }
  body.menu-open .mobile-menu-toggle.hamburger .bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .brand { display: none; }
  .nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    padding: 10px 12px;
    background: rgba(21,21,21,0.92);
    border-top: 1px solid #2a2a2a;
    backdrop-filter: blur(6px);
    flex-direction: column;
    gap: 8px;
    z-index: 6;
  }
  body.menu-open .nav { display: flex; }
}

.about, .contact { padding: 52px 0; position: relative; z-index: 1; }
.about p, .contact p { color: var(--muted); font-weight: 300; }

.site-footer { padding: 42px 0; color: var(--muted); position: relative; z-index: 1; letter-spacing: 0.02em; margin-top: auto; }

/* === Page Slide Transition === */
/* Entry: halaman baru meluncur masuk dari kanan, Exit: halaman lama geser ke kiri */
body.page-slide-pre-enter {
  opacity: 0;
  transform: translateX(16px);
}

body.page-slide-enter {
  opacity: 1;
  transform: translateX(0);
  transition: transform 120ms ease-out, opacity 120ms ease-out;
}

body.page-slide-exit {
  opacity: 0;
  transform: translateX(-16px);
  transition: transform 120ms ease-in, opacity 120ms ease-in;
}
/* === Music Config Panel === */
.music-config-panel {
  position: fixed;
  top: 64px;
  right: 16px;
  background: rgba(20, 20, 24, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px;
  z-index: 20;
  width: 280px;
  color: #eaeaea;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.music-config-panel .panel-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.music-config-panel h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
}
.music-minimize-btn {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 999px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  transition: transform 120ms ease, background 160ms ease;
}
.music-minimize-btn:hover { background: rgba(255,255,255,0.12); transform: translateY(-1px); }
.music-minimize-btn:active { transform: translateY(1px); }
.music-config-panel .row { margin-top: 8px; }
.music-config-panel .row input[type="file"] { width: 100%; }
.music-config-panel .row .btn { margin-right: 8px; margin-top: 8px; }
.music-config-hidden { display: none; }
.btn-secondary { background-color: #3b3f5c; color: #fff; border: none; }
.btn-secondary:hover { background-color: #4a5070; }

/* Tombol panel Music Config bergaya ENTER dan full-width */
.music-config-panel .btn-enter {
  display: block;
  width: 100%;
  margin-right: 0;
}

/* Toggle tampil seperti tombol tab/pill di header */
.music-config-toggle {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: 999px;
  color: var(--text);
  border: 1px solid #5a5a5a;
  font-family: 'Dune Rise', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  margin-left: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  position: relative;
  overflow: hidden;
  animation: floatY 4.5s ease-in-out infinite;
}
.music-config-toggle:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 6px 24px rgba(0,0,0,0.35); border-color: #8a8a8a; }
.music-config-toggle:active { transform: translateY(1px); }

/* State minimized: panel menjadi pill tab kecil */
.music-config-panel.music-minimized {
  width: auto;
  padding: 8px 12px;
  border-radius: 999px;
}
.music-config-panel.music-minimized .row { display: none; }
.music-config-panel.music-minimized h4 { margin: 0; font-size: 12px; }

/* Launcher tombol untuk membuka panel konfigurasi musik — tampil seperti ENTER */
.music-config-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 11;
}
.mobile-menu-toggle { display: none; }

/* === Rotate Notice Overlay (Mobile Portrait) === */
.rotate-notice {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
  z-index: 9999;
  text-align: center;
}
.rotate-card {
  background: rgba(20,20,20,0.9);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 18px 20px;
  max-width: 380px;
  color: var(--text);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.rotate-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.rotate-card p {
  margin: 0;
  color: var(--muted);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell;
}
.rotate-icon {
  font-size: 28px;
  margin-bottom: 10px;
}

/* Toggle tampil ketika body diberi class */
body.show-rotate-notice .rotate-notice { display: flex; }

/* Sedikit pengaturan untuk layar sangat kecil */
@media (max-width: 360px) {
  .rotate-card { padding: 14px 16px; }
  .rotate-card h3 { font-size: 14px; }
  .rotate-icon { font-size: 24px; }
}